party library
Local and network party sessions for any simulation on flutter3d's
relay: a party of up to a full table found by a code or among strangers
(PartySession), a two-machine room (RoomSession), and one side's
run kept as a .f3drun (SideRecording).
Every ask carries the simulation's version. The relay holds a party
and a room to one SimulationVersion (flutter3d_plugin_api's) and one set of terms, and turns a
machine on another away with a reason, before a frame of a session that
would part at its first contact. That is the 1.0 network hello, from the
side of the code that asks.
What a session steps — the game's own rollback over the seat's wire — is the game's. This package seats it.
Classes
- PartySeat
- A machine's place in a relay's party: its wire, the slot the relay gave it, the party's code — the one to send a friend — and full, which completes once every player's slot is taken.
-
PartySession<
G> - A party on the relay, and the game staged for it: the code a party is found by, the slot this machine plays, and whether every slot is taken.
- RoomSession
- A two-machine room on the relay, asked for with the simulation's version: the socket a rollback session runs over, the code, and why the relay closed it.
- SideRecording
-
One machine's own side of a networked session, kept as a
.f3drun.
Constants
- partyCodeAlphabet → const String
-
The letters a party or room code is made of: no
0/Oand no1/I, which read alike aloud and on a phone keyboard, the two ways a code travels between two people in one room.
Properties
- physicsTerms → String
-
What every machine of one party has to share beyond the simulation's
version: the physics backend, since the native core and the Dart
reference are not promised to agree, and a session across the two
parts at the first contact. The relay holds a room and a party to the
first machine's terms.
no setter
Functions
-
partyCode(
Random dice) → String -
A five-letter code from partyCodeAlphabet, thrown with
dice. -
relayVersionOf(
SimulationVersion simulation) → int -
simulationas the one number a relay compares: the engine's version and the game's,engine × 1000 + genre. Two builds agree on it exactly when a session between them steps the same; a game with no genre of its own passesSimulationVersion.engineOnly.