Game loop and tick rate (executable)
Read in the machine code (addresses as in
SYSTEMS.md §1).
- Fixed 30 Hz logic tick. The per-frame game step keeps its own QueryPerformanceCounter clock: tick period = counter frequency / 30 (computed once). Each frame it runs whole ticks while the next tick’s time has passed, at most 3 per frame, advancing the next-tick time by one period each; if it is still behind after 3, it moves the next-tick time up to now (the backlog is dropped: the game slows down rather than skipping). It draws only on frames where at least one tick ran. There is no delta time in gameplay: every timer, speed and rate is per tick (1 tick = 1/30 s).
- Present. A second limiter in the present call waits (Sleep(1) loop) for another 1/30 s period of its own and presents with sync interval 0, or with sync interval 2 (every second vblank) when a display option is set. Same 30 fps, resynced when more than two periods behind.
- Numbers. Positions, velocities, gravity and animation frames are 32-bit floats (SSE scalar code); angles are 15-bit integers (0x8000 = 360 degrees); timers and the match clock are integer tick counts. No fixed-point arithmetic was found in the movement or floor code. The net code sends positions and fire requests (SYSTEMS.md §21), so the original does not rely on bit-exact simulation across machines.
Rebuild: Godot’s physics
runs at 30 Hz (project.godot), so
delta is one game tick and
velocity.y -= g * delta then
move_and_slide() is exactly the
game’s vy -= g; y += vy, with at
most 3 steps per frame
(max_physics_steps_per_frame).
Rendering is interpolated between ticks (Godot
physics interpolation); the camera follows the
drawn body.