Hi, i am currently trying to learn how to handle server in unreal engine for simulating multiple levels at same time.
and while i am doing that, i found that there are several ways to opening a server.
so i have got confused and want to know the differences of them and which one should i use for my project.
So far, i found these ways to open a server
-
Dedicate server (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums)
-
Command line to open level as listen (server?) (Blueprint Open Listen Server - Blueprint - Unreal Engine Forums)
-
âSessionâ related blueprint nodes (Online Session Nodes | Unreal Engine Documentation)
Here is the example of what i want to make (assume it as some kind of RTS game like âStarCraftâ but Single-player game)
-
when you start a game, there is your building on a map and you can spawn some units from that building.
-
units can explorer or build new buildings, extract some resource from source, fight, etcâŚ
-
But there is border on your map. so playerâs base canât get larger than certain size.
-
but when player spawn an air plane, player can send some units at different map. so that player can make second base or attack NPCâs base.
-
and for send units, player should choose a spot on world-map. and also player can check world-map if NPC sent an air plane to playerâs base.
What i am planned to do.
When player start a game, launch a server that works as some kind of master-server (World-Map).
And if there is at least one base that player created, open a new server with the map that can read data and load game data from it. then master-server find which data should new server read and give server the data.
After all the necessary servers are ready (World-Map and Local-Map), player join to Local-Map so that player can play with units and buildings.
Than when player send a group of units on different spot, World-Map (master-server) open a new map(server) and check is there existing save data for that spot. And depending on result, tell new server to whether load or create new data.
Finally, if there is no units on Local-Map, save mapâs data and terminate server.
So far i only tried first option (Dedicate server) and i barely made it to work. Then i was looked for how to open multiple servers and noticed there is several ways to open a server.
but i couldnât figure out which one is better or fit for may situation.