[WiP] Multiplayer Login System with MySQL Database (thoughts?)

Can anyone tell me which app is this

It is just photoshop. I got myself a background grid and made it blue. Then added a new layer
where i write on with my graphic tablet.

Having people who run servers host a webserver along the game is probably a bit overkill. If you’ve ever hosted a ArmA/DayZ server you’ll understand why. From an end user perspective, it’s much better for the server hosting process to be click button->have server. From what I’ve read it looks to me that your system could easily be implemented with save game objects, with a lot less headaches too.

User authentication/login doesn’t have to be handled by the game host server (and shouldn’t if possible). It’s not only simpler to handle this with an external website, but also more secure. If your game is heavily data-driven and the server needs to interact with a database heavily during network gameplay, you would be best to keep the login process completely separated from the game host server. The following are the reasons I suggest this:

1: Any respectable authentication system should be making use of industry-standard password storage, hopefully using a PBKDF2 implementation (or equivalent) for salted password hashing using key-stretching and iterative hashing. If you run iterative hashing on a gameserver, say goodnight to your game… lol it’s resource intensive and is intended to purposely slow the whole process, limiting the rate at which brute force attacks (dictionary/rainbow tables) can take place against your authentication system. This also isolates the login system in the event that it does become the target of an attack, allowing the game server to function for those already logged in and playing.

2: The engine has HTTP and SSL support built-in which is all you need. HTTP has cookies (which can be encrypted) and ssl secures the connection from man-in-the-middle, packet sniffing, port snooping, etc.

  1. The engine also has json and xml parsing capabilities too so if you wanted your http responses to pass an actual token in json or xml data format, its already there. Technically, you could even make use of OAuth for authentication this way too if you wanted because all the underlying requirements are already in the engine.

Just my 2 cents but if you also have (or will have) a website for your game, I’d just use an http request/response to perform the initial user logins between the website and the client and once validated, pass the token to the game server and from there the server can handle renewal if/when required (although, in my opinion, it should only be done once per game session: once the token is expired, the session is expired).

we would like a tut i think much beginning developers like me are searching for a tutorial for a login system like yours.

Has the proposed tutorial gone by the wayside?

I’m digging into PHP/MySql atm and would appreciate more information. :slight_smile:

Honestly, since you don’t simply want a “Get me the playerId!” script, but a complex flow of data - which items the player has, etc - I would consider a master server instead, as you get far more power & robustness instead of a simple PHP Script (of course, in this case the PHP Script acts as a masterserver, but I think you understand where I’m trying to go with this). There is a plugin with a basic master server implementation (its in Python though), which may help you get started:

I wish there was an interface thing for UE where you could use relational databases :slight_smile: ~ Just read though all posts…Keep it up but I think the tutorial should not be so much beginner based because it will take many time to explain advanced stuff.

Thing is, like many previous posts pointed out, direct DB access from clients is a bad idea, unless its a SP game, you should have a wall between the DB and client.

I just saw that you guys answered my old post, so i wanted to say something too.

The Tutorial i mentioned in the first post is not planned or anything. I have not done anything more in terms of
database and php stuff, because i did not get the real idea behind it with the discussion above. I backlogged it
for me and actually never tried it again.

If someone knows exactly how to make a very basic and save setup for this, then go ahead and create it + document it.

A lot of people would like this i guess (:

If you ever feel like trying again, take a look at the link I posted, most of the work you would need is actually there.

Aww this is exactly what i need/was looking for. in unity it is easy to set up i havnt got a clue how to do it in unreal. All i need to do is save the players stats to a mysql database on the server when they log off and load them back up when they log in but dont even know.where to start

If its a ‘fixed’ (local) server - and again, we strongly recommend that you do not do that as its unsafe, people can just modify the DB - use the database connection which already exists in UE4.

At the moment im using datatables and storing the information client side. Which i know is no good its just the only way i can do it and at least get on with prototyping my game

What i would like is to have a game launcher/website that is connected or can connect to a mysql database stored on a dedicated server, when the player logs in on the launcher/ website it will get the players information like experiene points, username. Total kills, achievments etc and then foreward this information into the game.

When the match ends or the player logs out it then contacts the database with the updated experience points etc .

Check the link for the plugin I shared, that’s exactly what its for :slight_smile:

I had hoped for a leg up from the stillborn tutorial.

For my multiplayer project, I need extensive database access and have been reading up on this.

At this point, I understand a proper method would be to connect to MySql through a php webservice via json. A number of tutorials (alas none for UE4) exist for the MySql/php and I am starting to get a handle on that portion. My current plan is to study the json UE4 plugin that is available and try to use it to accomplish the connections that I need: login, inventory, player stats, etc.