Room
One room of a level, for a camera that moves room by room (a Metroidvania, a dungeon, Celeste’s screens). While the camera’s Follow target is inside a room, the camera stays inside it, in place of its Follow.StayInside; when the target crosses into another room, the camera slides over to it in Transition seconds, with the game held still meanwhile if Freeze is ticked. Rooms can change the music and how dark it is, and say they’ve been entered with a message.
A room is a box of Size centered on its entity. Make rooms at least as big as the camera’s view; where they overlap, the one listed first wins. Out of every room (a gap between them), the camera keeps to the last one.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
size: [x, y] = [18,10]. The room’s width and height in world units. 18 by 10 is one screen with the default camera. (Field: a vector.)transition: a number = 0.5. Seconds the camera takes to slide over when the target enters. 0 cuts straight there. (Field: a number.)freeze: true or false = true. Holds the game still while the camera slides over, so nothing moves under the player’s nose. (Field: on or off.)music: text = null. Music that starts when the room is entered, e.g. “Music/cave.mp3”. Empty leaves the music alone. (Music in Assets, e.g. “Music/song.wav”.) (Field: music.)ambient: a color, “#RRGGBB” or “#RRGGBBAA” = “#00000000”. The camera’s Camera.Ambient light in here: a dark color for a cave in a sunny level. Transparent (the default) gives the camera back its own. (Field: a color.)message: text = null. A message sent with Game.Send when the room is entered, with the room’s entity as its data. (Names a message.) (Field: a name.)
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
isCurrent: true or false. True while it’s the room the camera is in.
Scripts use it as Room: its methods, events and values that aren’t saved with the scene.