Monday, April 21, 2014

Net-"working"!

Basic network communication now works, with support for instantiating across the network and setting starting-states. This means that when you join a server as it is now, you will receive instructions to instantiate everything already present in the level, as well as the level. These instructions contain info on the current state of the object: position, rotation, health left, viewID for the network component (unique identifier) and any other important bits of information.

Instead of serializing/marshalling the entire object, we only need to send basic info. So the server tells the connecting client to make a object of type 5, with viewID 12, at position X:1, Y:0, Z:0, zero rotation, with additional info as a string fed to the object. The objects themselves will interpret and apply these strings, so the thing making the object does not care what kind of object it is making.

We also got basic position synchronization up and running, but it is still a bit choppy, so client prediction will be implemented soon.

   

No comments:

Post a Comment