Stratagem Devlog, Part 0
Dusting the cobwebs off a fantasy console cartridge
Long ago, in the times before the great disease, a young VM wanted a challenge. “I like to code, I like to draw, and I like to make music,” they thought. “What can I make that tests my skills in all these fields?” After some time pondering, an idea emerged: “Eureka!” They exclaimed. “I’ll make a video game!” And so, they went to work: little by little, working weekends and weeknights, they breathed life onto a blank canvas with code and art and music. But alas, VM was working on borrowed time, and final exams were drawing ever closer; the threat of grade-point averages forced VM to triage. Their game sat unfinished and abandoned without the attention of its creator, gathering dust on their hard drive… until now!
OK, enough with the flowery third-person prose. Being a solo game developer forces you to be a jack-of-all trades: you’re the team’s resident artist, programmer, musician, and writer because you are the team. I have major respect for anyone in the game design industry, especially if they develop games on their own. While my previous attempts trying video game design during summer camps and school breaks ended up either lost to time or unplayable, my most successful attempt was Stratagem, a nonlinear match-3 puzzle game I tried making during college for the Lexaloffle PICO-8. Since its source code is actually in a playable state, I want to finish what I initially started so that I can publish the game for others to play. Let’s metaphorically blow the dust out of its cartridge, load it into the PICO-8, and pick up where I left off.
This article is part of a series called “Stratagem Devlog”.

Fantasy consoles like the PICO-8 are video game engines designed to mimic the look and feel of early video game consoles. Like the software and hardware restrictions of their real-life counterparts, the space and memory limitations of fantasy consoles force developers to invent creative solutions to compress their games. Fantasy consoles also come with quality-of-life improvements over real retro consoles: for example, the PICO-8 comes out-of-the-box with a game development suite and Lua as an embedded scripting language for games to run on instead of pure assembly.
While I don’t fully remember my thought process for designing Stratagem, I’m certain that the original Bejeweled game was my main inspiration. I also wanted to switch up the game mechanics to try new ideas that I hadn’t seen before in the match-3 puzzle genre. In most match-3 games like Bejeweled, players score points by swapping gems to clear them in lines; instead, in Stratagem, any adjacent group of gems of three or more can be cleared in a single match. I decreased the grid size from 8×8 to 6×6 and increased the number of gem types to balance out these looser match restrictions. This rule change also made it harder to determine when there are no more possible moves on the board, which is how a Bejeweled game ends. To circumvent this issue, I chose to use a “three lives” mechanic to let the player spend a non-productive move adjusting the game board for the chance to get another match. The gem grid still resets once the player reaches a specific point threshold to level up, so its contribution to the game’s strategy stays the same.
Stratagem’s core main game mechanics were almost complete by the time I re-discovered it, but its code was haphazardly written. Programming the PICO-8 was my first introduction to the Lua programming language, so I hadn’t yet gotten the gist of its table paradigms yet; the PICO-8’s built-in code editor didn’t help much either. Instead of looking up and implementing a recursive flood-fill-like algorithm to find matches on the game grid, I originally opted for an overly complex brute-force algorithm that would iteratively mark adjacent cells on the grid as visited before clearing them.
Even though I don’t like using Lua for configuring programs, I would choose it for game development scripting any day over an assembly language. Its only data structure, the table, can mimic concepts in other programming languages like arrays, enumerations, structures, classes, and dictionaries. I learned about how Lua tables are set up thanks to my brief stint learning about the Lua Language Server and configuring Neovim.
As much as I wanted to use the name “Gemini” for the game’s title (primarily because it contains the word “gem”), the name just doesn’t feel right. The only thing in my game that would make sense naming it after the zodiac sign associated with twins is how two gems are swapped, and that mechanic isn’t uniquely mine. “Stratagem” was going to be the name of the classic un-timed puzzle mode, so I promoted it to the game’s title.