One step of a running game, in GameMaker's order:
- every instance's
xpreviousandypreviousbecome its position - begin step events
- alarms: each alarm above zero counts down, and one reaching zero turns off and runs its alarm event
- keyboard events: a held key's keyboard event, a pressed key's key press event, a
released key's key release event, each also as "any key" (
1) when there is one, and the keyboard event "no key" (0) when nothing is held; then mouse events - step events
- built-in motion: friction slows
speedtowards zero, gravity adds tohspeedandvspeed, then the position moves by them; an instance that is now wholly outside the room, and was not before, runs the outside room event - collision events (
Cauldron2D.GameMaker.Collide) - end step events, then views that follow an object move, then every room layer with
a speed scrolls by it (
World'sscroll) (Cauldron2D.GameMaker.Views) - animation:
image_indexadvances byimage_speedtimes the sprite's own speed, wrapping at the sprite's frame count, and an instance that wrapped runs the animation end event - a room change asked for during the step happens
Within each stage instances act in creation order; an instance destroyed partway through a stage takes no further part in it.
input has the GameMaker key codes held, pressed this step and released this
step, and may have :mouse: %{position: {x, y}, held: buttons, pressed: buttons, released: buttons}, buttons being sets of :left, :right and :middle, position
in room pixels.
Summary
Functions
The world one step on, with input as the players' input this step.
Functions
@spec run(Cauldron2D.GameMaker.World.t(), Cauldron2D.GameMaker.World.input()) :: Cauldron2D.GameMaker.World.t()
The world one step on, with input as the players' input this step.