Manual under construction. Some parts are incomplete or may change.
The list of messages
Nyra 0.5.4.28
From the client to the server
type | Fields | Mode |
|---|---|---|
register | username, email, password | all |
login | identifier, password | all |
move-input | dx, dy (the sign counts; one step on a single axis) | tile |
face-input | facing (0, 90, 180, 270) | tile |
input-state | platform: left, right, jump, run. 8 directions: left, right, up, down, run | platform, 8 directions |
input-angle | moving, angle, run | 8 directions |
From the server to the client
type | Main fields | To whom |
|---|---|---|
register-success | username | whoever registers |
auth-error | context, reason, message (sometimes) | whoever got it wrong |
welcome | see the Sign in and registration page | whoever gets in |
player-joined | playerId, username, x, y, plus facing | the others already inside |
player-moved | it depends on the mode | everyone |
player-turned | playerId, facing | everyone, in tile |
player-disconnected | playerId | the others |
move-rejected | reason (in-transition, out-of-bounds, blocked) | whoever sent the step, in tile |
face-rejected | reason (in-transition) | whoever sent the facing, in tile |
disconnect | reason | the connection about to close |
Reserved messages
The game-event and level-change messages have a shape already decided, but the server does not send them today. If your client receives them in the future, it finds them as new types.