Remix.run Logo
▲ rrradical 4 hours ago

> The fixed randomness and determinism thing sounds great on paper (all of this does), but in reality this is an extremely confining way to build a video game. Ensuring you maintain determinism across many platforms is where things get super nasty.

Why 'nasty'? I agree it's a problem to solve, but you just use a fixed-point math library and it's fine. Determinism is freeing, not confining. It allows you to do things like rollback netcode, replays and easy debugging. You can't just say that 'reality' happens to be what you in particular are used to.

▲avaer 4 hours ago | parent [-]

> Why 'nasty'? I agree it's a problem to solve, but you just use a fixed-point math library and it's fine.

Assuming the agent didn't put in a native nondeterministic trig function deep in the code instead of using the library one, it's an easy mistake to make and hard to debug in a big game. It won't even show unless you have a robust CI matrix. It can indeed be "nasty" to maintain.

Also determinism might work for simulation state, but shader/gfx differences across platforms can be really nasty and a library can't save you. Not even something like WebGPU. Also if you're doing any sort residency streaming dependent on GPU timings trying to make that deterministic will be a nightmare.

▲rrradical 35 minutes ago | parent | next [-]

But that CI is very easy to setup.

Take a given start point; feed a set of inputs; compute a checksum on the resulting state. Check that the checksum matches on different platforms.

And if your language is good you can parameterize your logic on a particular numeric type, so that a particular fixed point implementation is consistently used

▲mypalmike 3 hours ago | parent | prev [-]

Unless the GPU output is feeding back into the game loop simulation, there’s no nightmare.

I’ve worked on games with intentional determinism, and it’s a very valuable tool. A playtester can hand a dev a recording of the game inputs (including clock) for whatever bug they encountered, and the dev can fast forward to the exact point and repro it 100%. The amount of time saved chasing down difficult bugs is enormous.