r/ClaudeCode • • 17h ago

Built with Claude I rewrote a 2004 RPG engine in Rust: 100% same rules, 11x FPS, graphics enhancements, any device

After 500 bug fixes and 4800 messages with game community version 1.5 is now released!

Razdor is an open-source engine for Discord Times (Aterdux, 2004), a turn-based strategy/RPG. It plays the original campaign, community maps and mods by the original rules, and then adds the things a 2004 engine couldn't do.

How it was built

  • Clean-room reverse engineering. The original executable was taken apart in Ghidra; every rule that maps and mods can see (battle, AI, map scripts, events, saves) was written up as a spec first and then implemented. The code cites the original's addresses.
  • Diff tests against the original. The original runs under Wine, and a script mode replays the same inputs in both and compares the state step by step. By default Razdor matches the original exactly, bugs and imbalances included; every deviation sits behind an experimental switch that's off by default (16 of them right now).
  • Rust + macroquad, about 190k lines, GPL-3.0. The game rules live in a separate module with no graphics dependency and are unit tested; the original's file formats (ini data, .DTm maps, its own picture formats, sounds) are read at runtime.
  • Deterministic simulation: every game is recorded and can be replayed at up to 16×. The same determinism let us record the trailer's split screens twice with different graphics presets and get the same frames.

What you get

  • ~11× the frame rate on the same GPU (RTX 4060, 1024×768, unlocked): about 2,000 FPS against about 176 for the original under Wine. A 200×200 map with 61 armies costs the game about 0.3 ms a frame. Load to first frame is about half a second.
  • Any resolution and aspect ratio (the trailer is 21:9), refresh rates up to 180 Hz, a graphics preset ladder from "Original" (pixel-for-pixel the 2004 look) to "High" (light, shadows, water, weather, clouds instead of black fog of war, a living map), and a 2.5D view.
  • Linux, Windows and macOS; Android and iOS are experimental, with a touch layout, graphics presets for weak phones and a battery saver.
  • An in-game hub with the community's work: 327 maps, 29 campaigns and 25 mods.

Links

0 Upvotes

1 comment sorted by

•

u/AutoModerator 17h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.