Playing with others
Island, and any last-one-standing game made from the same parts, can be played by up to 16 people, with bots in every place nobody takes. Each player takes a bot's place, and a bot takes it back if they go.
Playing
- Host: Play Online, type a name, Host Game. The lobby shows the address others join at. Start Match starts it; after the match the results stay up for 12 seconds and everyone goes back to the lobby.
- Join: Play Online, type a name and the host's address (
192.168.1.20, or with a port,192.168.1.20:7777), Join Game. - A server with no window:
neux serve --project PATH. It starts the match when--players Nhave joined, or--wait SECONDSafter the first one came, and goes round again for as long as it runs. It also takes--scene,--port(7777) and--seconds, which stops it.
Through a relay (no port to open)
A host behind a home router or a firewall cannot be reached directly. A relay is a small program on a machine with one open UDP port that both sides connect out to; it passes datagrams between the host and its guests by room code, and never reads them.
- Run a relay:
neux relay --port 7777(on any machine both sides can reach). - Host through it: a button action
net:relay:SCENEhosts through the relay whose address is in the field with the setting "relay", and shows a code such asK7QX2M@relay.example:7777. A server with no window does the same withneux serve --relay relay.example --room K7QX2M. - Join: type the code and the relay in the address field,
K7QX2M@relay.example:7777(orrelay://relay.example:7777/K7QX2M), then Join Game.neux visit --address K7QX2M@relay.example:7777does too.
A relay holds up to 2000 rooms of 63 guests, forgets a peer that has been silent for a minute, and refuses anything that is not its protocol. It has been tried on one machine (a relay, a server behind it and a stand-in player joining by code: the lobby filled and the match played) and never over the internet; no relay is run for you, so you need one of your own.
neux visit --project PATH --address HOST:PORT --name NAME is a stand-in player with no window. It takes a gun, keeps inside the zone and goes for whoever is nearest, badly. It is how the gates and the numbers below try a match with others on one machine.
How it works
One machine runs the rules: the player who hosts, or neux serve. It has every bot, the zone, the damage, the loot and the cars nobody drives.
- A player's own character and car move on their own machine at once, and the host checks that the move could have happened. How far someone can have gone builds up with time, so a message that comes late is forgiven and a stream of long steps is not: the host stops believing them and puts them back.
- Shots are the host's to judge, against where everyone stood on that player's screen: a player who hits what they saw has hit it, up to half a second behind. Ammunition, cooldowns and damage are counted there.
- What moves all the time goes out 20 times a second to each player, and the next message replaces the last: a lost one does not matter. Others are shown a tenth of a second behind, so there are always two places to move between. Things far from a player are told about less often, and only what can be heard reaches them.
- What lies around (
Loot, and anything with aReplicatedcomponent) goes out 5 times a second as acknowledged changes from the scene as it was loaded, so it arrives however much is lost.
The code is crates/ae_cli/src/online.rs on top of crates/ae_net/src/session.rs. Both machines must hold the same scene: the host turns away anything else.
What it does not do yet
- Over the internet the host needs a port open, or a relay: nobody can reach a machine behind a home router unless UDP port 7777 is forwarded to it, or the match goes through a relay (above; you run it yourself), or
neux serveruns on a rented server. There is no way of finding a game: the address or code has to be passed on by hand. It has been run on one machine, and never over a real internet connection. - The web player cannot join: browsers have no UDP. Desktop and phones can; phones have not been tried.
- There are no accounts and no password. Anyone with the address can join until the match starts.
- A dead player waits for the results. There is no watching the others in the meantime.
- Action names are fixed. Fire, Reload, Swap, Take and Heal must keep those names for online play.