You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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: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 theirview range
sent to themThe text was updated successfully, but these errors were encountered: