Jump to content
  • Advertisement
Sign in to follow this  
yoshscout

Factories in RakNet

This topic is 4025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This question is for a RakNet expert =) Originally I had an ugly structures implementation(non-raknet) and a huge case statement on the server opcode. It was ugly. TCP Now I have message factories where the appropriate message class is referenced for its size(of message-can be variable if message has strings) is pulled from class and when the entire message is received(gotta luv TCP) it passes that to a Deserialize function that pulls the data out to the class and then call Invoke. I include the same files into client and server and use #ifdef to make sure that only the correct one processes code in invoke. If i make a new message, i copy my template file and search and replace __NAME__ and boom i got a new message. i love this. it is still TCP and has some flaws and is somewhat dependant on Windows. It could be fairly easily ported i believe, however. There are a lot of changes going on in my game and if a rebuild comes out of this, moving to RakNet with a reliable UDP would be good. Will i be able to get the same ease of networking out of RakNet? Like I said, its practically copy paste message right now. There are some hang ups but its kinda nice. I'm reading RakNet documentation right now. I want a really high level interface to networking, non-OO was a nightmare in networking. Edit: RakNetworkFactory.h is an implementation of the factory design pattern, used to get a pointer to RakPeer, RakServer, and RakClient I think this is going down my alley... we will see.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!