Colisão Multiversal
A roguelite about building a kingdom on a floating island. You play cards, fuse and upgrade them, then watch the battle play out on its own. There are twelve Archons, each with its own world, island and cards, and every piece of art is drawn in code.
- Problem
- I wanted to see what 9 Kings would look like with more upgrades and more fusions between the kings.
- What I did
- A roguelite in Godot 4 with deterministic battles, a bot that plays whole runs for balancing, and all the art and music made in code.
- Result
- A playable prototype with 12 Archons, 286 cards, 181 fusion recipes and 700+ tests.
The game
I made this game because I'm a big fan of 9 Kings, a game by a YouTuber I follow, and I wanted to see what a version of it would look like with more upgrades and more fusions between the kings. Here the kings became twelve Archons, each one from a different world.
A run lasts 30 years, and each year has a preparation phase and a battle. During preparation your hand has no limit. What limits you is the number of plays, and placing, upgrading, fusing and selling cost one each. When the enemy island docks, the battle runs by itself, and at the end each lot shows how much damage it did and where the bonus came from.
There's a shop every five years, an event every three and a boss in years 10, 20 and 30.
The battle is deterministic
The simulation doesn't know a screen exists. Positions are integers in thousandths of a tile, every tick runs the same nine steps in the same order, and randomness comes from a seeded generator with derived streams. No file in the simulation calls the engine's random functions.
It runs on a worker thread, and the screen only replays the frames it received, at 20 ticks per second. The same seed gives the same battle, which is what makes it possible to test, reproduce a bug and put a robot in to play.
A robot that plays whole runs
Balancing 286 cards by hand doesn't add up. The balancing bot plays complete runs without opening a window, with a random policy and a greedy one, and returns a table per Archon. Every adjustment goes into a log with the before and after measurements, in batches.
In batch 9, with 20 greedy and 30 random seeds per Archon, the greedy policy went to winning 45% of runs, down from 55%. Two Archons fell outside the 35% to 70% target band: Frost at 15% and Zumbizz at 25%. The log itself notes that the control measurement wasn't finished.
All the art is code
The game loads no ready-made images. Each Archon has a painter in GDScript that draws the portrait, the cards, the animated units and the island, and a shared finishing pass adds shadow, outline, rim light and glow. The music and sound effects are synthesized by Python scripts, with no third-party samples. One rule for the painters: no text inside a sprite. A card has to explain itself at a glance, so the "PASTEL" sign becomes a giant pastry hanging from the awning.
How it was built
The project moved in milestones, and each milestone was handled by Claude Code agents in parallel, each in its own worktree: the battle core, the island visuals, the screens, diplomacy between worlds. That came to 269 commits between October 19 and 21. The data is JSON with a written schema, and a Python validator checks all of it without opening Godot, so an agent that gets a card name wrong finds out before running the game.