Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / MultisyncUDP (MUDP) v0.1 - Multiplayer Plugin

Author
Message
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Sep 2009 21:21 Edited at: 27th Sep 2009 19:50
Update 0.1.3 - 27th September, 2009
Added hostname support (www.mysitehere.com can be used instead of an IP address), fixed some bugs, and added the following commands: UDP SEND COPY, UDP CLEAR MESSAGE, UDP GET MESSAGE REMAINDER, UDP GET PLAYER IP, and UDP GET PLAYER PORT.

MultisyncUDP (MUDP)
I've been recently developing a UDP equivalent of Multisync for a project, and decided that it would be worth posting on the forums. This is actually an offshoot from a more powerful networking plugin I'm working on.

For the most part this plugin is very similar to Multisync, although it uses UDP rather than TCP. This effectively means that it is suitable for a wider range of games, particularly first person shooters where there are certain limitations of TCP that make it infeasible. One important addition is the ability to manage several servers or clients from a single application. Each server or client is known as an 'instance'. As well as the default instance, you are allowed up to 32 additional instances.

Please be aware of the pitfalls of using UDP: Messages are not guaranteed to be received, may be duplicated, or arrive out of order. Under good network conditions these problems have a very low chance of occurring, but nonetheless you must design your networking code to account for this. One simple solution is to use this plugin for the data that can be thrown away (data that is constantly updated), and use the original Multisync for important data that must not be lost. I would like to point out however that it is feasible to use UDP on its own, and most commercial games do this.

I've written a basic manual detailing all of the commands and giving some important information about the usage of this plugin. Some examples are included although these were written to test the plugin rather than to explain how to use it.

Changelog


Download
The latest version (0.1.3) is available from here.

Attachments

Login to view attachments
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 22nd Sep 2009 21:36
Nice!!!!!!!

Any chance on merging this with the original multisync? I think having it all in one will make it better.

HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 22nd Sep 2009 23:26 Edited at: 30th Sep 2009 18:02
Don't merge it keep them both independent, unless there's some sort of prefix between them both.

UDP_net put byte or something

also could you detail more on the risks and ... well what's really different between UDP and TCP

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 23rd Sep 2009 00:05 Edited at: 23rd Sep 2009 00:05
I would have liked for this to be part of the original Multisync but some time ago I lost some important files, and without them I can't compile it.

Quote: "also could you detail more on the risks and ... well what's really different between UDP and TCP"

Wikipedia covers the differences between UDP and TCP quite well. Those points I mentioned are probably the most relevant differences. Perhaps one important difference is that TCP has flow control, whereas UDP doesn't.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Sep 2009 19:51
Update 0.1.3 - 27th September, 2009
Added hostname support (www.mysitehere.com can be used instead of an IP address), fixed some bugs, and added the following commands: UDP SEND COPY, UDP CLEAR MESSAGE, UDP GET MESSAGE REMAINDER, UDP GET PLAYER IP, and UDP GET PLAYER PORT.
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 27th Sep 2009 23:51
Benjamin, any chance of making this GDK-compatible?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Sep 2009 03:00
I will do in the next few days if possible. I'm a little busy with current tasks.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 29th Sep 2009 07:46
This is fairly interesting, it would mean you could keep connection to like, a main 'host' which hosts the room list for a game, and the actual game server at the same time. Shiiiny


EDP Map Editor[2D]
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 30th Sep 2009 00:06
Hostname support. A miracle for Dynamic IPs.

Is there any way to store the Server IP as a string when using a Hostname for connection?


bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 7th Oct 2009 17:19 Edited at: 7th Oct 2009 17:26
Quote: "also could you detail more on the risks and ... well what's really different between UDP and TCP"


There's no security concerns for UPD over TCP. The main difference is that TCP packets are guaranteed to arrive, to be in the right order, and to be complete. If not, the TCP packets are automatically resent.

With UPD, there's no guarantee that your data will arrive, will arrive in order, or be complete. UPD packets are not checked for any of those things, and UDP packets as a result are not resent (unless you program such a feature in your game). UDP is much faster as a result, but if you need any of these three features, you need to program it yourself within your program.

To illustrate, if in your game there was a chatroom and you used the UDP protocol, a user's message may not arrive or may be garbled on other's machines. Text messages may need to be sent using TCP, or, you could check the packets in your game to make sure it's complete, and if not, your game could request that information from the other client machine again.

Now, for say, voip data in your game, you could care less if the data is guaranteed or in the right order, you need that VOIP data there fast and if it doesn't arrive, you're screwed anyway, so send it UDP.

Login to post a reply

Server time is: 2024-11-24 11:25:39
Your offset time is: 2024-11-24 11:25:39