Running PICOPi on the Retroflag GPi case
I just got a Retroflag GPi case, which is a cool little enclosure for a Raspberry Pi 0(W) that has the form factor of a GameBoy. This gadget is intended primarily for emulation, but I REALLY wanted to use it as a portable pico-8.
Spoiler alert - I did.
Most tutorials for the GPi case focus on getting RetroPie running, and there are also resources out there for getting pico-8 running in conjunction with RetroPie. This is fine, but I really wanted a gadget that quickly boots into pico-8, no questions asked. Luckily, a software engineer going by Gamaral developed an image for all raspberry pi models that fast-boots into pico-8. This is, to my knowledge, the closest we can get today to dedicated pico-8 hardware.
Goal of this tutorial
This tutorial will focus on getting PICOPi running properly on a raspberry pi 0(W) in conjunction with the GPi case. You can find all of these materials for purchase on most online retailers. There are plenty of tutorials showing how to build the thing once you get all the materials (non-trivial!). I will not cover this.
Physical stuff you need
- Retroflag GPi case
- Raspberry pi 0 (the W model has wifi onboard, but the setup is the same, and it doesn't matter since the picopi image has no widi support anyway)
- SD card formatted to FAT32
Software you need
- Patch files for GPi case http://download.retroflag.com/
- PICOPi download for Raspberry Pi A-B-0 https://guillermoamaral.com/read/picopi/
- Raspberry Pi build of pico-8 (You can get this from the downloads page here on lexaloffle)
What you need to do
NOTE Since I am not sure about the licensing on the code I am linking to, I have opted not to copy-paste the exact code you will be copying around. Trust me, though, it's pretty easy.
DOUBLE NOTE as with all DIY projects, you are taking on the risk yourself in installing all of this software - I am not responsible for any bricked hardware.
- Assemble the GPi case and the Pi 0 (I am not going to help you with this)
- Insert your sd card into a computer (win/linux/mac doesnt matter)
- Follow the PICOPi directions for setting up your SD card
- Here is where things get a tiny bit tricky. Extract the contents of the GPI case patch somewhere on your computer, then navigate to GPi_Case_patch\GPi_Case_patch\patch_files. You should see two items here, config.txt and a directory named "overlays".
- Open config.txt, and copy all the contents of the file to you clipboard. Navigate to your SD card, open config.txt, and paste all of these contents ABOVE all the contents on the SD card. Your config.txt on your sd card should flow like this:
- All text from GPI patch config.txt
- All text from PICOpi config.txt
- In SD\config.txt, navigate to the #OVERCLOCK section, and remove the pound sign from all the overclock specifications. You need these to run pico8 properly
- Copy the overlays directory from the GPi patch, and copy this to the root of your SD card.
- The GPi instructions might have told you to flip the "safe shutdown" switch under the battery cover to "on." We want it "off," since PICOPi already has safe shutdown built in to it.
- Thats it! plug in your sd card and you should be ready to go! I was impressed by how easy this was.
You will need to pull the sd card in and out of the case to load new games, since PICOPi has no wifi support, but that is a small price to pay for the ULTIMATE pico8 handheld. Enjoy!
I made this in about an hour for ld44's jam! Not much to see here, just really wanted to see if I could throw something together that fast.
Arrows to move. Collect booty from the shipwreck. Find a good ship and sale away to paradise.
My best time is 28 seconds (100% completion). Can you beat it?
Ludum Dare entry for this: https://ldjam.com/events/ludum-dare/44/risk-it-all-for-booty
Hungry Harry is back! Help Harry as he travels around the world putting a stop to the mushroom gang!
HOW TO PLAY:
Walk - arrow keys
Jump - Z or C
Lick things - X
High Jump - jump while licking
Long Jump - jump while licking AND holding a direction.
GOAL: Find the portal at the end of each level. Harry will get hungry over time, so make sure to eat enemy mushrooms as well as berries you find sitting around the levels.
Blue mushrooms are tough and can't be licked normally. If you eat a spicy pepper, Harry will turn red-hot for a few seconds. Use this time to eat the blue mushrooms.
If you lick while in the air, Harry can get a little extra boost. By licking on the ground and then jumping soon after, Harry can jump extra high or extra far, depending on whether or not you are holding a direction key down.
See if you can find every present in the game! You can get lots of berries from presents by licking them.
Is Harry too easy for you? Pause the game with ENTER and choose hard mode!
v1.1 - fixed possible softlock in level 2.
v1.2 - made hard mode accessible from menu instead of a weird code noone can do. Fixed some trouble areas.
v1.3 - fixed present count.
Wow! I finally made a finished version of my LD39 game. Overall, I am fairly satisfied with this game, if not super enthused. I had to make many concessions to fit it into the token count. However, it is a surprisingly fully-featured procedural platformer, and it is something I am proud of.
Help Harry escape the procedurally generated caves!
How to play:
Walk and climb - arrow keys
Burp (attack) - X
Jump - Z or C
Dig - down arrow
- Harry will starve if you don't eat mushrooms along the way. Make sure to grab them!
- the caves are randomly generated every game. If you get a tough set of caves, don't be afraid to try again!
- If you get enough mushrooms, a powerup will appear above harry. GRAB THESE! they are they key to running faster, jumping higher, and burping harder!
- when harry digs on flat ground, he will pile up the ground behind him. Use this to build platforms to help you climb higher.
- the escape for each level is at the top, in the middle. If you find a way to break the ceiling, however, you can use that too!
- Your hunger will occur at a faster rate each level. Mushrooms are almost always worth a detour.
- You can jump for quite a while after walking off a ledge. Use this to your advantage!
v1.1 - Oct 31 '17
- added text to harry's intro that points out your burping ability. Non-pico8 players did not know to try pushing X.
- increased frequency factor of mushrooms from 1.5 to 2. SHould make things a bit easier.
Poor Harry! He was taking a nap when the ice broke from under him! Help him climb out of the caves, and make sure he gets enough mushrooms to eat before he starves!
Arrow keys - move
Z - jump
Down - dig a hole
Up - climb most surfaces
I can't believe I finished this in time. It is pretty bare bones, but I am happy with it. I wish I had the time to add in enemies, but there you go.
Here is the link on Ludum Dare's site: https://ldjam.com/events/ludum-dare/39/hungry-harrys-climb
Congrats to everyone who finished LD39!
--edit Aug 1:
I've tried to clear up some confusion for LD39 participants. It is now hopefully clearer that the first level is actually a level that can be beaten. Also, i added a super-jump (hold up and jump) that should help with some of the trickier levels. The super-jump burns food though, so don't go crazy.
I removed the super-jump. This felt against the spirit of ludum dare, in that i was adding an ability after the competition ended. However, i DID fix the level generator so that all levels can be beaten - i feel that this was a bug fix.
-- edit 3
People keep digging through the floor, so I had to hardcode that to be impossible. Fix made for LD participants
*Edit July 28
I've been happy with this little cave-generator that i made. I might want to use some of it for Ludum Dare this weekend, so I am releasing the current code under the creative commons license.
You can try playing it now! it takes a few seconds to generate a level. There is no "win" state currently, but i envision a game where you have to avoid obstacles, collect stuff, and climb to the top of the cave.
I am using the algorithm i describe below, with a few improvements. If the cave that gets generated is "empty," which would make it impossible to climb, the algorithm will stick some bridges and ladders to climb into the structure. This process is dynamic, so if the cave is dense fewer will generate. Likewise, if you have a very dense cave, there is a safety-check that will make sure the cave can be completed by punching holes through blockages.
If you are interested in using some of this code and have questions, please let me know. The level-generation is almost entirely separate from the character code, so you can choose one or the other. If you are interested, I recommend looking at the callback functions (_init, _update60, and _draw) to understand the basic flow first. There is a lot of code here, about 3500 tokens, but most of it is lumped in the level generation and can be kept as is.
I imagine this being useful for quickly banging out a metroidvania or something along those lines. I hope you enjoy!
I recently started making a little game about a critter who falls into a cave and has to climb out. I wanted to create a big world, but I didn't want to actually design it, so i wrote a little script to generate a large cave-like structure.
The algorithm is pretty slow - it is based on a paper i read in grad school (but cannot remember) for modeling the nucleation and growth of particles in solution. I start with an empty space (64x128 array of zeros) and first create walls by making all of the border values 1. Then, I 'seed' the space by randomly selecting a fraction of the array locations and setting them to 1. I then run a kinetic-monte-carlo simulation. Every step, every single '1' in the array a small chance that it will attempt to move 1 space in a random direction. In chemistry, this represents the random movements small particles or even molecules will make in solution, brownian motion.
If a '1' element in the array is next to another '1', a stickiness factor is applied, making it harder for the element to move away - this encourages the growth of clusters. it is possible to modify this stickiness factor to create more spherical shapes, long shapes, etc. I could also seed the space with regular shapes like boxes or lines and use this algorithm to make them appear more organic.
Anyways, in the demo above, you can watch the simulation run - as it runs, you can see clusters forming. It usually takes me about 4000 frames before the level looks nice (i need to speed up the code!). There's actually a game here too - press z to hop into the caves and explore!
I cooked this up pretty quickly, and I really like how it looks. I will definitely flesh this out into a full game, but I thought this was a fun little demo so I decided to share.
9HOLE is a platformer where you are also golfing! Hit the ball to the hole (under par!) and then get to the hole yourself!
X: Swing your club (hold the button for a harder swing!)
WHEN THE BALL IS AIRBORN:
Arrows: Move the ball (a little bit!)
C,Z: releas ball control and control the character again.
SECRET: if you find the game a little easy, try pressing "Up" repeatedly on the title screen!
I will be doing more of a post-mortem in a bit, but I wanted to get this game online. Happy playing!
- added tutorial text to level 1
- fixed (hopefully!) spraying particles when your ball sits next to a wall
- increased particle counts and lifetimes across the board (makes the game a little flashier)
- fixed level 2 so that there is no point of no return
- adjusted a jump on level 5 so it is a little more forgiving
in the future:
- bug fixes as they get reported
- I would like to flesh out the music with one more layer
- ...that's it? I kind of feel like I've explored this idea to my content.
Directions for 9Hole, a golfing-platformer.
Arrows to move
Button 3 (C or Z) to jump
Button 4 (X) to swing your club. Hold the button and release for a stronger swing!
When the ball is airborn:
- arrows to influence its movement (VERY important) - arrows have more effect after the ball has bounced off something
- press jump to return control to the player before the ball starts moving
Goal: Get the ball to the flag under par, then get yourself there in one piece!
I really, REALLY wanted to wrap this game up, but due to events in my personal life coming up I may not get a chance to finish this anytime soon. I really wanted to share what I have, so here is my first game, 9Hole!
It is heavily a work in progress, and it is missing:
-all sorts of polish
I am really enjoying Pico-8, and it is a testament to the quality of the console that I was able to bang this out in a few free hours (I estimate I've played with Pico-8 about 10 hours total, from downloading to publishing).
One day soon, I hope to finish this. In the meantime, I could use your feedback!
I wanted to make a golf game that didn't involve a timing-based swing mechanic. There is some timing here, but the ball is really controlled well with the arrow keys. It can collect powerups, beat-up turtles, and bounce off springs! I was a little inspired by an old Itchy-and-Scratchy Gameboy game where you platformed and played minigolf. I think the golfing in my game is harder, but the platforming is very simple right now.
Thanks to everyone who has been fooling around here - I have been very inspired by everyone's creations!