Studio › Manual › 3D rooms

Billboard sprites

Room > Game > Billboard Sprite… (⌃⌥8), or right-click empty space, puts a sprite sheet in the room as a billboard: an upright card that always turns to face the camera (about up), showing the frame for the way it's seen from, as early-90s shooters drew their enemies from 8 directions. Pick the sheet's PNG; its settings are the .json beside it with the same name (or sheet.json in its folder):

{"frame_w": 128, "frame_h": 128, "origin": [64, 127], "px_per_m": 64,
"anims": {"stand": {"row": 0, "dirs": 8, "frames": 1, "fps": 0, "loop": true},
"die": {"row": 16, "dirs": 1, "frames": 5, "fps": 8, "loop": false}}}

The frames go across, an animation's directions down (an 8-direction one takes 8 rows from row); origin is the pixel at its feet; px_per_m pixels make a metre. Direction d shows it turned d × 45° counter-clockwise (seen from above) from facing the viewer. The billboard is a model of its own (a card, baked as Room 3D bakes it) with the sheet in datafiles/room3d/billboards/<name>/; its turn is the way it faces. The inspector's Billboard section picks its animation (bb_anim).

Animation. While editing, the view shows the animation's first frame (from the side the camera sees it). Room > 3D View > Play Animations (⌃⇧P) plays it in the view, and Play Room plays it from the start as the game does: the frame is the animation's time × its fps, going round when it loops and stopping on the last frame when it doesn't (the kit's r3d_billboard_frame at bb_time), the row its first plus the direction it's seen from (8-direction animations; 1-direction ones keep their row). Its collision is a box round it, not solid. In GameMaker the kit's scr_r3d_billboard draws it (billboard, bb_anim, facing in its creation code; r3d_billboard_play(inst, "walk")).

Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.