Demake: Building Retro ROMs from a Single Source
The project actually evolved from a very specific pain point regarding generative AI. While LLMs and image generators are great at creating "retro-style" sprites, they are notoriously bad at adhering to strict hardware constraints. They might give you a sprite that looks 8-bit, but it will often use colors or pixel dimensions that the actual hardware cannot render. By building a tool that understands these constraints, it becomes possible to bridge the gap between AI-generated assets and actual playable ROMs.
The engine relies on a custom declarative language called Demotic. Instead of getting bogged down in the implementation details of a specific CPU or GPU architecture, you describe the game logic and layout using a high-level syntax. To handle the different screen sizes and aspect ratios of various handhelds and consoles, Demotic implements relative units similar to modern CSS:
- vw / vh: Viewport width and height
- vmin / vmax: The minimum or maximum of the two viewport dimensions
This abstraction means you can define an object's position relative to the screen, and the compiler handles the translation to the specific pixel coordinates of the target hardware. It removes the tedious process of manually recalculating coordinates every time you want to port a project to a different system.
For those looking to integrate this into a development pipeline, there are three ways to interact with the tool: a web-based UI for quick prototyping, a CLI for power users, and an NPM package for those integrating it into a JS-based AI workflow.
If you are trying to build a project from scratch using retro constraints, this approach is significantly faster than learning the assembly language of five different consoles. You can focus on the prompt engineering for your assets and the game logic in Demotic, then let the compiler handle the deployment to the specific ROM format. It effectively treats retro hardware as a deployment target rather than a coding restriction.
Since it is still a work in progress, the current focus is on expanding the list of supported consoles and refining the Demotic language to be even more concise. For anyone interested in LLM agents that can generate actual playable games, this kind of middleware is exactly what is needed to make those agents useful in a real-world production environment.