-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Currently the server ends every tick by calling emit('world', game_state); eg, the global world state is broadcast to all clients. There are a few problem with this, but the most immediate ones are:
- every client will know everything about the world! (good luck having a "hide" ability with this model)
- the client needs to know how to translate between "world space" coordinates and "view space" and "screen space" coordinates
Instead of broadcasting global state, entities should have a view range (this can be a global constant to begin with, but could eventually be adjustable per entity). Each frame, instead of emitting a global message, each client would have everything within their view range sent to them
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed