Back in 2010 I wrote a tank game. It started life as a competition entry to win a laptop from HP by writing something for the Palm Pre (remember those?), got ported to the iPhone and iPad, and ended up on the App Store as Tanks! Mayhem, a Battlezone-style shooter with glowing vector graphics. It didnât fly off the shelves; even back then competition was stiff in the app world. But it didnât do badly.
Then in 2011 I got an email from Apple: Atari had complained that a game where you drive a tank around shooting other tanks infringed their copyright. I briefly thought about fighting this, but when your opposition is a company with lawyers on the payroll, itâs just not worth it. I pulled it from the US store, and that was that. I was pretty grumpy about it at the time.
Eventually, I moved on from writing my own apps and the source code has been sitting in a Dropbox folder ever since.
Sixteen years is a long time and things have moved on around it. It no longer compiles and thereâs little point in submitting it to an even more crowded app store. Itâs 20,000 lines of C++ and Objective-C, OpenGL ES renderers for three platforms, Blender models, sound effects: itâs a lot of code.
So, this week I pointed Claude Code at that folder and asked it to get the game running on the web. 20-30 minutes later:
Play it now at tanks.atomic14.com. Q/A and P/L drive the left and right tracks like the original Mac version, or just use the arrow keys. Space fires. It works on phones too (the original virtual joystick came along for the ride), and if you plug in a gamepad, the two analog sticks map onto the two tracks, which is how a Battlezone-style tank was always meant to be driven.
And hereâs the 2010 original for comparison:

How the port worked
I was expecting to get some facsimili to my original game. Maybe a rough clone of Battlezone. Or, a completely broken version of my 16 year old code that barely worked.
Instead, Claude launched a bunch of angents to investigate the code - the renderer, the game logic, the input handling, the enemy tank âAIâ etc.. And then it got on with writing the code.
The port over is pretty faithful. The physics runs on planck.js (a JavaScript port of Box2D) with the same damping, restitution and impulse constants as the iPhone version. The models are the original .obj files. The sounds are the original WAVs. Itâs an exact port. Pretty impressive!
Recreating the glowing lines
The part about the game that I was really happy about when I wrote it was the nice neon glow effect. I had completely forgotten how it worked but I did remember that Iâd done something clever with shaders and linewidths. The models are drawn twice. The dark, nearly-black solid faces go down first (so wireframes occlude properly, with a polygon offset pushing them back), then the edges go on top as 8-pixel-wide GL lines with additive blending. The line fragment shader computes each pixelâs distance from the lineâs centre and fades the colour channels. The centre of the line saturates to white-hot, the fringes stay coloured.
Claude rewrote that by expanding each line into a quad. I canât tell the difference.

Weird bugs in my original code
The initial run that it tested for itself using the Chrome plugin didnât work - it was just a huge drak polyhedron filling the screen. This turned out to be the playerâs tank. Viewed from the indside.
This is Claudeâs explanationâŠ
My old
esRotatefunction builds a left-handed rotation matrix, and the renderer negates the angle before calling it, so the two wrongs net out to a standard right-handed rotation. The port negated the angle and used a proper rotation matrix, which left a single wrong with nothing to cancel it: every model in the game faced backwards, and the first-person camera stared straight into the back of its own turret. Thatâs the trouble with old code: the bugs come in pairs that cancel each other out, and fixing just one of them breaks everything.
Some code that shipped 16 years later
My favourite discovery: the source contains a complete, working procedural radar shader (concentric range rings, crosshair, glowing blips, all computed in the fragment shader) that was compiled by the original game and then never called. The shipped game drew the radar with a texture instead. I have no memory of writing it or why I abandoned it.
Itâs in the web version now. If you look at the radar at the bottom of the screen, youâre looking at a shader getting its first production deployment sixteen years after it was written.

What didnât make it
The multiplayer is gone: it was a LAN-only affair built on enet and Bonjour discovery, it worked back in 2010 really well but hard to recreate without some backend infrastructure. And the attack helicopter is gone too, though not for technical reasons: itâs fully ported and works, itâs just disabled behind a flag in the code, because absolutely nobody who played the original liked it. Game design feedback, finally addressed, a mere decade and a half later.
The code is on GitHub at atomic14/tanks-web: plain JavaScript and WebGL, no build step, every original constant preserved and commented with where it came from.
And this time itâs free, so hopefully nobody minds.
