XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.
Status: Built: lines, polygons, bitmaps with inks and styles, palette swaps, SVG parts, tethers, flips, turning, holes, light and dark. Reference: pictures.
The engine draws every picture it can, once, at load, into its own Bitmap; backends only show that bitmap. One path, buildPicture (load/expr.cpp): read, draw, flip, keep a Turnable for objects with a heading. What an object shows is a typed Picture, never strings a backend parses. So:
name.width works in tests);pixel collision tests exactly the pixels drawn;Text and <image> files are the exception: only a backend can measure them, so they cannot be pixel, and a size reads 0 until measured. Keep new kinds on this path.
<line> (from, to, colour, thickness), drawn as round-ended bars of true width. Lunar Lander is drawn entirely from lines. Lines have no fill.<polygon> of <point>s, filled even-odd, its own kind (not mixed with lines), drawn once so pixel, <hole> and turning all work. Rejected: a <fill /> on a closed run of lines (lines are redrawn when turned, losing holes).<bitmap> of <row>s, . clear and * solid, a whole <scale>, a <color>. Strict: an unnamed character or unequal rows stop the load. One element per row, since whitespace in text differs between the four XML libraries.<color char="w">s, so a ghost’s eyes follow its body’s looks. Rejected: two or three objects on top of each other.<bitmap style="mario"> takes the style’s scale and inks, its own winning. About 150 lines repeated another bitmap’s colours. Rejected: a separate <palettes> container, taking another sprite’s colours by name.<become style="angry"> puts a style’s colours on. Each palette an object can reach is drawn at load and shared by copies, so a swap only points at other pictures. Rejected: recolouring at run time (a pixel does not know its character). Not for an object with a heading.<image> hands a file to the backend, and only some read SVG, so pictures would differ per library.<svg>: a path, an optional part (all four of x, y, width, height, or none), <scale>, <hide> by id (a missing id is not an error).picture/svg.cpp includes it. It supports <use>; nanosvg does not.<flip> is applied right after drawing, before turning, so the size is exact.Turnable) and one current bitmap, redrawn when the whole-degree heading changes. Nearest sample keeps hard edges; lines are redrawn turned. Every heading is the same square. Rejected: 72 pictures made at load.<tether from to> is a sprite redrawn after each frame’s move between the two middles; in play only while both ends are. Rejected: a <line> with live ends (a sprite is drawn once).<hole> in a rule cuts a round hole (<rough> for a ragged edge) in the object’s own picture, so the next shot goes deeper.<hole sprite>: the arcade’s shields were cut by a fixed pattern).<light> is a radius; <dark> unlit draws only while lit, unseen from the first time lit. Only drawing changes, in one place (drawObject), so every library and generated game gets it.