Remix.run Logo
Show HN: Boba, a one button platformer for PICO-8(zeta0134.itch.io)
2 points by zeta0134 6 hours ago | 2 comments

While learning pico8 for use in an upcoming game jam, I implemented a single-button control scheme for a platformer character. It was so fun to see how many different actions I could squeeze into a single button. I fleshed it out with as many screens of level as I could squeeze into pico8's tiny constraints, and polished it as well as I could.

It certainly has a bit of a learning curve, but I think it turned out pretty well all things considered. The entire project took about three weeks, including code, pixel art, and music. I'm really pleased with pico8's built-in editor and some smart choices in the music tracker. It's limited, but the tools I really needed are all in there.

Enjoy!

roshiya 6 hours ago | parent [-]

Curious which part ended up being the hardest to fit into PICO-8's limits code size, art, or music?

zeta0134 6 hours ago | parent [-]

By far the most irritating limitation is code size. This is a fantasy console, but the Lua VM is compressed into some sort of bytecode stream with a hard limit on the number of "tokens" (basically whole words) in the code. This leads to some oddities, like "e.pos.x" being 5 tokens, while "e.pos_x" is only 3.

My usual platform is NES, and I've got a pretty good handle on how to optimize assembly language to squeeze code down to size, but I haven't really developed that intuition for pico8's Lua implementation. The final version of the game uses 7989/8192 tokens altogether. It just barely squeaks by!

There are some minification tools I could have run, and I think with hindsight there are some architectural changes and code habits I could develop to make this slightly less of an issue. In practice, I'm now learning picotron instead. (It's got actual widescreen! Much more practical for modern displays, I think.)