Herb wrote:Looks tempting!
Had a few questions below maybe you could answer:
- Is the code commented well?
- Could you comment on what tools you use for level design? And how you're using recast with the level tools?
- Does the framework from both the client and server support a threaded approach? For example, can AI be calculated in a different thread than the render thread?
- Finally, how is the networking with RakNet setup? Using their BitStream class or serializing out the structs? Are you using the Replica3 plugin for the player objects, or doing it manually?
Thanks for any answers you can provide!
Hello!
- Is the code commented well?
Its is commented (just not very much), there are some few parts in portuguese which i am converting to english. Everything else is in english.
- Could you comment on what tools you use for level design? And how you're using recast with the level tools?
For 3D Modelling of the enviroment it was used 3DsMax. For scene setup i used Ogitor and my own tool that you can download for free here in the forum:
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=48385. For mesh visualization i used OgreMeshViewer, but there more updated solutions. For mesh handling (resizing, upgrading, optimizing etc) i used meshmagick.
For recast, the obj is loaded inside recast Application and after all the parameters are configured, the binary file is exported. If you keep all the positioning the same (at origin) and scale, it should work flawlessly.
here are some screen of the recast configuration:
the code then loads the binary file and gets the information for the navmesh.
- Does the framework from both the client and server support a threaded approach? For example, can AI be calculated in a different thread than the render thread?
Its not multithreaded, but should be no problem if you keep track of what is being threaded. For example, here is a good resource for Raknet:
http://www.jenkinssoftware.com/forum/in ... pic=4782.0
- Finally, how is the networking with RakNet setup? Using their BitStream class or serializing out the structs? Are you using the Replica3 plugin for the player objects, or doing it manually?
I have tested all of these solutions(not sure if it was replica3 or 2 though). And ended up using bitstream. I didnt feel very confortable using replica manager as I had to make a lot special case handling -and some parts of it looks like magic-, but it looks like a great solution for some games. Also between using structs and streams, the docs say streams are faster, so i went with that

Its great to have deep control whats being sent or not. But it does consume your time for each action of the game that needs to be serialized.
For example, Replica may the only feasible way to go if you have a game like MMO, where you have tons of elements that need to be synchronized, as it does this almost "on the fly".
Here is a snippet for the player Respawn function, on Server:
Code: Select all
SystemAddress playerId;
Ogre::Vector3 position=Ogre::Vector3::ZERO;
RakNet::BitStream respawn(packet->data, packet->length, false);
respawn.IgnoreBits(8); // Ignore the packet ID
respawn.Read(position);
RakNet::BitStream sendRespawn;
sendRespawn.Write((unsigned char)PLAYER_RESPAWN);
sendRespawn.Write(position);
sendRespawn.Write(packet->systemAddress);
sendToAllPlayers(&sendRespawn,RELIABLE,packet->systemAddress);
printf("%s respawned\n",players[packet->systemAddress]->getName().c_str());
if(players[packet->systemAddress]!=NULL){
players[packet->systemAddress]->respawn(position);
}
I should add these things on a wiki
thanks for the questions.