The 0.75 profile: plan and notes

Implemented (2026-10-23), all sections, see CONTRIBUTING.md “The 0.75 profile” for what is in the code and what is still open (0.76’s map cache, the browser and TURN tried for real, the CI smoke join).

Status: the seven design decisions are taken (see section 0). What is left is the work, and a short list of consequences that still need an answer (section 15). Nothing here changes the current server: the 1.0 server keeps its behavior whatever happens to the 0.75 profile.

0. The decisions

  1. One binary. The 1.0 server and the 0.75 server share the sources (the bots, the plugins, the map rules, the transport layer): they are two profiles of one executable, not two code bases and not two repositories.
  2. Each profile has its own TOML. config.toml for the 1.0 profile, config-075.toml for the 0.75 one. A Lua plugin says which version it supports; the server does not load it in a profile it does not support.
  3. The configuration stays as it is. The config file is mandatory (there is no “config by environment variables only” mode).
  4. The browser reaches the 0.75 server, and so do the old clients. The web client speaks 0.75 over the WebRTC transport the server already has (the browser cannot speak 1.0 to a 0.75 server, and it cannot speak UDP at all); the unmodified 0.75 clients join over ENet/UDP.
  5. The server supports the ZeroSpades extensions (Player Properties, Damage Markers, Teamplay), so an unmodified ZeroSpades gets more than a bare 0.75 client.
  6. The 0.75 server announces to the public 0.75 masters (the ones the vanilla clients already know) and to our master (the browser’s list and the WebRTC signalling). A server that is in both lists is listed once, as ours: the client’s merge already does that (hud_serverlist_add: the “ours” row replaces the 0.75 one, the same identifier).
  7. The 0.75 server is the 0.75 game. Everything the 0.75 protocol can express, with all of our server-side work (the bots, the planner, the plugins, the map metadata, the anti-abuse), and nothing that is a 1.0 invention: no perks, no classes, no squads, no kill assists, no 3D spotting, no revive, and only the classic modes (section 6).

1. What this is

Add a profile to the server binary where the server speaks only the 0.75 protocol: original 0.75 clients (BetterSpades, pyspades, ZeroSpades) join it, the browser joins it over WebRTC, and the game keeps everything the 1.0 server has — the bots, the planner, the Lua plugins, the map metadata, the anti-abuse rules — as long as it stays playable by a client that was never touched.

The server’s default behavior does not change: without a flag, the server is exactly what it is today (protocol 1.0 only, refusing every other connect data).

Two rules shape everything:

  1. One binary, one easy switch. ngspades-server starts the 1.0 server (today’s behavior). ngspades-server --profile 075 starts the 0.75 server. Nothing else changes between them.
  2. The two profiles never share a configuration. Each profile reads its own config file, writes its own data folder, listens on its own port and has its own master identity. Running both at the same time on one machine is a supported, documented case.

2. Ground rules for the implementation

  1. One source tree. The gameplay code is shared at the source level (the same files compiled once), never copied between profiles.
  2. The wire is the only thing that differs. Protocol 1.0 lives in server/Source/Server/Proto10/; protocol 0.75 goes into a new server/Source/Server/Legacy/. The shared gameplay never learns which one it talks to: it calls a small wire interface, and each profile supplies its own implementation.
  3. No protocol-specific logic in the shared files. A shared file that must tell a client something calls the wire interface; it never includes Proto10/*.h.
  4. Only what needs the 1.0 wire is gated. Everything else (the bots, the plugins, the map rules) is shared and works in both profiles. The 1.0 inventions (the perks, the classes, the squads, the assists, the spotting, the revive, the 1.0 modes) are absent in the 0.75 profile, not degraded (section 6).
  5. The client’s protocol lock is a debug tool. It lives in the harness and in an environment variable, never in config.ini and never in the Settings screen (section 11).
  6. English everywhere: comments, logs, commit messages, docs.
  7. Measure, do not guess. Each phase ends with a log line or a harness run that proves it.

3. Architecture

3.1 The profile

A runtime value on the server, not a compile-time one (the whole tree is one binary):

enum server_profile_t {
    SERVER_PROFILE_10,   /* protocol 1.0 only: today's behavior, the default */
    SERVER_PROFILE_075,  /* protocol 0.75 only: the classic game */
};

The profile decides:

SERVER_PROFILE_10SERVER_PROFILE_075
Accepted connect dataonly P10_CONNECT_MAGIConly 3 (0.75) and 4 (0.76)
The wireProto10/Legacy/
The featuresallthe 0.75 game: no perks, no classes, no squads, no assists, no spotting, no revive (section 6)
The game modesthe full catalogthe classic CTF and Babel
The config fileResources/config.tomlResources/config-075.toml
The data folderthe default onethe default one plus -075
The mastersour master (Net/Master.c)the public 0.75 masters and ours (the browser’s list and the signalling)
The player cap6432 (the 0.75 limit)

It lives in the server struct (server/Source/Server/Structs/ServerStruct.h) and is read through server_profile(). It is set at start-up from the command line (section 4), before the config is read.

3.2 The wire interface (the shim)

The shared gameplay calls protocol 1.0 functions directly today. These are the exact symbols referenced outside server/Source/Server/Proto10/ (measured; re-measure after the first edits):

proto10_world_cell                  Block.c Grenade.c Nodes.c Packets/BlockLine.c Plugins.c Gamemodes/Arena.c
proto10_world_chat                  Packets/Message.c
proto10_world_tick                  Server.c
proto10_world_player_update         Player.c
proto10_bridge_damage               Packets/SetHP.c
proto10_bridge_kill                 Packets/KillAction.c
proto10_bridge_player_left          Packets/PlayerLeft.c
proto10_bridge_reload               Packets/WeaponReload.c
proto10_bridge_teleport             Plugins.c
proto10_bridge_generic              Assists.c Classes.c EscapeWatch.c Player.c Plugins.c Revive.c Gamemodes/Zombie.c
proto10_gamemode_intel_event        Gamemodes/Ctf.c
proto10_gamemode_round_start        Gamemodes/Gamemode.c
proto10_entities_grenade_thrown     Packets/Grenade.c
proto10_entities_grenade_removed    Player.c
proto10_entities_grenade_exploded   Grenade.c
proto10_objects_grenade             Grenade.c
proto10_objects_at                  Perks.c
proto10_objects_destroy             Perks.c
proto10_begin                       Player.c
proto10_update                      Player.c
proto10_on_packet                   Server.c
proto10_session_tick                Server.c
proto10_session_map_loaded          Map.c
proto10_bridge_tick                 Server.c
proto10_netstats_add                Net/Conn.c
proto10_netstats_log                Server.c

Do not edit the shared files to make this work. Legacy/ provides the same symbols with 0.75 semantics:

Symbol0.75 semantics in the shim
proto10_world_cellthe 0.75 block action / world update to the affected clients (a 0.75 client computes collapses and craters itself)
proto10_world_chatthe 0.75 chat packet
proto10_world_tickthe per-tick 0.75 broadcast (send_world_update)
proto10_world_player_updateno-op (0.75 has no map-reset handling)
proto10_bridge_damagethe 0.75 SetHP output
proto10_bridge_killthe 0.75 KillAction output
proto10_bridge_player_leftthe 0.75 PlayerLeft output
proto10_bridge_reloadthe 0.75 WeaponReload output
proto10_bridge_teleportthe 0.75 position output (send_position_packet)
proto10_bridge_generica 0.75 chat message or the matching extension packet (section 7)
proto10_gamemode_intel_eventthe 0.75 send_intel_capture/pickup/drop
proto10_gamemode_round_starta 0.75 notice (0.75 has no round state)
proto10_entities_grenade_*the 0.75 grenade packet (a 0.75 grenade is a packet, not an entity)
proto10_objects_*no-op (the 1.0 object registry does not exist in 0.75)
proto10_begin, proto10_updatethe 0.75 join machine (section 8.2)
proto10_on_packetthe 0.75 dispatcher (section 8.1)
proto10_session_tick, proto10_session_map_loadedno-op (the 1.0 handshake does not exist in 0.75)
proto10_bridge_tickthe 0.75 per-tick broadcast
proto10_netstats_add, proto10_netstats_logcount the 0.75 bytes (the same counters, the 0.75 packet types)

The shim is the only place where the two protocols meet.

4. Starting the server: one binary, two profiles

4.1 The command line

ngspades-server                  # protocol 1.0 (today's behavior, the default)
ngspades-server --profile 075    # protocol 0.75 only
ngspades-server --profile 10     # the same as no flag
ngspades-server --config <path>  # a config file of your own (wins over the profile's)

4.2 The order of parsing

The profile decides the config path, so it must be known first:

  1. Parse --root, --data, --profile, --config (the flags that do not need the config).
  2. Resolve the profile and the config path.
  3. Read the config, then apply the rest of the flags (--port, --gamemode, --map, --preset, --bots, …) as today.

Main.c currently resolves the root (resolve_data_root) and the data folder (resolve_data_dir) before reading Resources/config.toml (TOMLH_READ_FROM_FILE) and before --check-config. The profile resolution goes next to those, and the config path becomes a variable used in both places.

4.3 The configurations never interfere

Each profile has its own config file, its own data folder, its own port and its own identity:

profile 10profile 075
Config file<root>/Resources/config.toml (unchanged)<root>/Resources/config-075.toml
--configoverrides itoverrides it
Data folder (what the server writes)the default data folder (unchanged)the default data folder plus -075
--data / SP_DATA_DIRwinswins
Game portconfig.toml’s [server] portconfig-075.toml’s [server] port (a different one)
WebRTC port[webrtc] port (default: game port + 1)its own [webrtc] port
Identity (master.key)the data folder’sthe 0.75 data folder’s (its own key)
Bans (Bans.json), logs, plugin storesthe data folder’sthe 0.75 data folder’s
Map rotation, fog, teams, bots, presetsconfig.tomlconfig-075.toml

Details:

4.4 The feedback (so opening it is easy and obvious)

5. The plugins say which version they support

A plugin is written against the game’s API, and the API differs between the profiles (the classes, the perks, the modes). A plugin that only makes sense in the 1.0 profile must not be loaded in the 0.75 one.

6. The features in the 0.75 profile: the 0.75 game, with our server-side work

The 0.75 server supports only what the 0.75 protocol has. The 1.0 inventions are not there at all — not “hidden from a vanilla client”, not “server-side only”: absent. What stays is the whole classic game plus every server-side improvement we wrote, because none of them needs the 1.0 wire.

6.1 In the 0.75 profile

WhatWhereNote
The classic CTF and Babel (the intel, the tents, the captures)Gamemodes/Ctf.cthe 0.75 rules as they were
The bots (dig, swim, cover, the roles, the lanes, the honest misses)Server/Bot*.cas they are: they act through the 0.75 handlers
The bot planner (A* on its own thread, the map copy)Server/BotPlanner.cas is
The bot projects (the cooperative bridges)Server/BotProjects.cas is
The map metadata (the pyspades rules: the spawns, the intel, the protected sectors, the fog, the water and boundary damage)Server/MapMeta/MapMeta.cas is: this is what makes the server feel like a pyspades
The map catalog, the tags, the rotation, the presets, the per-map bot countscommon/modes/modes.h, tools/tag_maps.pyas is
The Lua plugins (the chat commands, the blocks, the fog, the bans, the store, the mode and map changes)Server/Plugins.cas is, minus the 1.0-only API (section 6.3)
The anti-abuse rules (the conduct, the anticheat, the spawn protect, the escape watch), the lag compensation, the bans, the audit, the stats, the event logseveralas is, with the tolerant preset (section 10.1)
The ZeroSpades extensions (the damage numbers, the teammates through the walls, the pings, the compass)Legacy/Ext075.cthe 0.75 ecosystem’s own features (section 7)
The IPv6, the --data folder, the WebRTC transport, the mastersServer/Net/as is

The bots keep their classic roles in the 0.75 profile: without the classes, _bot_role_weapon falls back to the 0.75 gun set (rifle, SMG, shotgun) and the seats (defender, infiltrator, overwatch, camper) as they were before the classes.

6.2 Not in the 0.75 profile (the 1.0 inventions)

These are off in the 0.75 profile. The code is compiled (one binary) but the profile makes it inert: no grant, no announcement, no wire packet.

FeatureWhyWhere the gate goes
The perks (the sentry, the jetpack, the landmine, the dynamite)entities and input bits the 0.75 protocol has notServer/Perks.c: the grant path (_perk_grant, the wear-on-grant, the inventory) does not run in the 0.75 profile. The grant is today protocol-agnostic — that is the bug this fixes.
The classesa 1.0 screen and a 1.0 announcement; the 0.75 team screen has a weapon, not a classServer/Classes.c: no class is chosen in the 0.75 profile; every player is the game’s default (the Commando’s figures are the game’s own).
The squads (the names, the rally point)a 1.0 wireServer/Gamemodes/Squads.c: the wire is already gated on p->protocol != PROTOCOL_10; the bots’ own lanes stay (they are server-side).
The kill assistsa 1.0 wireServer/Assists.c: the tracking may stay, the 1.0 announcement must not happen.
The 3D spottinga 1.0 wire (a 0.75 client has the Teamplay ESP of its own, which is ZeroSpades’ feature, not ours)the spot command: refuse in the 0.75 profile (why=profile).
The revivea 1.0 entity (the marker)Server/Revive.c: refuse the perk.
The zombie mode, ngCTF, the arena, the creative mode, the Lua modesthe GameModeState and the 1.0-only mechanics behind themnot registered in the 0.75 profile (section 6.4).
The streak bar, the perk HUDclient-side, and only on a 1.0 connectionnothing to do on the server.

6.3 What a refused 1.0-only call looks like

The plugin API’s 1.0-only functions (game.classes(), game.class(), game.set_class(), p:set_class(), the class events, the perk API) are refused in the 0.75 profile with a reason, the same way a mode refuses a class (why=mode):

EVT plugin action=refused name=myplugin why=profile what=game.set_class

and game.set_mode to a mode the 0.75 profile does not register (the ngCTF, the zombie, the arena, the creative) is refused the same way.

6.4 The modes

The 0.75 profile registers the classic CTF and Babel (the same CTF code with Babel’s rules). The other modes (ngCTF, zombie, arena, creative, the Lua modes) are 1.0-shaped: the GameModeState has no 0.75 equivalent, so the client cannot be told about the mode, the round clock, the perks or the classes. They stay in the 1.0 profile.

common/modes/modes.h (the catalog the client reads) stays as it is: the client filters the picker by what the server supports.

7. The ZeroSpades extensions on the 0.75 server

Our client already speaks ZeroSpades’ protocol extensions on a 0.75 server (the client’s ext075.c, the client’s ext075.h; the credit for the wire format is there, and the client’s probe.c is a 0.75 server that only sends these, as the reference). The server side does not exist yet: this section writes it, in server/Source/Server/Legacy/Ext075.c.

7.1 The wire, exactly as the client reads it

The extension ids and their packet ids (PACKET_EXT_BASE = 0x40; an extension below 192 has its packet at 0x40 + id):

Extensionidpacketorigin
Player Properties0x0064BetterSpades
Damage Markers0x20 (32)96ZeroSpades
Teamplay0x30 (48)112ZeroSpades
256 players0xC0—BetterSpades: not offered
Message types0xC1—BetterSpades: not offered
Kick reason0xC2—BetterSpades: not offered

Never offer 0xC0, 0xC1 or 0xC2. Our client lists them as “known” (so it would agree to them) but implements no handler for their packets, and 256 players would break the one-byte player ids. Offer only what the server really sends.

ExtInfo (packet 60), server to client: count (u8), then count pairs of (id u8, version u8). The client answers with the same shape, listing only the extensions both sides know. The server records the answer per player and sends the extension packets only to the players that agreed.

Player Properties (packet 64), packed:

subID u8 (=0), player_id u8, health u8, blocks u8, grenades u8,
ammo_clip u8, ammo_reserved u8, score u32

Damage Markers (packet 96): victim u8, then the amount, whose width the packet length picks: 2 bytes = u8, 3 = i16, 5 = i32. A negative amount is healing. The client ignores it for our own player and for a victim it does not know.

Teamplay (packet 112): the first byte is the sub-packet.

SubPayload
0 Configfeatures u8 (bit 1 = teammates through walls, bit 2 = pings allowed) + two f32 (the north vector)
1 Pingplayer u8, x f32, y f32, z f32, life f32, surfaces u8, colour (blue, green, red) u8 x3, message id u8, the label (free UTF-8)
2 Markplayer u8, life f32, surfaces u8, show name u8, colour (blue, green, red) u8 x3, message id u8, the label

The map coordinates on the wire: the wire carries (x, y, z) where the internal is (x, 63 - z, y) — the same conversion the client does when it reads a ping. The client’s own ping sends the same layout, with the player id 255 (the server’s own).

7.2 What the server sends

7.3 What the server receives

7.4 The configuration

[ext075]
# The ZeroSpades protocol extensions the 0.75 server offers.
damage_markers = true
teamplay = true
player_properties = true
team_esp = true       # teammates through walls (the Config bit 1)
pings = true          # pings allowed (the Config bit 2)
compass = true        # the compass bar (the Config bit 4)
ping_lifetime = 12.0

Read it in the 0.75 profile only; the 1.0 profile ignores it (1.0 has its own ways).

7.5 The credit and the files

7.6 The rest of the aosprotocol specification (done)

The aosprotocol specification (https://github.com/zerospades/aosprotocol, protocol075.md and its extensions/ folder) has more than ZeroSpades’ two, and both sides now speak all of it but the Powerthirst packets (script begin/chunk/end/call, which need an AngelScript client):

8. Phase: restore the 0.75 wire

Everything needed exists in this repository’s git history. It was removed on 2026-10-03 by two commits:

Use the history as the source of truth: git show ba72777^:<path> gives the original file. Copy the original bytes (packet ids, field order); adapt only what changed.

8.1 The dispatcher (the receive side)

ba72777^:server/Source/Server/Packets/PacketManager.c has init_packets() with the 18-entry table and on_packet_received():

0 position, 1 orientation, 3 input, 4 weapon input, 5 hit, 6 grenade,
7 set tool, 8 set color, 9 existing player, 10 short player, 13 block action,
14 block line, 17 chat message, 28 weapon reload, 29 change team,
30 change weapon, 34 version response, 63 host command

All 18 receive handlers still exist in server/Source/Server/Packets/, as the 0.75 wire’s parsers: each reads its packet and calls the internal game API (server/Source/Server/GameApi.h, the game_player_* functions), which the 1.0 bridge (Proto10/) and the bots call directly. Put the table in Legacy/Dispatch075.c; the gameplay stays shared.

The 0.75 profile adds two more ids to its table (section 7): 60 (the client’s ExtInfo answer) and 112 (the client’s Teamplay ping).

In server_conn_receive (Server.c), route by profile:

8.2 The join state machine

ba72777^:server/Source/Server/Player.c has the old on_player_update switch with STATE_STARTING_MAP → STATE_LOADING_CHUNKS → STATE_JOINING → STATE_SPAWNING → STATE_READY (and the bot shortcut that skips the map transfer). Restore it in Legacy/Join075.c:

The 1.0 path (STATE_PROTO10, Proto10/Session.c) stays untouched.

8.3 The senders

The full list of the 0.75 senders the history has (git show ba72777^:server/Source/Server/Packets/Packets.h):

send_restock            send_move_object        send_intel_capture
send_intel_pickup       send_intel_drop         send_grenade
send_player_left        send_weapon_reload      send_weapon_input
send_set_color          send_set_color_to_player send_set_tool
send_block_line         send_block_line_to_player send_block_action
send_block_action_to_player  send_state_data   send_input_data
send_kill_action_packet send_set_hp             send_existing_player
send_map_start          send_map_chunks         send_create_player
send_respawn            send_world_update       send_position_packet
send_version_request

Plus Util/Notice.c (broadcastServerNotice), deleted by ba72777.

Files that were deleted and come back whole: MapStart.c, MapChunk.c, StateData.c, CreatePlayer.c, WorldUpdate.c, MoveObject.c, Restock.c, IntelCapture.c, IntelPickup.c, IntelDrop.c, Util/Notice.c.

Files that kept their names but lost their 0.75 output: SetHP.c, KillAction.c, PlayerLeft.c, ExistingPlayer.c, BlockAction.c, BlockLine.c, Message.c, SetTool.c, SetColor.c, WeaponInput.c, WeaponReload.c, Grenade.c, HostCommand.c, PositionData.c, VersionRequestResponse.c, ShortPlayerData.c, InputData.c, ChangeTeam.c, ChangeWeapon.c, Hit.c.

8.4 The transport migration (mandatory)

The 2026-10-03 code sent with enet_peer_send(player->peer, ...); today’s transport is conn_send (server/Source/Server/Net/Conn.h):

conn_send(conn, channel, data, len, reliable)

Every restored 0.75 sender must use conn_send(player->conn, 0, data, len, 1) — channel 0, reliable — because the same bytes must travel over the WebRTC transport (the browser), and the 0.75 protocol is single-channel and reliable. Use conn_send_reliable (Net/Conn.c) so the 0.75 bytes also show up in the network statistics.

Two mandatory guards in every restored sender:

  1. player->conn == NULL means a bot: return early (this is the historic crash: enet_peer_send with a NULL peer).
  2. PROTOCOL_075 == 0 is also the value every bot has (player_t is calloc’d), so a protocol check must always test player->conn != NULL first. Copy the existing shape: p->protocol == PROTOCOL_10 && p->conn != NULL && p->p10_state == P10_STATE_GAME.

8.5 The per-tick broadcast

0.75 expects a full world snapshot per client per tick: send_world_update (WorldUpdate.c in the history). Wire it into the tick (Server.c) in the 0.75 profile, next to the 1.0 bridge tick (proto10_bridge_tick).

8.6 The masters: the public 0.75 ones and ours

ba72777^:server/Source/Server/Master.c announces to the classic master over ENet at the hardcoded address 67.205.183.163:32886, and Structs/MasterStruct.h holds the state. That master is alive: http://services.buildandshoot.com/serverlist.json currently lists live 0.75 servers.

8.7 Acceptance criteria

9. Phase: the web client speaks 0.75

The web build currently refuses anything but protocol 1.0, in the client’s transport_webrtc.c:

if(connect_data != P10_CONNECT_MAGIC)
    return -1;

That single check is what stops the browser from reaching a 0.75 server. The client already contains the complete 0.75 implementation (it joins public 0.75 servers today); it is compiled into the web build and simply never reached.

Changes:

  1. the client’s transport_webrtc.c: accept the 0.75 connect data as well. The address check (master_find_id) stays: the browser may only join servers the master knows (section 15).
  2. The join order on the web: network_connect already tries 1.0 first and falls back to 0.75/0.76 (the client’s network.c). Against a 0.75-only server the 1.0 attempt fails and the 0.75 one must succeed — verify the path, and make sure the web build does not wait for a 1.0 greeting that will never come (the 1.0 wait is P10_GREETING_WAIT, 5 s).
  3. The 0.75 path uses one reliable channel (transport_connect(..., version == P10_CONNECT_MAGIC ? NETWORK_CHANNELS : 1, version)). The WebRTC transport opens both DataChannels regardless; the second stays idle. Confirm the 0.75 client code sends everything on channel 0.
  4. The WebRTC transport carries 0.75 bytes in this profile. the client’s net.js documents “a binary one is one protocol 1.0 packet” — update the comment; the code is payload-agnostic.
  5. The browser’s control channel (“connect ”) carries the connect data: the browser must send 3 for the 0.75 lane.

This client change is additive and must not affect the 1.0 server or the 1.0 lane: the native client already prefers 1.0 and only falls back to 0.75.

Acceptance:

10. Phase: the public server

10.1 A tolerant preset for original 0.75 clients

Our server is stricter than the pyspades servers a 0.75 player is used to. A vanilla BetterSpades client can get kicked for things the old servers allowed. Add a profile section in server/Resources/config-075.toml:

[profile.075]
# The rules a 0.75 client (BetterSpades, pyspades) expects from a public server.
anticheat_protocol_violation = false   # a packet outside the standard is logged, not a kick
grief_warn_points = 20
grief_kick_points = 40
afk_kick_seconds = 300
spawn_protection_seconds = 0

Conduct.c, Anticheat.c and SpawnProtect.c already read their own config sections; make them profile-aware (the 0.75 profile’s defaults are the values above). Measure it: a 0.75 client must be able to play a full match without being kicked or warned.

10.2 The browser, our master and the duplicate servers

The browser only joins servers our master knows (transport_webrtc.c refuses an address the master does not list), and the signalling (the offer and the answer) goes through our master. So the 0.75 profile announces to our master as well as to the public 0.75 masters (section 8.6).

Our master is our own code (a separate, private repository, a Go program). Reading it settles what has to change there:

On our side, two changes:

The duplicates need no work: the client already lists a server that is in both lists once, as ours (hud_serverlist_same compares the address and the port, whatever the identifier’s form). The test is that the 0.75 server shows up once in the list, and that the browser joins it over WebRTC.

10.3 STUN and TURN

[webrtc] stun currently takes a single STUN URL and Net/RtcPeer.cpp puts one entry in libdatachannel’s iceServers. For a public server, players behind symmetric NAT (many mobile operators) will not connect with STUN alone.

10.4 The page (out of this repository, but required)

docs/web.md phase 5 is still open: the wasm, the data package and the page have to be served over HTTPS with the COOP/COEP headers (the chunk workers need SharedArrayBuffer). That work lives in the website repository. Requirements to hand over: HTTPS, Cross-Origin-Opener-Policy: same-origin, Cross-Origin-Embedder-Policy: require-corp, the data package cached, and a “click to play” overlay.

11. Phase: the client’s protocol lock (harness only)

To test the 0.75 lane, the client must be locked to 0.75: it may not fall back to 1.0, or a broken 0.75 lane would hide behind a successful 1.0 join. The lock is a debug tool, reachable only through the harness — never a setting in config.ini, never a line in the Settings screen, never something a player can find. The client’s default behavior stays what it is today: try 1.0, then 0.75, then 0.76 (the client’s network.c, network_connect).

12. Phase: the config says what it does not read

A setting the server does not read is ignored in silence: a typo, or a key that belongs to the other profile (a [perks] section in the 0.75 config, a [profile.075] section in the 1.0 one). The server must say so in the log, at every start, not only when --check-config is asked for.

Acceptance:

13. Phase: packaging, CI and docs

14. The order of work

StepWhatEstimate
1The profile plumbing: the enum, --profile, the config/data separation, the banner, /profile1 day
2The client’s protocol lock (SP_PROTO_ONLY) and the harness’s --proto-only (section 11)0.5 day
3The 0.75 dispatcher and the join state machine (the map transfer included)1-2 days
4The senders, migrated to conn_send, plus the shim (Legacy/Wire075.c)2-3 days
5The per-tick world update and the public 0.75 masters announce1 day
6The profile’s feature gates (no perks, no classes, no squads, no assists, no spotting, no revive) and the classic-mode registry (section 6)1-2 days
7The config says what it does not read: the registry, the walk, the log (section 12)1 day
8The plugins’ version declaration (section 5)0.5-1 day
9The ZeroSpades extensions on the server (ExtInfo, Player Properties, Damage Markers, Teamplay)2-3 days
10The web client speaking 0.751-2 days
11The tolerant preset, TURN, the master’s WebRTC row1-2 days
12The master: the announce’s protocol, the row’s game_version and the identifier’s prefix (a separate, private repository), and the client’s ours flag (the HELLOINFO decision)0.5-1 day
13The packaging, the CI, the docs1 day

Total: roughly three weeks of focused work, plus the operational work for the public server (the page hosting, the master, the address).

15. The traps (all of them were real bugs once)

  1. PROTOCOL_075 == 0 is also every bot’s value. player_t is calloc’d, so a bot reads as protocol 0.75. Every protocol branch must test player->conn != NULL first.
  2. A NULL conn is a bot, never a client: every sender returns early.
  3. The 0.75 client computes collapses and craters itself. Do not send terrain deltas to it; send block actions and let it work it out (that is why proto10_world_cell maps to the 0.75 block/world output, not to a 1.0 TerrainUpdate).
  4. The 0.75 map transfer is the VXL, in chunks, with the map start packet first. A 0.75 client cannot read the ngmap format.
  5. CP437, not UTF-8, on the 0.75 wire.
  6. 0.75 has one reliable channel. Everything goes on channel 0.
  7. The version handshake is 0.75’s own (PACKET_VERSION_REQUEST / VERSION_RESPONSE): copy the old code, do not invent one.
  8. The block rate limit and the anchor rule are the 0.75 ones (BLOCK_DELAY, a solid neighbour required): they are unchanged, keep them.
  9. The server paces its tick at 60 Hz and must not spin: keep the current pacing in both profiles.
  10. The two profiles must never share a port, a config file or a data folder: that is what makes running both at once safe (section 4.3).
  11. The extension packets go only to the clients that agreed (the ExtInfo answer), and only in the 0.75 profile. Offering an extension the server does not implement is a broken promise: our client agrees to the three BetterSpades ones it knows but cannot read, so never offer 0xC0, 0xC1 or 0xC2.
  12. The colour order on the extension wire is blue, green, red (the client reads {d[20], d[19], d[18]} as {b, g, r}), not the red, green, blue the rest of the 0.75 protocol uses in some places. Copy the client’s reader.
  13. A plugin that says nothing about its profile is loaded everywhere: the existing plugins keep working, and the 1.0-only calls they make are refused with a reason, not silently ignored.
  14. A server in both lists is listed once. The client’s merge replaces the 0.75 master’s row with ours when the address and the port match; the row we publish must carry the 0.75 fields too (the name, the map, the mode, the players, the country, the game_version), or the list shows an empty row.
  15. HELLOINFO goes only to the 1.0 servers. A 0.75 server in our master’s list does not know the packet: the client’s ours flag (which decides it) must come from the row’s game_version, not from the list the row came from.

16. Still open

  1. The master’s two hardcoded 1.0 bits (registry.go: the row’s game_version and the identifier’s prefix) are ours to change — the master is our own repository, a separate private one — and section 10.2 says exactly what to change. It is a separate repository, so it is a separate change (and a separate commit), not a file in this tree.
  2. The gates’ exact shape. The features the 0.75 profile makes inert (section 6.2) are few and each has one place: the perk grant, the class choice, the squads’ wire, the assists’ announcement, the spot command, the revive, the mode registry. Which of them are a runtime check and which are a compile-time one (the file is only in the 1.0 build) is the implementer’s choice — one binary compiles both, so a runtime check is the straightforward answer.

17. Out of scope