Pressure Keeper
- Learned Lua and Pico 8 in a limited time period for a game jam.
- Quickly picked up on Pico 8's Init, Update, and Draw cycles as well as sprite rendering and key inputs necessary to make a game loop.
- Leveraged the game jam's theme both in what the player does in the game, and how the player feels while playing the game.
Section Summary
Learning Pico 8 & The Game Jam
I wanted to experiment with tools I hadn’t used before, so when I found a game jam with a theme that interested me, I chose Pico-8 as my development platform. Its strict limitations immediately stood out to me, and I was curious how those constraints would challenge my problem-solving and creativity.
From the time I joined the jam to the submission deadline was about five days. I spent the first two days learning the editor by following Space Cat’s YouTube tutorial series. During that time, I learned the fundamentals of Lua, how Pico-8 handles its update and draw loops, how to work with the sprite system, and how to create sound effects using the built-in audio tools.
The theme of the jam was “Under Pressure,” which I interpreted literally by creating an arcade-style game about managing pressure in aging, unstable pipes. The core mechanic focused on balancing and repairing the system, while the rapidly increasing difficulty curve was designed to put the player themselves under pressure, reinforcing the theme through gameplay.
- Learned to write modular, cleaner code through Pico 8's artificial limitation on how much code you can write.
- Adapted to Lua's limitations, often using tables to represent objects and classes creating reusable code.
- Pico 8's built in sprite editor and limited color palette bred experimentation and creativity in my game art.
Section Summary
Limitations of Pico 8 and Lua Peaked my Creativity and Problem Solving
Pico-8 is a fantasy console built around strict technical limitations. Developers are restricted to roughly 8,000 words of code, 255 sprites, a 16-color palette, and its built-in sound editor. The language it uses, Lua, is also minimal, with only 23 keywords and very few built-in systems.
The code limit was my favorite constraint to work within. Being restricted to 8,000 words forced me to evaluate every line I wrote and consider how it could be improved. I became more intentional about writing reusable, modular systems, allowing me to reduce redundancy and keep the overall codebase efficient.
I adapted to Lua’s minimal structure, primarily by leveraging tables. Lua tables can function similarly to objects in JavaScript, which allowed me to create a lightweight pseudo-class system. Core game entities such as pipes, the player, pressure wheels, and particle emitters were all represented as tables with shared variables and behaviors, reducing complexity while keeping the code organized.
As someone who primarily focuses on programming, I don’t usually emphasize game art. However, Pico-8’s limited color palette and integrated sprite editor encouraged me to approach art more creatively. Working within a fixed set of 16 colors and a constrained resolution helped me better understand sprite sizing, visual clarity, and shading, all without relying on external tools.
- Wrote a custom collision system using rectangular overlap.
- Wrote a delay function using frame count and booleans.
- Wrote a particle system combining Lua tables with loops.
Section Summary
Built Core Game Systems Such as Collisions From Scratch
Pressure Keeper required building many systems from scratch that aren't included by default with the engine's game loop. This forced me to design solutions that were both efficient and reusable as I had to take into consideration the code limit with the rest of the game loop.
The collision system used a simple rectangular overlap check, comparing the x and y bounds of two objects and returning a true or false result. The delay function I created accepted a frame duration, a condition, and a timer variable. The timer would increment each frame and, once it reached the specified duration, the condition would trigger, allowing me to control timed behaviors throughout the game.
The particle system was more involved. Each particle was represented as a Lua table containing position and lifespan values. In Pressure Keeper, particles were primarily used to simulate steam escaping from broken pipes. When a pipe broke, it would continuously spawn new particle tables into a parent list, and each particle would update and expire independently. This approach created a dynamic visual effect while remaining lightweight enough to fit within Pico-8’s constraints.