XMLGameEngine

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

View the Project on GitHub beefviper/XMLGameEngine

22. Motion models

Status: idea (a vocabulary to choose from; only constant-velocity motion is built)

The question

The engine today moves things by a velocity that a rule can rewrite. Pong needs nothing more. A platformer needs acceleration, gravity and a notion of grounded versus airborne. The question is how to name the step up so that an author picks a model instead of writing forces, and so that later games do not force a redesign (13, 23).

Orders of motion

One useful ladder, from the early-arcade discussion:

The practical point: everything up to the second step fits a rule-driven declarative engine comfortably; the third is now built for one case: an object’s <acceleration> and a held <accelerate> thrust that burns a variable (Lunar Lander, 34). It adds per-object state, continuous updates, and a fixed order inside a frame (gravity, then input, then collision, then response).

Names for the two camps

Several pairs were weighed for the public vocabulary and for the internal docs:

Suggestion recorded: two public words, kinematic and dynamic, with the finer labels kept for documentation.

Simulated simulation

Many old games only imitate physics with tables and fixed arcs. A dynamic model therefore probably needs a mode that says behave as if simulated (a fixed arc that looks like gravity) next to a mode that integrates for real. The same split appears in the jump discussion (23): fixed versus variable.

Movement feel as data

Two design cultures showed up. Some games treat the avatar as an animation system that is given commands (press to begin a run cycle, release to begin a stop, press jump to begin the one fixed jump). Movement is a puzzle of preparation: line up with the edge, take the right number of steps. Modern remakes of the same games give free control and forgiving jumps. If the vocabulary can say which of the two a game uses, both can be described without special cases:

Sources