Jump to content
  • Advertisement
ilovechii

UDP (RakNet) question.

Recommended Posts

Hi,

Basically, I have a multiplayer game with an already developed structure:
-> Login Server
-> Lobby Server
-> Room Server

But all the servers use TCP, but basically I want to rewrite the Room Server and convert it to UDP using RakNet (because game is realtime). I do not want to have to rewrite everything just the Room Server, which is where the matches happens. My question is:

What would be the best way to use RakNet:

  • A RoomServer using RakNet with limit like 1000~2000 players, it's possible?
  • If it's possible a RoomServer support like 1000+ players, which I need to do? Every match started I need create a host inside of RoomServer? Or only create a host server and make like I'm using in TCP, just has a RoomManager running every match inside.

PS: Every Room support max like (1v1 | 3v3 | 5v5) and maybe on future some battle royale with max 32 players.

Or would you have a better suggestion?

I am also in doubt about using ENet or RakNet because RakNet does not even have more updates, but it has already had more than 13 years of development and is stable.

Thanks,
Cheers!

 

PS: sorry my english.

Share this post


Link to post
Share on other sites
Advertisement

For what it's worth, the online game Roblox uses a modified version of RakNet, and runs multiple game instances on each server (similar to your "room servers.") I don't think their number-of-players-per-server numbers are public though. Given that Roblox does a lot more physics simulation than a traditional game, you should be able to do as many players as they do per server or more, but whether that limit is 500 or 2000 or 10000 depends on how you structure your gameplay and simulation logic, more than the networking bit.

If you generate a lot of data and need a lot of networking.data per second, then that will naturally come from touching more simulation data per tick, so the two concepts are somewhat intertwined. (Unless you use deterministic co-simulation, and only send inputs -- then the networking is always small.)

You will obviously also have to allocate a different port per server process on the same host, unless you use a forwarding proxy that knows how to route.

Share this post


Link to post
Share on other sites

Thank you very much for answering me!

So, my logic don't is heavy, more like some "Bomberman" game, but online, I only use less things of physics (it's 3D game but my map logic map is 2D in server-side like blocks with coordinates and check if is possible to move in this current coordinate or if current block make me invisible, water or something...), then is not a bad idea to use RakNet? I want to use too like ACK in RakNet, because I want an authoritative game and in realtime, it's a good idea?

 

Share this post


Link to post
Share on other sites

Yes, many realtime games have used RakNet, it can work well.

Note that the real-time-ness of your game doesn't just depend on your networking library, but also on the implementation of the game simulation itself. For the best real-time interactions, you need to be able to let the local client be "out of sync" and then "correct to server" when receiving updates, while somehow hiding the out-of-sync. Exactly how to do this best varies by specific game mechanics.

Share this post


Link to post
Share on other sites
Posted (edited)

Sorry for the lack of knowledge, but is there a specific name for this "technique" or some article that can explain one more about this implementation?

I'm thinking of implementing some tips from Gabriel Gambetta, such as Interpolation, Reconciliation and Prediction:

https://www.gabrielgambetta.com/client-side-prediction-live-demo.html

Would only these implementations be enough for a realtime?

Edited by ilovechii

Share this post


Link to post
Share on other sites

Those are fine techniques, and many games work well with those techniques.

More specifically, each game will have to make its own particular choices -- there is no "one size fits all" for this, which is why game networking doesn't really have a "generic game server" solution like, say, web pages, or chat servers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!