An engine for describing games built around Xerces, exprtk, and SFML.
Status: idea (long term); related to 15
The engine already chooses window and XML backends at build or start time. A bigger version of the same thought: one game description, several targets, each with its own limits, and the toolchain does its best on each and tells the author what it had to give up.
The comparison that started it: a hobby toolkit for 8-bit machines writes the game logic once and swaps in target-specific code for screen setup, input, graphics, sound and start-up, so the same source builds for several old computers and consoles. The declarative version of that idea is stronger, because the description has no machine code in it at all.
A capability profile: resolution, color count and palette rules, sprite count per frame and per scanline, sprite size and colors per sprite, audio channels, input devices, memory. A loader then compares the game to the profile.
The output would not fail silently. Examples of the kind of messages the discussion imagined:
That list of which assets to redo is the useful part: the tool approximates, then says exactly what to fix.
Old hardware limits produced techniques the language may want to be able to say, or at least to know about when it targets those machines:
These are implementation techniques. The declarative layer would say there are two regions and a limit; a target would decide how.
Alongside real backends: a software renderer as the last fallback, and null implementations of graphics, audio and input, so the rest of the engine never checks whether a subsystem exists. A null audio backend makes the play-a-sound call always safe. A null input can be scripted, which is the basis for tests and for an AI player (20).
A related idea from emulator design: keep a system’s instruction or capability table as data, translate it once at start-up into a fast structure (an array of handlers), and only then run. Loading a small table costs almost nothing; what matters is that nothing stays a string lookup in the hot path. The same structure fits a target profile: parse, resolve, then run without further parsing (16).