One Kitchen, Four Recipes

In Kastle Studio there's a treadmill. A creature stands in place, the floor slides under it at the world's speed, and we watch its feet. If a foot slips, the stride is wrong.
Remember chapter 3, when making a new model walk, fight and die was half the work? Now multiply that by four games. The treadmill exists because at some point we needed one place to take care of that.
One kitchen, four recipes
The previous chapter ended with each new game writing the same things over again. On October 9, the day Line Tower was born, everything Castle Survivors had that wasn't its own rules moved into a package of its own: Kastle, the house engine.
The easiest way to picture Kastle is a kitchen. The stove, the pots and the pantry belong to everyone: the 3D world, the sky and weather, the creatures, the sound, the menus, Steam, saves, online. The recipe belongs to each game: its rules, numbers and words. Each game is a folder next to the engine, with its own simulation and content.
The comparison has a limit, and that limit is deliberate. In a real kitchen, the cook peeks at the neighbor's recipe. Here, the engine must never know any game's recipe, and an automatic check fails if it ever does. That's what keeps each game's rules inside the game itself, away from the engine and the other three.
The pantry
The pantry is where the work of the artists from the first chapter ended up. The packs each game used became a single library, and each game ships only what it loads.
| In the pantry | Count |
|---|---|
| Creature models | 164, with 705 skins |
| Scenery models | 1,115 |
| Effects | 235 |
| Sounds | 74 |

Nobody touches a piece without writing it down
In chapter 6, online worked like correspondence chess: the two boards only stay the same if nobody moves a piece without writing it down. With four games on top of the same engine, that became a rule for the whole kitchen.
Kastle has an inspector for it: a determinism lint that reads the simulation's code and flags anything that would make two computers disagree, like a random draw without a seed, a read of the real clock, or a list sorted in a way that changes from machine to machine. There's also a stress test that plays whole matches over deliberately bad networks, with delay, loss and packets arriving out of order. It has already found a real bug: a guest whose countdown started after the host's lost the match's first turns.
Who uses what
Not every game uses the whole kitchen, and that was a decision, not a delay.
| Game | Uses from Kastle |
|---|---|
| Line Tower | Everything |
| Custom Hero Survival | Everything |
| Castle Survivors | Only the visuals; simulation, network, menus and saves stay its own |
| Castle Arena | Nothing from the engine, but it talks to the Studio |
The bench
When you have one game, the numbers live in the code, and that's fine. When you have four, each with hundreds of units, abilities and weapons, changing one value turns into a hunt: which file it's in, who uses it, what changes in the game, and the same mistake waiting in every game.
Kastle Studio is the bench for this kitchen. In it, you can see every creature with all of its animations beside a height ruler, every effect on a stage of its own with its cost on the frame, and each game's data side by side: units in 3D, factions, and how long each fighter takes to bring down each of the others.
And you can change it. A number edited in the Studio goes back into the game's code, in the right place. But before it goes back, it passes through the tab that matters most, Consequências: the numbers before and after run through the Studio's simulators, and the matchups the change touched show up sorted by how far they moved. It's chapter 4 turned into a tool: evidence before the number.
Nothing changes in the game until someone presses Save.
On the command line, the same simulator becomes a gate: it runs every matchup with fixed seeds in about 25 seconds, and refuses the change if any of them moved more than 10 points.
What's still in the recipe
The engine isn't everywhere it could be yet. The games still use their own orders and abilities instead of the engine's. Adopting Kastle's is what will let each game retire its duplicated code, and that's the next step for the kitchen.
Four games, one engine, one bench. Next, let's see where all of it stands today.
— The team





