Page 1 of 16

IrrNet - Irrlicht Network Framework 0.36 (Now Windows/Linux)

Posted: Thu Jan 04, 2007 7:21 pm
by BlindSide
This version is outdated, please goto:
http://sourceforge.net/projects/irrnet

and download the latest SVN.

irrNet V0.36!

Download Mirror 1:
http://www.sendspace.com/file/9havx2

(This one doesnt include a specific source file for linux but it will still work with linux with a tiny bit of modification. (Pretty much replacing all (void*) with (char*) and several other minor things thatll pop up at compile time...))

Original Post:

Hey guys,

I searched around the net for ages and nowhere could I find a suitable and easy to use network api. People said RakNet was good but you have to pay $100 for commercial titles and I found the tutorial for the primer a little confusing. Then I stumbled upon Enet, and for a long time I was very dumbfounded at how to use it. Where are all the simple functions, like "sendPosition" or "sendScale". They are nowhere! :lol:

So, after a hard night fooling around with Enet (hehehe) and "memcpy", I decided to write my own! It is still in the very early stages and I doubt it will be suitable for really big projects for quite a while but expect a first release soon. I have written most of it so far it just needs some testing. Depending on interest I can keep working on this. Although my network knowledge is newly gained noone else seemed up to the task of writing a network wrapper so I will try my best.

Enjoy, and please read the instructions and look through example code! If you have any questions/suggestions post them here.

PS: I am thinking to incorporate EPIC library for client prediction sometime...

Posted: Thu Jan 04, 2007 10:35 pm
by monkeycracks
I've been needing one extremely! bad.
Glad someone did this.

Cool

Posted: Fri Jan 05, 2007 2:02 am
by whiteston
This would be awesome to have. Our project would benefit greatly from it.

Posted: Fri Jan 05, 2007 6:52 am
by BlindSide
Update

Posted: Fri Jan 05, 2007 12:36 pm
by sudi
Looks pretty cool...but what u did is missing one feature that i always tried to implement.
Ok listen u create an object on one maschiene and now ur network manager has to reproduce the thing on all other connected systems. and ofcourse also has to destroy them and build them on new connecting systems. I always got memory leaks by implementing this and was never able to solve the problem...maybe u can find a way.

Posted: Fri Jan 05, 2007 1:04 pm
by BlindSide
Yeah im thinking of implementing this later.

What I will do is have a node type struct, with all the materials etc. This will have to be preset on all machines, and all the client has to send is sendCreateNode(int nodetype, position, scale, rotation);

So basically a nodetype id which leads to a struct holding info on what the mesh material animator etc etc is...

Posted: Fri Jan 05, 2007 1:10 pm
by sudi
ok so u basicly will have a hardcoded or xml-based table wich has to on all maschines? This could lead to a big hack when u use a external file to set the table. For example in an action-game u could exchange all players with a glowing ball so u can see them easily or something like that.

Posted: Fri Jan 05, 2007 1:36 pm
by Spintz
I should really whip something together for Irrlicht real quick. My job for the past 6 or 7 years has been Network Programming/Engineering, I've implemented my own protocols for reliable Unicast UDP, and reliable multicast( although for reliable multicast, Microsoft has implemented PGM which will be nice, but is very unstable at this point ).

Anyways, I can't use code from work, but I'll write up some new classes specifically for using with Irrlicht( using Irrlicht core classes ). I'll start out by writing generic UDP and TCP classes that are cross platform for Linux / Windows( I cannot do anything for MAC, don't use it, don't even know someone who owns one ). Maybe you can use them instead of this Enet stuff, I'll make it really simple to use.

Posted: Fri Jan 05, 2007 1:47 pm
by BlindSide
I was thinking hardcoded, not external. Ppl hack counter strike and stuff all the time tho so I doubt there are many ways around those kinds of things.

PS Whats wrong with Enet? Aside from it being a lil hard to link :P

Posted: Fri Jan 05, 2007 2:35 pm
by Spintz
Dont know but you were complaining about it a bit, so i'll make an easier to use, and easier to link network library that will work for both Linux and Windows. It's what my real job is, network programming/design/systems of systems.

I need my own network code for a game I'm working on. You don't have to use it, but maybe you'll like it better, or find it easier :?:

Posted: Fri Jan 05, 2007 2:41 pm
by BlindSide
Oh no, go ahead! :lol:

I was just curious because alot of ppl recommend Enet. Id love for you to make an easier to use Irrlicht Specific library though :D (Maybe even better to integrate it into IrrSpintz so that the network code can benefit from the internal functions and integrate net information into the scene nodes themselves? That would be awesome! 8) )

Posted: Fri Jan 05, 2007 3:16 pm
by whiteston
Again, something like this would be great to have. I mean seriously $100 is not that much if you are talking about a true commercial product, but having something for irrLicht is great.

You're also never sure about something that they are already charging for. If you hit on the next big thing, their 'commercial' license may suddenly increase!

Unless you have a signed agreement -- but what game creator, that is having a tough time with $100 for a license, is going to spend $3-4k to have lawyer go through that for him.

Posted: Fri Jan 05, 2007 3:19 pm
by BlindSide
It is not just the money, RakNet does not have high level functions like automatically updating the node position like this does. I actually found raknet just as confusing as Enet because I was not familiar with networking in general.

Posted: Fri Jan 05, 2007 4:26 pm
by RapchikProgrammer
Awesome work blindside! This is really useful for the irrlicht community, even though i was planning to have at making a irr + hawknl library but after this i dont think there wud be no need for that! BTW it was a little in accurate the first time i moved the node in the client and checked the server, but after that whenever i moved either the client or the server it worked perfectly!

Posted: Fri Jan 05, 2007 4:56 pm
by stef_
Hi,

I have already used irrlicht+enet (or opengl+enet).
Sometime ago I proposed the name irrNet on niko blog (http://www.irrlicht3d.org/pivot/entry.php?id=409)
and recording to me the value added for enet+irrlicht should be "at least": client-prediction+interpolation+extrapolation.

Probably your library will become great, but from a library named irrNet
I'm expecting something more than only replicating positions.
In cube (where enet was born) there is also prediction, ...

Anyway I love any effort on networking.

PS
another issue is thinking about client or server authoritative.

Bye :)