Author Topic: Server client architecture  (Read 799 times)

Hi I'm trying to make sense of how server and client connections work in blockland. I'm trying to design one from the ground up for a school project and I wanted to understand what information is sent through packets exactly and how blockland utilizes it

When working with a non-local client, does the server send every object in the game over in a packet and the client renders every object? Is the packet a full stream or does it contain append Information, like, If an object hasnt changed in any way, is it ommitted from the packet, or if it's deleted, is it removed entirely from the packet or does the packet contain information telling the client to delete that object on their renderer?

Also what general formats are packets sent as?

All objects have a spot in memory per client to determine whether that client needs to have an update sent to them, and whether the object was ever sent in the first place.
Once an object comes in range of the client's view, it's flagged to be sent to the client (ghosting). And if an object is ever updated, it sends the update to all clients that it's been visible to (ghost update).

Example:

Object 1:
visible to client 1: no
visible to client 2: no
updated: no

Object 2:
visible to client 1: no
visible to client 2: yes
updated: no

Object 3:
visible to client 1: yes
visible to client 2: no
updated: yes

Object 4:
visible to client 1: no
visible to client 2: has just come into view
updated: no

this will send the object data for object 4 to client 2, and updated data for object 3 to client 1.


probably not entirely accurate but that's the gist of it.