# h4r: rebuilding the Heroes of Might and Magic IV engine

> h4r reimplements the Heroes of Might and Magic IV engine in Rust using data from a player's installation. It parses .h4r archives and .h4c maps, renders an adventure-map prototype and reconstructs selected movement and combat rules, with a separate harness comparing some rule outputs to the original executable.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-06
- Added to the catalog: 2026-11-08
- Original resource: <https://github.com/demen1n/h4r>
- Primary source: <https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/README.md>
- Catalog page: <https://awesomerea.org/resources/h4r-case/>
- Record JSON: <https://awesomerea.org/resources/h4r-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/h4r-case/index.md)

## Requirements & limits

- **Prerequisites:** A user's own Heroes of Might and Magic IV installation is required; game assets are not included.
- **Prerequisites:** Rust and Cargo are required; development uses Rust 1.99.1.
- **Limits:** The prototype cannot complete a game; combat has no playable battlefield, and AI, saves and sound are absent.
- **License:** GPL-3.0-or-later License.

## Primary sources

1. <https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/README.md>
2. <https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/tools/testbench/README.md>

## More in Games

- [Harold: reimplementing the Fallout 2 engine for browsers](https://awesomerea.org/resources/harold-fallout-2-case/index.md) · Case study
- [Hazard: Revenge — a reconstructed Hazard engine using SDL](https://awesomerea.org/resources/hazard-revenge-case/index.md) · Case study
- [Helion: rebuilding a Doom-compatible engine](https://awesomerea.org/resources/helion-doom-engine-case/index.md) · Case study
- [HERCULAN Engine: reimplementing Earthsiege 2 from retail binaries](https://awesomerea.org/resources/herculan-earthsiege-2-case/index.md) · Case study
- [hercules-native: rebuilding Disney's Hercules Action Game on Apple silicon](https://awesomerea.org/resources/hercules-native-case/index.md) · Case study
- [Heroes of Jin Yong: reimplementing the DOS game](https://awesomerea.org/resources/heroes-of-jinyong/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
