Log In  

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:

Cart #17433 | 2015-12-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

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.

P#17470 2015-12-04 09:11 ( Edited 2015-12-04 14:13)


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-18 21:01:41 | 0.011s | Q:20