Log In  
Follow
eth3real
[ :: Read More :: ]

Cart #46188 | 2017-11-12 | Code ▽ | Embed ▽ | No License
5

This is my second upload (first was only music), though still not exactly a game.

The code looks crazy, and probably isn't the most efficient method, but it works! I'd love any tips on things I could do to improve this. Thanks!

-eth3real

P#46090 2017-11-09 23:00 ( Edited 2018-08-25 00:45)

[ :: Read More :: ]

Just started getting familiar with the PICO-8 music editor, it's surprisingly easy to work with once you understand the interface.

Update: Added PICO-8 cart, and changed music slightly. ;)
Update 2: Fixed more of the music, probably as good as it can get on PICO-8 at this point.

Cart #46946 | 2017-12-02 | Code ▽ | Embed ▽ | No License
5

Recording on YouTube (old version now):

If you've never seen / heard of The IT Crowd, here's a video of the intro:

Maybe one day I'll incorporate this into a PICO-8 game. Let me know if you have any suggestions! ;)

P#45897 2017-11-05 14:11 ( Edited 2017-12-08 15:07)

[ :: Read More :: ]

Hello everyone!

I recently ordered myself a PocketCHIP, and while waiting for it to arrive, I needed something to hold me over. After literally waking up in the middle of the night with this idea, I bought a copy of PICO-8 and broke out my Raspberry Pi + Adafruit PiTFT 2.8" and got working.

Fast forward several days of pulling my hair out, since there didn't seem to be any tutorials that A) worked, or B) provided enough detail, I got serious about trying to get a guide together, start to finish. That is to say, I don't want anyone else to go as crazy as I did trying to sort this out.

I'd love to know if this works for you, things that you do differently, or any projects that get made from this!

Components:
PICO-8 v0.1.11
Raspberry Pi version 1 model B
Raspbian Stretch Lite
PiTFT 2.8" with resistive touchscreen (https://www.adafruit.com/product/1601)

Raspberry Pi configuration:
Overclocking: Modest
Memory Split: 44



Raspbian console


Loaded "hello" demo. Resolution is wrong, but I think that should be an easy fix.


Update: resolution fixed, added "-pixel_perfect 0" to commandline arguments.


Resolution fixed!

Update: Now portable! Adding a LiPo battery with a charging / boost converter circuit was very easy:


LiPo battery pack and charging circuit added. Charging circuit is actually a Wemos D1 Mini LiPo shield.


Hug Arena in the airport. Irony was realized once I was actually on the plane.


Without further ado, the tutorial:

# AFTER setting up NEW Raspbian Stretch Lite and configuring network
# NOT tested with other versions of Raspbian, or Desktop environments

# SAFETY NOTE: be careful compiling/running code from the Internet!
# This includes BASH scripts as well as source code!

# from another host, transfer the PICO-8 v0.1.11 binaries to the Raspberry Pi
# NOT tested with other versions of PICO-8
scp pico-8_0.1.11_raspi.zip pi@raspberrypi:~/

# directions starting here are directly on the Raspberry Pi

# unpack the PICO-8 binaries
unzip pico-8_0.1.11_raspi.zip

# update the system
sudo apt-get update
sudo apt-get upgrade

# the following commands are borrowed from:
# https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/

# download SDL2 source
wget https://www.libsdl.org/release/SDL2-2.0.7.tar.gz

# unpack SDL2 source
tar zxvf SDL2-2.0.7.tar.gz

# install dependencies
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake git-core

# build SDL2
cd SDL2-2.0.7

# configure SDL2
# NOTE: this is for Raspberry Pi version 1:
./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
# NOTE: this is for Raspberry Pi versions 2 and 3 (NOT TESTED):
./configure --host=armv7l-raspberry-linux-gnueabihf --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl

# if there were no issues, build and install the binaries
# this will take a while, play some PICO-8 BBS cartridges while you wait ;)
make -j 4
sudo make install

# download and install wiringPi
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

# the following commands are borrowed from:
# https://learn.adafruit.com/running-opengl-based-games-and-emulators-on-adafruit-pitft-displays/pitft-setup

# download and run the PiTFT-FBCP script
# NOTE: after a reboot, your HDMI monitor will likely be unusable, as the resolution will be too low!
# make sure you're able to SSH into your Raspberry Pi before rebooting!
cd ~
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh
sudo bash pitft-fbcp.sh
# select appropriate options for your setup!

# to get fbcp running at startup, we need to make a change to /etc/rc.local
# in my case, /usr/local/bin/fbcp was already added, but not working properly
sudo nano /etc/rc.local
# add "sleep 20 && " BEFORE fbcp so that it looks like this:
sleep 20 && /usr/local/bin/fbcp &
# this must be BEFORE the "exit 0" line!

# after logging in, start PICO-8 by running:
~/pico-8/pico8
# doesn't matter if you use pico8 or pico8_dyn, both will work!

Apologies for the huge code block, I was keeping all of my notes in a text editor while trying different things. Final version of these notes were tested start to finish on a new Raspbian install to verify accuracy. :)

Next steps: make pico-8 run at boot time, controller and touchscreen setup, and get the case back together with a battery pack to make this portable!

Hope this helps someone! Enjoy! :)
-Eth3real

P#45528 2017-10-27 22:38 ( Edited 2017-11-11 23:28)

Follow Lexaloffle:          
Generated 2024-03-28 10:45:01 | 0.069s | Q:12