Two sample projects live in the Samples repository. Each also has short worked examples in its Examples folder.
Icebreaker #
A small C++ sample with no level and no assets. Capsules with an owner authoritative pose, a server written colour and a bonk counter, messages (W waves, G bonks) and LAN discovery. Host with H and join with J. It has 6 tests, and it has been run by a person on two machines.
Arena #
Lua, prefabs and generated data, with no C++. Two teams, a server that never sends you what a wall hides, a server authoritative Pawn with prediction and correction, an authoritative crate and a stress pen. scripts/arena-verify.sh runs six headless server and client runs over UDP loopback (clean, lag, loss, nudge, pilot, pilot moving) and checks the predicted position matches the server’s. Its arena.netschema and arena.netaccess are good worked examples.
Short examples #
- Foundation: host and join from settings, load a level for everyone, sync a transform.
- Samples: add a message, add a replicated value, change what a player sees, count the cost of many records, hand over ownership in Lua, keep a score in Lua, move a pawn with prediction, test under a bad network.
Measured cost #
On the development machine, with 16 Clients and 1,000 NetRecords, a typical send phase took 604 microseconds and a Client’s receive took 104 microseconds. These are numbers from one machine, not a promise about yours.