API Reference Cauldron2D.GameMaker v#0.2.1

Copy Markdown View Source

Modules

A background (a BGND entry): a picture GameMaker Studio 1 rooms draw behind or in front of everything and cut tiles from, and, from GameMaker Studio 2, a tileset.

Values read at absolute offsets of a GameMaker data file.

The chunks of a GameMaker data file: a FORM holding four-letter named chunks, each a length and its bytes.

The game's code, as a module that answers for each piece of compiled code by name.

Collisions between instances, as GameMaker decides them.

GameMaker's colour functions, as {r, g, b}.

A GameMaker game's data file read whole: data.win on Windows, game.ios on macOS and iOS, game.unx on Linux, game.droid on Android. Every platform's file has the same layout.

A running game's frame as a Cauldron2D.DrawList, in room pixels.

GameMaker's event types, and the names its compiler gives each event's code.

A font (a FONT entry): glyphs cut from one picture on a texture page.

The GEN8 chunk: what the game is called, the window it opens, the order of its rooms, and which generation of GameMaker built it.

One instance of an object in the running game, with GameMaker's built-in instance variables under their GameMaker names, and the game's own variables in vars.

An object (an OBJT entry): the definition rooms place instances of.

The game's options (the OPTN chunk): window and display settings and the constants the game was built with.

GameMaker's particle systems as its runtime runs them: systems that hold particles, particle types that say how each particle starts, moves, changes and draws, and emitters that set particles loose over a region. The functions are the game code's part_system_*, part_type_*, part_emitter_* and part_particles_create, each taking and giving the world; random draws come from the world's generator (Cauldron2D.GameMaker.Random), in the runtime's order.

Particles, as GameMaker's part_particles_create makes them: pictures that code sets loose, which move, animate and fade by themselves and are gone when their life runs out. They are drawn with the room, at their depth, and cleared when a room is entered.

A path (a PATH entry): points, each {x, y, speed} with speed a percentage of the speed the path is followed at. smooth paths curve through their points precision times between each pair; closed paths join their last point to their first.

The pictures of a game, cut from its decoded texture pages as FrenchCurve.Rasters.

GameMaker's random numbers: the runtime's WELL512a generator, seeded as random_set_seed seeds it, giving what random, random_range, irandom, irandom_range and choose give.

A picture's place on a texture page (a TPAG item).

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).

One of a GameMaker Studio 1 room's eight backgrounds: background background drawn at {x, y}, behind everything or, with foreground, in front. tiled is {across, down}, repeating the picture across the room in each direction; speed {x, y} moves it by that many pixels a step; stretch scales it to the room. background is -1 for an empty slot.

An instance a room places: object object at {x, y}, with the id the game's code knows it by.

A layer of a GameMaker Studio 2 room. Layers draw in order of depth, greater first; offset {x, y} shifts everything on the layer and speed {x, y} scrolls it by that many pixels a step.

A tile placed on its own: the rectangle source {x, y, width, height} of background (GameMaker Studio 1) or sprite (GameMaker Studio 2 asset layers) picture, drawn at {x, y} scaled by scale, blended with colour. GameMaker Studio 1 tiles order by depth, greater drawn first.

A room's view: the rectangle view {x, y, width, height} of the room shown in the rectangle port {x, y, width, height} of the window. With follow set to an object index, the view keeps that object's instance at least border {x, y} pixels from its edges, moving at most speed {x, y} pixels a step, -1 for no limit.

Leaving one room and entering another, in GameMaker's order

A script (a SCPT entry): a name and the code entry it runs, nil for none. constructor marks a GameMaker 2.3 function declared as a constructor. A game compiled to native code keeps a script's code in its executable as the function gml_Script_<name>.

GameMaker's drawn shapes as pictures, in white, to be tinted by a draw list item's :blend and :alpha.

A sound (a SOND entry).

A sprite (a SPRT entry): frames of a picture, the point it is drawn from, and the masks it collides with.

One step of a running game, in GameMaker's order

Surfaces, as GameMaker's surface_* functions make them: rasters code draws onto, kept in the world by id until freed, across rooms.

Text in one of a game's fonts, laid out as GameMaker's draw_text lays it out, as draw list items naming {:glyph, font, character} pictures (Cauldron2D.GameMaker.Pictures.table/2).

A texture page (a TXTR entry): one packed image that sprites, tilesets and fonts cut their pictures from through Cauldron2D.GameMaker.Region.

A room's tile layers, each drawn as one picture.

GameMaker's built-in view following, run once a step after the end step events.

A stored sound in WAVE form (a RIFF file of PCM samples), as games keep their short effects in the AUDO chunk.

A GameMaker game running: its data, its code, the room it is in and the instances in that room, as one value.

Mix Tasks

Prints what a GameMaker data file holds: the game, the GameMaker generation that built it, whether its code is bytecode or compiled into the executable, and its resources.