A room (a ROOM entry): a level or screen of the game, size {width, height}
pixels, stepped speed times a second (GameMaker Studio 2 files set the game's
speed instead and leave this 0).
colouris the background colour{r, g, b, a}, drawn whenfillis setviewsare the room's eightCauldron2D.GameMaker.Room.Views, used whenviews?is setinstancesare itsCauldron2D.GameMaker.Room.Instances, in creation order- GameMaker Studio 1 rooms draw
backdrops(Cauldron2D.GameMaker.Room.Backdrop) andtiles(Cauldron2D.GameMaker.Room.Tile); GameMaker Studio 2 rooms leave those empty and drawlayers(Cauldron2D.GameMaker.Room.Layer) instead gravityis{x, y}andpixels_per_metrethe scale, for rooms with physicscreation_codeis the code entry run when the room starts,nilfor none
Summary
Functions
The byte length of a placed instance in a file, measured from the gaps between
consecutive instances in its rooms' instance lists at rooms; fallback when no
room places two.
The room at at. instance_size is the byte length of one placed instance in this
file (see Cauldron2D.GameMaker.Room.Instance.read/3); format is the file's.
Types
@type t() :: %Cauldron2D.GameMaker.Room{ backdrops: [Cauldron2D.GameMaker.Room.Backdrop.t()], caption: String.t() | nil, colour: {byte(), byte(), byte(), byte()}, creation_code: non_neg_integer() | nil, fill: boolean(), gravity: {number(), number()}, instances: [Cauldron2D.GameMaker.Room.Instance.t()], layers: [Cauldron2D.GameMaker.Room.Layer.t()], name: String.t(), persistent: boolean(), physics?: boolean(), pixels_per_metre: number(), size: {non_neg_integer(), non_neg_integer()}, speed: non_neg_integer(), tiles: [Cauldron2D.GameMaker.Room.Tile.t()], views: [Cauldron2D.GameMaker.Room.View.t()], views?: boolean() }
Functions
@spec instance_size(binary(), [non_neg_integer()], 36 | 40 | 44 | 48) :: 36 | 40 | 44 | 48
The byte length of a placed instance in a file, measured from the gaps between
consecutive instances in its rooms' instance lists at rooms; fallback when no
room places two.
@spec read(binary(), non_neg_integer(), atom(), 36 | 40 | 44 | 48) :: t()
The room at at. instance_size is the byte length of one placed instance in this
file (see Cauldron2D.GameMaker.Room.Instance.read/3); format is the file's.