x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to seperate LoginServer and GameServer?

Hello,

Here is what i have so far. I connected UE4 with a MySql Server via Mysqlcpp connecor (works perfectly fine). I do not have any Web server (php/java). I cooked a dedicated server and client, connection works. The Client starts the game and is on a local map for login purpose.

What i want to do next: Connect to a LoginServer, which checks if the user and password exists in the database. If so, create a HashID or something to identify the user+session. The User should then be able to select or create a character. The Gameserver has to be notified, that a new user joins the game with the Session ID. Then the user should be able to join the server.

The Big Question here is: How do i run a Gameserver where all the playing takes place, plus a Login/Characterscreen Server seperatley. Or at least run different maps on one machine. And how do i set up the communication? I don't want the client to talk to the Database server directly.

I know it is a bit more complicated. Maybe there is another way to set up Login,Characterselection,Gaming in an easier way, tell me. I appriciate any helpfull replies.

Maxx

Product Version: Not Selected
Tags:
more ▼

asked Oct 31 '14 at 11:12 AM in Using UE4

avatar image

Maxxomatik
73 7 8 11

avatar image Maxxomatik Oct 31 '14 at 07:30 PM

After looking into Sockets i think i can use a socket to talk to the client without connecting to it via console open 127.0.0.2. The next step would be to do the same with the client machine, am i right? On that level it should be possible to communicate both ways and to solve the problems above? Would be nice if someone with experience in this could confim that.

avatar image makai Dec 24 '14 at 02:01 PM

im working on a script interface based on mysql, json and php dedicated for account managing validating and all stuff like that. MAYBE i will release it for free for ue4 users when it will be ready, if you need help setting it up yourself just contact me

you will then be able to do all account managing stuff and all stuff you need for realising a account server directly from blueprint.. you can even do direct database actions from blueprint and the script interface includes servers classes for accounting and validating

its a "safe" systems using secret tokens and ip banning

avatar image Methusalem Dec 24 '14 at 03:40 PM

Why you use JSON for this project ? Dont understand it wrong , but old simple PHP Mysql would be enough

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Okay first never , I mean NEVER , connect direct to the Database-Server. Its the "Road-To-Hell" , really. Second i would try to split Logi/Game-Server like this : Start Local-Only and connect via HTTPS to a Webserver that Wrap a Databaseserver. The Web/Databaseserver check your login and if valid sends you a session for your gameserver. Then do a simple Session-Connect-To-Server and you are fine. That is only a Scratch but maybe it give you ideas

more ▼

answered Dec 24 '14 at 01:38 PM

avatar image

Methusalem
56 1 2 6

avatar image Maxxomatik Dec 25 '14 at 01:25 AM

Thanks for the answer. Actually I am connecting to the database via the dedicated server and I think an extra Web Layer would make it more vulnerable. Don't misunderstand me. This is how it goes at the moment: Client starts on an extra Offline Map where the login and password is to be entered. The Cliend sends a TCP package with the login and password (not encrypted yet) to the dedicated server. Receiving this the server asks the database server if the user and password exists. If so the Server creates a SessionID which is handed to both the cliend and the dedicated server. Then the Client connects via 'open thegameserver_com' to the Server. After the Connection is established the the server compares the Clients SessionID with the SessionIDs he saved earlier...

All in all it works, non the less I consider this unfinished and a bit crappy, because I think there has to be a much better way than hack the whole login code like this...

I wonder if there is some Login procedure already existing in the unreal engine other than the command 'open ...' You mentioned to do a simple Session-Connect-To-Server. This sounds exactly like something I want to achieve.

avatar image Methusalem Dec 26 '14 at 10:02 AM

Sorry I had misunderstood something. I thought your client would make the request to your database. But it is the game-server that establishes the connection to the database.

Client->Server->Database

In this technique, you can already do it nearly without the web-server. Secure only the transmission paths between client and server, and the server and database. That should be enough as far as possible.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question