Loom - Secondary Animation for GameMaker
A downloadable tool
Characters in expensive games trail things: a cape that lags a jump, hair that whips on a turn, a lantern swinging on its chain. GameMaker's own route to that is Box2D — the manual's rope costs one instance plus one fixture per link, inside a physics room. Twenty links is twenty instances before your game's own objects, in a room that must be physics-enabled whether it wants to be or not.
Loom is the whole secondary-animation layer in pure GML, attached to an ordinary animated sprite in three lines. No physics room, no instances, no fixtures — a rig is a struct, a chain is arrays of numbers.
rig = new LoomRig(loom_preset_cape()); // Create rig.step(x, y, image_index, image_xscale, delta_time); // Step rig.draw(); // Draw
Six presets, one core
cape · hair · tail · rope · chain · pennant
Every preset is a plain data struct — copy it, retune it, or build your own. Each ships with its own renderer: capes are tapered, gradient-shaded ribbons with a trim edge; hair is phase-offset strands; chains draw real alternating links oriented along the segments, not a polyline; and the textured mode maps your sprite along the cloth.
The cape rides the run cycle
A run cycle bobs. If the anchor doesn't bob with the shoulder, the cloth floats — that is the detail that separates a cape from a rectangle. Author per-sprite-frame offsets once and the rig tracks them, mirrored automatically when the character turns:
rig.anchor_frames(0, [[-12,-68], [-12,-72], [-12,-68], [-12,-72]]);
Drapes, never sinks
Most hand-rolled verlet enforces segment length and body colliders sequentially — whichever pass runs last wins, so the cloth either stretches over the torso or sinks into it. Loom resolves both together: each node lands on the closed-form intersection of “exactly one segment from my parent” and “outside the collider”. Measured across a 7-scene test matrix: 0.00% stretch and 0.00px penetration in every scene where the anchor is outside the body. Set a floor and fabric piles onto it with friction instead of falling through.
Identical at 30, 60, 144 and 240 Hz
The sim runs on a fixed-substep accumulator (1/120 s): the same wall-clock time produces the same substep sequence on every display, so capes do not explode on high-refresh monitors — that trap is removed structurally, not tuned around. Under extreme load the sim slows instead of spiralling; a debugger pause or window drag cannot NaN a chain.
Deterministic wind
The wind field is layered sinusoids of time and position — no random() anywhere. Gusts travel spatially along the cloth (that travelling ripple is most of what reads as “expensive”), and two identical runs produce identical motion, which matters for replays and capture.
Hang things, grab things, teleport safely
rig.tip(0)— world position of a chain's last node: hang a lantern, a key, a fish.rig.grab(chain, node, mx, my)— pin any node to the mouse or a hand while held.- Teleport guard: a room transition or respawn snaps the chains to rest — it reads as appeared, never as the cape being fired across the screen.
delta_timeis microseconds; Loom converts it exactly once, in one file. That off-by-1000 is not your bug to have.
Built to be read
- Pure GML. No native extension, no DLL — nothing to break on a runtime update, every export platform works.
- The simulation core has zero engine calls. Integration, constraints, colliders and the wind field are total functions of their inputs, in one readable file.
- Namespaced. Everything is
loom_/LOOM_/Loom*— nothing collides with your project. - Texture-page safe. Sprite cloth UVs come from
sprite_get_uvs, so sprites sharing a texture page map correctly. - A runnable 5-page demo room ships beside the library — keys 1–5: the knight, all six presets, a grabbable rope, a calm→breeze→gale wind cycle, and textured cloth. Every rig call in it is the three-line API above.
What's in the download
Loom.yymps— import via Tools › Import Local Package- The full raw project — readable, commented source, no minification
- 4 scripts (the core has zero engine calls), the demo object, the demo room
- Readme with quickstart, API reference and the collider/anchor recipes
More GameMaker tools from CSAF
Loom is free because it is the introduction. If it earns a place in your project, these are the paid tools it sits beside:
- Kinetic UI — spring-animated interface system. Most UI libraries arrange your art; this one draws the interface.
- Pliant — sprite mesh deformation. GameMaker can scale and rotate a sprite; it cannot bend one.
- Meridian — procedural skill trees that draw their own forty icons.
- Trove — procedural item icons and inventory, pictures included.
Requires GameMaker 2024+ (built and package-verified headlessly on runtime 2024.14). No performance benchmark is claimed — none was measured; the frame-rate-independence and solver figures above come from the core's numerical validation suite, and every visual claim was verified by running the demo and looking at the frames. Code is AI-written and disclosed as such.
| Updated | 7 hours ago |
| Published | 1 day ago |
| Status | Released |
| Category | Tool |
| Author | CSAF — Corey & Stephanie's Asset Factory |
| Tags | 2D, Animation, Asset Pack, Effects, GameMaker, gml, Physics, sourcecode, Sprites, vfx |
| AI Disclosure | AI Assisted, Code, Graphics |
Download
Click download now to get access to the following files:
Development log
- Loom is now pay-what-you-want1 day ago
- Your character's cape is painted on1 day ago







