Update October 2017. After a long time following courses on how to build in Unreal Engine, I finally have started with building blueprints. Busy building a watersystem
Update may 2017. I have reactivated the project. Was too busy with ordinary work :-). I am following a course on Udemy (Unreal Engine 4: How to Develop Your First Two Games) to get my skills on a higher level.
Note: In the documentation the blueprints are changed with the different step. I am building new versions each time:
Space bar = MulticastSpawn p = Run on Server
Note: In this example the blueprints ar build in the character. The character lives both on the server and the client. So that is why, a function can by activated on the server by an action on the client.
Step 1 Multicast (Spacebar)
The multicast only spawns to the clients if it is activated on the server. So on a dedicated server how to activate this function?
Step 2 Run on Server (key p)
Works on the Dedicated Server (local)
Stap 3 Run On Owning Client (key o to print inventory)
I understand why the Item Added and Item Removed string is not printed on the client. This because the Triggerbox only activates the server (Authorrity) which activates Remove and / or Add Item.
Result after step 25 I got a problem. If a run the simulated server (2 clients) in the editor, no problem. But after packaging and starting the local server, this appears, over and over. I can start the client but stil this is wrong.
So it looks like the progam is try to read the value of Textrender, while it has no value yet or is not create yet? If I don’t use event tick, there is now problem.
Turns out to be a typical Dedicates Server error. Problem is that the dedicated server does not have a graphical interface!!!! So it can’t deal with the textrender, there is no textrender on the server!!!!
Warp up and some solution to the problem 🙂 Stil not solved completely
After the counter is back to 0, the timer still keeps on running because it is set on looping! De timer is only running on the server. So the timer should be cleared! This is done in the On Rep Deactivate.
Event Debug FDPlayerInfo prints information to screen
Location of the debugfunktions used
FD_Lobby Event BeginPlay
0:15 Default setting as Barbarous.
When the others make first contact. FD_LobbyPC Event BeginPlay is called several times on the server. Time 0:39 This because a PlayerController lives on the server and the client?
1:17 Host changes character to Natural . EveryoneUpdates runs with only info of the host. Server FD_LobbyGM knows that other are connected, but they have not selected a character yet. Natural is greyed out at al clients!
After each client selects a character it is grayed out, EveryoneUpdate loop runs on FD_LobbyGM on server, PlayerImage of clients is missing
1:42 Host select Barbarous. Players are displayed. PlayerImage is missing for clients.
2:41 When ready or not ready is clicked the loop runs again on the server
Clients started to select a character, while the character selection is not open on the server / host. One client appears without CharacterImage and name. Start Session is grayed out!! 6:15 After the client without characterimage and name quits, start session works again.
After rejoing, the start session is still grayed out. 8:42 . 8 players where allowed to join. If one of the clients changes character, it is ok again
21:39 althoug the client knows it PlayerImage, it does no show up.
Game Instance : Game instance created when game starts and lasts until that game executable closes, persisting across level changes and joining sessions etc. Game instance is only aware of its own executable. Does not have any connection between server and clients. Lives only on the client (is this correct?, also the server is an .exe)
In steam multiplayer of FD_Online:
BP_FD_OnlineGameInstance (Parent class = FD_OnlineGameInstance in C++)
Event Show Main Menu (Interface)
Event Show Host Menu (Interface)
Event Show Server Menu (Interface)
Event Show Options Menu (Interface)
Event Show Loading Screen (Interface)
Event Launch Lobby (Create Advanced Session and open FD_Lobby, as listen) (Interface) Setup Host as listen server
Event Join Server (Interface)
Event Save Player Info (Interface)
Event Main Menu Player Info (Interface)
Event Update Friends List (Interface)
Event Destroy Session Caller (Interface)
Event Store Character Seleceted (Interface)
Several Gamemodes and PlayerControllers
Game and Server Default Map is FD_MainMenuMap . In level BP : Event BeginPlay sets resolution and starts Show Main Menu
FD_MainMenuGM has no content, is only used the get the FD_MainMenuPC activated
Event BeginPlay Gets playername and image from Steam and also the friends
Map FD_Lobby has no Level BP. Starts FD_LobbyGM
LaunchGame (Actual start of the selected level)
InitialSetup (only on client)
CallUpdate (only on server)
SetupLobbyMenu (only on client)
AddPlayerInfo (only on client)
UpdateLobbySettings (only on client)
ShowLoadingScreen (only on client)
UpdateNumberOfPlayers (only on client)
Kicked (only on client)
AddPlayerToKickWindow (only on client)
UpdateAvailableCharacters (only on client)
AssignSelectedCharacter (only on server)
AssignPlayer (only on server)
GetChatMessage (only on server)
UpdateChat (only on client)
Gamemaps like FD_World and FD_Prototype uses BP_FD_OnlineGM
At this moment BP_FD_OnlineGameStateBase and BP_FD_OnlinePlayerState are not used.
One could think that I haven’t been active lately. But that is not the case!. I have been very active, and had a lot of “challenges”
Actualy I am starting the project for the third time 🙁
First Time I started to build in Unreal Engine using only Blueprints. I ran into problems with the hydraulic calculations. I also read that the best approach is to start with a basis in C++
Second Time I started to learn C++. I followed several courses at Udemy, Linda.com, and Unreal. My prototype multiplayer is based on the listen server in Unreal. My idea was that it would be no problem to convert to a dedicated server. This was a mistake. Turns out that a dedicated server is completely different compared to a listen server. There is also little documentation on getting a dedicated server running on a VPS.
Third Time My new approach is to start with getting the standard third-person game running on a VPS. Based on a dedicated server and clients. And I started to use perforce as source control. And I skipped the idea of using a Linux VPS, it is all to complicated. I managed to get the “simple” project running as a server and client on a windows server. So my strategy now is to add on the simple project, and test everytime that it is working as a server and client. Bt using perforce I will be able to always return to a working solution