channels

first of all, thanks for developing the SGS, and i hope the final licence will allow academic research to be made with this product… :slight_smile:

to my topic; what would be the best way to send position updates between players in the SGS-environment? my initial idea was to use a quad tree on the server to check what players are in sight, and then forward position updates that arrive to the players in the same quad.

now the question is; should i do this manually (as in, the server will re-send the update messages), or should i create a channel for each quad that the players enter and leave and use broadcasting to send updates to all players in that quad space? (ignore cheating/security aspects for now)

i guess it all comes down to how you envisioned the use of the channels in SGS, how do they scale, etc. etc.

how does the broadcasting on a channel work? does it send all data through the server or does it use p2p between the clients?

thanks for any replies!

Yup. Good question.

Answer, you want to create a channel for each leaf on the quad tree and assign the players to them.

The reason is ebcause it is MUCH faster and scales MUCh better to do havey-volume communication across a channel ad directly between players then to involve the logic layer of the server. The logic layer has to do a lot more because it is preserving referentially integorus presistance on that level…