# mgcarpet: reconstructing the Magic Carpet games with turn comparisons

> mgcarpet rebuilds Magic Carpet, Hidden Worlds and Magic Carpet 2 in a Rust engine that imports data from the user's game copies. Its simulation is compared turn by turn with state and input recorded from retail executables in instrumented DOSBox; the author reports matching certified recordings while tracking exceptions. Rendering and audio are rewritten separately, with deliberate differences documented.

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

## Requirements & limits

- **Prerequisites:** Original game data from a legally owned copy.
- **Prerequisites:** Rust 1.85 or newer; Linux builds need ALSA headers.
- **Testing evidence:** The author reports exact simulation replay only across certified recordings; rendering and audio are excluded from exact comparison.
- **License:** GPL-3.0-or-later licence.

## Primary sources

1. <https://github.com/raincz/mgcarpet/blob/9a82c640cc4fa5921f67e328588ff4ecc02e2052/README.md>
2. <https://github.com/raincz/mgcarpet/blob/9a82c640cc4fa5921f67e328588ff4ecc02e2052/docs/CONFORMANCE-REPORT.md>

## More in Games

- [MHLIB: reimplementing engines for Moorhuhn games](https://awesomerea.org/resources/mhlib-moorhuhn-case/index.md) · Case study
- [mkxp: reimplementing RPG Maker's RGSS runtime](https://awesomerea.org/resources/mkxp-rgss-case/index.md) · Case study
- [mortar-eng: LSW game scene and character reconstruction](https://awesomerea.org/resources/mortar-eng-lsw-case/index.md) · Case study
- [My biggest work: reconstructing Brawlhalla replay simulation](https://awesomerea.org/resources/my-biggest-work-brawlhalla-case/index.md) · Case study
- [My Simulation: reimplementing The Sims Online client](https://awesomerea.org/resources/my-simulation-case/index.md) · Case study
- [Nanolathe: a documented Total Annihilation engine reimplementation](https://awesomerea.org/resources/nanolathe-case/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.
