SWIM – My first PICO-8 Game

Click the play button below to try out the game. (You may want to go fullscreen)

I recently got into designing games for the PICO-8 fantasy console. PICO-8 lets you create and share small games – so small that you can encode the logic, graphics, and music in a single png image! It does this through steganography, storing the game information in the least significant bits of each pixel. You can take a screenshot while playing, and PICO-8 takes care of encoding everything in that one screenshot, which serves as the cover for the game.

Making games in PICO-8 feels different than making games in Godot, my default engine. It has no built-in physics, so you have to write functions to handle collisions, motion, and so forth. And there are no objects – the closest you can get is creating a table with attributes to pass into a function. Drawing things on the screen is also much lower level than I am used to, although PICO-8 at least has a decent suite of useful commands for drawing with pixels.

It is possible to create sprites in PICO-8, but there is no built-in way to rotate them. Because of this, I decided to eschew sprites altogether and draw everything from scratch using just code. Everything in SWIM is made up of circles and individually drawn pixels, which allows for rotatable graphics. Something I like a lot is that PICO-8 measures angles such that a full circle is equal to 1 unit. For example, if you want to rotate 180 degrees you add 0.5 to your angle. I wish more engines did this; reasoning in radians or degrees is ugly, annoying, and unnecessary; now that I have experienced trigonometry in normalized units, I never want to go back!