Networking
-
AlejandroMJ
- Gnoblar
- Posts: 5
- Joined: Tue May 24, 2011 1:55 pm
Networking
Hi, I´m thinking about start a Ogre3D game project, but I must know if exists something to manage the network easier, thanks you 
-
Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
Re: Networking
try rakNet
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
...and we have gasoline.
-
AlejandroMJ
- Gnoblar
- Posts: 5
- Joined: Tue May 24, 2011 1:55 pm
Re: Networking
thank you:)Pangamini wrote:try rakNet
-
AlejandroMJ
- Gnoblar
- Posts: 5
- Joined: Tue May 24, 2011 1:55 pm
Re: Networking
and someone knows a free network engine????
-
spacegaier
- OGRE Team Member

- Posts: 4308
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 137
Re: Networking
Did you have a look at RakNet's website?
Depending on what you are going for, it is free!
http://www.jenkinssoftware.com/pricing.html
Depending on what you are going for, it is free!
http://www.jenkinssoftware.com/pricing.html
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
thebluefish
- Gremlin
- Posts: 170
- Joined: Tue Apr 05, 2011 1:55 am
- x 10
Re: Networking
Hi,
If you aren't looking to use a commercial networking library such as RakNet, I would suggest you take a look at enet: http://enet.bespin.org/
It's what I'm currently using for my game, and it works wonders. Though it may not be as feature-rich as RakNet, it's free and open-source.
If you aren't looking to use a commercial networking library such as RakNet, I would suggest you take a look at enet: http://enet.bespin.org/
It's what I'm currently using for my game, and it works wonders. Though it may not be as feature-rich as RakNet, it's free and open-source.
During the code inspection, a couple of minor points were noticed: -
Function inlining was critical to performance.
For MSVC, at least, a "delete 0" caused execution of 11 assembly instructions, including a function call. So in cases where performance is at an absolute premium it can be worth inserting the extra manual test.
-
Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
Re: Networking
That enet looks pretty good as well, i am seriously thinking about switching from RakNet, since i don't use all those rich features
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
...and we have gasoline.
-
rewb0rn
- Greenskin
- Posts: 128
- Joined: Sat Dec 02, 2006 10:03 pm
- Location: Berlin, Germany
Re: Networking
A fellow moderator of mine on spieleprogrammierer.de (german gamedev community) has written a comparison of various ways to implement networking, including raknet, and his results suggest that raknet is not the non plus ultra lib for networking as many people tend to say: http://networklibsbenc.sourceforge.net/
I must add though that I currently use raknet in my project and for the moment it works great
Also, I have not studied those results in detail.
I must add though that I currently use raknet in my project and for the moment it works great
-
Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
Re: Networking
Do you use the raknet serialization of game objects? I have read there is such a feature but i don't know how does it work, i do all sync myself.
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
...and we have gasoline.
-
pizzazhang
- Kobold
- Posts: 30
- Joined: Thu Jan 20, 2011 6:37 am
- Location: Shanghai/China
Re: Networking
do you mean RPC?Pangamini wrote:Do you use the raknet serialization of game objects? I have read there is such a feature but i don't know how does it work, i do all sync myself.
try bitstream: (only for Raknet4)
Code: Select all
struct PlayerStateSync
{
PlayerStateSync()
{
}
~PlayerStateSync()
{
}
int playerIndex;
//postion
Ogre::Vector3 pos;
//Quaternion
Ogre::Quaternion qua;
};Code: Select all
PlayerOperateSync pos;
RakNet::BitStream bs;
bs.WriteCompressed(pos);
mRPC.Call("RPC_PlayerOperateResponse", &bs, HIGH_PRIORITY, RELIABLE_ORDERED, 0, RakNet::UNASSIGNED_SYSTEM_ADDRESS, true);
return true;Code: Select all
NetProtocal::PlayerOperateSync pos;
bool read = bitStream->ReadCompressed(pos);
RakAssert(read);-
rewb0rn
- Greenskin
- Posts: 128
- Joined: Sat Dec 02, 2006 10:03 pm
- Location: Berlin, Germany
Re: Networking
I don't, a while ago I have read that the built-in synch system has several flaws and would be rewritten in time (statement bei Rakkar on the forums). There is now a new synching system but I did not check it out. I feel quite comfortable doing it by hand anyways as its not that much work. I added different synching channels depending on the kind of action, user input (to server) and object states (from server) which are by far the most frequent types of messages are sent unreliable ordered on one channel, other things like join/leave etc. have their own channels and are sent reliable ordered. As I use client side prediction I think the standard RakNet synching wouldn't be an option for me anyway..Pangamini wrote:Do you use the raknet serialization of game objects? I have read there is such a feature but i don't know how does it work, i do all sync myself.
-
Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
Re: Networking
Detto, i do it all myself. I use the channels like you do, for physics there is unreliable ordered, for chat and important events reliable ordered and for entity creation reliable unordered (as my entity manager can handle mixed order even if entities depend on each other)rewb0rn wrote:As I use client side prediction I think the standard RakNet synching wouldn't be an option for me anyway..
I believe TCP doesn't have such features
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
...and we have gasoline.