Drift Core: the game runs on a hash chain
All game logic lives in one deterministic Rust library. The hash in the terminal on our home page is the same one the game computes.
The rules of h4shDr1f7 live in one Rust library called Drift Core, and Unreal loads it in-process. The engine draws the world, and Drift Core decides what happens in it: the shell, the simulated hosts, the receptionist’s decision, the defender’s next move, your Creds and your Vibe.
Drift Core is deterministic. It never reads the clock or asks the OS for randomness. Game time arrives as ticks, decisions come from the session seed, and every command you type is folded into a SHA-256 chain:
h0 = sha256("drift_core/transcript/v1\n" || config)
hn = sha256(h(n-1) || "\n" || entry)
The same inputs at the same game times give the same hash on every machine. That property does three jobs.
- Saves are your transcript. Loading replays it and refuses the save if the replay doesn’t reach the recorded hash.
- Hash Drift, the evidence overlay at the end of a job, shows the real head of your chain.
- Online modes, later, can check a result by replaying it on a server.
The terminal on our home page implements the same chain in your browser. Type a few commands and run drift. The hash you get is the one Drift Core would produce for the same session. The tests pin both implementations to the same known answers.
The terminal itself is a preview. In the M0 build, Drift Core’s shell only knows clear, echo, help, history, hostname and whoami. The simulated hosts, with their filesystems, permissions and services, arrive in the next milestone.