XMLGameEngine

An engine for describing games built around Xerces, exprtk, and SFML.

View the Project on GitHub beefviper/XMLGameEngine

Notes for AI coding agents

Working notes for any AI coding agent (or new contributor) picking this project up. Everything the project itself relies on is in ../readme.md and ../designs/00-designs.md; this folder is for agent-facing bookkeeping.

The first version of these docs (the design write-ups, sources.md and the scan script) was written by Claude (Sonnet 5.5) on 2026-09-29, from the author’s exported chat history plus a read of the source on the claude branch. Frogger (games/frogger.xml), the verbs it needed and design write-up 21 were added by Claude (Sonnet 5.5) on 2026-09-30, as was Space Race (games/spacerace.xml, first to two points, no new verbs). Kaboom (games/kaboom.xml, design write-up 30, no new verbs) was added by Claude (Sonnet 5.5) on 2026-09-30 as a game to have fun with, and to try <random> inside a <group>; it was first a looser game named Gem Catcher, and was renamed and rewritten to follow the arcade rules (bombs only, waves, a miss sets off the wave and costs a bucket) on the same day. Freeway, Depth Charge and Astrosmash (design write-ups 31 to 33, no new verbs) were added the same day, chosen because they needed nothing the vocabulary lacked. Lunar Lander (games/lunarlander.xml, design write-up 34) was added by Claude (Sonnet 5.5) on 2026-09-30 at the author’s request, with the <line> sprite shape, <type>pixel</type> collisions, <acceleration>, <accelerate>, <stop /> and the slower/faster filters; the window backends for lines were only compile-checked. A second export (ChatGPT) was mined on 2026-09-30: it added design docs 22 to 28 and a section headed second batch in most earlier docs; only paraphrased ideas were kept, and titles of chats that did not start as game discussions were made generic. On 2026-10-01 Claude (Opus 5.5) checked every doc against the code, fixed the crash when XGEGUI switched to raylib or OpenGL (OpenGL contexts shared with Qt, 39), paused the game while the Options dialog is open, and fixed a handful of engine bugs found on the way (a <push> naming no state read past the end of the list of states, <pop /> could empty the state stack, a condition’s <pop /> freed the commands it was running, a bad file or image ended the program instead of throwing); it built every library on Linux to do it, including raylib 6.0 configured as vcpkg does. On 2026-10-02 Claude (Sonnet 5.5) built design 40 at the author’s request: XGEGUI shows the game in one window (the Qt renderer) or two (a video library’s own window), the embedding code of design 39 was removed from lib/ and gui/, and the question before moving to two windows is kept in xgegui.ini. Only the Qt renderer, SDL2 and OpenGL (GLFW) could be built and run for that (under a virtual X server); SFML 3 and raylib were not built. On 2026-10-02 Claude (Sonnet 5.5) also built design 42 at the author’s request: the <bitmap> sprite shape (ASCII rows), named <sprite>s with an <animation> of <frame>s on a seconds interval, a Space Invaders redrawn from them (three kinds of alien as a <group> of <grid>s, a bitmap cannon, a thin bullet), and <fire> now leaves from the middle of the shooter. Built and run on Linux with SFML 3, SDL2, raylib and OpenGL; the Qt renderer was not built.

What exists

Conventions the author asked for

Facts that are easy to get wrong

Suggested next steps (not started)

  1. Decide design 04 (arithmetic as text vs elements); design 03 is done.
  2. Add an arcing jump (gravity now exists: an object’s <acceleration>, see design 34; what is missing is grounded-versus-airborne and a jump impulse) (design 13, and the air-control refinement in design 23) as the next test of whether the vocabulary approach extends. hop (Frogger) was the first: one instant step per press.
  3. The ideas listed at the end of design 21: show and hide verbs (an amount for inc/dec is built, see design 41), and per-row velocity in <grid> (the built <group> tag, design 29, covers lanes; its open points are nested groups, a bare <x> in a member and evenly spaced members).
  4. Rename collisionData.basic (and the basic= label in printGame()) to something that says what it is.
  5. Sort out the file structure: lib/source/ and lib/include/ are flat and growing (25 and 26 files). Move them into folders by responsibility (parse and evaluate, engine loop, collision, window backends, XML backends); the Visual Studio filters are meant to be built from the directories, so this is only about the layout on disk. Not started; design 16 has the history of the earlier, over-layered attempt on the rewrite branch and why it was flattened.
  6. Watch Lunar Lander in each window backend once on Windows; on Linux it has been drawn by SFML 3, raylib 6.0 and OpenGL inside XGEGUI, and by raylib on its own (menu, play and pause screens). Scoring by fuel left is the obvious next step for it (rotation now exists: design 41).
  7. Designs 22 to 28 are ideas from a second batch of conversations, not plans; nothing in them is built.
  8. A build that fetches both SFML and raylib (no vcpkg, no system packages) links them statically, and both carry stb_image: the link fails with duplicate stbi_* symbols on Linux. vcpkg’s DLLs do not have the problem. Building one of the two as a shared library would avoid it; not done.
  9. Asteroids (Claude, Sonnet 5.5, 2026-10-01; design 41) added headings, <turn>, <thrust>, <drag>, <hidden>, <release> and an amount on <inc>/<dec>. Its open points: shots that wrap and expire, a safe wait before the ship comes back, runtime spawning instead of pools, a flying saucer and more than one wave. Not yet watched in a window backend on Windows.
  10. Watch XGEGUI’s two-window layout once on Windows with each library, SFML 3 and raylib above all (design 40): the agent could only run the Qt renderer, SDL2 and OpenGL, on Linux. If the controls lag while a library’s window waits out its frame, a backend needs a way to be told not to wait.
  11. Bitmap sprites and animation (design 42) open points: a palette (several colours in one bitmap), an interval per frame, an animation that runs once, turning a bitmap at draw time for smoother angles, and compiling the inspector label change in XGEGUI. Not watched in the Qt renderer or on Windows.

Privacy rule for these docs

This repository is public. Nothing personal from a chat export goes in it: no health, identity, contact or business details, and no names beyond the beefviper author handle already in the code headers. Conversation titles are listed only for design-relevant chats.