I am in the early days of learning unreal engine and trying to take the first steps into making a multiplayer game. I am aware that multiplayer has a lot of difficult aspects, which will be headache inducing to learn. I would like to start with the first thing a player would see, when they try to join a multiplayer game - the login, character selection, and character creation screens. My thought was that it is such a general thing, that all multiplayer games has, so there might be some good tutorials on the topic going into how and why you would create these aspects.
I have found this series from the Unreal Engine team. It is pretty good, but it seems like something has broken, which a good amount of the comments on the videos are also addressing.:
I hope that you guys/girls can help me understand what would be the right/optimal way to setup these functions. Currently I figure that I need this:
A Login Level showing some aspect of the game and a login widget showing the standard insert Name/password screen
A Character Select level showing the characters the player has and a widget showing stats of the characters - this will be switched to when the player logs in successfully
A Character Creation level showing the classes which are available and a widget explaining the classes - this will be switched to when the player click “create new character”
I have these things setup in a rudimentary state - just a blank level with a widget showing the name of the level e.g. Login. So my questions are:
Does it make sense to use the level/widget setup that I have chosen?
What should link these levels and widgets together? I think It makes sense to use the game instance, given that it is persistent for the player throughout the game, but it does not seem to work.
How should the character info be handed over to the server and should I use the player controller, now that it “lives” on the server?
Have you built the game itself yet? Like the running around a shooting and keeping of the score and stuff? Personally (and this may just be me personally) but I found the aspects you are going over some of the most difficult aspects of game development. I didn’t start getting into that type of stuff until I was about 2 years into using Unreal (currently about 5 years in). It was easier for me to learn by building the logic within the world. So if that isn’t done yet you might be better off learning in that domain first. If you are already at that point then I personally store character specific variables in Struct Data Tables for each character. I have an enum name for each character which pulls the character specific data from a Enum/Datatable Set Array in the game instance. All logic from that point is pulling character data from data tables specified by character name enum. Moving consistent data around between levels, wins/losses, widgets etc. is more difficult then I assumed. Again, the easier stuff is playing around with the movement behavior of characters, making guns lose ammo and need to re-load, making spell magic decrease with use etc.
I have never done a name/password screen on pc. You may need a plug in for this, but I am not sure.
You need to develop backend for this which is not related to Unreal Engine 4. You can do this with (for example) php, MySQL database or Node.js (using websockets) or something else. So you need remote backend server that will store user accounts, characters etc. and create your own API so it can communicate with UE4. This also requires a lot of experience and can be a harder part of the job, especially if you want to secure user data, make a scalable infrastructure…
Same for this. After login, web server will return user data to UE4 client. For example, characterID which will UE4 “read” from Data Table (for example) and stats data.
You can do this in UE4, but also you need to save created character which means that you need to send that info to the remote server database.
All persistent data you can save in the Game Instance and from there use it when player join the match.