Game design wiki
Chapter 08

Saved worlds and servers

Saves, the dedicated server and the relay.

#Saved worlds Currentsince 2026-11-20

Survival and sandbox worlds are kept. "Play Survival" and "Play Sandbox" open the world list of that mode: every world saved, newest first, with its milestones, time played, when it was saved and who played in it; Play, Delete (pressed twice), and New world with a name. The main menu's Continue goes straight back into the world saved last.

A world is user://saves/<name>.save (the save as before), with the server's <name>.meta beside it (mode, milestones, seconds played, when saved, players), so the list reads no world. It is saved every 5 minutes, on /save and when one leaves it. The fights from the menu host a world kept nowhere. The player's name is kept in the settings: a world knows its players by name (where they were, what they carried), and a new random name each start lost all that.

#Dedicated server and the relay Currentsince 2026-11-20

The dedicated server (server) runs a world for others to join: server --port P --save FILE [--survival]. With --relay it runs no world at all: it is a relay where players meet in rooms.

  • In the menu, Play together (relay): the relay's address, a room name (everybody types the same), the world this machine would run (survival or sandbox), and "I'd like to host". The room lists who is in it, each machine's CPU score, and who would host.
  • Anyone in the room presses Start; the relay picks the host: of those who asked to host, if any did, else of all, the fastest machine (a fixed piece of the kind of work the server does, timed; more cores add a little). The host's machine runs the world (kept as "Room " in its saves); the others connect to it.
  • Hole punching: the relay tells the host every member's public address and each member the host's; both sides send punches straight to the other. Once a packet comes in straight from a peer, packets to it go straight; until then (and if it never does: a strict NAT) they go through the relay, which passes them on between members of the same room only. The menu shows "direct" or "relayed".
  • A peer is known by its address as the relay sees it; the game's packets (netcode) are told from the relay's by their first byte (0xFE).
  • The host leaving ends the game for the room (the world is on its machine).

Community servers (since 2026-11-25; the hosting plan): the dedicated server takes a settings file (--config, every key; any key also as SPACEGAME_<KEY> in the environment): its name, port, mode, players at most, a password to join (players type it under Password in the menu; one without it, or with a wrong one, is told why and let go), and an admin password: /login <password> in chat makes a player an admin, with /kick <name>, /ban <name> (by name and by address, kept in the bans file), /unban <name or address> and /bans. With player_commands = false the other chat commands are the admins' too (players keep /help, /progress and /arena join, leave, categories); a match server always runs so. With max_blocks_per_player a player may have only so many blocks standing that they put down by hand (kept in the save; admins free; blocks a projector or welder makes count for nobody). (m, 2000 unless set; 0: off) a construction farther than that from every player goes to sleep: its bodies sleep and nothing on it works by the tick, until a player comes within it (200 m nearer: no flicker at the edge). Bots are not players here. Kept awake however far: a construction with a computer set to STAY AWAKE (its panel, or me:set_stay_awake(true); kept in the save and in blueprints), one somebody (a bot too) sits at the controls of, and one with a fire control while an enemy is within 2.5 km, and the space traffic's dock pads (since 2026-11-28: asleep, a far dock's connector took no drone, and its drones were taken out and put back, 20 s on, over and over; sleeps as a server does, 2 km). Asleep, its antennas still send their beacons: where it is stays on the players' maps. A world with nobody in it (a server nobody plays on, the tests, the benches) has nothing asleep. Towns and landmarks are built near players only, not near bots (the air traffic's 300 bot pilots kept every one up). A player hosting from their own game is always its admin and needs no password to it; on a dedicated server nobody is, until they log in. A dedicated server is built without the browser (--no-default-features): it shows no web pages.

Match servers (since 2026-11-25): with match set (br or team) the server holds one match and exits: it opens it as it starts, puts everyone who joins in it (the class's own ship), starts once there are players or after the first came (bots filling the seats), and exits 20 s after it is over (or after 10 minutes with nobody, or when every player left mid-match). It says what it does as MATCH {json} lines on standard output, for whatever runs it. These are what a game-server host runs for Battle Royale and Team Fight.

Steam (since 2026-11-25; a build with the client's steam feature, the release builds): friends see what one does ("Hosting a world", "Playing", "In the menu"); while one hosts, the game listens on Steam too (friends only), and friends join it through Steam's relays by Steam's "Join game" or an invite (Invite friends (Steam) in the Esc menu): no open ports or public address needed; the game's password and bans still apply. Each survival milestone sets its Steam achievement. Asking the matchmaker for a match, the game sends a Steam web ticket, which a matchmaker with a Steam publisher key checks. A dedicated server built with Steam can be in Steam's server list, and any server can keep a whitelist of Steam IDs (whitelist, /whitelist). Without Steam the game goes on without it; the autotests never start it.

One's own ships online (since 2026-11-25): in a game, the match panel's Keep this world's blueprints as my ships copies the world's blueprints to this computer (user://ships/); Your ship picks one to fly in Find a match online: uploaded to the match server once connected and flown if it fits the class (the class limits as for any ship joining), else the class's own ship, with the reason.

Find a match online (since 2026-11-25): with a matchmaker set ([online] matchmaker or --matchmaker URL; none is built in yet), the match panel has a button that asks the matchmaker for a match of the panel's mode and class, shows how long it has waited, and joins the match server it is given; pressed again (or the panel closed), it stops looking.