Adam's Lair Forum

game development and casual madness
It is currently 2019/11/19, 15:43

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2015/12/18, 18:44 
Newbie
Newbie
User avatar

Joined: 2015/12/17, 19:27
Posts: 5
Location: Germany
Role: Hobbyist
Hi there from someone new :)

I noticed there was someone trying to implement Multiplayer into Duality
(forum.adamslair.net/viewtopic.php?f=4&t=202), but it seems he has quit the work on that. So i decided to write some code that might help people to get their game wired up.

Goals:
- GameState based UDP Networking
- Compressed Packets
- Replication of Gameobjects based on changes that were made
- Remote Procedure Calls (Client -> Server, Server -> Single Client, Server -> All Clients)
- Standalone Server & Listen Server (Play while you Host) functionality


What i have curently is the basic Networking using UDP Packets (Compressed & Uncompressed using Snappy (google.github.io/snappy/))
Even that UDP is Connection Less i Implemented a faked session system to reidentify upon data arrival (this is based on a token that is needed in case some old router fuck up with their ports). The system has the functionality to poll a server if its still alive (also implementing a timeout) and of course the server will poll all "active" connections for their alive status, also using a timeout)

I want to take advantage of udp speed and also have the advantages of tcp.

Once i got a prototype i will post it here. Since i havent looked into the duality source yet to find some starting points for the direct implementation.

Edit: Had to malform the Urls because of the board policies


Top
 Profile  
 
PostPosted: 2015/12/18, 19:03 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Welcome to the forums!

This is an interesting feature that you are working on. But why use UDP instead of TCP?


Good luck!

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/12/18, 19:16 
Newbie
Newbie
User avatar

Joined: 2015/12/17, 19:27
Posts: 5
Location: Germany
Role: Hobbyist
RockyTV wrote:
Welcome to the forums!

This is an interesting feature that you are working on. But why use UDP instead of TCP?


Good luck!


Well UDP is much faster than TCP when it comes to a huge amount of data to be send, because of the architecture of the protocol. Sure the bandwith and the latency can be ignored in a LAN but think of WAN you want to have the best performance possible.

another neat feature is UDP Broadcasting, when it comes to LAN Lobby implementations

Also i never worked directly with udp so its kind of a challenge :D


Top
 Profile  
 
PostPosted: 2015/12/18, 19:34 
Member
Member

Joined: 2013/05/20, 17:19
Posts: 77
Role: Professional
Hi ruohki. This sounds really interesting. I look forward to seeing what comes of it.

@RockyTV: I'd add to what ruohki said and mention that TCP is just generally unacceptable for games because of all the techniques it uses to make it a reliable protocol, such as in-order packet delivery, acks and retransmission etc. With games, if packets get dropped, the world has to keep running, and it's why games based on UDP (which is probably most of them) have all sorts of fancy prediction algorithms. Coding against UDP is definitely more difficult, because you have to do lots of stuff yourself that TCP would do for you, like discarding out of order packets, but it is more efficient.


Top
 Profile  
 
PostPosted: 2015/12/21, 00:37 
Newbie
Newbie
User avatar

Joined: 2015/12/17, 19:27
Posts: 5
Location: Germany
Role: Hobbyist
Just successfully tested LAN Server Discovery :)

The Server Module has the ability to turn its broadcasting to either on or off, while broadcasting it sends a Message to the Broadcast Address of the LAN containing some informations and the port on wich that server is listening on... The delay of this transmission can be defined in a property to keep lan traffic low

Still alot of basic stuff to do b4 i could even think of an implementation into the engine :|


Top
 Profile  
 
PostPosted: 2015/12/22, 19:09 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
ruohki wrote:
Just successfully tested LAN Server Discovery :)


First steps :) If you feel like letting us know about your progress on a regular basis, feel free to create a worklog in the Projects forum. Some technical insight could be interesting on this as well.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/12/24, 17:03 
Newbie
Newbie
User avatar

Joined: 2015/12/17, 19:27
Posts: 5
Location: Germany
Role: Hobbyist
Once i have a working prototype (maybe blobby volley clone^^) ill put the project on git


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group