XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.
Status: Built.
xgecli [game] [options]
-g, --game <game> the game, same as giving it bare
-w, --window <name> sfml3 (default), raylib, sdl2, opengl
-x, --xml <name> xerces (default), tinyxml2, pugixml, rapidxml
-a, --audio <name> sfml3 (default), raylib, sdl2, none
--generate <target> write the game out as a program (windows-cpp) instead of playing it
-o, --output <dir> where --generate writes (default <game>-<target>)
--record play, and write what was played into the game file as its <demo>
-h, --help
xgecli pong, xgecli pong.xml, or nothing (runs pong). Every option is optional; defaults match the C++ defaults.-gpong, -g pong); a long one needs the space (--game pong; --game=pong is an error that says so, the author prefers the spaced form). Names are not case sensitive. A repeated option or game is an error (not “last wins”: a quiet way to run the wrong backend); unknown option or backend errors list the valid names. A value starting with - is never taken as the previous option’s value. Bare and -g are the same game, so giving both is an error.file:, window:, xml:, audio:, one per line..xml if no extension; then as given; then its file name alone in the working directory; then in descriptions/ of the data folder. The data folder is the games folder: the first folder with both descriptions/ and assets/ in it, looking at the working directory, the program’s folder and the folder above it, each itself and then its games/; then the working directory is changed to it (the engine reads assets/ relative to it), so the program starts from anywhere. Shared with xgegui through xge/lib/engine/folder.h so they cannot drift.parseCommandLine and findGameFile throw CliError; main() prints the message and usage to stderr. cli.cpp is compiled into xgetest too (the library does not contain it). Library code throws and never calls exit() because xgegui loads game after game.--generate takes a platform-language target (windows-cpp), long form only because -g is the game; -o is an error without it. It is resolved before the working directory changes, so the default folder and a relative -o are where the user started; the stylesheets are found in generators/ of the data folder, and the engine’s files it copies from lib/ of the repository’s xge/ it was built from (GenerateRequest::engineFolder, set from XGE_ENGINE_FOLDER). It prints the files written and the assets copied, and does not start a window. generate.cpp is compiled into xgetest too.--record plays as usual from a new seed and, when the window closes, writes the <demo> into the game file (withDemo), replacing the one there and keeping the file’s line endings. Long form only, like --generate, with which it cannot go. It writes the repository’s file on purpose: the demo is part of the game.-g for generate (it is the game); --game=pong; last-one-wins; short backend aliases (sfml, xerxes).