/ game-development / Modeling Eleven Formations As Pure Data In My Roguelike
game-development 7 min read

Modeling Eleven Formations As Pure Data In My Roguelike

Each of World 11's eleven shapes is a list of slots in JSON. Here is how data-driven formations power a visual shape picker and change how every draft plays.

World 11 formation picker showing the visual shape of the chosen eleven

World 11 starts every run with a choice of shape. Before you spin a nation, before you draft a single player, you pick one of eleven formations, and that choice quietly decides what the rest of the run will feel like. A flat back four with two holding midfielders is a different game from three at the back with wing backs flying forward. The formation is the frame the whole draft hangs on, and the thing I am proudest of in this part of the game is that none of it is code. Every formation is data, and that decision paid me back over and over.

I want to walk through how a formation is modeled, why the shape picker is built the way it is, and how changing the shape ripples into which positions you draft and where your chemistry ends up landing.

Play World 11 in your browser, or read the overview of how the whole game was built for the wider tour.

A Formation Is Just A List Of Slots

Strip away the football and a formation is a very simple object. It is a name, and a list of eleven slots, and each slot is a position and a place on the pitch. That is the entire model. A back-four shape is two center backs, two fullbacks, a midfield band, and a front line, each one a slot with a role attached and a coordinate that says where it sits on the field. There is no logic in a formation. It is a description.

All eleven of these live in formations.json, and that file is the single source of truth for what shapes exist. When the game needs to know what slots a run has, it reads the chosen formation out of that file and builds the draft around it. The code that handles drafting never knows there are eleven formations. It only knows there is a list of slots, and it fills them. The variety lives entirely in the data, and the code stays the same no matter how many shapes I add.

Why Pure Data Was The Right Call

The reason to do it this way is that formations are the kind of thing you want to tinker with constantly, and tinkering with code is slow and dangerous. When a formation is data, adding a new shape is editing a file, not writing a feature. I can sketch a back-three variant, drop it into the file with its eleven slots and their coordinates, and it shows up in the picker ready to draft, with the draft logic, the chemistry, and the match model all handling it correctly because none of them were ever specialized to a particular shape.

That separation is the same principle that runs through the rest of the game, where balance and rosters live in data rather than in code, which I wrote about in tuning balance by editing data instead of code. Formations are the cleanest example of it. A shape is so obviously a piece of content rather than a piece of logic that pushing it into a file feels less like an architecture choice and more like admitting what it always was. The win is that the eleven shapes are not eleven code paths I have to maintain. They are eleven entries in a list.

The Visual Shape Picker

A formation as raw slots and coordinates is meaningless to a player, so the data has to become a picture. The shape picker reads each formation out of the file and lays its eleven slots onto a pitch using exactly the coordinates stored in the data. The player does not see a name like a numbered shorthand and try to imagine it. They see the actual arrangement, the defenders spread across the back, the midfield band, the shape of the attack, drawn straight from the same coordinates the draft will use.

This is the quiet benefit of storing a position for every slot. The coordinate is not only there to tell the match model where a player operates. It is also what lets me render the formation honestly, because the picture the player chooses from is drawn from the same numbers that drive the game. There is no separate art asset per formation that can drift out of sync with the logic. The picture is the data. When I add a shape to the file, its portrait in the picker comes for free, because the picker is just drawing what the file says.

Changing The Shape Changes The Draft

Here is where the formation stops being decoration and becomes a real strategic lever. Because the draft fills exactly the slots the formation defines, picking a different shape changes which positions you have to find players for. A shape with three center backs sends you hunting for an extra natural defender. A shape with two wingers makes you value pace out wide that another formation would never ask for. You are not drafting in the abstract. You are drafting into the specific eleven holes your chosen shape carved out, and the same random nation feels generous or stingy depending on the shape you are trying to fill.

That collides directly with the two systems I care most about. It collides with the out of position penalty, because a shape that demands a position your spun nation is thin in forces you into costly moves, while a shape that matches the nation's strengths lets everyone play their natural role. And it collides with chemistry, because where the slots sit shapes how your same-nation and same-decade links stack up across the team. A formation is not just a defensive or attacking preference. It is the constraint that decides how easy your draft is, how much you pay to fill it, and how your chemistry lands. All of that emerges from one list of slots in a file.

What Treating Shapes As Data Taught Me

The lesson I keep relearning on this project is that the more of a game I can express as content, the faster the game gets to feel right. Formations were the proof. Because a shape is pure data, I could afford to have eleven of them, tune their coordinates, and add variants without touching a line of logic, and every other system handled them automatically because they were all written against a list of slots rather than against any specific formation.

If I had hardcoded even a few formations, I would have a tangle of special cases by now, and adding the twelfth shape would mean threading it through the draft, the chemistry, the penalty, and the renderer by hand. Instead the twelfth shape is one more entry in a file. That is the whole argument for data-driven design in a sentence. Decide once that a thing is content, write the systems against the shape of the content rather than its specifics, and adding more of it stays cheap forever.

World 11 is the game built on that idea, and the eleven shapes are the first choice you make every run. Pick a formation, watch the draft bend to fit it, and see which shape your spun nation was secretly built for. Play it at games.kevingabeci.com/world-11.

Built by Kevin

Like this? You'll like what I'm building too.

Two ways to support and get more of this work.

Desktop App

HEARTH

A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.

Read more
Digital Products

MY TOOLKITS

Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.

Browse on Whop

Need This Built?

Kevin builds products solo, from first version to live. If you want something like this made, work with him.