Bitflinger Games docs

How a game is built

A game is a stack of layers. The first is the root, and each layer after it is built on the one before.

When someone plays Sky Islands at Night, the runtime loads Starter World, then Sky Islands, then Sky Islands at Night. Each layer's script runs once, in that order, and says what it sets, adds and replaces. Then the root builds the world from what every layer said.

WordWhat it means
LayerA folder with a variation.json and an entry script. One layer is one developer's contribution
RootA layer with no parent. It builds the world and decides what the layers above it may change
ChildA layer whose parent names another layer. It can have children of its own
GameA root plus the chain of children up to the one being played
LibraryShared helper code that games with different roots can use. Not ready yet, see below

The manifest

variation.json is where a layer says who it is and what it allows.

{
  "name": "Sky Islands",
  "version": "1.2.1",
  "summary": "Floating islands above the meadow, and gliding between them.",
  "added": "floating islands, gliding",
  "creator": "Ana",
  "parent": "starter-world",
  "entry": "layer.gd",
  "seal": ["rules.player.glide*"]
}
KeyWho sets itWhat it does
name, version, summary, added, creatorEvery layerWhat the catalogue and the credits show
cover, genre, perspective, players, session, difficulty, controlsEvery layerHow the game looks and is described in the catalogue
parentEvery layerThe slug of the layer you build on, or null for a root
entryEvery layerYour script that runs when the layer loads. layer.gd if left out
openThe root onlyThe points children may change, such as rules.*, zones, items, slots.*. A child's open is ignored
sealAny layerPoints no layer above you may change, such as rules.world.gravity

Your slug is your layer's short name, such as sky-islands. It's the name of your layer's folder, and your files live under res://layers/<slug>/.