Tank Bloks
Tank Bloks
Build a battlefield. Then fight in it.
Tank Bloks is a 3D sandbox battle game. In EDIT MODE you build a world block by block — terrain, buildings, hazards, flags, enemy units. Press P and you drop straight into it in PLAY MODE, driving a tank against an AI opponent in a game of capture-the-flag. Hop back to EDIT MODE any time to reshape the fight.
Three themes share the same engine and the same core rules:
- ๐ข Tank Wars — drive, aim your turret, capture the enemy flag
- ๐ Space Battles — fly a spacecraft through an asteroid field with full 3D movement
- ๐ค Robo Wars — run, jump and fight your way up to a boss in a neon arena
Everything you see is generated procedurally in code — no downloads, no loading screens, no imported assets. The whole game is tiny and runs instantly in your browser.
Press C at any time for the full controls, and a short tutorial walks you through your first build.
โ๏ธ Released as-is, with the full source
I'm not developing this any further, so I'm putting the whole thing out in the open — playable game, and every line of source — for anyone who wants to play with it, learn from it, or build on it.
A few things are unfinished, and I'd rather say so up front: capture-the-flag detects a capture but doesn't yet keep score, Robo Wars is thinner than the tank theme, and if you were to implement multiplayer, probably using MicroStudio's server to run would be good starting point. None of it stops you building and playing.
If you're a developer, the interesting part is that it's ~17,700 lines with no assets at all — tanks, soldiers, terrain and explosions are all built from primitives at runtime. Roughly 60% of the codebase (AI, animation, shadows, save/load, menus) is written generically enough to lift into a different game. The included Code Structure Guide maps every module and rates how reusable it is.
๐ง Mod it with an AI
MicroScript — the language this is written in — trips up chat models, so asking one to write code for it cold gives you plausible nonsense. To fix that, the release includes an Engine API doc: upload it to Claude or ChatGPT, describe what you want (a new enemy, a new placeable object, a scoring system), and it writes code that actually runs. There's a section of worked examples to get you started.
Built something with it, or got stuck? I'd love to hear about it in the comments — that's the main thing I'm hoping to learn from this release.
๐ฆ What's included
- Playable game — in-browser, or run it on the MicroStudio community page
- Full source — all 31 modules, free to fork and reuse
- Player Guide (PDF) — controls, building, CTF rules, full keyboard reference
- Code Structure Guide (PDF) — architecture, module map, modding cookbook
- Engine API (MD/TXT) — paste into an AI chat to mod the game
Built in MicroStudio with Babylon.js.
| Published | 7 hours ago |
| Status | Released |
| Platforms | HTML5 |
| Author | grafixmechanix |
| Tags | 3D, Arena Shooter, Homebrew, Indie, Sandbox, sourcecode, Space, Tanks, Third-Person Shooter |
| Content | No generative AI was used |
Download
Install instructions
Thanks for downloading Tank Bloks! Everything here is free to play with, learn from, and build on.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
JUST WANT TO PLAY?
You don't need to download anything to play — the game runs right here in your browser. Click the fullscreen button for the best view, and press C in-game for the controls. You can also play it on the MicroStudio community page: [PASTE YOUR MICROSTUDIO LINK]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WHAT'S IN THE DOWNLOAD
โข Full source code — every MicroScript module that makes up the game โข Player Guide (PDF) — controls, building, capture-the-flag rules, full keyboard reference โข Code Structure Guide (PDF) — architecture, module map, and a step-by-step modding cookbook โข Engine API (MD / TXT) — a file you paste into an AI chat model to mod the game
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
EDIT IT IN MICROSTUDIO (NO INSTALL NEEDED)
Tank Bloks is built in MicroStudio, a free browser-based game engine. The easiest way to open and tinker with it:
- Go to the project on the MicroStudio community page: [PASTE YOUR MICROSTUDIO LINK]
- Make your own copy of it into your account (free sign-up).
- Edit and run it entirely in your browser — your copy is yours, and you won't affect the original.
Prefer to work offline? MicroStudio also has a free standalone app for Windows, Mac, Linux and Raspberry Pi, available at microstudio.dev.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ABOUT THE SOURCE ZIP
The downloaded .ms files are plain text — open them in any editor (Notepad, VS Code, anything) to read the code, or keep them as reference if you're porting ideas to another engine. To actually run and edit the game, use the MicroStudio route above.
A quick orientation for anyone reading the code: start with client.ms (the main loop), then game_world.ms (how the world is built), then procedural_tanks.ms (how a complex object is assembled from primitives). After those three, the rest reads easily. The Code Structure Guide PDF maps every module.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
MOD IT WITH AI
MicroScript looks like JavaScript but isn't, so AI chat models write broken code for it unless you give them context first. That's what the Engine API file is for:
- Upload TANK_BLOKS_ENGINE_API.md (or .txt) to Claude or ChatGPT.
- Describe what you want — a new enemy, a new placeable object, a scoring system.
- It writes MicroScript that fits this codebase and actually runs.
There's a section of worked examples at the bottom of that file showing what a good request looks like.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HEADS UP
This is released as-is and a few things are unfinished — capture-the-flag detects a capture but doesn't tally a score yet, and the Robo Wars theme is thinner than the tank one. None of it stops you building and playing; the guides explain the gaps.
Have fun with it — and if you make something, drop a comment on the page. That's the thing I'd most like to see.





