A collision layer holds a room's collision apart from its art: you paint where things are solid, sloped, one-way or a ladder over the room, whatever the art tiles are. Add one with + > Collision Layer in the Layers list, or Room > Collision > Add Collision Layer (⌃⇧⌘K); the first time, Studio makes a small collision tile set in the project (ts_studio_collision_32, in Studio Kit/Collision).
It is saved as an ordinary GameMaker tile layer on that tile set, so GameMaker opens and builds the room unchanged (there it shows as coloured tiles). In the game the Studio kit hides it when the room starts and reads it directly: move_and_slide stops on its solid kinds, F3 draws it.
Paint with the Collision tool (K, or ⌥⌘6); ⌃⌘K opens its palette of kinds, each in its own colour:
- Brush (⌃⇧⌘1) paints cell by cell; right-drag erases; ⌥-click picks the kind under the pointer.
- Rectangle (⌃⇧⌘2) drags out a box.
- Fill (⌃⇧⌘3) fills the touching cells that hold the same kind.
- Erase (⌃⇧⌘4, or E with the tool) clears cells.
- Polygon (⌃⇧⌘5) draws polygon shapes (see "Polygon collision shapes").
Opacity (⌃⇧⌘[ and ⌃⇧⌘]) and Show Collision Layers (⌃⇧⌘H) are in the palette and the room inspector, view only. The inspector's Collision section shows the kind under the pointer and which collision layers the selected one is on: give a second collision layer only the "enemies" layer and players walk through it while enemies are stopped. Every change is one undo step.
Related topics
Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.