Version: Unreal Engine 5.0.3
Now: I have a client/Dedicated Server game, And I want to limit the player nums in each game session.
Try: I override game mode preLogin . And compare player nums between gamesession and settings, as follow:
Question: But the function GetNumPlayers() will increase after post login, If many players join game in same time, they will get the wrong current num players, how to resolve it?
I hope u can give me some advice.
I’m not yet a wizard with networking as I haven’t required it so far, but people recommend this document on networking:
Multiplayer Network Compendium | An Unreal Engine Blog by Cedric Neukirchen
While my first thought was also GameMode or GameInstance, this document talks about an entirely different approach.
Page 94 would suggest you might want to take a look at the “Online Subsystem” and how a session is configured. Page 88 shows that it’s goal is to make it all work with various consoles and online platforms.
Hi there @RicardoAndy. Hope you’re well!
This topic has been moved from International to Programming & Scripting: C++.
When posting, please review the categories to ensure your topic is posted in the most relevant space.
Thanks and happy developing! 