Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

core

const core: Readonly<{ systems: CoreHandles<FlatSystemHandles<object & object & object & object>>; }>

The core: the step’s own machinery, which every world runs. A game never lists it, omits it or replaces it, and anchors to its systems by their handles: after: [core.systems.physics]. Every other system is an engine plugin’s, reached on its factory, behaviours.systems.chase, or a game’s own.

The step runs them in this order with every engine plugin listed:

Phase System Plugin Runs on What it does
input tracks.copyInput tracks() room and page Copies the player’s steer and jump into each track mover under the client’s authority.
input core.copyInput the core room and page Copies the player’s input into each entity the player controls under the client’s authority.
input characters.walk characters() room and page, predicted system Sends each character a walk command names along the navmesh to its point, and stops each a stop command names: on the sender’s page at once, and on the room on the same tick.
input abilities.approach abilities() room and page Walks each caster toward the target of its pending cast, as a click to walk does, and stops it once the target is in range.
motion stats.expireModifiers stats() room and page Counts down each timed stat modifier, and drops it once spent.
motion stats.copyFields stats() room and page, predicted system Sets each field a stat is registered to from the entity’s stat.
motion core.move the core room and page, predicted system Moves each entity by its velocity.
motion core.blendCorrections the core page Closes the drawn offset of each character the room corrected, so the correction eases in.
motion tracks.move tracks() room and page Moves each track mover along its track, and stands its entity there.
motion tracks.markTriggers tracks() room and page Marks the track triggers a mover stands in, enters or leaves.
rules core.advanceDayClock the core room Walks each World’s day clock on by the hours the step’s seconds buy at its day length.
rules cooldowns.countDown cooldowns() room and page, predicted system Counts down each entity’s cooldowns, and ends each: a character’s on the player’s page too, which predicts them.
rules inventory.takeItemCommands inventory() room Runs each item verb a player asked of her character.
rules inventory.useItems inventory() room Runs the uses asked of each entity’s items.
rules behaviours.spin behaviours() room and page Turns each spinning entity round y.
rules behaviours.bob behaviours() room and page Rises and falls each bobbing entity.
rules behaviours.pickup behaviours() room Credits each pickup a player’s character reaches to that character’s wallet, and removes it.
rules inventory.loot inventory() room Puts each loot a player’s character reaches into that character’s bag as far as it fits.
rules behaviours.interact behaviours() room and page Marks each Interact a character stands near.
rules behaviours.takeInteracts behaviours() room Takes each interact command within its Interact’s reach.
rules behaviours.trigger behaviours() room and page Marks each trigger a character stands within, and raises its enter and exit.
rules behaviours.capHealth behaviours() room Clamps each health under its maximum.
rules behaviours.reapDead behaviours() room Removes each entity at zero health, and downs a player’s character or one with a respawn instead.
rules behaviours.respawnDowned behaviours() room Stands each downed entity with a respawn that is no player’s character, such as a crate, an NPC or a kart, again once its wait is spent.
rules characters.respawn characters() room Stands each downed player’s character, one a player may control that the character controller moves, again once its respawn’s wait is spent, and runs each plugin’s onCharacterRespawn.
rules behaviours.chase behaviours() room Points each chaser’s velocity at the nearest character it accepts, and parts chasers that overlap.
rules resources.regenerate resources() room and page, predicted system Regenerates or decays each resource, such as mana, between 0 and its maximum: a character’s on the player’s page too, which predicts it, health aside.
rules abilities.cast abilities() room and page, predicted system Starts or refuses each cast a player sent, and winds each cast down to its release, its cancel or its fizzle: on her page too, up to the release’s outcomes, which the room alone decides.
rules weapons.flyProjectiles weapons() room and page Flies each projectile, and damages the first target it meets.
rules npcs.takePicks npcs() room Takes each pick a player sent in her conversation.
rules rounds.takeRequests rounds() room Takes each page’s start and restart of the round.
rules rounds.advance rounds() room and page Scores each round in play and counts its clock down to a win or a loss.
rules npcs.converse npcs() room and page Starts a conversation on each press of an NPC with a Dialog, and moves each conversation on.
rules npcs.runRoutines npcs() room and page Sends each NPC’s routine what happened to it, and does the step it is on.
rules machines.advance machines() room and page Counts each state machine’s wait, and moves on each one whose wait is spent or whose when holds.
rules abilities.keepRefusals abilities() room and page Files each cast refusal for the devtools’ ability inspector.
physics characters.aim characters() room and page, predicted system Writes each character’s strafe and the pitch its input aims at into its pose, which other pages draw.
physics characters.npcMovement characters() room Steers each character no player controls along its path, and moves it with moveCharacter, or along the navmesh for a chaser that does not walk, bases before riders.
physics characters.movement characters() room and page, predicted system Steers each player’s character on its input, or along its path while that input is not steering, and moves it with moveCharacter, bases before riders.
physics characters.countDown characters() room and page, predicted system Counts down each character’s timed speed modifiers, and ends each: on the player’s page too, which predicts them.
physics core.physics the core room and page Steps the physics scene once: builds and drops bodies, places each stand-in at its streamed pose, hands each body moveAndSlide moved its move as a kinematic target, steps Rapier, reads each dynamic body back, and destroys what fell out of the world.
physics core.follow the core room and page, predicted system Stands each attached entity at its parent’s pose and its offset, parents before children.
physics core.restColliders the core room and page Marks each kinematic collider that has stood still half a second, so the navmesh bakes it in, and unmarks it as it moves.

“Runs on” is where a system runs in a game with a room, as its entry’s runsOn says; a predicted system also runs on her page’s replay of her steps. A game with no room runs every system.