XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.
Status: Built.
assets/tuffy.ttf unless a <font> says otherwise (below), relative to the working directory. Running from the wrong folder used to draw nothing, silently.picture/font.cpp (public-domain font8x8, credit kept), drawn into a Bitmap by rasterizeText. When a font load fails each backend prints one error line and draws all text from that bitmap. Size: height scale size / 16 (min 1), cell 8x that tall, half as wide but never under 8 (size 48 gives 12 by 24). Non-ASCII is ?; newline starts a line; tab is a space. Text is chunky and monospaced, so width differs from the real font; centering with title.width still works. The first version used one scale for both axes and ran off the screen.tuffy.ttf (about 600 KB of source, a generation step since C++20 has no #embed), an embedded PNG atlas (needs a decoder in a fallback), each library’s default font (only raylib has one).<font> in a text or, usually, its style; the file is the text’s Picture::font (empty for the standard assets/tuffy.ttf), and every window backend keeps its fonts by file (SDL2 and OpenGL by file and size), unsmoothed. Shipped: Press Start 2P (assets/pressstart2p.ttf, SIL OFL, its licence beside it as pressstart2p-ofl.txt, which --generate copies with any font it copies), letters 8 by 8 at size 8, used by Mario Bros. and Q*bert (at their own 256 by 224, size 8 and 16), Pac-Man and Donkey Kong. Looked at: switching the built-in font on by name (its letters are stretched half as wide again, it was drawn as a fallback), a bitmap font as rows in the game file (each game standalone would carry the alphabet).assets/ in the working directory (cli).window.width.center - name.width / 2, naming the object inside its own position.<styles> of <style name>s, each an optional <size> and <color>; <text style="..."> takes what it leaves out, and its own wins. A style’s size is worked out with the game’s names, after layOutScenes, so a scene’s variable of the same name does not change it. Resolved in shared C++ (applyStyles), so the generator only writes the style down. Now a style also holds a bitmap’s scale and colors (pictures). Looked at: a style on the state or scene (each game file is one standalone screen set, and one list is enough), and a style holding a position too (a place is not a look).<centered>, chosen: a value tag of a position only, holding where the middle goes (empty: the window’s middle on that axis). centerOnOwnSize turns it into (where) - name.width / 2 once the object’s name is final, so groups, members and scene changes need nothing of their own. Looked at: a centered keyword in the expression (a string to parse), an anchor or origin per object (the parked “anchors” idea in values-and-names; centering is the common case), and self.width (a name whose meaning changes with the object).banner, prompt, help, keys, hud). Pong’s and Breakout’s titles keep their <formula>s as the examples of that tag.resolveSizeDependentPositions).<choose> piece of a <text>, <by> a value then its <word>s, showing the word the number picks (the first for 0; a fraction goes down; past either end the end word), live like <number>. The words stay in the file as elements; nothing is packed in a string.{score}; a string to parse).<content> at run time other than by a <choose> or a look.