Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930package sim
SIM_VERSION :: u32(1)
// The simulation owns gameplay time. Rendering may run faster, slower, or jitter,// but every gameplay decision should eventually reduce to integer ticks at this rate.SIM_HZ :: 60SIM_DT :: 1.0 / f64(SIM_HZ)
// App code uses these limits when converting wall-clock frame time into sim ticks.// They are sim constants because changing them changes replay/runtime behavior.MAX_FRAME_DT :: 0.25MAX_TICKS_PER_FRAME :: 5
// Seeds are part of the replay contract: same initial state, same inputs, same result.DEFAULT_WORLD_SEED :: u64(0x7468616E61746F)
// Authoritative spatial state uses fixed-point integers. A power-of-two scale// keeps future conversion cheap and avoids division in the simulation hot path.FIXED_SHIFT :: 16FIXED_ONE :: Fixed(1 << FIXED_SHIFT)
// Prototype player speed: ~8.57 whole sim units per second at 60hz.PLAYER_MOVE_CARDINAL :: Fixed((1 << FIXED_SHIFT) / 7)PLAYER_MOVE_DIAGONAL :: Fixed(6620) // round(PLAYER_MOVE_CARDINAL / sqrt(2))
// Fixed capacity keeps early actor iteration deterministic and cache-friendly.// Echo caps/readability can become game rules later; this is just storage shape.MAX_WORLD_ACTORS :: 16