Starting over on purpose
I cleared out the first version of Evil Engine to start again on a handful of rules. Here's what those rules are, and what's been built on top of them since.
On October 29, one commit deleted 1,530 files and 114,366 lines: “Clear out godot/ to start Evil Engine over on its pillars.” The first version stays in the history as reference, but nothing it did counts again until it’s rebuilt.
Why
The first version read Garry’s Mod’s content well, but it was Garry’s Mod’s content all the way down. Everything it read only lived in memory, in Source’s shape, with nothing of the engine’s own to save, load or mod. Garry’s Mod was supposed to be a mount, and instead it had quietly become the foundation.
The pillars
The restart begins with a short document of the ideas every part of the engine gets held to.
- Any game is a mount, not infrastructure. The engine runs on its own formats. A game’s content gets converted into them, and nothing past the converter knows which game it came from. The engine doesn’t need any game to run
- Godot is a runtime the engine owns. Evil Engine builds its own fork of Godot 4.8 from source, only takes fixes from upstream, and patches Godot wherever it gets in the way. Nothing a modder writes depends on Godot
Garry’s Mod is still the only game I’m promising for launch. It’s just built as one adapter on a generic core now, instead of being the core itself.
Owning Godot
The fork runs in double precision and has two patches so far. One fixes a Theme editor hang at fractional editor scales. The other lets Godot find C# scripts in referenced assemblies, so the engine’s code can split into Shared, Server and Client, where server code and client code never reference each other. That one’s been checked in the editor, in an export, with hot reload, and in an export with Client left out entirely.
Write it down first
Every system gets a scope before it gets code: what it is, what it isn’t, and how it gets checked. 24 new ones were written after the reset, and the older ones got rewritten.
The scopes now end in twelve laws, which are what every mounted game gets with every other game from the mount core alone. The floor under all of them is that every mounted game’s stuff shows up in the spawn menu and spawns as props, with no Plugin needed. Plugins decide anything beyond that.
The reason is scale. If games were wired together pair by pair, twenty games would need 190 bridges, but with shared laws each game only has to map itself onto them once. Honestly this is the part I’m happiest with so far.
Proving the design
The laws and the bigger promises in the scopes also live in Lean, a language for machine-checked proofs, with 123 theorems so far. They prove the design rather than the C# code, and if a doc line they quote changes without its proof, the check fails.
The newest mount
Amnesia: The Bunker mounted on October 31, as the fifth game through the same core:
- One layer of 23,477 files, every one matched against Steam’s own record of its hash, so nothing gets reread just to compare it
- Its files are found by name, the way the game finds them, since its own references point at the developers’ machines
- 489 references to files the install doesn’t have get noted instead of silently dropped
- Planning the mount takes about 0.7 seconds
The core needed no changes for it beyond reading Steam’s hashes.
What isn’t here yet
The first version had a world, a player, weapons and a physgun, and this one doesn’t yet. No map converts, and nothing reaches the screen. That’s on purpose… the foundation comes first this time, so everything built on top of it stays put.
