Hello #sancho! Now with more colors, sizes, and navigation.
Experimenting with a simple platform game character controller.
- fine-grained collision detection
- more map tiles
- fore/background tiles
- shooting animation
- multiple shots
- double jump
- wall jump
Lack of mouse controls should be no obstacle. Use arrow keys to navigate.
- cursor range limits
- mine counter
- flag marker
- number tiles
- more mines
- game over
- code size optimization
This Wednesday, I opened one of my pico-8 in notepad and realized how simple the format is. I immediately wanted to build tools that write cartridges. The idea that hit me was this: It can be hard to make multi-screen scrolling levels or title screens from tiles, because every image has to be composed of tiles, it would be easier to just paint the image in photoshop, and then have a tool break it into tiles, eliminate duplicate tiles, and write the result into a cartridge file.
So I got started, first step, a bit of code that scrolls a map around the screen. Secondly, make some art that uses the pico8 palette. I made a JASC PAL file based on a screen shot, and used PSP8 to dither the old red-eyed tree frog that's used so much in image processing.
Then wrote some code to read the resulting PNG, break it into 8x8 tiles, and write tiles and resulting map into a cartridge. I'm already writing Lua here, so I used LÖVE, which made reading image files and looking at pixels pretty easy, even though it's not what it was meant for, but who has time to write all this stuff in SDL and C? So that wasn't too hard, and by end of day, I had put up a proof of concept:
Navigate with arrow key, speed up with the first button (keyboard Z or controller A).
The code that generates the cart is really awful, everything happens in love.load(), and there is a ton of string processing that's about as inefficient as you could make it if you wanted to, and the resulting cartridge had way more tiles than you need, because duplicate elimination wasn't done yet. Gotta save some work for version 1.
I wrote a little utility to export PNG files to pico8 cartridge map files. I've got plans to automatically eliminate duplicate tiles and allow arbitrarily sized images, but in the meantime, here is my first proof-of-concept to show that I've got the cartridge format correct, and the basic idea works, using the good old red-eyed tree frog seen in all kinds of image processing demos (the pico8 palette is not too kind to it).
Not that this is not a game, it's an automatically generated cartridge. The real magic is in the generator (which I hope to publish when I'm happy with it).