Repository navigation
v0.1.0-alpha.7
Pre-release-
Fix: messages the server sent right after a join's answer, in the same frame (a state
change, a new host, entity updates), were lost, or went to the room you were leaving. They reach
the new room now. Their events fire beforeawait relay.joinRoom()returns, like anything that
happened before you joined;room.state,room.playersand entities are right. -
Change: a room that's closed (left, kicked, lost, or replaced by joining it again) sends
nothing, instead of reaching the room you're in now.send,emit,setState,chat,
reseed,assignTeams,timer,clearTimer,inputandreleaseon it are dropped with a
console warning that says why it closed, host or not.request,shareLinkand the host
controls reject withdisconnected, as a request still waiting at the close does.claim
resolvesfalse(with the warning), andspawn(a kind's too) throwsdisconnected. What the
old room sends while ajoinRoom,createRoomorquickMatchwaits for its answer is held: it's
dropped if you get in, and sent to the room you're still in if the join fails. Moving to another
room (yours or your party leader's) fires the old room'sclosedonce the server's message is
handled, so a handler there may enter a room;party_roomandroomfire after it. Stop a
room's loop onroom.on('closed'). -
Fix: a field's
precisionthat isn't a power of ten keeps its own steps:precision: 0.25
sends quarters (it sent tenths: 0.25 went out as 0.3). -
Change:
precisionmust be a finite number above 0. A string such as'0.1'(which worked
by accident) orInfinitynow throws atroom.define; pass a number. -
Fix:
simulate: { latency, jitter }could send two messages out of order, and the server
drops a message that arrives after a later one: a call such asquickMatch()then got no answer
(timeout), and enough of them closed the connection. The simulated network keeps order now.
Withoutsimulate, nothing changes.