There are no official cases and tutorials to learn about the login system of the proprietary server. I read some related tutorials made by others while groping for them. When I made them myself, some problems could not be solved. I hope to get answers.
Mainly when the client starts, does it need to connect Open IP to the server first, thus creating a player controller on the server, and calling UI to enter account password in a Login map and jumping to play in the game map?
At present, I want players to input account password and click login, then open IP, and then transfer account password data. But in this case, because I just use the debugging function and turn off the automatic connection to the server manually, the client does not connect to the server, and then thinks that it is the server, and the client also creates gamemod. The âswitch to game scene if login succeedsâ function I made in gamemod is executed locally by the client, so the client skips the login map. The decision made by isserver and hasauthority will be judged as the server itself when the client is not connected to the server.
Is it necessary to compile client programs and server programs to solve this problem?
If the client connects to the server when it starts, will the server have many more player controllers that âstart the game but donât log inâ? How does this affect server performance and security? For example, if these player controllers are not logged in, will they get information that they should not? For example, information about other player controllers in the login level?
Also, how to instantiate the level class? For example, every player in the login map has an object, and they donât directly affect each other?
As for the types of regular MMORPG of the proprietary server, I hope the official can provide some tutorials.
You need a DataBase, a WebAPI and VaRest Plugin
First, create login widget for writing username, password. And after player fills in the blanks, should click âLoginâ button.
That Login button should call JSON request(s) to your WebAPI, after successfull login your WebAPI should return a response that includes AuthCode and maybe Account Information. (such as Username, Email, Exp Points, Money, Character Type etc.) Or an error message for player to know he/she doesnât know own password, and try again and blah blah blah.
And you need a master server to hold Dedicated Server lists. Or maybe you donât need a master server at all. Just a pre defined DedicatedServer IP list to show clickable for joining to the player after succesfull login response. Player will click that server but after this you need to check if the player is authorized to access to server or not. How to do it? You can have 2 or more options. Edit game mode of serverâs default with C++ or Blueprints.
1-) Go for C++ and edit PreLogin function. You can check if playerâs AuthCode is whitelisted or not blacklisted in that server. After this check you can block or let player to join to dedicated server.
2-) Because of PreLogin cannot be overrided via Blueprints, you need to wait for player to connect server first and than you can call a function to check if player is whitelisted or not blacklisted after PostLogin event. (After player connects to server.) If player is not suitable to join server at all, you need to kick that player. Because player is actually connected to server.
(Better to use Option 1 to reduce traffic and block before player actually joins to server.)