SFML community forums

General => SFML projects => Topic started by: RedxDev on June 01, 2012, 09:37:35 pm

Title: RoveNet Network Library
Post by: RedxDev on June 01, 2012, 09:37:35 pm
Heya!

Ever since I found SFML, I've always loved working with it, except for one thing: the network package. Yeah, it is easy to use, but it just isn't cut out for use in a fast-paced multiplayer game. TCP is not good for this, since it is fairly slow, and the UDP it provides is just plain UDP with no extra layer for reliability.

In the past, I've used enet (enet.bespin.org) for reliable UDP, but the problem with that is, although it is simple to use, it is written in C and can't take advantage of classes and such in C++.

I've taken the best parts of the SFML network package (mainly the sf::Packet class) and enet to create a more powerful network library that I call RoveNet (named after a game engine I'm currently working on).

The only dependency is enet.

As of right now, it is only set up to compile into a static library, though I will fix that in the future.

Features/WIP/Todo list:

Project Wiki: http://wiki.redxdev.com/rovenet
Bitbucket Mercurial repository: https://bitbucket.org/redxdev/rovenet
Stable branch documentation: http://docs.redxdev.com/rovenet
Development branch documentation: http://docs.redxdev.com/rovenet-dev

The server/client framework is pretty much done, and is ready to be used, though really it just provides a class-based layer over enet.

The object management framework is under development, and some of the progress can be seen on bitbucket.

RoveNet is under the same license as SFML, the zlib/png license.

For more details, see the bitbucket page.
Title: Re: RoveNet Network Library
Post by: Lo-X on June 01, 2012, 10:02:05 pm
Sounds interesting.

I never used the network module for a video game before, but I plan to use it for a future small LAN game. That's why I'll keep an eye on your project. I will let the network users to say if it's more convenient as I've almost inexistant experience  8)
Title: Re: RoveNet Network Library
Post by: RedxDev on June 01, 2012, 10:15:37 pm
Oh, I forgot to say that I'm using SFML 2.0 for this project. It may work with 1.6, and even if it doesn't it should only require minor changes.

EDIT:

I've finished the basic library, and it has been pushed to the bitbucket repository. I've also added a sample program for reference (though I haven't documented the sample yet). There is one major problem with the sample, which is touched on in the readme file in the sample's directory.
Title: Re: RoveNet Network Library
Post by: Zefz on June 02, 2012, 01:21:43 pm
What are you using from Enet to make it a dependency?
Title: Re: RoveNet Network Library
Post by: RedxDev on June 02, 2012, 06:00:00 pm
Um, everything. I'm not using SFML's network package for the actual networking, only for the sf::Packet class. enet already implements a protocol on top of UDP for high-speed reliable networking (if you don't believe me, it was made to be used in the Cube (http://cubeengine.com/) engine).

My library, for now, is just a set of classes over enet to make it more C++-like. I'm going to be adding more features later.
Title: Re: RoveNet Network Library
Post by: Laurent on June 02, 2012, 07:18:48 pm
Quote
I'm not using SFML's network package for the actual networking, only for the sf::Packet class
I wouldn't make a library depend on SFML just for sf::Packet. It's a very simple class that anybody can rewrite (you can even copy-paste it in your own code, unless you use a weird license).
Title: Re: RoveNet Network Library
Post by: RedxDev on June 02, 2012, 07:39:55 pm
That's a good point, though I am also using the ip address class... I'll probably rewrite it to not depend on SFML when I get a chance. Also, the license is zlib, so copying the packet class won't be a problem.

EDIT:

I've started moving this away from SFML. Also, I've added a script on my website that will auto-build the documentation whenever the repository is updated. You can find the docs here: http://docs.redxdev.com/rovenet

EDIT 2:

The first stable version is in the 'stable' branch (which is default). It includes a basic wrapper around enet, and I've tested most of it. In the 'development' branch I'm starting to work on an object management system similar to the Replica system in RakNet. There will be a download in addition to the repository on bitbucket soon.

Also, the docs at docs.redxdev.com/rovenet are only for the stable branch. For the development branch, you have to build them yourself (with doxygen 1.8+, since markdown support is needed).