WIP
connection/
: handles websocket connections and raw messages, sends parsed messages todispatcher
dispatcher
: receives parsed messsages and dispatches commands to entities ingame/
oraccount/
game/
: handles game logicaccount/
: handles user authenticationstore/
: handles persisted server data (currently is a in-memory mock db)
Neologia uses Websockets as the underlying transfer protocol.
On top of that we use our own micro-protocol.
Client messages are JSONs conforming to the following schema (check docs/mock-requests
):
{
requestId: number,
command: {
name: string,
payload: any
}
}
Now, for the server sent messages, we have:
{
requestId: number, // When message is a response, same as client's requestId, otherwise null
event: {
name: string,
payload: any
}
}