Networking

#Unity2D

Description

  A checkers game you can run on LAN that can handle more than one match at a time. The networking system is made using the c# sockets (tcp clients) and the bit converter.
  The format is object based: every message is inheriting the IMessage interface that contains the data and uses the 'Packet' class to read and write its data in the correct order.
  The Packet is a class that handles the serialization and deserialization. The Packet first reads/writes the hash of the IMessage subclass from the network stream, then calls their methods that reads/writes their data.
  There is a heart beat, that automatically disconnects if the client or server is not responding after a few seconds.
  Packets check the last message sent through the network to reuse the same byte array.

Time spent:

 3 weeks
Download Server Build
Download Client Build
Full project GitHub

Credits

Set-up code made by: Hans Whichman