XMLGameEngine

XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.

View the Project on GitHub beefviper/XMLGameEngine

Backends and the library

Status: Built: 4 XML, 4 window and 3 sound libraries plus silence; a library and two programs. Reference: the engine.

Why backends

The prototype was hard-wired to Xerces and SFML. Each library sits behind an interface so the core never names one, licensing or weight can be dodged per library, and one can be swapped without touching game logic. A compiling two-library example proved it before adoption.

XML: XmlDocument and XmlNode

Decision Alternative Why
A node is an interface one struct everything converts into libraries store data very differently; a struct copies on every access
Children come as fresh unique_ptrs raw pointers into a cache several nodes alive while a subtree is walked; allocation is irrelevant at load
Unfiltered traversal, callers filter by name positional element order is not guaranteed
Read-only, UTF-8 std::string mutable; wstring RapidXML cannot mutate; library-agnostic

Window and sound

Scale

Library and programs