XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.
Status: Built: text arithmetic of + - * / (load/calc), and <formula> tags for everything more. Reference: arithmetic as tags.
Arithmetic (window.width.center - ball.radius) was the last thing hidden from XSD and XSLT: a string a tool cannot see into. Wanted: a form a schema can check and a transformation can walk, that does not cost every game its readability, and that needs no second tool.
| Option | Verdict |
|---|---|
| E1. Paste the string through | Fine for C++ targets, not assembly |
| E2. XSLT parses it | Awkward precedence parsing |
| E3. Parse in C++ to an AST as XML for XSLT | Adds a step |
| E4. Computation as elements | Built as <formula>, beside plain text for sums |
<formula><random> or another operation. Precedence is the nesting; a chain (a - b - c) is one operation with several second operands.augend/addend, minuend/subtrahend, multiplicand/multiplier, dividend/divisor. Operations with no classic names take <value>s. One table, operationShape in game/command.cpp, drives loader, evaluator and printer.<dividend>a + b</dividend> brings the hidden string back.late flag tells these apart.<equation> of steps (three-address code) was built beside it, then dropped: two structured spellings of one thing are one too many, and its operands as attributes broke the format’s rule.<smallest>, <largest>, <absolute>, <clamp>; clamp reuses the condition words (<atleast>, <atmost>). Rejected: <min>/<max>, which already mean a <random>’s ends.<compare> gives 1 or 0: <compare><value>mode.waves</value><atleast>4</atleast></compare>, the condition words again, so there is one comparing vocabulary and the test says which side is which. Rejected: five two-operand comparisons (which side?), a test as an empty tag between bare operands (mixed content the schema cannot check), an <if> (multiplying by 1 or 0 says it).<sign>, <ceiling>, <floor>, <round>, <negate>, <sine> and <cosine> in degrees (so no pi), <remainder> from 0 up to the divisor so a count wraps.<divide>a<by/>b</divide>), output names per operation, dotted outputs written into an object.max(...), cos(... * pi / 180)) and comparisons: a second, hidden maths vocabulary beside the tags.load/calc: numbers, names, + - * /, a leading sign, brackets, nothing else. It compiles a text once into steps that read each name’s number where it lives, and works left to right exactly as written. A function call stops the load and says to write a <formula>.A formula’s operands hold operations, so the schema’s types contain themselves. Xerces handles that; load/xsd was taught to follow a named type that refers to itself. The operations are listed twice (formula and operand), since a group containing itself is still refused there.
tangent, square root, power and pick: added when a game needs one. A schedule (a list of lengths, one per wave) would say Pac-Man’s timings plainly.