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
CHANGE LOG
27/September/2009 0.1.3
* Fixed crash when attempting to get a string from an empty message.
* Added hostname support (ie. you can use a web address instead of an IP address to specify the server).
* Reduced maximum message size to 1400 bytes in order to avoid exceeding the MTU size.
* Added UDP SEND COPY and UDP CLEAR MESSAGE.
* Added UDP GET MESSAGE REMAINDER.
* Added UDP GET PLAYER IP and UDP GET PLAYER PORT.
22/September/2009 0.1.2
* Added UDP SET INSTANCE command. Up to 32 instances (excluding the default instance) may be used to create multiple servers, clients, or both.
* Altered UDP SYNC to update all active instances.
18/September/2009 0.1.1
* Fixed UDP HOST and UDP CONNECT to give the "ALREADY CONNECTED" error when relevant.
* Fixed UDP DISCONNECT to correctly clean up and flag the disconnection.
* Fixed UDP DISCONNECTED to return correct value.
* Fixed bug that caused messages of an incorrect size to be sent.
* Altered internal library to allow a player to reconnect without the server having to first acknowledge its disconnection.
* Added UDP GET PLAYER AMOUNT and UDP PLAYER EXIST.
17/September/2009 0.1.0
* Fixed bug in internal library that caused a connection problem.
* Altered the UDP PUT FLOAT entry in the string table to take an F parameter (was erroneously D).
Download
The latest version (0.1.3) is available from
here.