Building 2D games
Sprite animation
Flipbook animation from sprite sheets, and cutout rigs.
Flipbooks
A sprite animates automatically when its texture is a sprite sheet and the texture's
.mt sidecar describes the grid:
atlas:4,1,4,6
uuid:E0E2E5C73B79CFB1atlas:columns,rows,frames,fps, so this example is a 4×1 strip with 4 frames at 6 frames
per second. Any sprite that uses this texture loops through the frames, as long as the scene's
update: list contains Sprite2DFlipbook.
From the Pixel Art editor
- Draw your frames in Pixel Art. Use the frame strip and onion skin.
- Save as > Flipbook strip (.png). The frames are laid out side by side.
- Add the
atlas:line to the image's.mt. To do that in the browser, edit the.mton your computer and import the image again together with it.
Cutout rigs
A rig (.tgrig) animates a character made of separate parts (bones and slots) with
keyframed rotation clips, and it can blend between clips. Place one with -Rig:<uuid> and
add Rig2DAnimation to update:.