MMO Starter Kit

So i know i getting annoying now but id like to see if you think this idea would possibly work. so i see how you have it set to call either hostname or from the php script in the call function of the json blueprint. would it be possible to put an if then in between call php function, that would say basically if any data in field “SERVER ADDRESSE” is filled then call “SERVER ADDRESS”. then from there create a UMG widget or possibly edit the main menu so that one could input their own server address ip/url for the server to dial to. thus allowing the game to be immediately more modular and scalable for a private server type setup?

Can you elaborate on this please? Right now there are two goals in mind - 1) the server admin must be able to easily redirect the users to another game server ip without packaging/patching the game and 2) the developer must be able to test the client + server easily on the local machine. Goal #1 is achieved by receiving the game server ip from the php script. Goal #2 is achieved by command line parameter -local which I always keep in my client and server editor shortcuts so that I can easily test standalone.

Is level streaming supported? If it is I will pick up immediately, thanks.

Edited: Just purchased, but still would like to know, thanks !

Hi, and thanks for the purchase. :slight_smile: I haven’t tested it with large levels yet, but here’s what seems to be working so far:

In character BP:

In level BP:

Result: when one character enters the streaming level, it doesn’t affect what other characters have visible/loaded. Server has all the levels loaded.

Main issue I am having with MMO Starter Kit and large tiled terrain using the World Browser is previewing it in the editor (by pressing “Play-Selected Viewport”). When I preview it in the editor viewport it wants to try to load all of the terrain levels causing my ram to sky rocket to over 5gbs and freezes Unreal. It doesn’t do this in a normal project so something weird happening. On the later if I run it in “Play-Standalone Game” mode, seems to not have the issue and plays OK, but I cant see the gui HUD (health bar, etc) and the Login Box covers the screen from the “Start” level loading as well.

Hi ,

I really think you should at least put some license.text file into the zip file. It is rather difficult to use the kit in any commercial product unless the license is clear. It also put yourself in a much better situation.

You write that we shall understand the license as the same as the market place license. Well in that case a screenshot must be taken… Done! :slight_smile:

Otherwise I find this kit to be rather interesting, as it opens up new fast single/multiplayer options online as well for small adventure games :slight_smile:

Now some research on it will have to be done :slight_smile:

Best,

Dwarf King

So I’m having trouble getting the webserver to work I think, could anyone help me out with the specifics? I’ve got a webhost and everything already, I don’t have any experience with PHP, really just used my sites to host some HTML5 games and wordpress blogs.

Got everything working, thanks for the help !

Add me on Skype () so I can help you quicker. But basically what you have to do is:

  1. replace some strings in the php scripts as the online documentation says
  2. upload them to some folder on your site just like you upload your website files (through ftp or web-based file manager)
  3. you can test that the php scripts can execute by going to http://yoursite/somefolder/mmologin.php - it should display something that starts with"{“status”: ". If somewhere it says “Connection failed: Can’t connect to local MySQL”, this means the strings that you replaced in step 1 are incorrect. If instead it displays raw php code with <? and such, it doesn’t execute properly.
  4. in JSONRequests BP in your MMO project assign the Hostname variable’s default value to “http://yoursite/somefolder/” (with slash at the end)

But since this stuff is already in the docs, I’m assuming your problem is more specific, so again, add me on Skype :slight_smile:

First of all, MMO Starter Kit doesn’t change how Unreal’s dedicated server behaves with level streaming, so you can test the terrains in a clean project without the starter kit (might be easier). “In a normal project” - do you mean a single player project? I’ll try to do some testing with large terrains soon.

I recommend you use the two editor shortcuts in MMO Starter Kit project for testing standalone (just change the paths in them), because you need the -local parameter. Also, the listen server has no UI, so I think you’ve run the standalone in listen server mode.

@: I have noticed a few concerns with this kit.

Although you are using mysqli … you are not doing any form of SQL Injection protection. You may need to look at this to try and protect the Backend Services a little better.

Your passwords are also being stored in the database in plain text, if the database ever gets compromised all your user accounts will be compromised. You may need to look at doing some type of one-way encryption with a salt to the system.

You can also optimise the kit by adding a require_once function call on each page and include your DB details from there, this will make it more efficient and easier to use.

I also recommend that you clear the register form in UMG once you have registered an account successfully. On failure you should at least clear the password and confirm password as a precautionary measure.

On a side note, I had to change some of the PHP code in order to run properly on Linux and on my local development machine.

if someone needs something like this for free, just contact me…
its simple like that: use blueprints for register, login etc and even directly modify database values by blueprint communicating with a php interface, json and security tokens there is even a account administrating tool based on php, mysql and bootstrap framework

i won’t give much support because of my lack of time but hey because of that its free

you can even setup a monthly fee system within some clicks (if you have paypal)

@: Please don’t hijack a thread with your wares … please rather create your own thread. What you are doing is quite rude and inconsiderate to the amount of work that has put in. He has done more than just what you suggest … so please refrain from being rude.

@qdelpeche

I knew about most of this, was going to add injection protection and salt real soon. Thanks for reminding me :slight_smile:

Do you mean the database settings in each of the php scripts?

Thanks for pointing that one out. For people who wish to fix this issue now here is a link that will explain what it is and how to deal with it.

Stackoverflow also discuss that security issue as well right here.

Yeah … do the following.

1). Create a new file called mmodb.php or whatever you want to call it.

2). Add the db credentials from the page to it (i.e. servername, username, password, database name).

3). Then in each file replace those lines with require_once(‘mmodb.php’);

Now all you have to do is change the credentials in one place … simplezzzzz … 8-}

First off, I just want to say that this is a fantastic codebase. I would’ve bought it for the MySQL database integration alone, but the patcher and networking are fantastic components and I can’t wait to incorporate them.

That said, I did find some issues with the PHP. For example, in the registration PHP, there’s a query

SELECT * FROM `users` WHERE `name`='".$accountname."'

but it should be

SELECT * FROM `users` WHERE `username`='".$accountname."'

As it is, it always returns no rows because the field “name” doesn’t exist in that table. This use case in the blueprint also has an issue because the “Get MMO Instance” is only being called if the status is okay. Therefore, if it’s not okay, MainMenu remains null. With those two changes, it successfully checks to see if the username already exists.

I’m still having issues with the login, as well. The PHP is probably crashing at some point because when it tries to read the status, it’s blank. It still successfully updates active logins, but doesn’t respond with the JSON. I’ll keep working on it.

Also, with PHP’s built-in password hashing, changing the password field to a VARCHAR(255) and replacing

$sql ="INSERT INTO `users` VALUES ('NULL', '{$accountname}', '{$accountpassword}', '{$accountemail}', 'NULL')";

with

$acc_pass = password_hash($accountpassword, PASSWORD_DEFAULT);
$sql ="INSERT INTO `users` VALUES ('NULL', '{$accountname}', '{$acc_pass}', '{$accountemail}', 'NULL')";

in mmoregistration, and

if ($pass == $row'password'])

with

if (password_verify($pass, $row'password']))

in mmologin, that should fix it.

EDIT:
Alright, so the issue with the JSON reponse was that the line declaring the header at the very end of the PHP files was creating a warning on the server: “Warning: Cannot modify header information - headers already sent by (output started at [the line with the JSON echo]).” This caused the parsing to totally mess up. Removing that last line seems to have fixed it. Obviously, depending on you warning settings, this might not come up or be a problem, but it seems to be a redundant line anyway.

:slight_smile: You can add me on skype by the way () if any questions arise.

Thanks for reporting this, fixed it for the next update. The update will contain lots of php improvements, thanks to qdelpeche and to you.

Yeah, php settings can vary between hosting providers, me and several users that I know of didn’t have any problems with that warning. I’ll do some testing and remove the line if it’s redundant.

@: I have also created a completely blank template without all the other fluff and starter kit content etc. Let me know if you want it. It is basically just your one MMO folder and a replace Menu/Lobby and starter area with the necessary items added to make it work.

You can maybe offer it as an alternative for those like me who want a blank slate to start off.

I am also currently putting TripleDES encryption in to the C++ engine … so you would hash your password and then send it to the PHP web service for registration. When you log in, you do the same hashing on the client and then compare it to hashed password in the DB.

Finally I have noticed that you aren’t confirming the two password fields that matching when you send it to the registration process … you may want to look at this.

I would be interested in this :smiley:

Funny how some things happens all the same on every new gameDev community every now and then…
I’m already pretty sure where all of this is going to end, good luck to the ones involved.

I thought about this, and will probably add a new “starter” map to the kit. Epic’s desert map will be put in a separate folder so you can delete it yourself. I don’t want to get rid of the desert demo altogether, because some people, especially those new to Unreal or level design like to start with something that looks good (I remember myself a few years ago - I would have certainly preferred to start with the desert map instead of some white blocks :slight_smile: )

Zeiten is right, it’s checked in MainMenu bp.

By the way, a sneak peek of the update :slight_smile: