What Are Sequences?
Introduced in GameMaker Studio 2.3, Sequences are a visual timeline editor built into the GameMaker IDE. Before Sequences, if you wanted to animate multiple objects together — say, a title screen where text slides in, a logo fades up, and a sound plays — you'd write a state machine or a chain of alarms in GML. It worked, but it was tedious to time and painful to tweak.
Sequences change that. You open the Sequence editor, add tracks for sprites, objects, sound, and instance properties, and place keyframes visually on a timeline. The result is a reusable animation asset you can drop into any room or trigger in code.
Creating Your First Sequence (Step by Step)
- In the Asset Browser, right-click and choose Create > Sequence.
- The Sequence editor opens. Set your canvas size (matches your room, usually).
- Click the + button to add a track. Choose a sprite or object asset.
- Move the playhead to a time position. Change a property (x, y, alpha, scale, rotation). GameMaker automatically creates a keyframe.
- Move to another time position. Change the property again. A second keyframe is created, and GameMaker interpolates between them.
- Add an Audio track the same way — drag an audio asset in and set the playback time.
- Add a Broadcast Message track to fire events (like signalling that the Sequence has ended).
- Preview it in the editor. Adjust keyframes by dragging them on the timeline.
- Add it to a room via the Room Editor's Layer panel, or create it in code:
layer_sequence_create(layer_id, x, y, seq_MySequence).
Key Concepts
Tracks: A track represents one thing being animated — a sprite instance, a sound, an object, or a property like camera zoom. You can have as many tracks as needed.
Keyframes: Each keyframe stores a value at a specific time. Between keyframes, GameMaker interpolates the value (linear by default, but you can change the curve in the Keyframe editor).
Broadcast Messages: These are events fired at a specific time in the Sequence. Subscribe to them in object code with broadcast_message_received or through the Sequence's event editor. Useful for triggering game logic when an animation reaches a certain point.
Moment Events: Similar to broadcast messages but fired every step the playhead crosses a specific frame. Good for sound effects or particle bursts at exact moments.
What Sequences Are Good For
- Cutscenes and story moments
- Animated title/splash screens
- UI reveals and transitions (level complete screens, menus)
- Tutorial overlays with timed arrows and text
- Camera pans tied to specific story beats
In iZBOT, Sequences handled several of the game's animated moments — elements that would otherwise have required careful alarm timing and state tracking in GML. The ability to drag keyframes and preview the result immediately saved a significant amount of iteration time.
What to Use Animated Sprites for Instead
Sequences are overkill for a character's walk cycle or idle animation. For simple looping animations on a single sprite, the standard Sprite Editor with multiple frames is faster and more memory-efficient. Use animated sprites for anything that loops continuously — use Sequences for anything with a distinct start, middle, and end.
A good rule of thumb: if the animation involves only one sprite and loops indefinitely, use an animated sprite. If it involves multiple elements, plays once, or needs to trigger logic at specific points, use a Sequence.
Sequences vs Manual GML Animation
Before Sequences, triggering timed animation events meant alarm chains, counters, and state machines. A 10-second intro cutscene could need 100+ lines of GML. The same thing in a Sequence takes 10 minutes in the editor. When you need to adjust timing, you drag keyframes instead of hunting through code.
The trade-off: Sequences have some overhead and are less flexible than pure GML for highly conditional logic. If an animation needs to respond dynamically to gameplay state mid-play, you may still need GML. For a fixed-timeline animation, Sequences win every time.
Common Gotchas
- Sequences run at the room's speed (frames per second), not independently. If you change room speed, your Sequence timing changes.
- Destroying the layer a Sequence is on will destroy the Sequence. Store the
layer_element_idif you need a reference. - Looping is controlled by the Sequence's Playback property (one-shot, loop, pingpong). Set it in the editor, not in code, unless you use
layer_sequence_headdir().
Frequently Asked Questions
What are GameMaker Sequences?
Sequences are GameMaker's built-in animation and timeline tool, introduced in GameMaker Studio 2.3. They let you create complex animations, cutscenes, and UI transitions visually — moving sprites, changing properties, and triggering events over time — without writing GML code for every keyframe.
How do you create a Sequence in GameMaker?
In the GameMaker IDE, go to the Asset Browser, right-click, and select Create > Sequence. The Sequence editor opens a timeline where you add tracks for sprites, objects, audio, and properties. Set keyframes by moving the playhead and editing values. Add the Sequence to a room or create it in code with layer_sequence_create().
Are GameMaker Sequences better than animated sprites?
For complex multi-element animations — cutscenes, UI reveals, animated menus — Sequences are much better. For simple looping sprite animations (a character's walk cycle), animated sprites are still the right tool. Use Sequences when you need to coordinate multiple objects or properties over a fixed timeline.
Built with GameMaker — See the Result
iZBOT is a precision platformer built in GameMaker by Australian indie studio Ruxar. If you're learning GameMaker, playing a finished game made with it is surprisingly instructive.
Play iZBOT on Steam – $9.99