Created: 10/7/2013 7:16:00 PM
Updated: 10/20/2013 8:58:00 PM
Game Producer
Joined: 2/4/2017
Thread Replies:
2
Thread Followers:
126
Category
Networking Client / Server
Just some things I have learned about networking games in the last couple of days. First you want to use UDP aka User Datagram Protocol this protocol is fast and does not carry the overhead that TCP does. Both protocol are built on the IP layer but UDP does not have a lot of the checks and balance that TCP does for errors and data structure. This has a down side that I think more packets are lost during transport and we may never get them back. However with game programming the most recent packet is normally all we care about. As we want the most up todate information for the game. Most the calls for this are pretty simple with the .net classes however since we want to send struct instead of just primitive data type like int, string or byte. This adds a complexity to the code for sterilizing and desterilizing a struct. We are currently using a Marshal helper to do this. But I do know of a memory with a binarywriter and binaryreader that I think would do this as well. Not sure if there is any gain in preformance between the two at this time. I am going to leave it a long because as of now it works great so unless I see a problem with it might try the other way of doing it. There is an article pasted in below that shows some more information about all of this. The class that have develop I think handle all the case in that document along with some other website article i have found. As of now I think we have a really good start on a networking structure.
Thanks,
James Fleming
FacebookDiscord
Created: 10/20/2013 8:58:00 PM
Updated: 3/14/2021 3:36:36 PM
Game Producer
Joined: 2/4/2017
Member Replies 748
Member Follows 126
Nils thank you I will take a look at this and see if there is anything I can learn from it or if we can just use it.
Thanks,
James Fleming
FacebookDiscord
Created: 10/20/2013 4:18:00 PM
Updated: 12/5/2016 3:49:51 PM
Game Producer
Joined: 10/18/2013
Member Replies 1
Member Follows 0
did you consider to use lidgren? Seems to make things much easier
http://code.google.com/p/lidgren-network-gen3/wiki/Features