🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

UDP (RakNet) question.

Started by
5 comments, last by hplus0603 5 years, 2 months ago

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.

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.

enum Bool { True, False, FileNotFound };

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?

 

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.

enum Bool { True, False, FileNotFound };

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?

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.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement