I am working on a school project where we are making a game in unity and its supposed to be multiplayer. I am not allowed to use any inbuilt server/client libraries like UNET or MIRROR because its a networking course not game dev.
So far I've got a working UDP .NET server that can receive and send data. Whenever a client connects it stores the info (IPEndPoint) so that it can be used in the future. Whenever the server receives a packet from a client, the server sends the packet to every other client.
Thank you for reading this far. Should the Server tell the clients which ClientID they have? I guess the packet has to be marked with some kind of ID to identify which client sent it. Also in Unity, How would i go about spawning and "moving other clients gameobjects" when i recieve data that they have changed position. Ive seen that the NetworkManager and UNET uses IsLocalPlayer to identify if its the local player, i cant find the underlying code but i guess its just a bool you set when instantiating the object?
So what i've got right now is a game, the client can connect to server, the client can send its transform.position to the server, the server prints it out and sends it to other clients.
All help and ideas is appreciated, and if this is a stupid question please tell me where to read more because all tutorial i see use network libraries and thats what i would do if i was allowed to.
See Question&Answers more detail:os