Making a speedrun timer in D
10 months ago
- #linux
- #game-hacking
- #speedrunning
- The author created a custom speedrun timer for Deus Ex to implement features like auto-splitting and load time removal.
- The timer was developed in the D programming language due to its system-level capabilities and high-level features.
- Initial attempts to find a loading flag in memory failed, leading to a more complex approach involving code injection.
- Key Linux syscalls like `ptrace` and `process_vm_readv` were used to interact with the game's memory.
- The `LoadMap` function in Deus Ex was identified and modified to set a custom loading flag.
- A safe memory location within the game's process was found to store the loading flag and map name.
- The timer includes logic to detect loading screens and automatically pause the timer.
- Autosplitting was implemented by tracking the current map name returned by `LoadMap`.
- Challenges included handling exceptions during loading and optimizing memory access to reduce game stutter.
- Future improvements could involve more efficient signaling mechanisms and support for save time removal.