MMO Starter Kit

If you call for example tmmo_clan_list.php:

Fatal error: Call to a member function execute() on a non-object in /var/www/html/mmo_clan_list.php on line 11

This is what stock mmo_clan_list.php is:

$mydata = json_decode(file_get_contents('php://input'));

$output = array();

$stmt = $conn->prepare("SELECT clans.id, clans.name, clans.leader_id, characters.name, characters.id FROM clans INNER JOIN characters ON clans.id = characters.clan WHERE characters.clan != 0");
$stmt->bind_result($row_clan_id, $row_clan_name, $row_leader_id, $row_character_name, $row_character_id);
$stmt->execute();

while ($stmt->fetch())
{
	$is_leader = ($row_leader_id == $row_character_id); 
	$output[] = array('character_id'=>$row_character_id, 'character_name'=>$row_character_name, 'clan_id'=> $row_clan_id, 'clan_name'=> $row_clan_name, 'is_leader'=> $is_leader);
}


echo json_encode(array('status'=>'OK', 'clans'=>$output));

But it should use the format:

prepare…
bind_param…
execute…
bind_result…

It seems you are correct in that bind_result should occur after execute and before fetch.
This has never caused a fatal error for me or anyone who used the Kit over the years, and those scripts haven’t changed in years, either. Looks like it just goes unnoticed with the default warning level of the php interpreter, and works correctly, too. Weird, but interesting.
Thanks for bringing this up, I’ll change it for UE 4.27.

cool. Take a lot, as others php files has the same wrong format.

Cheers.

Hi,

I got a couple of questions @:

Why don’t you have your own discod server ?

Why are you using data assets instead of just a list and a structure for example the quest system or the inventory system?

Why don’t you create a wiki or docs that can be edited by the community so there will be more documentation for understanding the template/kit. The Diagram you posted is already great but if the whole system had those diagrams it would be amazing! And maybe the community can add more diagrams or information about the mmokit on the wiki/community docs which you created then :blush:

Kind regards,

Hey,

Real-time communication can be distracting. I don’t use messengers during the day while I’m working.

It’s easy to cross reference data assets. For example, if a quest rewards an item, you just assign an item (data asset) from a dropdown list, and you can instantly open that item and inspect it, jumping between data assets as needed. Data tables don’t allow that.

Google docs allows people to ā€œsuggest changesā€. I’ve not had any suggestions in all the years.

@ Hope you are doing well. I purchased your kit and am having problems getting connected. I’ve followed the instructions through many times and still have the same errors starting the Server. Doesn’t matter if it is on my Dedicated server, my local machine, or remote web server. Still same issue. On 4.26.2. Please help?

Open the server with -log and I get:

[2021.07.22-03.52.37:537][ 0]LogInit: Display: Game Engine Initialized.
[2021.07.22-03.52.37:538][ 0]LogInit: Display: Starting Game.
[2021.07.22-03.52.37:538][ 0]LogNet: Browse: /Game/MMO/Maps/DesertRallyRace?Name=Player
[2021.07.22-03.52.37:538][ 0]LogLoad: LoadMap: /Game/MMO/Maps/DesertRallyRace?Name=Player
[2021.07.22-03.52.37:539][ 0]LogWorld: BeginTearingDown for /Temp/Untitled_0
[2021.07.22-03.52.37:541][ 0]LogWorld: UWorld::CleanupWorld for Untitled, bSessionEnded=true, bCleanupResources=true
[2021.07.22-03.52.37:544][ 0]LogUObjectHash: Compacting FUObjectHashTables data took 0.50ms
[2021.07.22-03.52.37:550][ 0]LogStreaming: Error: Couldn’t find file for package /Engine/EditorMaterials/Thumbnails/SkySphereMaterial requested by async loading code. NameToLoad: /Engine/EditorMaterials/Thumbnails/SkySphereMaterial
[2021.07.22-03.52.37:551][ 0]LogStreaming: Error: Found 1 dependent packages…
[2021.07.22-03.52.37:551][ 0]LogStreaming: Error: /Game/MMO/Meshes/SM_EditorSkySphere
[2021.07.22-03.52.37:595][ 0]LogAIModule: Creating AISystem for world DesertRallyRace
[2021.07.22-03.52.37:595][ 0]LogLoad: Game class is ā€˜BP_MMOGame_C’
[2021.07.22-03.52.37:596][ 0]LogNet: ReplicationDriverClass is null! Not using ReplicationDriver.
[2021.07.22-03.52.37:596][ 0]LogNetCore: DDoS detection status: detection enabled: 0 analytics enabled: 0
[2021.07.22-03.52.37:597][ 0]LogInit: WinSock: Socket queue. Rx: 131072 (config 131072) Tx: 131072 (config 131072)
[2021.07.22-03.52.37:597][ 0]LogNet: Created socket for bind address: 0.0.0.0 on port 7790
[2021.07.22-03.52.37:597][ 0]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2021.07.22-03.52.37:597][ 0]LogNet: GameNetDriver IpNetDriver_2147482560 IpNetDriver listening on port 7791
[2021.07.22-03.52.37:607][ 0]LogWorld: Bringing World /Game/MMO/Maps/DesertRallyRace.DesertRallyRace up for play (tick rate 30) at 2021.07.21-20.52.37
[2021.07.22-03.52.37:609][ 0]LogWorld: Bringing up level for play took: 0.011003
[2021.07.22-03.52.37:609][ 0]LogGameMode: Display: Match State Changed from EnteringMap to WaitingToStart
[2021.07.22-03.52.37:611][ 0]LogVaRest: Request (json): POST http://192.168.1.41/MMO/mmogetserver.php
JSON(
{
}
)JSON
[2021.07.22-03.52.37:611][ 0]LogGameState: Match State Changed from EnteringMap to WaitingToStart
[2021.07.22-03.52.37:611][ 0]LogLoad: Took 0.073843 seconds to LoadMap(/Game/MMO/Maps/DesertRallyRace)
[2021.07.22-03.52.37:612][ 0]LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init()
[2021.07.22-03.52.37:612][ 0]LogLoad: (Engine Initialization) Total time: 1.09 seconds
[2021.07.22-03.52.37:612][ 0]LogInit: First time updating LLM stats…
[2021.07.22-03.52.37:646][ 1]LogVaRest: Response (200):
JSON(
{ā€œstatusā€:ā€œOKā€,ā€œaddressā€:ā€œ192.168.1.41ā€}
)JSON
[2021.07.22-03.52.37:647][ 1]LogBlueprintUserMessages: [BP_MMOInstance_C_2147482600] Received server address: 192.168.1.41
[2021.07.22-03.52.37:648][ 1]LogTemp: Log: Created thread
[2021.07.22-03.52.37:680][ 1]LogTemp: Log: Starting Tcp socket thread.
[2021.07.22-03.52.39:665][ 61]LogTemp: Log: Couldn’t connect to server. TcpSocketConnection.cpp: line 409
[2021.07.22-03.52.39:665][ 61]LogTemp: Log: Tcp socket thread was destroyed.
[2021.07.22-03.52.40:656][ 91]LogTemp: Log: Created thread
[2021.07.22-03.52.40:656][ 91]LogTemp: Log: Starting Tcp socket thread.
[2021.07.22-03.52.42:670][152]LogTemp: Log: Couldn’t connect to server. TcpSocketConnection.cpp: line 409
[2021.07.22-03.52.42:670][152]LogTemp: Log: Tcp socket thread was destroyed.
[2021.07.22-03.52.43:660][182]LogTemp: Log: Created thread
[2021.07.22-03.52.43:660][182]LogTemp: Log: Starting Tcp socket thread.
[2021.07.22-03.52.45:674][243]LogTemp: Log: Couldn’t connect to server. TcpSocketConnection.cpp: line 409
[2021.07.22-03.52.45:674][243]LogTemp: Log: Tcp socket thread was destroyed.

Try launching the game server, the chat server and the client all on the same machine and use the ip 127.0.0.1 (except php scripts, which you can host on a webhost).

For anyone who would like to see a more advanced project built on mmokit please check out our facebook page. Legacy of Ares.
www.facebook.com/Legacyofares/
there you can find a link to download our client for our live test server.
enjoy!

Thank you for replying. I think I got it figured out. Can I also specify the port for the server to use by adding :7781 (or similar) at the end of the IP

I’m interested in buying this but I have a coupe of questions.
How customizable is this? If I buy this will it allow me to change it to broadcast character, head and hands position for a VR online experience?
What server architecture does it implement? Can I have multiple zones (world servers) connecting to an overall chat system or can people only communicate on the same server?
How do you handle network optimization? Does everyone in the same server get position/rotation/action updates or is there any ā€œarea of interestā€ implemented that only people in proximity receive each other updates?

It’s a wow-like template and I imagine you’re talking about a first person game. It’ll involve some work on your part to change this.

The chat server is a C# program, so players can be on different servers, but communicate anyway.

I don’t remember, but UE4 has ā€œNet Cull Distanceā€ functionality for characters, so if I didn’t turn it on, it’s just a matter of checking a box.
There’s no custom replication graph involved.

Thank you so much for the prompt reply.

So what’s your emphasis on this project? A framework to make wow like games with a relatively robust networking framework, or a strong networking framework that just happens to be packaged with a wow template?

Because i’m not looking to make a wow clone but I just want to ā€œfast forwardā€ through the networking part to make a good server infrastructure that is prepared to handle communication, physics, login/logout, server handouts of clients, etc.

It’s a demo project for some - they look at how the login works, they borrow the chat server, see how data persistence is implemented, etc, and they re-implement it all in their projects.

Others try to build their game inside this project, modifying things and building new mechanics.

If you need to know how to build the MMO infrastructure, you could use the project as a working example. If you’re skilled enough to cut out BPs you don’t need and implement your own first-person VR mechanics, you could do that too. But neither of the two options are easy. It’s a way to speed up development, but not to fast-forward through it.

We used this kit as our base. we have modified it very heavily. the chat has also been modded. we use DSS(dynamic server system) from the marketplace for multizone world. our chat has been setup for zone chats and world chats as well as distance based chat.(chat has a distance like the real thing). how far you go is based on your own desire to learn unreal.

@ Hope you are doing well. If we are not using characters that are modular, can we delete the BP_Modular files? Or does it serve another purpose? We are not using any assets from the Demo if that matters.

Sorry, I don’t remember. Set up a version control and give it a try. Revert in case of trouble.

We often setup a copy of the basic kit and test new plugins and changes there before we try to implement it in our game. this gives you a baseline to work from. we have a basic version of the db on our server just for this kind of testing. simply give the base db a different name than your production db and point to it for your basic tests.

Yes I’ve done the same thing for many different questions I have on the kit. But honestly I’m getting tired of having to ā€œtestā€ if things break just because of the lack of proper documentation. In the documentation there is an area called " Orienting in MMO Kit blueprints" and here is where there should be some better explanation of how setup all the blueprints. Trying to figure out this kit has been more headache than it was worth but unfortunately it is too late to start our project on a different server kit. Very frustrated with this purchase.

Hello ,

I have compiled the 4.26 project for 4.27, the project refuses to connect to my server in a packaged game, is this happening to you? And is there anything you did to fix this that i can apply to my version?

My firewall settings are fine and ive open all ports i need, im using a linux VM on google cloud to host the server, the php scripts work fine im able to login and create a character and save it, its just traveling to the server map that doesnt work