Skip to content

v0.1.0-alpha.7

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 09 Oct 23:14
· 20 commits to main since this release
61c2628
  • 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 before await relay.joinRoom() returns, like anything that
    happened before you joined; room.state, room.players and 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, input and release on it are dropped with a
    console warning that says why it closed, host or not. request, shareLink and the host
    controls reject with disconnected, as a request still waiting at the close does. claim
    resolves false (with the warning), and spawn (a kind's too) throws disconnected. What the
    old room sends while a joinRoom, createRoom or quickMatch waits 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's closed once the server's message is
    handled, so a handler there may enter a room; party_room and room fire after it. Stop a
    room's loop on room.on('closed').

  • Fix: a field's precision that 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: precision must be a finite number above 0. A string such as '0.1' (which worked
    by accident) or Infinity now throws at room.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 as quickMatch() then got no answer
    (timeout), and enough of them closed the connection. The simulated network keeps order now.
    Without simulate, nothing changes.