//! Game logic for *Ratchet & Clank: Going Commando* (PS2). //! //! The rules, systems and behaviour of the game, reimplemented from the //! original code rather than wrapped around it. No emulation, no interpreter: //! this is a Rust implementation that is meant to behave the way the game does. //! //! # What belongs here //! //! * `hero` - Ratchet's controller. Movement on a **spherical** planet, which is //! what distinguishes this game: the camera and collision code change gravity //! handling across the whole world, and is the main reason the first game's //! movement code does not transfer. //! * `chargeboots` - hold and release timing, chained jumps and the dash. //! * `weapons` - the wrench and the weapon set, plus the weapon modification //! system (per-weapon bitmasks: lock-on, shock, acid, ...). //! * `gadgets` - the Pyrocitor, Bomb Glove, Glove of Doom and friends. //! * `moby_update` - the per-class update dispatch, driven by each level's //! `lvl.vtbl` class table. Classes that are identical across levels are //! shared; the rest are resolved through the overlay relocator in //! `gc-formats`. //! * `collision` - queries against the collision world. //! * `progression` - bolts, the Gadgetron vendor, RPG upgrades and unlocks. //! * `save_game` - the IFF chunk save format, and importing a Ratchet & Clank //! (2002) save to unlock the legacy weapons for free. //! * `memcard` - the 25-state memory-card finite state machine and its UI. //! //! # The float model //! //! The Emotion Engine's FPU is not IEEE-754 in every respect: it has no //! denormals, and rounding differs in places. Gameplay code here reproduces //! that model rather than using Rust's native `f32`, because the difference is //! visible in the movement and the camera. See `docs/plan/float-model.md`. //! //! # Timing //! //! The game is 60 Hz (this disc is NTSC). Constants are expressed per tick at //! that rate. PAL discs run 50 Hz and would need different timing throughout.