Lyra Client/Server model

Hi there.
I’m trying to package the Lyra starter game to have a dedicated server (for me to host) and clients that can connect to the server. I thought this would sort of work out of the box as the Lyra sample game is advertised as a game with networking already included but I have not managed to get it to work. When I package and then run the server, everything seems to be ok in the logs, it is the client that cannot connect to the server (when I run the open localhost command).

Digging into the code a bit, I noticed a lot of the code is not setup for multiplayer actually. For example, the LyraGameMode class inherits from GameModeBase, not GameMode parent. Same for LyraGameState which inherits from GameStateBase. Also on the client side, I am stuck on the loading page, which is the expected behaviour because in the code, the experience is only loaded if on the server (LyraExperienceManagerComponent), hence the front end menu can never be loaded.

Hence, am I missing something? Is Lyra just not setup for multiplayer out of the box?

Any help appreciated. Thanks!

3 Likes

Bumping this same issue.

how you have set the client and server side? are you using eos?

No I’m not using EOS. Right now I just wanted to make it work locally.

same issue. except I can package the client and run that but it continually says Experience Loading … while the server packages fine, when ran it does nothing visually as if it didnt run at all.

I also understood this to be a networking example by unreal but hey at least the part where you pay micro transactions works as usual xD

Call me oldschool but id prefer teh gamers to make a choice if they want high quality servers , cloud servers, etc and host them on their own, but i guess thats just a non corporate / not out to milk every penny from the gamers who buy my game mindset these days.

also i’m not sure of the server quality that epic provides, but i really don’t like cloud / shared hosting at all as a gamer with an opinion. I know most gamers dont care or don’t even know there is an alternative or was… but meh rant over.

Epic doesn’t provide servers. You can package the game generating a client version and dedi server files. You can then take those server files to any “old school” GSP, get a box and run it.

You just have to package the game right and have a way for clients to ping servers. EOS and STEAM provide those services.

5 Likes

dope. thanks for the clarification !

I think any game company would be happy to not have to pay for dedicated servers but if they want any reliable experience and cheat detection it becomes necessary.

It is also a lot easier to make a company accountable for potential hacking than thousands of servers hosting by thousands of dudes in random basements.

Finally you don’t like micro transactions but are happy to pay monthly for private quality servers?

I actually would prefer if both public and private servers were possible in most games then the players got both options of either paying for private servers or play for free on the public servers and when the public servers get shut down then the game lives on using private servers.

cheat detection just doesn’t really happen in the first place. I mean you can login to red dead redemption online right now and just get teleported around by cheaters… CSGO has been out for 20 years and cheat infested. Overwatch processed cease and desists against cheaters and still they just made a 3rd party overlay that doesn’t inject anything and sorta acts like face recognition but for aimbot.

At the end of the day… stopping cheaters with anti cheat is something im just not interested in as they are going to do it one way or the other.

Yes, micro transactions are acceptable in one format and that’s aesthetics / skins. Anything else is just punishing the actual gamer who enjoys your game and selling out to some punk ashe that wants to dominate the people who love your game with micro transaction items… I dont find any joy in that concept at all… its disgusting!

Im ok with paying 5-50 dollars a month for a private server that can be modded, moderated, you can pick close to your region for server host and choose performance / quality over low quality shared hosting and that usually creates communities around that which in turn make your game healthier and then the server admins who will more than likely be active will easily be able to manage the servers . It also gives the players the ability to find a server that suites them instead of being forced into the square hole even though they are a cylinder.

Honestly that format held cheaters at bay much more than any anti cheat i see today !!!

2 Likes

Can you ilnk to the instructions for packaging dedicated server files in lyra ? I’ve been unable to find any instructions short of the documentation here. “Setting Up Dedicated Servers in Unreal Engine | Unreal Engine 5.0 Documentation

currently applied my own modifications in a separate plugin game feature and this all works p2p even with EOS. Even though I setup the Client type to be client only and a serve only client. it didnt matter when I built with those command options input, both exe on startup worked and I could play p2p, but the server exe didnt require credentials while the client exe did as expected when setting them up in product settings and using command line build from vs studio.

unexpected was that fact that the server build would visually load the game and a player on the server once creating the game server.

Any update on this?

I got it working finally… lmk if ya have any questions ill see if i can help.
You don’t need to edit code or anything for dedicated server, its all functional by default. You do however need to know how to setup a dedicated server, once you go through that tutorial you can apply it to lyra either with your own plugin or upon their plugin.

4 Likes

Hello JGZ!
I was wondering if you could provide some more detail on what exactly you did to get the lyra game up and running on a dedicated server for multiplayer. I have followed the tutorial, and I am getting stuck on the loading screen when loading up the server side. I can get two clients logged into the server instance from the same machine, I am running into the same issues you described at the top of this thread. Which plugin are you referring to as well? Cheers

Heyo,

Ok, hopefully you have an entry map where you can eitheropen console and type open 127.0.0.1 or whatever public ipv4 u are using if u plan on testing with people outside of your network or you can just use the open level command from Blueprints on the Entry Level Blueprint.

If you have the proper maps setup in project settings then you just need to make sure
you are running the packaged dedicated server to launch the multiplayer map. as in creating a shortcut of the exe and adding “- ThirdPersonMap” and adding -log to the shortcuts target properties so you can see a log once you run the server.

This was ultimately my problem, I was just running the dedicated server exe without giving it any commands on startup.

Hopefully this helps, if not lmk and I can try my best to answer anything or even better I wouldn’t mind spending an hour or so doing a screenshare on discord or something.

1 Like

Heyo! =D

Yes, I have the map and the test map with the proper commands added to the target executable. Still running into issues getting more than one client logged into the multiplayer match, all running on the same PC. Did you ever get the multiplayer loaded across the internet running and loaded into the default packaged loading screen?

I would like to take you up on your offer of a walkthrough through discord, that would be amazing! What is your discord nick? or just dm on here how to get a hold of you on discord.

Much appreciated friend!!

yes, I actually had some gamer buddies download it and we had a few connected at once , hosted from my pc using dedicated server. Nobody had to be logged into epic or anything, just open client exe and connected to server.

but yes join this discord channel and message me on there using the general chat.

I’m usually around pc if im not working so I should be easy to contact.

Hello JGZ! Hello everyone!
I’m trying to set up Lyra to work with a dedicated server, and everything even starts, but only until the moment when any level is loaded, after everything returns to the menu. According to the logs, the error goes here LogOutputDevice: Error: Ensure condition failed: GameMode [File:\Source\LyraGame\UI\Frontend\LyraFrontendStateComponent.cpp] [Line: 102]
Tell me, have you encountered this error, or do you immediately load the level, without a menu?
What version of the engine are you using, thanks in advance.

Hey JGZ,

I’m still having issues with the client connecting to the Dedicated Server. I can see the server running a map and events are printing in the server’s console. I assume this is running correctly

When I run the client it gets stuck on the loading screen. You mention about connecting to an IP - where (which console - how did you open it?) and how are you doing this?
Thanks and looking forward to getting this working

You have to package the client version as Development. Then you can access Unreal Engine Console in the client package. Also you want to make sure the clientpackage map is set to Entry or a Blank Map.

Now you have two choices to connect. You can setup a blueprint using the “Open Level” function on the Blank/Entry maps level blueprint. U will literally type your IP into the Open Level command and when you open the client package it will automatically connect to your server thats hosted if u use the right public ip. (you may also have to open port 7777, i thought i proved i dont have to, but i take ■■■■ notes so i cant easily reference.)

Also the other option for connection is just using the Console command “`” `````` tilde when the Entry/Blank map loads without any blueprint packaged into it. THe console will open and then you can type in Open Level and ur ip so if I remember right its

Open Level 127.0.0.1

that should work and connect you to server, if it doesnt try 127.0.0.1:7777 the default port.

127.0.0.1 is just a placement for a generic ip, you should replace with your public IPv4 address

1 Like

10 min video going over setting up dedicated server with Lyra Game on a source build of Unreal Engine 5.1 editor

2 Likes