XMLGameEngine

An engine for describing games built around Xerces, exprtk, and SFML.

View the Project on GitHub beefviper/XMLGameEngine

16. Code layout and the compile pipeline

Status: concept adopted; the current tree is flat

The compiler-pipeline model

A game description is treated like a program in a language with a front end and back end: parse, validate, evaluate, generate. Validation as its own explicit stage makes it much easier to catch a bug in one stage leaking into another (an earlier Pong condition bug was of that kind). The current code has this shape: game_xml parses and validates, game_expr evaluates, and the results are Objects and States.

The July 2026 skeleton

A restructure drafted this tree (empty files), reviewed in conversation:

Feedback given: the layering and the three-phase loop are sound; things worth deciding were whether types.h becomes a dumping ground, where the collection of live objects and the currently active state live, whether the build wiring uses #ifdef or a run-time factory, and that audio and configuration were absent (the author confirmed both were intentionally missing for now).

What the tree looks like now

The layered directories were later flattened into include/ and source/ files (now under lib/) with the same responsibilities (game_xml, game_expr, game, engine, command, command_executor, collision_detector, window_*, xml_*, xsd_lite). The command line (cli.cpp, main.cpp) later moved out of the engine into cli/, and the engine became a library (35). See the source map in docs/readme.md.

Open

Second batch: alternatives

Sources