Tank Supremo: From a Teenage Dream to a Multiplayer Game

Posted by:

Comments: 0

My tank game finally left my hard drive.

The first tank game I played was on an Interton TV Console as a teenager. It was 2D, top-down, deceptively simple. Hunt your opponent, dodge their fire, navigate obstacles that changed every level. I was hooked, and that fascination with how games work has continued to fuel my coding curiosity, making me hungry to learn whichever tools each business software challenge required.

When I mastered C# in 2006 — co-leading a large-scale migration from Magic eDeveloper — I finally had a language that made DirectX approachable. By 2008 I’d designed and built a tank game with procedurally generated terrain and a computer-controlled opponent. But it never left my machine. No easy way to publish it, no audience.

Fast-forward to now. As a Svelte developer I discovered Threlte, which lets you define 3D scenes in markup, HTML for Three.js. The old project finally had a home. I rebuilt it for the web, playable in any browser, added multiplayer, and consulted Claude Code to save time on several tasks. It’s a work in progress (always something to refine) but instead of sitting on a hard drive gathering dust, Tank Supremo is out in the world and playable.

A screenshot showing player's tank in a hilly field looking at two AI tanks aiming at each other.

The hardest problem: hosting

Multiplayer required a WebSocket server — a long-running process — which ruled out serverless hosting entirely. My existing VPS runs cPanel, which has a Node.js app manager, but it turned out to be a dead end: CloudLinux isolates each Passenger-managed app inside its own network namespace, so Apache can’t reach it. The support team couldn’t find a way around it.

The solution was to run the relay outside that sandbox, as a background service on a separate port, with Apache forwarding WebSocket traffic to it. That meant writing a systemd service file, configuring Apache’s WebSocket proxy manually, and deploying via root SSH — none of which cPanel exposes through its UI. I could have spent days on this kind of infrastructure problem, if I hadn’t sought help.

Claude Code as pair programmer

So I found a pair programming partner. I had a clear vision of what the game should be. Claude Code helped me find the best approach to each new challenge, then wrote the code. But I didn’t just accept its output: I read everything, pushed back when I thought a better solution existed, and tested that it behaved the way I expected. The learning went both ways, and understanding the code kept me in control of the direction.

The details that came from playing

Several of the finer details came from playing the game and noticing what felt wrong. For example:

  • The opponent bot would miss a shot and then aim at exactly the same spot and miss again. This was because the ballistic math assumed level ground, and the terrain almost never is. Adding shot-correction biases made it behave more like a human player, which was a happy side effect of making the bot smarter.
  • The terrain deformation came from wanting the world to carry the memory of the battle. Changing blast-site colour to black was the obvious first step, but then I added rocks flying from the impact, and it felt natural to also sink the ground where the shell landed, distributing the displaced “earth” where the rocks fell. This small detail made the landscape feel like it was really being fought over.
  • Surviving a page refresh mattered most in multiplayer. You shouldn’t lose your game because of an accidental F5. Claude suggested seeded random terrain generation as the elegant solution: store just the seed, regenerate the whole terrain identically on reload, then layer on only the deformed vertices on top. Minimal storage, and the world picks up exactly where it left off.
A screenshot showing player's tank after hitting an AI tank about 10 meters away. A "Reloading" progress bar at the top shows a countdown to the next available shot.

Why it matters to me

Throughout my career, the software I’ve built has been used by employees at client companies. It has been valuable work, some for very large companies, but with a limited audience. There’s something different about putting something out into the world that anyone can find and play. I’ve set up Cloudflare, partly for performance, but also for the usage stats. Watching that counter go up for Tank Supremo would make me happy. After decades of coding, this is the first thing I’ve built that a stranger might stumble across and enjoy.

A screenshot showing player's tank on a river bank looking at two AI tanks, one on the same river bank and one in the river immersed under water.

👉 tanks.tiyal.com — give Tank Supremo a try and let me know what you think.

0