Why Raknet?

BlitzMax Forums/BlitzMax Programming/Why Raknet?

BLaBZ(Posted 2013) [#1]
I see Brucey made a module for Raknet which is fantastic!

I don't have much experience networking and creating multiplayer games so pardon the rudimentary question -

Why use Raknet vs a basic UDP library like a few Josh K has submmited ie:

http://www.blitzbasic.com/codearcs/codearcs.php?code=2325

Thanks


Thareh(Posted 2013) [#2]
The issues with UDP from what I have read is that packets may be lost, incomplete, duplicated and come in a different order than the order in which you sent them.

So you need to implement some smart packet handling for it to work properly.

Raknet takes care of this for you I believe.


xlsior(Posted 2013) [#3]
Raknet is quite a bit more elaborate, e.g. Brucey's modue has several components including RaknetVoice, which allows you to implement voice chat / team speak functionality in your game as well.

(Although unfortunately it appears that the raketn module won't (yet) compile with the 4.7.1 GCC, so depending on which version of MinGW you have installed, things may or may not work for you)


xlsior(Posted 2013) [#4]
Also, what Thareh said: unlike TCP, UDP has no built-in error checking / consistency.

It's geared towards streams where it doesn't really matter if you drop the occasional packet, e.g. audio/video streaming -- where a split-second hiccup or glitch is preferable to waiting for several seconds for the 100% accurate info to show up should there by a delay with some of the packets for whatever reason.


JoshK(Posted 2013) [#5]
You can send messages via ENet (which is UDP) with a "reliable" flag which guarantees they are sent.


Richard Betson(Posted 2013) [#6]
Hi,

I use bnetex which works great and easy to use and supports both UDP and TCP. ;) You might need TCP if you are say keeping a server list using PHP or need to access a MySql database.

- Rich -


Imperium(Posted 2013) [#7]
The links for the RakNet wrapper work finally. I had problems with the site for a about a week.

http://repeatuntil.free.fr/raknet/