Picking up your brains to see whether this would be possible with UE5+.
Let’s assume the server is running the main map (open world or whatever) in 3rd person with clients connecting and interacting - however, for PVE / PVP combat I’d like a JRPG-style tactical/turn based on where the involved actors are “teleported” to a separate battle field (with a loading screen if needed, no problem there).
For a really small number of clients, it would be perfectly possible to have the combat field in the same map and teleport the actors there (normally unreachable otherwise). However, should there be multiple battles at the same time, is there a way to instantiate that battle arena only for the involved actors (either players for PVP) or client and whatever mobs in PVE? As in generating a battle id via RPC or API call and only allowing whoever is needed to join there?
Another option that crossed my mind was using @Dartanlla’s OWS to spawn on-demand as many battle instances of a certain type as needed - not yet sure if it would work, but would call for a certain amount of resource overhead.
Wondering if you could point me towards a better approach regarding the above.
One option would be to use Unreal Engine’s built-in replication and spawning functionality to create new instances of the battlefield map specifically for the players or groups of players involved in a particular battle. You can use Remote Procedure Calls (RPCs) or other networking methods to initiate the spawning of a new instance of the map, and then use the same methods to teleport the actors (players and mobs) involved in the battle to that new instance.
Another option you mentioned is using a plugin like OWS to spawn new instances of the battlefield map on-demand. This approach would likely have a higher resource overhead, but it would give you more fine-grained control over the spawning and management of instances.
Ultimately, the best approach will depend on the specific requirements of your game and the resources available to you. I recommend experimenting with different approaches and measuring their performance to see which one works best for your use case.
Please note that creating a game or a system like this would require a good understanding of game development, network replication and programming. If you are not familiar with the above, it might be difficult to accomplish.
The simplest and most straightforward approach would be to use World Partition and have as many of your “Battle Arenas” pre-assembled and ready. Spread them out in world space.
For each you’d have a container of data noting what players, mobs etc where involved with n arena.
Just a matter of creating a UI/backend to set the container data, teleport the players to the arena and handling the arenas game mode rules.
Player Unknowns Battlegrounds (PuBG) has a similar set up (UE 4.16) using World Composition.
In the Training Grounds (practice area map) you can 1v1 in a private match. You are teleported to a small 1v1 arena on the outskirts of the main map play area.
They also have a comeback arena where dead players are teleported to for a chance to respawn in the main game. Same concept is used. Teleported to a special area on the outskirts of the main map.
The kicker here is having the proper server hardware to support it. CPU, RAM, Bandwidth etc.
@EliasWick: thank you very much for the detailed answer! In my exact case, as awkward as it may be - networking, infrastructures and coding are no secrets, while UE is the topic I’m currently at “in progress” stage (i’ll say beginner to be safe), hence the request for pointers.
Resource wise - while I appreciate something like OWS being usable to manage herds of clients by map splitting/instancing, I still feel silly about having it spawn 300 battleground instances at nearly once if there’s 1000 clients across the world. I’ll follow your advice and try both approaches to see which one’s more efficient.
Thank you again!
@RevOverDrive: thanks, I thought of that, but what drags me back is you can never known how many battle arenas are needed. Were it a 1-vs-1 league with a fixed number of entrants, that’d be fine, but when PvE enters the deal and the number of total players in a map instance is unknown/can vary, plus maybe theming to match arena against current area (pyramids, hell, whatnot) and also adding the turn-based style combat (read: at 30sec/client turn + 15sec/AI turn), it means an arena can be occupied for as long as a good 3-4 minutes. Arena management would suddenly require an waiting queue just to attempt to kill a poor spider or something that’d be my main concern here. Server hardware for such a project, were it to reach maturity, is the last of my concerns (not trolling, just something I’ve been handling for at least couple decades).
Thank you as well for the pointers - highly appreciated!
What you are willing to pay per server instance will dictate player count per instance, thus max number of arenas. All considering the resources needed for all functionality +% for load.
Even with procedural generation of arenas there will be a max number of them per server instance.