When i was an early teen, just learning to code, I had a book about making games. Books like this are always weirdly written, they have to target an audience that knows something about software development, but is stupid enough to buy a physical book on the topic, and is probably also too young to have done much at all with software.
The book I had described the process of building a single game, a clone of Missile Command, which ran on windows. For whatever reason, I’ve found this to be an exceedingly good "test case game". I’ve made semi-clones of Missile Command several times in my life, because it’s the basic test I use when figuring out if an engine or framework is good enough to use. It’s not a direct clone of the game, and the variations I added I call "Nuke Defense".
In 2011, I built a version of the game for Android, and proudly released it. I didn’t really expect anything to happen (and it didn’t). I put ads on it and made a total of less than one dollar. Every couple years Google added new restrictions and requirements to the market (eventually rebranding it "Play" instead of "Android Market"), and it would get removed. In 2016 I more-or-less gave up on it, and made a final build on itch.io that remains today.
I wanted to take a few vain minutes to say why I fondly remember this stupid little game.
Everything that went into the game was quite literally made from scratch. This was before engines were readily available that could compile for any platform, and well before any Android frameworks existed to make games. Unity didn’t exist and we were still on Unreal Engine 3. At the same time id tech 5 was thought to be making a splash with megatextures; nobody really knew the future. If you wanted to make something then, you had to just make it.
This means that every GL call for the entire renderer, every compatibility feature, every collision, every effect, every sound, every edge case had to be accounted for manually. I wrote my own text renderer, and even wrote the JNI bindings for the fixed-int branch of Vorbis (called Tremor) that the game used; because floating-point sounds were so slow it physically ate into battery life. Not to mention, phones at the time had extremely limited decoding, most couldn’t even do mp3’s, and certainly not on-demand for a game.
This was also 2010, so it was before JSON had really taken over the world. The save file for the game is three bytes long, with each representing either a one or zero for the three areas that can be unlocked. Why define it like that, and not some text format? Because there were not a lot of parsers that made sense; why bring in a library whose compiled size is orders of magnitude larger than the save file itself?
Part of this was, admittedly, a bit of obsession with optimization.
When i was in my 20s, I was obsessed over optimization. I wanted the leanest executable possible, that could run on everything that existed, and wasted no time in doing its job. When it came to Nuke Defense, this exhibited itself as meaning that it can be played on every single Android device in existence - all the way from api version 1 (for reference, at time of writing we’re at API version 31). It took some sacrifices such as;
This was frustrating, since at the time i had a Motorola Droid X, and had a "much" (for the time) higher native resolution than that - but the constraint remained and I persevered. These were the early days, and I had coworkers with the G1; compatibility wasn’t just an inane obsession, it was actually pertinent.
The game only has about a dozen textures in it. Almost every asset seen onscreen at any given time is untextured, purely using vertex colors and geometry to draw. This was partly to save space (the apk is under 1.2mb, it fits on a floppy disk), but also partly because textures were slow, and some phones didn’t even support them. If you wanted sharp visuals, you had to use geometry. So the nuke, missile, particle effects, explosions, smoke and trails, clouds, lightning, black hole, distortion, ground, sky, stars, and "powerbar" were all made with geometry first, and all but the nuke were completely untextured. Most of the game just doesn’t need textures.
The backgrounds are all procedurally generated, done at the beginning of a level with Android bitmap manipulation, then streamed into a texture and stretched across the minimal amount of vertical space needed to accomodate the tallest elements.
I mentioned a few, but all the powerup and explosion effects are also generated. The explosion, for instance, builds a "radial" of points in a triangle strip, assigns colors to them, is scaled up and down over its life, and is composed of multiple layers (the "smoke" that lingers briefly afterwards is a separate object). The lightning effect determines all the targets for the "arms" of the lightning, builds branches that will meander from the center to meet them, and uses alpha and color effects to make it look like the lightning is arcing from the touch to the nukes in slow motion. I could go on, but you get the idea - literally every effect is hand-crafted and "procedurally" generated, there’s no sprites or animations here, I literally fill every single buffer in code and dictate the colors and math needed to make it.
It should be clear that a huge reason for my fondness with the game is the technical details. I really do take pride that before I could drink, I was building this kind of stuff. It’s the kind of thing that probably indicates a misspent youth, but I loved it then, and i both love it now and love that my younger passion still shines through in the source.
But enough of the boring stuff, what about the gameplay?
When I built the game, I largely just added stuff I thought was fun. I had no particular end-goal in sight, no real level of production or difficulty or progression. The nukes followed one of four possible movements as they went towards the surface, and the difficulty of the game was largely in just tapping the nukes so that the missiles would lock onto them (this isn’t visually explained well).
In later levels, you simply do not have enough missiles to shoot every nuke, so you need to start using powerups wisely. A single well-timed powerup, in the most extreme case, can destroy around 50 nukes. The game shifts from tapping everything that moves to carefully managing which nukes are allowed to fall before you grab a powerup and destroy as many as you can in one go. One level even necessitates that you "hold" a powerup from the previous level to complete.
The difficulty curve is a bit extreme, because the game just isn’t very long; there are only 10 levels to the game. Part of that is because I worked surprisingly hard to make each level have a consistent experience, despite everything being random. I spent weeks with my phone plugged in, timing how long and how many missiles it took to get through a level. I resolved that no level should go more than 100 seconds long, and that the number of nukes you had to defeat took higher and higher percentages of the missiles you were allotted. I had a little "difficulty curve" of speeds, where nukes could go extremely fast in some levels, which seems difficult, but in other levels were allowed to build up in huge numbers, all bearing down like a black tide, and you have few missiles to shoot them with.
Playing it today, yeah it’s only fun because I know literally every line of it, but I’m a bit proud that the gameplay is still fun - it’s genuinely satisfying to use a cutter or lightning blast at just the right moment to score the highest kills; or knowing that a black hole gives you a point for every piece of dirt it sucks up, so it’s best to fire a bunch of nukes at once and then vacuum the whole screen up in one fell swoop to maximize score. It even goes so far as to give you 50 points if an explosion from your missiles bursts a nearby cloud apart.
It’s hard, it’s dumb, it’s not AAA, but it’s fun - to me at least. It sometimes feels unfair, but it’s never Souls-level unfairness, it never beats you just to make you feel bad. It lets you feel awesome just as much as it says "sorry, try again". The goal is hardly to beat every level, it’s to blow up as many nukes as it lets you before you die - but knowing that you could beat every level if you knew the tricks.
Why am I jerking off over my own dumb game that much? Well…
The game was built from a blank project in a year, almost exactly. And in that year, I did almost nothing except go to work for 10 hours, come home and work on the game for 4-6 hours, and sleep. I played lots of games, I ate lots of food, but ultimately everything led back to nuke defense. It was an obsession, a pointless one since I knew that I wouldn’t ever make it rich with this game. I knew it was mostly only fun to me and the few people who i gave it to, and that it had virtually no mass appeal. It wasn’t about the money, it was about the love for the craft.
And it’s easy to scoff at "love for the craft" given how terrible the game looks. But what I’m describing is more like an artist building every brush and ounce of paint by hand, pressing and making canvas himself, carving the frame and fabricating the matting all by hand. It almost doesn’t matter what the painting looks like in the end, the joy came from the variety and extent of the problems that had to be solved along the way. It’s the journey, not the destination, that I loved.
When I released it, there was suddenly a big hole in my life where it had occupied. I knew it was finished, I knew there wasn’t much else to do to it, so I tried to recapture the glory by making another game (roboTrapper, based on a game by Adam Atomic of all people), but it just wasn’t the same. I burned out on doing it all by hand, and have never truly since recaptured that love of the process.
Yeah that was the point of this whole thing. I reminisced fondly for this long because what I loved was that time in my life where everything was a problem to be solved, and I had the power to solve it. Where I didn’t need anyone else, where I could devote 100% of my efforts and have a fulfilling result. Where, frankly, things were simpler.
I’m into my 30’s at this point, and everything is complicated. Every decision requires a dozen other decisions to be made first, every goal is a tapestry of other goals which each need to be navigated. Life is hard, and that’s good. But a decade later, part of me looks at Nuke Defense and thinks about recapturing that glory in this decade - maybe I can make a new iteration of Nuke Defense every ten years. The thought is tempting, but I look at it and think maybe this is just an old man clinging to nostalgia.
Sometimes it’s better to remember something fondly than to try to recapture it.