#multiplayer

1 messages · Page 581 of 1

wind onyx
#

Question on roles and replication: All my clients are getting local role Authority (and remote role SimulatedProxy which seems right), as well as the client on the listen-server. Shouldn't the local role for clients be be AutonomousProxy, and Authority only for the client running the server?

soft girder
#

can anybody explain whats wrong with this

wind onyx
#

@soft girder images too low res

soft girder
viscid escarp
#

Question on roles and replication: All my clients are getting local role Authority (and remote role SimulatedProxy which seems right), as well as the client on the listen-server. Shouldn't the local role for clients be be AutonomousProxy, and Authority only for the client running the server?
@wind onyx Not sure if i understand your question, but clients only see remote. Dedicated server and listen-server only see Authority.

vivid prawn
#

@soft girder I wouldn't use multicast to fire a weapon, I would only use multicast for particles.

soft girder
#

they are

#

this is a parent

#

this worked before adding animations

vivid prawn
#

once you fire in your pc and send to server that's good enough

soft girder
#

in the child only the particles get ran on the multicast

#

we have a bunch of childs that worked up until yesterday

wind onyx
#

@viscid escarp All my clients are getting LocalRole as Authority on a listen server, I'm wondering if this is correct or something is off. I am spawning the characters on the server and then letting the client controller posses it.

bitter oriole
#

It's normal

viscid escarp
#

can anybody explain whats wrong with this
@soft girder Does not make sense the (Switch Has Autority)->Remote. If you want server to call "Weapon fired" just delete "Fire Client" and server will still call the "Weapon fired". Inputs are always readed by the caller and server.

soft girder
#

i had it like that originally

#

ive changed different combos just trying to get it to work. the weapons are fake client instances

#

they are replicated

#

they are only for visual

#

wait

#

if i delete fire client it will only fire on server side

vivid prawn
#

yeah, in both cases "server" is firing, why are you checking for Autority?

twin juniper
#

Anyone know why I could potentially be crashing when calling SessionInterface->CreateSession(..)? From the OnlineSubsystem ?

soft girder
#

its really the same as this is it not?

#

if i remove the client to server ones the clients never fire at all

vivid prawn
#

yeah, now you are telling server to fire and then server tell everyone to fire.

#

if you are only try to show particles, just multicast the particles, no need to call server

soft girder
#

thats the problem

#

the children blueprints have just stopped multicasting

vivid prawn
#

but if you are tracing and causing damage, run on your pc + send it to server

soft girder
#

check

#

the particles are fired from a multicast event so everyone sees stuff coming out of the same instance child

#

i have went in made new multicast events and no matter what they dont fire

#

the particles

#

the event itself only happens on server even tho its marked multicast reliable

#

not sure what has caused it.

#

its very frustrating to build a new parent and make the same thing

#

when i take an empty actor and wire it up the same it works

#

i took an earlier version of my build without animations and it works

#

i cant figure out why a parent bp would break like this

viscid escarp
#

@viscid escarp All my clients are getting LocalRole as Authority on a listen server, I'm wondering if this is correct or something is off. I am spawning the characters on the server and then letting the client controller posses it.
@wind onyx basic events(inputs, begin play, tick, etc) are always fired by server and owning client, so Authority will always be fired. Recommend you to read multiplayer compendium by eXi: http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf

vivid prawn
#

@soft girder okay, try not calling fire from server or multicast, just directly connect the fire event to is valid

soft girder
#

same

#

lol

#

i thought for sure that would work

#

passing the client straight to the instance of the weapon

#

that was a good idea tho

viscid escarp
#

Anyone know why I could potentially be crashing when calling SessionInterface->CreateSession(..)? From the OnlineSubsystem ?
@twin juniper invalid player state or unique ned id probably(just a shot)

soft girder
#

a one to one copy works but its not a child of anything and cant be referenced by the held weapon pointer

#

this is nuts

twin juniper
#

@twin juniper invalid player state probably
@viscid escarp I'm not following. What do you mean an invalid player state?

#

I have a GameInstance class in which I'm calling CreateSession like so.

    IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();
    
    if(Subsystem){
        Session = Subsystem->GetSessionInterface();
        if(Session.IsValid()){
            //bind delegates here
            Session->OnCreateSessionCompleteDelegates.AddUObject(this,&ULobbySessionGameInstance::OnCreateSessionComplete);
            
        }
    }
}

void ULobbySessionGameInstance::OnCreateSessionComplete(FName ServerName,bool Succeeded){
    UE_LOG(LogTemp, Warning, TEXT("Succeeded %d"),Succeeded);
}
void ULobbySessionGameInstance::CreateServer(){
    UE_LOG(LogTemp, Warning, TEXT("Creating Server"));
    FOnlineSessionSettings SessionSettings;
    SessionSettings.bAllowJoinInProgress = false;
    SessionSettings.bIsDedicated = false;
    SessionSettings.bIsLANMatch = true;
    SessionSettings.bShouldAdvertise = true;
    SessionSettings.bUsesPresence = true;
    SessionSettings.NumPublicConnections = 5;
    
    if(Session.IsValid()){
        UE_LOG(LogTemp, Warning, TEXT("Session was valid"));
        Session->CreateSession(0,TEXT("My Session"),SessionSettings);
    }else{
        UE_LOG(LogTemp, Warning, TEXT("Session not valid"));
    }
    
}```
Then I have a Level with a UI and a button which calls GetInstance()->CreateServer
#

The debuglog prints out "Session was valid"

vivid prawn
#

oh wait, @soft girder who's owning the "Weapon Fired"?

soft girder
#

the player

twin juniper
#

But OnCreateSessionComplete is never called and it crashes

soft girder
#

i tried looking into that

vivid prawn
#

player or gun?

soft girder
#

player

soft girder
#

im actually setting it to non replicated right now

#

and gonna see what happens.

vivid prawn
#

you see, If i'm not mistaken you can't call the server to do something if your actor don't own it.

#

so if player is the parent

#

can't call the server and execute something in the child

#

you have to ask the child to run it on the server

soft girder
#

it works on last build tho

#

ill change it tho

#

thank you very much @vivid prawn

#

❤️ from all of us

#

but we moved it to execute on all tho

#

hang on ill show you

#

this is odd

#

prob bad setup

#

the only thing that bothers me is that we had it set up exactly like this this morning

#

the only difference was that the held weapon events were run on server

#

those events in each child split up. the particles come from a multicast and the server call goes on to tick damage and nonsense

vivid prawn
#

wow, nice, guess you figured it out.

kindred widget
#

@soft girder Just a note. You shouldn't need to switch for input stuff. It works the same on a listenserver if you just call a server event on the server. So you can simplify those functions by just saying InputEvent->ServerRPC->Functionality. And it'll run just fine on both Clients and Listenservers.

soft girder
#

thank you but we were just trying anything to get it back working. we are comparing right now to the old and cant find a difference

#

we deleted every function and then moved crap around

#

but when we moved it over it started working again. im not sure if i accidently borked the bp when adding new events and then made it worse by not knowing what went wrong

#

kinda scares me

sleek elk
#

ok... I make the change to ini, package, upload to steam, do a check again, check my playerstate begin play debug log again if occurs on client when bug occur, and then come back to you ...
And of coruse i search the log for...
log: LogNetTraffic: Error: UActorChannel::ProcessBunch: New actor channel received non-open packet
UActorChannel::ReceivedBunch: Received a MustBeMappedGUID that is not registered.
@chrome bay @rich ridge :
I am done, I have prepared also some screenshots to show you the outcome.
https://www.dropbox.com/s/zs3t6qypt38av9l/LogsUE4PlayerStateInvalid.zip?dl=0

  • I made sure PlayerState is not created on client side again, but sadly it is. I search for "UActorChannel::ReceivedBunch: Received a MustBeMappedGUID that is not registered." and "LogNetTraffic: Error: UActorChannel::ProcessBunch: New actor channel received non-open packet" and of course also for parts of the strings. Its not happen.
  • I added the VeryVerbose log as described, but I do not find a Prorblem. I see some warnings of course, but nothing related to playerstate or replication problems.
    Screenshots with text, Blueprnts parts and some logscreenshots in this package: https://www.dropbox.com/s/zs3t6qypt38av9l/LogsUE4PlayerStateInvalid.zip?dl=0

Any idea aboout it?

#

Any one else here who can jump into and have a idea why a player state after server travel is not created/replicated for a client?

#

With log LogNetPackageMap VeryVerbose I can see the creation of playerstate in the logs. But as assumed, for server everything is correct but on client the creation of playerstate after server travel is missing. Just as confirmation, same result as in the screenshots in the zip file.

rich ridge
#

@sleek elk as far as I remember PlayerState is persisted after server travel by default?

chrome bay
#

You get a new actor, but some properties may be copied to it

#

It's a misconception but none of the actor instances from the previous level come across, just that some properties are copied to new ones

#

I'm not sure why it's not replicating in this case

#

Sounds like a nasty error

#

Or maybe the connection is just so over-saturated after travel that it's stopping open packets from coming through

#

Though i feel like that should disconnect the client if that happens

rich ridge
sleek elk
#

Yes, I had this conversation before. Documention seems to be missleading here. It's like Jambax said, actors are not copies, just values.

#

I also see no connection to my problem. Even then the player state could not be invalid.

rich ridge
#

It's a misconception but none of the actor instances from the previous level come across, just that some properties are copied to new ones
@chrome bay I know that, my point was engine makes deep copy of the PlayerState and thus gives the same effect as that it is actually persisted.

sleek elk
#

I a forum thread I found the advise to use different player states, one for lobby, other for game play. I tried both, makes no difference. As you can also use different player states on seamless travel, it should be created new. But as I said, I tried both already, using same player states Lobby GM and Gameplay GM and using different. I also tried using same GM at all in both or different.

rich ridge
#

Even I do serverl travel , but I didn't experience this issue...
Now I will cross check my game , @sleek elk I m scared now because of you.

sleek elk
#

🙂

#

You have to bring it to steam and run under real steam envirment

#

locally I get the "bug" (or what it is) very, very seldom

rich ridge
#

I think you better debug both and sever and client in visual studio

#

This will tell you exactly what is happening wrong.

sleek elk
#

I think I now much of party of Unreal. But I came not across real debugging with VS. 😦
Can I even use VS debugging in a packacged and run steam game? Or only on games started from editoir?
Would be important to run/debug it in my real steam game.

rich ridge
#

You can attach to any process .. and need to do necessary lib and DLL setup.

sleek elk
#

And when I do the debug... how could I see what happens on "player state" replication? I think I can not step through every executed line. So how do I know where to player even some breakpoints?

rich ridge
#

Put breakpoints

#

And watch for variables

sleek elk
#

At the moment I package my game new, and shut seamless travel off. Just want to know this is seamless travel related.

#

ok, thanks

rich ridge
sleek elk
#

thanks for pointing my to gut ressources, very kind of you. Thanks a lot

#

Perhaps you have also good idea "where" to place breakpoints? A method name I can search for or something like this?

rich ridge
#

On server put breakpoints in following functions in GameMode

  1. WelcomePlayer
  2. PreLogin
  3. Login
  4. InitPlayer
  5. PostLogin..

On client inside PlayerController

  1. onPossess
    2.OnRep_PlayerState
#

Since you are sure that everything is fine on server

#

Then you can easli debug of clients..

#

Launch your dedicated server

#

Then open visual studio

#

Put breakpoints

#

And press F5

#

It will launch UE4 in debuggable mode

sleek elk
#

Thanks, I will look into it. And really appreciate your help!

novel bison
#

hello everyone!!

#

has anyone in here used the EasyBallistics plugin by any chance?

fierce oriole
#

i just added it to my project

#

havent integrated it yet tho

novel bison
#

ah ok no worries

#

ive got it set up and ran into an issue where only the server has replicated firing and can deal damage

#

clients can't do it to the server, nor to eachother

fierce oriole
#

was it working before?

novel bison
#

no i just started setting it up

#

it has a couple events that i guess are supposed to automatically send the firing to the server but doesn't seem like it's happening

fierce oriole
#

lets see the RPC blueprint

#

yeah I think you still have to replicate the projectile

#

or rather the firing server/client RPC call and include the projectile in that

novel bison
#

so this is my input event for shooting

#

you saying make that a multicast or something along those lines?

#

input -> multi fire event -> shoot

fierce oriole
#

yeah, EB will replicate the projectile but you have to set it up.

#

more like input > switch authority > 1 - Server RPC 2- Multicast RPC

#

one sec

novel bison
#

oh awesome ok

fierce oriole
#

Hey All, is there some trick im missing to attach the pawn I unpossessed to this vehicle? Ive tried everything, disabling collision, physics, attach to actor/component etc. How do MP shooters handle this? I want the ability for the player to shoot and be shot from inside the vehicle

halcyon totem
#

do I need to replicate a characters tags in any other blueprints for it to read? I changed the tags everywhere I could on my character but it still fails when overlapping

fierce oriole
#

No you shoudnt have to if the character is replicating

novel bison
#

hmm so

#

this always prints server has fired a shot

#

even on clients

novel bison
#

no luck

#

oh well out of town for the weekend

#

will try to fix on tuesday haha

#

impact registers on server and apply damage is called

#

but AnyDamage event doesn't get called 😦

#

unless the server is the one shooting

twin juniper
#

When I had attempted to create a session in my project on MacOS it would crash, I couldn't figure out why it was crashing. And I assumed it might have been a bug in the engine/editor. So I moved my project over to Windows, and it executed fine was able to create the session.

#

Can I report this anywhere?

#

As far as I"m aware this has existed for a while now.

bitter oriole
#

@twin juniper Things crashing don't have to be a bug, really

twin juniper
#

But the fact that it's happening on Mac and not on Windows is really weird..

bitter oriole
#

Debug it and find out why

twin juniper
#

I did.

#

And the error it gives is strange.

#

Something to do with arrays index out of bounds, but no where in my code or blueprints,

#

And I using any form of containers/iterations

bitter oriole
#

That's your own code here, right ?

twin juniper
#

Yes

bitter oriole
#

Sounds like Session is invalid

twin juniper
#

It's not though

#

Because I check

#

Session.valid()

#

And that check succeeds

#

The debug prints that session was valid

bitter oriole
#

What's Session here exactly ?

twin juniper
#

It's a pointer to SessionInterfac

#

One second I will show you my GameInstance code

#
    IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();
    
    if(Subsystem){
        Session = Subsystem->GetSessionInterface();
        if(Session.IsValid()){
            //bind delegates here
            Session->OnCreateSessionCompleteDelegates.AddUObject(this,&ULobbySessionGameInstance::OnCreateSessionComplete);
            
        }
    }
}

void ULobbySessionGameInstance::OnCreateSessionComplete(FName ServerName,bool Succeeded){
    UE_LOG(LogTemp, Warning, TEXT("Succeeded %d"),Succeeded);
}
void ULobbySessionGameInstance::CreateServer(){
    UE_LOG(LogTemp, Warning, TEXT("Creating Server"));
    FOnlineSessionSettings SessionSettings;
    SessionSettings.bAllowJoinInProgress = false;
    SessionSettings.bIsDedicated = false;
    SessionSettings.bIsLANMatch = true;
    SessionSettings.bShouldAdvertise = true;
    SessionSettings.bUsesPresence = true;
    SessionSettings.NumPublicConnections = 5;
    
    if(Session.IsValid()){
        UE_LOG(LogTemp, Warning, TEXT("Session was valid"));
        Session->CreateSession(0,TEXT("My Session"),SessionSettings);
    }else{
        UE_LOG(LogTemp, Warning, TEXT("Session not valid"));
    }
    
}```
#
class LOBBYSESSION_API ULobbySessionGameInstance : public UGameInstance
{
    GENERATED_BODY()
public:
    ULobbySessionGameInstance();
    
    
protected:
    IOnlineSessionPtr Session ;
    TSharedPtr<FOnlineSessionSearch> SessionSearch;
    virtual void Init() override;
    
    virtual void OnCreateSessionComplete(FName ServerName,bool Succeeded);
    
    UFUNCTION(BlueprintCallable)
        void CreateServer();

    UFUNCTION(BlueprintCallable)
        void JoinServer();
#

So when I click the button in my UI to call CreateSession, this line gets printed UE_LOG(LogTemp, Warning, TEXT("Session was valid")); but then it crashes on Session->CreateSession

#

I remember this same error and crash happening a long time ago as well when I was creating a session in blue prints.

bitter oriole
#

Thing is, checking that the pointer itself is valid doesn't ensure that the object is

twin juniper
#

Oh but .IsValid

#

Is checking the object

#

Not the pointer

#

as far as I'm aware

bitter oriole
#

Is it, though ?

twin juniper
#

It should be because, it's not ->Isvalid() it's .IsValid which means SessionInterface is a container for the pointer itself.

#

Giving you access to the pointer.

bitter oriole
#

IOnlineSessionPtr is literally an alias to TSharedPtr

#

TSharedPtr::IsValid() does not check "the object"

twin juniper
#

Hmmm..

bitter oriole
#

It's type-agnostic and doesn't know shit about what it's storing

twin juniper
#

So how would I go about checking if the object itself is valid?

bitter oriole
#

You can't

#

In C++, checking that an object is still valid, is very literally impossible

twin juniper
#

But also

#

If the object wasn't valid

#

Then this line would produce the crash

#

Session->OnCreateSessionCompleteDelegates.AddUObject(this,&ULobbySessionGameInstance::OnCreateSessionComplete);

#

But that line doesn't crash.

bitter oriole
#

Maybe

twin juniper
#

And beyond that, the code executes and runs fine on Windows with Visual Studio.

#

But the crash is occuring on MacOS

#

It could potentially be undefined behavior.

#

But I'm skeptical and leaning towards a bug.

bitter oriole
#

Or it's an error in your code where the session is being destroyed at a bad time and causes the crash.

twin juniper
#

Hmmm..

#

That could be it, but then why wouldn't it destroy on Windows?

#

Compiler optimisation?

bitter oriole
#

Because the timing would be slightly different, I don't know

twin juniper
#

So there might be something in between the creationg and the call

#

Which you speculate is destroying the internal object.

bitter oriole
#

Maybe it actually is a bug, but usually, when writing C++ in UE4, it's much more likely than it is your code, not the engine

twin juniper
#

Yes, but

#

Usually bugs in code are not this ambigious, like giving an error to do with arrays out of bounds.

bitter oriole
#

Code errors in C++ are very much way weirder than this

twin juniper
#

Yes C++ compiler errors are disgusting.

bitter oriole
#

No, compiler errors are extremely clear

#

Memory errors can take weeks to an entire team to track down

twin juniper
#

But the reason,

#

I speculate it's not my code.

#

Is because I had attempted a while back

#

To do a blue prints project.

#

Which also called CreateSession.

#

And at the moment CreateSession was called, the editor would crash.

#

And produce the exact same error.

bitter oriole
#

If you reproduce the issue in Blueprint you can safely assume it is an engine bug

twin juniper
#

Yes I can.

#

But this also throws me off as to why I'd be the only one experiencing this bug.

bitter oriole
#

Well it's on Mac...

twin juniper
#

That's true, I can't imagine the userbase for Macs with Unreal Engine.

#

Is very large.

#

I paste in the mac section and no one ever responds to me regarding C++/Multiplayer code.

#

So I don't know..

bitter oriole
#

If you can write a simple sample project that reproduces the crash, you can report it and get it fixed

twin juniper
#

I have my CPP project already which prduces the error, and it's a bareboned skeleton of just CreateSession being called.

#

I can produce one in BP too

#

And then report it.

limber gyro
#

guys, i want to do an outline effect which is easy as pie but i am not exactly sure of the best way to do it with replication, to turn on the effect all u gotta do is set 1 variable to true but my question is since i have to do it for every player where would it be the best place to do it?

#

basicly im gonna make a red outline in all the enemy players

#

at it has to be done localy

#

i think

rich ridge
#

@novel bison I m very curious and it looks really nice.. how come your bp wires are straight?

limber gyro
#

but doing it in a tick wouldnt be right because of performance

#

@rich ridge theres a plugin for that

rich ridge
#

Ohh can you point to me to that plugin

limber gyro
#

i dont use it but if u search for something like "ue4 straight bp connections" it will probably show up

rich ridge
#

😂 😂 🤣

#

Nice Google search

empty axle
#

@limber gyro what triggers the outline?

barren warren
limber gyro
#

@empty axle setting Render custom depth to true

empty axle
#

I mean when you actually should enable and disable the effect? Because that would affect how it could be replicated

sleek elk
#

Also dropping this in here: https://answers.unrealengine.com/questions/991625/view.html 4 days of investigation and getting nowhere - incase anyone has any ideas!
@barren warren I have not knowldge of that, but feeling with you. Sitting at least 3 days on a "random" problem I do not understand. And still no one has a solution. But got some tipps about debugging here, perhaps someone have also four you

thin stratus
#

@barren warren Always helps to provide the actual crash error and a log :)

twin juniper
#

Does the Steam Online Subsystem require a steam account to use/test? And if so, wehre does the user sign in to test?

sleek elk
#

I am getting a big step further, by compare both logs of a case "with problem" and without "I see at client" log that its not about playerstate only which was not replicated. It's more. Just the not replicted playerstate is the first thing which crumble my game. It simply stop replicating more actors in failur case. In the meantime I investigate more. My thread is also approved by moderatir now.
https://answers.unrealengine.com/questions/991441/player-state-not-valid-after-servertravel.html

I now do more compates to server log... but some questuin, is there a actor limit known fpr UE4 on start of a map which chrashes/stop replicate them to clients? I have 3 PCs, one very strong and when he is the server problems also do not occure. 2 PCs are slower/less RAM, when their are server problem occur to 50%. It's very, very clear looks for me I hit a limit.
Can be because of bad map design, I use some physical assets. But still wondering why this stops replicating such important things as player state to clients

#

oh man, I think I got it

#

Still wired, and still (as I understand this) its a bug and not planned behaivor. But I think I know what to do. Do somthing about my replicating actors and set priority of player state higher. That should make it better. But I still have not Idea why Server is stopping replicating to client. I will compare server logs now

#

If someone is interested or think I talk shit I can share some log screens 🙂

sleek elk
#

Does the Steam Online Subsystem require a steam account to use/test? And if so, wehre does the user sign in to test?
@twin juniper You can test with APID 480 without steamworks Developer Account. But your gamer steam account has to run on the same machine, so you also need a active account. But you need not a steamworks account directly. Just make a normal steam account as a normal gamer, start your steam and configure your UE4 with appid 480

#

you can google for appid 480 related to you ui4 and will find tutorials and the code you have to copy into your config files

#

you also find subsystem configurator in market place if you want to make it by and plugin

harsh lintel
#

If an actor owned by the server has a replicated_using variable, that variable would be replicated to clients right? and the callback would be called as soon as the player is in Network Range of the actor?

harsh lintel
#

Also, if I change the owner of something owned by the server to the PlayerController of the player do I need to change the owner on the client too? I'm getting a null owner on the client, but valid owner on the server

quick flint
#
AllowPeerConnections=False
AllowPeerVoice=False
ConnectionTimeout=60.0
InitialConnectTimeout=60.0
RecentlyDisconnectedTrackingTime=120
TimeoutMultiplierForUnoptimizedBuilds=1
KeepAliveTime=0.2
MaxClientRate=15000
MaxInternetClientRate=10000
RelevantTimeout=5.0
SpawnPrioritySeconds=1.0
ServerTravelPause=4.0
NetServerMaxTickRate=30
MaxNetTickRate=120
NetConnectionClassName="/Script/OnlineSubsystemUtils.IpConnection"
MaxPortCountToTry=512
ResolutionConnectionTimeout=20.0```
#

How should I configure these settings for an overwatch style game to achieve best performance?

twin juniper
#

@twin juniper You can test with APID 480 without steamworks Developer Account. But your gamer steam account has to run on the same machine, so you also need a active account. But you need not a steamworks account directly. Just make a normal steam account as a normal gamer, start your steam and configure your UE4 with appid 480
@sleek elk Yes I used Appid 480 which is something like spacewars, but I wasn't able to locate my session across seperate machine/network. Do you know of any good resources for getting steam's online subsystem working in c++? When I test my onine subsystem locally using LAN and setting subsystem to Null, it works. But when I set it to steam and set lan off, then sessions can no longer be found.

twin juniper
#

@bitter oriole are you around?

regal sand
#

this may be a noob question; but how can you salvage "really bad" netcode for an entire game?

#

It is all in BP until we can make the move to C++ for Ded Servers

kindred widget
#

Really depends on what your definition of really bad is. If it's actually legitimately bad and not just unoptimized, then all you can really do is pick a system and redo it. Rinse and repeat until you're satisfied. You might break other systems by redoing some systems, if they're badly interconnected and not well OOP oriented. Can't really help that sometimes though. Maybe start with your more core systems. Redo those first and then focus on the outliers so that you don't end up needing to redo outlying classes twice if you decide to change stuff around in a core system from it's rework.

twin juniper
#

I'm interested in the performance differences between RPCs and replicated properties, I know that RPCs are supposed to be more costly, but by how much? Is there any performance profiling that has been done on this that I can take a look at?

placid bramble
#

Does anybody know which server is the best to go for in terms of pricing? Gamelift, Azure or DigitalOcean. Which server would be the best in terms of scalability? What is the alternatives to Gamelift in Azure?

limber gyro
#

How do you get the player state from a replicated character?

#

basicly i am getting all actors of type character and doing a for in the returned array and i want to know which team what player is in

meager spade
#

Get Player State from the pawn?

#

but you are doing something crazy if you are doing get all actors of class

#

just to get playerstates

limber gyro
#

i am doing get all actors because i need to hide UI elements acording to a raycast

#

and i just want to use that to get the teams in the player state

#

ye i just need to get it from the character itself, i was jsut confused because i forgot to cast hahaha

limber gyro
#

Does any 1 know where and the name of the function that gets the player name?

#

the one that you can pass as an argument when you connect to the server

meager spade
#

PlayerState->PlayerName ?

limber gyro
#

didnt know that

#

ty

royal rampart
#

hey guys, I have been following this tutorial on how to make all the player movement authorative

#

and it worked like a charm until I tried the dodge thingy

#

I didnt implement it exactly in the same way he did, Im trying to add a wallrun (which works fine), but then I want the player to be able to jump off the wall

#

So I need him to not only Jump, but jump away from that wall, so I need to add a velocity change but in a authorative way, can someone help me?

broken warren
#

im using playfab

twin juniper
#

Does anyone here have experience with Steam's online subsystem? I'm unable to join a Session when I set DefaultPlatformService=Steam instead of DefaultPlatformService=Null. When it's Null, I'm able to connect locally, but from Steam I'm unable to connect from a remote network (I've portforwarded)

whole urchin
#

anyone able to help me?
server can run TurnOnLight and gets message server recieved and updates clients, when client runs it gets response sending req to server but server doesnt get the response of server recieved and nothing is updated, i dont understand why any help will be great 😄
https://gyazo.com/b34a707018d798a1e14d081cb466e5e3

limber gyro
#

@twin juniper i dont think u are suposed to connect to remote servers when u have steam on

#

u gotta do stuff steams way

twin juniper
#

You sure? ISn't the whole point of steam's online subsystem to allow remote servers?

limber gyro
#

which is hostting them the way steam intends and registering the server in their back end

twin juniper
#

Or do I have to pay for that?

limber gyro
#

you can connect, you just can connect like u usualy do, say u run ur server.exe in any local machine and connect

#

u wont be able to do that UNLESS

#

u do what i did

#

and override some fuctions

twin juniper
#

I did all that though.

#

I overrode those functions.

#

Like

#

OnSessionFindComplete

#

OnSessionJoinComplete

limber gyro
#

thats not what i mean

twin juniper
#

Oh?

limber gyro
#

i made a post about that on playfab's forums

twin juniper
#

can you link it?

limber gyro
#

gimme a sec

twin juniper
#

so are you implying I' m able to play and connect locally, but if I want to do it remotely I need to register my app with Steam.

#

And use the correct steam app id?

limber gyro
#

i am not sure how steam does things since ive never used steam for server hosting

twin juniper
#

It's not dedicated.

#

IT's a listen server

limber gyro
#

oh so ur trying to just connect to a listen server, does it show in the server browser?

twin juniper
#

I guess something like that? Essentially, I have a game with a host and join option.

#

The join option just attempts to join the first index [0] server

#

iT finds

#

in the OnFindSessionComplete callback

#

Should I instead

#

Search for the server in the server list?

limber gyro
#

sorry friend i am not very familiar with how steam does things

#

i was under the impression u wanted a dedicated server

twin juniper
#

But yes it's a listen server.

#

One hosts, another joins.

limber gyro
#

with a listen server you are probably better off following a tutorial

twin juniper
#

Just not any good tutorials avilable in C++

#

And the ones there are,

#

I already followed them and did whatever they put

limber gyro
#

just use BP's

twin juniper
#

Why?

#

Extra work

limber gyro
#

theres plenty of tuts for that

#

and plugins

twin juniper
#

I'd just rather not take that route and instead try to figure out what I'm actually doing wrong.

limber gyro
#

well try and see what you ge browser

#

get in a server browser

#

to see if steam is actualy recognizing the servers

twin juniper
#

I'm not very familiar with steam, where is the server browser?

limber gyro
#

u need to implement one

twin juniper
#

Oh

#

I thought you meant,

#

Steam's client's

#

server browser

#

But yes I'm assuming the issue is, I'm attempting to join index 0.

limber gyro
#

well that is probably a possibility but you need an app id i think

twin juniper
#

Yes it gives a test app id

#

of 480

#

Which is what I'm using

limber gyro
#

what does the log say?

#

have u checked the logs?

twin juniper
#

Yes so what happens is,

#

I'm able to find servers,

#

And my OnFindSesionsCOmplete callback gets called 3 times.

#

And then,

#

I attempt to grab the player controller,

#

From the gameworld.

#

But at that point,

#

Nothing happens.

#

It just goesn't go any farther..

#

Like it doesn't fail to grab the player controller

#

Nor does it succeed

limber gyro
#

pste that part here

twin juniper
#

One sec

#
    UE_LOG(LogTemp, Warning, TEXT("Session Joined"));

    FText Message = FText::FromString(TEXT("Join Session Complete callback"));
    FMessageDialog::Open(EAppMsgType::Type::Ok, Message, nullptr);

    APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);

    if (PlayerController) {
        FText Messageo = FText::FromString(TEXT("Player Controller Valid"));
        FMessageDialog::Open(EAppMsgType::Type::Ok, Message, nullptr);
        FString JoinAddress = "";

        Session->GetResolvedConnectString(SessionName, JoinAddress);
        if (JoinAddress != "") {
            FText Messaget = FText::FromString(TEXT("Host Address Resolved....joining"));
            FMessageDialog::Open(EAppMsgType::Type::Ok, Message, nullptr);
            PlayerController->ClientTravel(JoinAddress, ETravelType::TRAVEL_Absolute);
        }
        else {
            FText Messagefr = FText::FromString(TEXT("Failed to resolve host"));
            FMessageDialog::Open(EAppMsgType::Type::Ok, Message, nullptr);
        }
    }
    else {
        FText Messagefpc = FText::FromString(TEXT("Invalid Player Controller Valid"));
        FMessageDialog::Open(EAppMsgType::Type::Ok, Message, nullptr);
    }
}```
#

So you see where it says FText Message = FText::FromString(TEXT("Join Session Complete callback"));

#

That dialogue gets called several times.

#

Then I attempt to grab the player controller APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);

#

And if that succeeds I print, player controller valid, otherwise, invalid player controller.

limber gyro
#

thats no the log thats the function

twin juniper
#

But nothing happens there.

#

I'm not sure which log you're referring to?

limber gyro
#

in ur saved folder

#

inside ur project folder

#

theres going to be a logs folder

#

check what those logs say

twin juniper
#

AH

#

There's several logs, I can produce new ones.

#

And show them to you.

#

Give me a moment.

limber gyro
#

first check them urself and see if u can find anything

#

there should be clues there

twin juniper
#

Okay

twin juniper
#

@limber gyro I p[ersonally can't understand these logs very much.

#

Can I send them to you to see if you find anything useful?

limber gyro
#

pm me

#

i will take a look in a few mins

#

not promissing anything tho

twin juniper
#

no worries!

swift kelp
#

what is the best way to deal with this?

#

make UComponents inside UComponents or AActors in AActors or something entirely different?

bitter oriole
#

Gonna need more context.

swift kelp
#
USTRUCT()
struct FCardName
{
    GENERATED_BODY()

    UPROPERTY(Replicated)
    ESuit Suit = ESuit::None;
    UPROPERTY(Replicated)
    ECard Num  = ECard::None;
    FCardName();
    FCardName(ESuit iSuit, ECard iNum);
    FCardName(const FCardName& Other);
    void operator=(const FCardName& Other);
};

I need a list of those in a UComponent that gets attached to APlayerState

#

but this struct can't be replicated

bitter oriole
#

That's not how you replicate structs

swift kelp
#

I know, I got the error

bitter oriole
#

Just mark the properties to replicate as UPROPERTY() alone

#

And replicate the struct

swift kelp
#

oh

#

no way

#

Thanks @bitter oriole it worked 👍

velvet brook
#

I'm using Event tick to facilitate my movement, should i mark functions I call as reliable? Or is that bad cuz event tick + reliable.

bitter oriole
#

Reliable functions on tick is definitely not a thing you want to be doing.

velvet brook
#

ok thats what i was thinking

#

ty

twin juniper
#

@bitter oriole Have you worked with steam's online subsystem?

bitter oriole
#

Ask your question, directly, to everyone, without tagging in random people

#

People who know will answer

twin juniper
#

Ah apologise.

#

Well I'm having an issue connecting to a listen server using steam's online subsystem

bitter oriole
#

Explain the issue, what you tried, what happens

twin juniper
#

The issue is, when I set my
[OnlineSubsystem]
DefaultPlatformService=Steam in defaultengine.ini

#

The client is no longer able to connect.

#

But when it's Null, the client can connect.

#

If it's Nul, the client can connect from the local machine.

#

But because Steam's subsystem requires a steam account.

#

I'm testing the server on my machine nad the client on a remote machine.

#

But the remote machine is unable to connect.

#

And I've port forwarded as well.

#

For some reason,

#

The client is able to find sessions.

bitter oriole
#

There is no need to forward ports at all with Steam

twin juniper
#

To connect to,

#

Yes, that is true.

#

It was just in case.

bitter oriole
#

Are you using two Steam accounts

twin juniper
#

Yes.

#

Two seperate machines across two seperate networks,

#

With two seperate steam accounts.

bitter oriole
#

Check the server logs for traces of a connection

twin juniper
#

I tried looking through the server logs but couldn't find naything useful, except this.

#

And wondering if it means anything.

#

LogOnlineSession: Warning: STEAM: No game present to join for session (GameSession)

#

But that's when I'm hosting, so I don't know if that's a relevant warning

#

If you would like I can show you the join/host code.

#

If that would help.

bitter oriole
#

When I said "Explain the issue, what you tried, what happens" I really meant show the code, the logs, video, screenshots, detailed explanations

twin juniper
#

Ah okay.

bitter oriole
#

Not that I know about the issue

#

I know nothing about it

#

People might if you share information

twin juniper
#

Well I'll show you what's interesting that happens in the code.

#

So this function is where the player connects to the server, and it's a callback from when a server is found/joined.

#
    UE_LOG(LogTemp, Warning, TEXT("Session Joined"));

    APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);

    if (PlayerController) {
        UE_LOG(LogTemp, Warning, TEXT("Player Controller Valid"));
        FString JoinAddress = "";

        Session->GetResolvedConnectString(SessionName, JoinAddress);
        if (JoinAddress != "") {
            UE_LOG(LogTemp, Warning, TEXT("Address resolved"));
            PlayerController->ClientTravel(JoinAddress, ETravelType::TRAVEL_Absolute);
        }
        else {
            UE_LOG(LogTemp, Warning, TEXT("Failed to resolve host"));
        }
    }
    else {
        UE_LOG(LogTemp, Warning, TEXT("Failed to grab player controller"));
    }
}```
#

The strange thing about this is,

#

"Sesson joined" gets printed to the log.

#

But then nothing else gets printed.

#

No log of failing to grab the player controller/succeeding.

#

No long of failing to grab the address/succeeding

#

It's like the code doesn't want to go beyond that.

#

hmm actually, I should check EOnJoinSessionCompleteResult...

swift kelp
#

is using
UFUNCTION(Server, Reliable)
redundant / not-needed
for anything in the game-mode?

bitter oriole
#

Game mode can't have RPC by design

#

Since it's not replicated

swift kelp
#

got it, thanks

tranquil yoke
#

Hey, guys for some reason,In blueprints Rep_function does not gets called for clients which are joining later, how should i debug this

it happened for upto 3 clients, but not after that

peak star
#

My game can't find sessions on the LAN using onlinesubsystem NULL. Do I need to add something to the Build.cs file?

#

And does it need to be private or dynamic added stuff?

swift kelp
#

In a casino game, where should the player's chips go?
In the player-state? or the game-mode?
If it is in the player-state (which would sound logical), could a player hack it sense it is client-side and give themselves more chips?

swift kelp
#

I decided to put the player chips in the player state and then use "withValidation" to check it against the game-mode
The game-mode will have the player-state ideas mapped to their correct stack size and if the two are off, I'll return false.

signal lance
#

You can put it in the player state and as long as everything is handled server side the client can't do anything (cheat)

peak star
#

So did Unreal Engine lose the ability to do LAN on Android starting at version 4.23 or is something else causing it?

#

I think it is not the ue version because mine stopped working without changing versions. Same project, same wifi router, same devices. I can't figure out why it would suddenly lose the ability.

peak sentinel
#

Does Android support LAN on unreal engine? Afaik it has problems since years about that

peak star
#

Well like I said i had it working consistently up until I was ready to release it

#

I just downloaded the multiplayer shooter example (western gunslinger game with orange mannequin with the cowboy hat) and found that it could not find LAN sessions either.

#

Even though both the pc and the android were in LAN mode and I Play on PC amd Find Sessions on Android. Firewall settings allow both private and public networks.

#

I had this working for 3 years and now it quits for no apparent reason

vale ermine
#

So after messing with everything multiplayer, I found that it is not worth it to make a multiplayer game and host it on any of these services.To any others that are wanting to make a multiplayer game for profit, take a look at the cost for hosting your game design on different services. Every game is different, and will occur different costs. The better route is rent a location connected to a main hub. Then set up your own servers that scale based on the demand of all the multiplayer game you create. It would be best to do this after you have completed a few multiplayer titles and tested them with your server back end thoroughly. That way when you go to rent the location, set the serves up and launch your multiplayer titles, you will have saved more money than using cloud based services in the long run.

peak sentinel
#

how much you can save from that way? @vale ermine

vale ermine
#

if you go the amazon route and you have high user count instance count the math is on their website and can exceed 30k a month with very low user count. There is the VPS route and your paying about 1000 dollars per year per vps and depending how demanding your game is translates into how many instance you can run on a single vps. That all said now you have you own back end. 2000 for rent, 5k per server you build, electricity, server admin 100k+ a year. The point is that you can use your own servers and scale them to your needs for the multiplayer games you create. Now you have one system that can do all your games and you are not paying separate cost for cloud hosting of each game. This could reach millions a year depending on your game or games.

peak sentinel
#

afaik they have a system to optimize instace issue

vale ermine
#

I need dedicated though for my games so it does depend on game types.

#

Games that have instance that are short lived can be fairly cheap.

peak sentinel
#

games that not have instance arent MMOs?

vale ermine
#

well you can have an mmo that is instanced based but I am looking more for the run 24/7

peak sentinel
#

why not use both?

#

to 24/7 operations use your own, for others use cloud-based

#

i believe the 24/7 thing only needed for .... data usage and small operations? right?

vale ermine
#

No the way my maps are designed they are up for 1 week then down for maintenance

#

that is a lot of dedicated servers but each blade can handle a few maps

kindred widget
#

@swift kelp In short, your players shouldn't be able to 'hack' their chips if you program it correctly. They could change their own local memory values which would update their own UI maybe, but as long as you don't do any form of client to server data and leave it all server to client, they cannot directly affect their chip count. Do bear in mind that if you have a server, and then a single client, there are actually two playerstates for that client. It does exist on clients yes, but those are just information hubs. The real processing and updates should always be done on the server and that change replicated to clients. Which means that the server is always working with it's own data and clients can try to change their own values all they like, it'll just mess up their own UI until the server overwrites it again.

vale ermine
#

The answer is put everything in the player controller. If you use the action rpg inventory system from the unreal market place, you will have everything you need you build player viewing and server communication you need for your game.

kindred widget
#

You only put things in the player controller that you do not want other players to see. If he wants other players to be able to see how many chips another player has, it cannot go in the player controller.

vale ermine
#

ugh ok example. You have a container(These containers are set up for you in action rpg inventory system). This container is a widget that has an array of players that are viewing the container. You can make the container look however you want but it would be the middle man between you and the other players. You could even set slots on the container that are locked to player viewers of that container and they could add their chips to the container and the other player will see it.

#

You can even set the inventory so that is the players hand that others can not see and the container where you drag the cards from your inventory into the container to play your hand.

#

Btw the container is the middle man. It is an actor that has an interface that both players can interact with at the same time while viewing the container ui.

kindred widget
#

First of all, you don't use UI for any form of networking. If you're talking about an actor that a widget can work through, that's fine, but a widget alone should not be used for any sort of gameplay or networking. So presuming that you want a hack free way of letting other people view your stuff that you don't want all players to see besides some, yes, you would need to use a single client actor like a player controller to route through and do checks on the server to let the server send specific data to specific clients based on their server side values. IE, don't let client1 try to tell you that it's client2, just rpc, get which client it is based on server data and use that to rpc back the data through a client RPC. But the original question was simply a matter of where to place a variable like a player's currency so that clients couldn't hack it. He chose playerstate, which means he probably wants more than just one player to see it which isn't unreasonable if you're sitting at a poker table. You kind of want to know where the money went.

vale ermine
#

Yea I just went through of of this. You will want to use rest commands to authenticate users and retrieve and set values to the database through a gateway. It is to bad there is no out of the box secure way to make a multiplayer game.

bitter oriole
#

There can be no such thing

#

People doing MMOs face unique constraints and have large budgets

#

It's unrealistic to expect a cheap service that does everything for you

vale ermine
#

Well I mean more of a stream line setup. That way developers have a clear system to follow.

#

Instead we have to ask questions here and read through the lines if you know what i mean because face it nobody wants to give their system out.

bitter oriole
#

You can't streamline the setup for this because it depends on your hosting provider, your databse technology, your game's constraints

#

Your problem isn't that people "don't want to give their system out", your problem is that each such game has extremely unique systems

#

And yes, it's years of work for teams of 10+ engineers

#

So you can't explain it, you have to hire the team and work some years

vale ermine
#

yea i got you and with a new system for example spacial os it is always changing and improving so you have to keep up.

bitter oriole
#

Not to mention the cost of SpatialOS is too high

vale ermine
#

but i mean as far as the keys and everything that needs to be hidden that was a very difficult leaning curve for me.

#

Maybe I just didn't look for the right documentation to help me learn

bitter oriole
#

"me" is your problem - this kind of games is for very large teams

#

Read >100 devs , >10 backend devs

#

You can't learn all of that stuff because your brain is not 100 times larger than average

vale ermine
#

yes but I like to learn

#

And you are right I can not do it all

#

I got you on that

bitter oriole
#

But you're trying to learn 100x what you can learn and then complain that it's difficult

vale ermine
#

but here is my point I like to know something that way when the admin exposes my keys I can be pissed and fire them

#

not wait till all my user information is hacked

bitter oriole
#

Anyway, my advice is to make simple games, preferably single player games first

#

Learn step by step

vale ermine
#

if they give authorization to the wrong group i want to know

#

im trying

#

but to that last comment yea I'm focusing on unreal market now

#

i have something big coming in this week for paper2D

#

It just rely sucks you think I am complaining about how difficult making a multiplayer game is. Just remember, I am experiencing this for the first time and it is advice from people like you that prevent me from wasting valuable time on something that will never happen in the near future but I can not say that I do no put my all into learning everything I needed to draw my own conclusion.

bitter oriole
#

But you are complaining about how difficult it is

vale ermine
#

I guess I was but didn't realize it. I am sorry that bothers you. I am gone forever(poof).

bitter oriole
#

You're not bothering, you just need to accept that there is no tutorial, or built-in plugin, or marketplace asset, to walk on the moon

#

Or build a successful MMORPG, which has been done less often than walking on the moon

twin juniper
#

Totally out of the blue question here, but has anyone ever built their server for linux and had windows clients?

#

i.e. does it work?

swift kelp
#

@kindred widget thanks for the clarification!

bitter oriole
#

@twin juniper Fortnite does it

#

I suspect every UE4 game with dedicated server does it

twin juniper
#

@bitter oriole That is so good to know XD

#

it's so much cheaper to run

#

@vale ermine Have you seen Ashes of Creation? It's built in UE and I saw an interview where the designer was talking about his issues transforming UE to make it work with an MMO style game.

bitter oriole
#

Made by a team of about 60 people, of course

vale ermine
#

Oh I have no issues with UE4. It is open source and I can do anything I want. Don't list to people that tell you that you need 60 people to do it either.

bitter oriole
#

Sigh

earnest comet
#

I remember there was a rush about making an MMORPG as a solo dev years ago with Unreal Egnine because one company did it.

#

But you really need that amount of people if you want to make a big scale multiplayer game.

bitter oriole
#

I mean AoC is literally made by 60 people

#
Ashes of Creation Wiki

Intrepid Studios Inc. is a San Diego based game studio working on the MMORPG Ashes of Creation.
Intrepid Studios was founded by Steven Sharif and John Moore, passionate gamers and successful entrepreneurs, who took their knowledge of business and passion for games and set out ...

#

And it got millions in funding to pay them

vale ermine
#

The funny thing is that he thinks that was what I was trying to do but I was just trying to learn 😛

bitter oriole
#

"I just want to learn how to build an MMO !"

twin juniper
#

Yes over 3m in kickstarter funding as well as publishing. I think he talked about how he had to rewrite state replication or something.

vale ermine
#

you know there is more to it than just what you think I know haha

kindred widget
#

I don't think he cares what you know, I think he cares what is humanly possible.

vale ermine
#

exactly goonix

earnest comet
#

But learning how to make an MMO can be actually a quite big of a waste of time if you got no future with it...

vale ermine
#

that is what im talking about

earnest comet
#

I mean curiosity doesn't kill the cat but it might hurt for no reason 😛

bitter oriole
#

Learning how to make an MMO is like learning how to make an orbital rocket that lands itself

twin juniper
#

I feel like there is a way to build an MMO as a solo guy but you would have to give up a huge amount from the typical vision.

bitter oriole
#

There isn't

twin juniper
#

haha

#

hmm, what about

#

a world a spheres that delete eachother on contact that only updates once a minute

bitter oriole
#

How do you get a million sales for your game as a solo guy ?

vale ermine
#

no he is right there isn't but i just learned that recently by going through all the steps

twin juniper
#

all hosted on one t2 nano

bitter oriole
#

The "M" in "MMO" is for "At least a few thousand people are playing my game at any time"

earnest comet
#

A few thousand might also not be enough depending on the costs. Let alone even making those people STAY is the actual problem.

#

95% of MMORPGS died because of this.

bitter oriole
#

But most games never even have that many players playing the game at all, let alone at the same time

shrewd tinsel
#

hi guys, where do i handle team scores? gamemode or gamestate?

twin juniper
#

How many MMOs actually turn a profit?

#

5%?

vale ermine
#

You would need to write your net code specific for you game that is not to hard with source

bitter oriole
#

Start with "how many MMOs actually exist"

kindred widget
#

@shrewd tinsel Gamestate, you'd want clients to see it, clients can't see GameMode.

shrewd tinsel
#

thanks

vale ermine
#

I want to build a system like spacial os

twin juniper
#

In a funny kind of way I think the thrill of the idea of an MMO is kind of dying anyway

vale ermine
#

cross server is the best thing ever

earnest comet
#

Only proftable MMORPG is WoW. But then WoW had an actual playerbase ready to play the game. Warcraft series etc.

peak sentinel
#

Unreal Leon, who did MMORPG alone?

twin juniper
#

surely FF mmos are profitable

peak sentinel
#

😮

vale ermine
#

you know who else does it rely good? planetside 2

earnest comet
#

Oh and Final Fantasy too I think

shrewd tinsel
#

i second @vale ermine

peak sentinel
#

someone in my country made MMO in 5 years with 12 person

shrewd tinsel
#

planetside is a great example

twin juniper
#

and what about Guild Wars by ArenaNet?

peak sentinel
#

and wasted 250k$

earnest comet
#

The thing is, those games FF and WoW has MASSIVE amount of playerbase READY to play it already. One guy going for a journey of this may not be good.

bitter oriole
#

One guy, or a small team, will never have the funding to get the players playing

#

The game doesn't even matter

twin juniper
#

Sad but true perhaps

earnest comet
#

Exactly. If the player will just say "meh" and only pay for one month, you ain't living.

shrewd tinsel
#

mmorpg is such a gargantuan project

twin juniper
#

it's not a good genre for the little guy

bitter oriole
#

The average Steam game will do 2 concurrent players

#

That's just the truth

#

In a year it will be 1

vale ermine
#

nf says "you look in the mirror and tell yourself you'll never be great" "You'll never be great"

earnest comet
#

It's just that when there was WoW, SWtoR and FF MMOs were popular, people wanted to make their own solo MMORPG projects because they all thought "their idea is billion dollars worth!!!111oneoneeleven".

Ah those silly times of Unreal Community. ❤️

bitter oriole
#

No one said that @vale ermine

earnest comet
#

Eh... It's not about telling yourself that lol. Not at allç

kindred widget
#

There's a difference between telling yourself you suck, and being a realist.

bitter oriole
#

Being great, today, is making a nice solo game and making 2000 copies

#

Or making a cool game as a team and making 20,000

earnest comet
#

You are trying to learn how to teleport before learning how to walk.

vale ermine
#

haha or make assets and let the other devs fail?

earnest comet
#

That ain't about saying "you will never teleport". You might one day.

bitter oriole
#

Reminder that the massive company behind Fall Guys shipped like 120 games before Fall Guys

#

Vlambeer made something like 70 games

twin juniper
#

wow, I didn't know that

earnest comet
#

Even then Fall Guys is a massive flop. No really. You just flop around in that game. 😛

vale ermine
#

I only have 2 and they are bad haha

peak sentinel
#

can someone tell me who did mmorpg alone before? lol

bitter oriole
#

Supergiant is on their 4th game in a decade and they got their first truly mainstream hit

peak sentinel
#

really curious

earnest comet
#

Noone did that Mr Old Christian Band.

#

Go make new albums

vale ermine
#

Its about bring back those old school games

bitter oriole
#

The point has never been "you can't succeed", the point is "succeeding today is making a game you love that has 13 players playing it every week"

earnest comet
#

I would say that's a big achievement too for a first game 😛

bitter oriole
#

It is

vale ermine
#

just have to look through the Atari stuff those are easy games to remake

earnest comet
#

Remaking is really overrated. Make your own games tbh.

peak sentinel
#

Adam left 6 years ago and new albums sucks. Anyway lol 😄

Go make new albums

earnest comet
#

Two Days Grace now huh.

vale ermine
#

well yea with twists of cource

#

everyone is inspired by some game

#

mine is Ragnarok online

earnest comet
#

Remaking has the massive chance of failing too. You really need to not only have the old times essence, but also have new times improvements. Not all can do that.

#

Inspiration is different, remaking is different so.

peak sentinel
#

No one considering the fact UE4 is actually requires heavy background operations to make an MMORPG run on it lol

vale ermine
#

yea guess bad wording

peak sentinel
#

You should totally edit source code to make MMO work

#

doc. also mentions that

#

actually mentions by "requires plugin"

bitter oriole
#

The problem with a RO remake is that the game only works mechanically when you have tens of thousands of active players to get about 100 online 🤷

vale ermine
#

we know that be everyone you see here if they know how to do it they will tell you you need 60 people to do it

bitter oriole
#

Because that's the truth

vale ermine
#

i like making jabs its just for fun

bitter oriole
#

Anyway, I won't be bothering you about it

#

Good luck on your projects

vale ermine
#

love you

peak sentinel
#

I am on this channel for almost 8 months and this is the 5th time I saw Stranger explaning making MMOs is not a good idea... 😄

twin juniper
#

Haha

earnest comet
#

You are pretty young then.

#

Years ago there was a FLOOD of people asking about how to make MMORPGs in Unreal forums.

#

It took a lot of blood and sweat to tell those people.

vale ermine
#

well no it is me no the explaining that matters .

earnest comet
#

We lost many good people that day.

#

War, war never changes.

bitter oriole
#

I've been talking with MMO wannabees since maybe 2008

vale ermine
#

felt like i had a target on my back

#

i was to needy

peak sentinel
#

Mattxor dont be taken on I am actually changing the subject

shrewd tinsel
#

for a mmorpg half of the work would be the server backend isnt it?

earnest comet
#

Sometimes we really need a big BONK on our head to get told our idea while sounds awesome, is not a good one.

twin juniper
#

@shrewd tinsel I don't know, you need to build a colossal amount of content too

#

players don't stay unless they have something to do

#

you can't just have a convenient game loop like CS

vale ermine
#

but leon there are ways to go about it

earnest comet
#

Listen ya all. EVEN if you had a good idea or implementation of MMORPG, you NEED to have at least 5+ years of story and gameplay mechanics to have something working.

#

Even if there is a MMORPG 500 GB Template to use.

#

You guys ain't considering the future. 😛

vale ermine
#

some times the best thing is to say nothing at all 😛

kindred widget
#

It's not really that difficult of a concept. Making the game itself is easy. You can implement the gameplay systems and whatnot fairly simply. It's the server connectivity and backend systems that will destroy you. Then we'll bring in the community management, tack on the necessity for business management, office space for these people to work in. In the end, making an MMO is about 5% game design, 95% business and server development.

bitter oriole
#

@earnest comet And you need a $100M ad campaign and a great anticheat and flawless IT, but you can't explain that to people who never shipped a game before

shrewd tinsel
#

best shot is getting a job a as lead designer at some big game company

earnest comet
#

People will not play your MMORPG if;

Connection is meh.
Story is meh.
Gameplay is meh.
Balance is meh.
Downtimes are meh.
Your face is meh.
Your community management is meh.
Half Life 3 dream is meh.

etc.

#

And these eventually snowball HARD.

#

Thats why even MASSIVE Companies have failed making an MMORPG:

peak sentinel
#

As far as I understand from Stranger's 5 floods and other researches what people trying to explain is persistent-levels and other back-end stuffs like anti-cheat, community and custom server management etc. if you make a session based but stay still on "Multi-Massive Online" with session-based games if you can afford the servers and anti-cheat stuff.

#

I've never dreamt of MMOs but wanted to type this lol

earnest comet
#

Ah yes. Cheating is a MASSIVE meh too.

bitter oriole
#

It's mostly the player count that kill 99% of projects

earnest comet
#

Cheating is unfortunately is something "even your grandmom can do" now.

bitter oriole
#

People don't play indie games, for the most part

earnest comet
#

But yeah as Stranger said, your game(MMO) means NOTHING if NOONE is playing it.

bitter oriole
#

Your MMO*

#

For a solo game, if one person is playing it, that's already great

#

Someone's having fun

earnest comet
#

Yeah fixed it.

shrewd tinsel
#

how do i manage team scores if the scoring depends on different gamemodes (ctf, point capture, deatmatch etc.) do i manage scores in gamemode and then update variables in gamestate for others to see?

kindred widget
#

People don't have to play your solo game, ever. They just have to buy it.

earnest comet
#

Marvel Avengers MUH AWESOME LIVE SERVICE game is in brink of destruction because there is no crossplay and people already playing in so low numbers.

shrewd tinsel
#

do i use different gamestates?

bitter oriole
#

The online looter genre was killed by Destiny the same way WoW killed the MMO genre

peak sentinel
#

The cure is souls-like or Death Stranding type connection so no one complain about it lol

#

if no one connected create custom assets and spawn them...

earnest comet
#

Well the problem is Stranger, the game is boring as heck. Also robots are the safest option of having enemies.

#

So there isn't much of a story to bring in.

bitter oriole
#

People keep saying Destiny is boring too, but they keep going back into it

earnest comet
#

Mean robot, destroy robot.

shrewd tinsel
#

using different gamestates for different gamemodes is a viable option?

kindred widget
#

@shrewd tinsel You can likely use the same Gamestate, just have your game mode change an enum or something in your gamestates, and use your values differently based on what the game type is. Less need for five different gamestate classes.

shrewd tinsel
#

alright

earnest comet
#

This might also have your answer.

#

Stranger, Destiny has at least some action and story to go by. You could at least go through the story once and say "yeah okay imma leave now".

#

Avangers have literally nothing but "hopes of years of content and aweomsenezz."

twin juniper
#

I have a question, if a bunch of stuff was batched and serialised into an RPC on tick, would it be as efficient as a bunch of replicated variables?

#

and I mean efficient in terms of network usage

bitter oriole
#

RPC on tick should only ever be used for client-to-player input

#

As unreliable

#

Replicated variables are serve-rto-client only

#

So the choice should be simple

twin juniper
#

client to player?

bitter oriole
#

to server, sorry

twin juniper
#

right so if a value changes on client, setting it to replicate doesn't change the value on the server?

kindred widget
#

Nope.

twin juniper
#

I see, so you would need an RPC to change the value anyway

kindred widget
#

Correct.

twin juniper
#

Why should RPC ticks only be unreliable?

bitter oriole
#

Because reliable RPC on tick will kill the network

#

Reliable RPCs are re-tried if lost

twin juniper
#

Ah so it floods it

bitter oriole
#

So if there is a one second cut of connectivity, at 60fps you then have 60 packets to re send

#

It doesn't work

#

Tick RPC must be unreliable, and it only makes sense for input

#

Server-to-client downlink should be mostly replicated variables

#

With some RPCs for reliable events

twin juniper
#

Can you send batched variables on a timer? Say my server is 40fps or something and I want to send them at that rate regardless of the client FPS can that work?

#

in an RPC i mean

kindred widget
#

You could, but why? What's the use case? Why not just only replicate these variables when they're changed?

bitter oriole
#

You can't decide of a rate to send stuff at

#

The network decides for you for the most part

#

Just use replication, it's a really well optimized system

twin juniper
#

I couldn't hold variables in a buffer and send at a time of my choosing?

bitter oriole
#

Send them, sure

kindred widget
#

Yeah, I mean you could call an unreliable RPC 40 times a second, but it's not going to end up as well as a simple replication.

bitter oriole
#

Have them received on time reliably ? no

#

It doesnt' work thay way

twin juniper
#

what would make it worse than simple replication?

bitter oriole
#

You would be using 10x as much bandwidth, to start with

twin juniper
#

oh.

kindred widget
#

Are you actually changing these variables 40 times a second?

bitter oriole
#

And you would be getting as much useful data, if not less

twin juniper
#

actually, probably not no

bitter oriole
#

The important part is that sendign stuff at 40fps does not mean you receive at 40fps

#

You will have half-second holes in the data

#

Grouped receptions of half a frame

#

Lost packets

#

Etc

#

Networks are hell

twin juniper
#

I imagine if I devised the system this way, occasionally an RPC would be sent in one of the 40fps intervals, but most would be empty

kindred widget
#

You could also just use conditional replication. If you're using C++

twin juniper
#

Why are RPCs so much more expensive?

#

I am

bitter oriole
#

Because you are forcing a packet to be sent

#

Even if nothing changed

twin juniper
#

using C++ I mean

#

can't you choose not to send an RPC based on client logic?

shrewd tinsel
#

why the hell cant i replicate maps?

bitter oriole
#

Because you're reinveinting replication

#

Replication copies the server state to the clients, efficiently, with variable speed depending on the network

#

On a per-client basis

#

If you feel like manually calling a function every time you change a variable, and rebuild all of these mechanisms yourself, feel free to

#

Just telling you there is a built-in mechanism that's proven with Fortnite, Valorant, PUBG, etc - and you're unlikely to do better 😉

twin juniper
#

From the server side I could use a TArray with my datatype in, but how do structs get replicated? Do they get serialised whole?

bitter oriole
#

Structs get replicated efficiently

kindred widget
#

What do you mean by client logic though?

bitter oriole
#

A structure with variable A and B will only replicate A if A is only changed

twin juniper
#

like, an input event happens, perhaps some other effects occur, these are batched, wait for RPC tick, if stuff in buffer, send

#

@bitter oriole Really!?

#

hmm, that is very interesting

bitter oriole
#

If you have an input event, just send it on tick as an unreliable RPC. If there is too much traffic it will get dropped and that's okay.

twin juniper
#

and it's all serialised and whatnot?

bitter oriole
#

Yes

twin juniper
#

well, now you're convincing me

#

I think I have thought of how I could do it using replicated variables. But what about very large TArrays? Is it still efficient to have a large array replicate to a client, in the sense that it only replicates changed members of structs within the array?

bitter oriole
#

TArrays will also replicate efficiently

#

Though replicating a "large" array is always dubious, generally speaking - if you are changing a 1MB array every frame, well, it's a problem no matter the tech

twin juniper
#

On the client I could have a RepNotify for logic once this array is changed on the client side

kindred widget
#

I thought any replicated arrays needed to use the one thing and then mark the array index as dirty?

#

Not any replicated arrays, but to only replicate a single array value instead of the whole array each time.

twin juniper
#

I expect it will be a batch of tens of structs probably 20 times a second at worst

#

some with only a single member changed

#

maybe 20 times a second is too many now that I think of it

#

I need to test of course

#

the server array will constantly be cleaned up so items are deleted, does this cause network overhead?

#

I could just have the same logic on client and not bother sending any deletion keys or however it works

#

Maybe it would be nice to be able to choose which array members to replicate, but I'm sure that's automatic

twin juniper
#

By the way thank you @bitter oriole & @kindred widget , I feel much wiser now

fringe sinew
#

Does putting a player's inventory on their PlayerState makes sense?

#

Like on death I want to destroy the character so I want the Inventory to persist, should I do it on the player state or the player controller.

#

Considering none of the two are destroyed what's the better option? From what I understand player controller isn't replicated to all clients but the player state is 🤔

kindred widget
#

Depends on whether you want other clients to see it or not. If you don't want other clients to see each other's inventory, or you want to save bandwidth to clients by only sending it to one client, do it on the controller. If you want it readily available to all clients for some reason, do it on the playerstate.

fringe sinew
#

Thank you mate, I was wondering why I was thinking about putting it on player state too because I don't want players to have their inventories available to each other, dropping items to ground is fine.

fringe sinew
#

Okay so another question this is a weird one, I don't understand what's up here but I have an interaction setup and when the interaction happens, I want the item that interact with to have it's scale reduced to 0.01 and collision set to no collision, and then set hidden in game this happens fine on the server but not on the client. On the client, it's set hidden but the other two things don't happen. Any idea why? One of the thoughts I had was that it's probably because the items are placed in the world and therefore owned by the server. This is puzzling a little.

fringe sinew
#

Okay so it's not the scale but the collision.

#

Collision is not changing 🤔

rose egret
#

cause only bHidden is replicated

#

collision size and scale are not replicated by default

fringe sinew
#

Scale I am able to replicate but collision I can not D_D

#

How can I replicate collision? Do you have any pointers you could give? D_D

rose egret
#

u can replicate a boolean to preform the action u want on OnRep_

fringe sinew
#

Hmm yeah 🤔

rose egret
#

u dont need to waste bandwidth by sending collision size and ...

fringe sinew
#

So I basically do OnRep_Bool{SetActorCollisionEnabled(NoCollision)} kinda thing? D_d

rose egret
#

ye

#

I even use already replicating variables like Owner for my pickup system

fringe sinew
#

Tenks fam, learned something new today D_D

#

Yeah this is form y pickup system too.

meager spade
#

could even use a enum to determine the state of something

#

and have onrep handle that state change

#

its a uint8

#

super cheap to rep

fringe sinew
#

Wow yeah, that's a cool one too @_@

meager spade
#

so like you change State to StateB, then clients do everything locally

#

adjust scale, adjust collisions, etc

#

if you only have two states, just use a bool

#

more than 2 states, a enum or some kinda bitmask flag

#

i have this for example

#
#define MRF_HIDDENMESH (1 << (1)) //Hide Monsters Mesh
#define MRF_COLLISIONS_DISABLED  (1 << (2)) //Disable Monsters Collisions
#define MRF_RENDER_PASS_DISABLED  (1 << (3)) //Hunters render pass is disabled
#define MRF_IDLE_OPTIMIZED (1 << (4)) //Monster is idle optimized
#define MRF_TICKS_DISABLED (1 << (5)) //Monster has ticks disabled
#define MRF_SENSES_DISABLED (1 << (6)) //Monster has senses disabled
#define MRF_DEAD (1 << (7)) //Monster is dead```
#
    //Replicated flags for the monster
    UPROPERTY(ReplicatedUsing = OnRep_ReplicatedFlags)
    uint8 ReplicatedFlags;
    
    UFUNCTION()
    void OnRep_ReplicatedFlags(uint8 OldFlags);```
fringe sinew
#

I am building an inventory system by storing object references, if I store them as class ones, any changes I make to the spawned object would be lost if I "stow it" back so getting to learn a lot while I do it D_D

meager spade
#

i can check flags like FORCEINLINE bool AreAnyReplicatedFlagsSet(uint8 Flags) const { return (ReplicatedFlags & Flags) != 0; }
😄 for example bool IsIdleOptimized() const { return AreAnyReplicatedFlagsSet(MRF_IDLE_OPTIMIZED); } I love flags like this 😄

fringe sinew
#

i only have 2 states tbh, 1 where the item has it's collision on for interaction purposes and one where it's set hidden and "stowed" but technically just attached to character mesh and collision disabled.

meager spade
#

one replicated property can handle 7 different monster states

#

and its 1 byte

fringe sinew
#

That's insane @_@

rose egret
#

@meager spade I am writing something like that as well to get rid of UE4 network and replication for ever lol

meager spade
#

Push model is also your friend

#

starting to roll that out recently

fringe sinew
#

I still need to learn more and more D_D

rose egret
#

push model and per property relevancy , thats what I need

meager spade
#

ye

#

tho per prop relevancy sounds weird

#

i mean instead of the rep system checking every prop to see if its changed

#

with push model it has a list which is far more cheaper to iterate through

fringe sinew
#

Dis is like a plane flying over me head, I go do the fixes.

rose egret
#

imagine I have 3 properties (blood, shield, mana) that should be replicated only to teammate and those who are spectators

#

I am currently using a sperate actor (ATeamData)

meager spade
#

you do have conditions

#

but those are very limited

#

if there was a way to make custom conditions

#

then that could be achieved

#

they actually made AttachmentReplication in AActor push based now

#

and ReplicatedMovement

#

wait

#

they did it to all props in there

#

niiiice

#
    SharedParams.bIsPushBased = true;

    DOREPLIFETIME_WITH_PARAMS_FAST(AActor, bReplicateMovement, SharedParams);
    DOREPLIFETIME_WITH_PARAMS_FAST(AActor, Role, SharedParams);
    DOREPLIFETIME_WITH_PARAMS_FAST(AActor, RemoteRole, SharedParams);```
#

only thing with Push based, is everytime you mod that prop, you need to mark it dirty

#

MARK_PROPERTY_DIRTY_FROM_NAME(AMonsterCharacterBase, ReplicatedFlags, this);

fringe sinew
#

Thanks guys. That worked : D

#

And I got to learn something new : D

empty axle
#

@meager spade so it is like dormancy, but for properties?

meager spade
#

kinda yea

#

the net system doesn't know if a property is dirty

#

so everytime it reps an actor, it checks every prop to see if its dirty, with Push Based you tell the rep system that its dirty, and does less CPU work per actor

kindred widget
#

Will the PlayerID in the Playerstate populate the same for a player connecting through steam? So for example, if the server is left open, and a client with.. say PlayerID 123456 disconnects and then reconnects using the same steam account, that PlayerID in the new playerstate created for their new connection would be 123456 again?

inner cove
#

I’m thinking of starting a BR game and I have some questions, hope someone can help me! So I was thinking the option of having official dedicated server to prevent (as much as possible) the cheating, for this options, do I need for every single match a dedicated server to it or can one dedicated server handle n amount of matches? If I need a dedicated for a match, how do can I handle the matchmaking system to launch dedicated servers and when the match is over, shut them down? The other options is peer to peer which is way cheaper but this option players can cheat (I think) and probably if someone doesn’t have a good connection, the game will lag. And the last question is how does fortnite handles all of this?

#

(Please tag me @inner cove if you are going to answer me 🙂 )

winged badger
#

@inner cove dedi game instances typically use 2 CPU cores

#

so one machine can handle multiple instances

inner cove
#

@winged badger okay so a machine with 12 cores can run 6 dedicated servers?

quick flint
#

NewPlayer->Player->PlayerId

#

Why is PlayerId empty when calling it this way in PostLogin()

vale ermine
#

@inner cove you will need to profile your game and run test to see how many dedicated servers you need for all user. Just by profiling you should get an idea of the cpu load and memory footprint. This will give you a good idea of how much ram you will need and how many instances you ca possibly run on one server.

#

Multiplayer with blueprints on unreal market teaches you how to do match making base on user ping. The server is started when there is a need for it. So it could be any user that it starts the server up for and others will see the instance because it is available.

#

I never played fortnight but I would think it is a lobby/map system. Players ready up in lobby. Once ready server spins up but this is in no way a dedicated setup. Dedicated the server is always running and is always available to connect to that instance.

limber gyro
#

hey peeps, i have a multicast BP function that is also executing in the server making 2 particle effects show up instead of 1

#

i need to make it run only on the clients (i assume) what is the best way to do this?

vale ermine
#

@limber gyro did you try putting has authority before the particle spawn?

limber gyro
#

ye i figured that just after i asked

#

LOL

vale ermine
#

That is most likely not the correct way to tackle the problem but it's good for testing

limber gyro
#

as long as it works im happy

inner cove
#

@vale ermine if it’s not a dedicated server, what is it?

vale ermine
#

It's just server that spins up then spins down when needed. A dedicated server is an instance that never goes down but for maintenance then when you start server back up it's a new dedicated instance

kindred widget
#

@limber gyro Are you ever planning on allowing listenservers on your game?

limber gyro
#

no

#

all dedicated

#

why?

kindred widget
#

Ah, was just going to make the point that instead of SwitchHasAuthority, you could use the IsDedicatedServer instead. Since you'd want particles to spawn on a listenserver too.

meager spade
#

@vale ermine that is not what dedicated server means

#

Dedicated server in gaming means a "Server dedicated to that gaming session"

#

doesn't matter how its launched, its the fact that its dedicated (not running on client machines)

inner cove
#

@meager spade that’s also what I think

vale ermine
#

An instance that goes up and down is not dedicated

meager spade
#

yes it is

#

in terms of UE4, its a dedicated server.

inner cove
#

@vale ermine maybe u are confused with a persistent server ?

meager spade
#

^

vale ermine
#

Yea I get wording wrong a lot

meager spade
#

a persistent server is a server that is always running, Fortnite, use dedicated server, but they spool up instances when needed and close when not needed (infact they always keep X amount spooled up at all times), and spool more to make sure players are not waiting to long for a server to boot and be ready. But this is all controlled by internal scripts i suppose epic side, not part of UE4.

vale ermine
#

I see your point it is dedicated for the time it is in use

inner cove
#

So I guess I will have to write my own script to be a master server to start up dedicated servers? But what if I rent 10 different machines, how could I start a server on a different machine than where the master server is? Hope it makes sense

vale ermine
#

That is the fun part. By the time I'm done I will have everything managed through autoit. That is the scripting language i use

#

Automation is my specialty haha

#

The master server will keep track of the sessions and ips using a database. So when another machine spins up it writes its ip and ports to the database. Then master server will use that to direct users to each machine.

inner cove
#

Yes I have figured it out myself what you just said, what I haven’t figured out is that if i have two machines x and y and the master server is on machine x, then it can execute locally a shell command to start a server . If it wants to start a server on machine y how can it execute that command remotely?

vale ermine
#

Well that depends on the system you design doesn't it. Example you have lambda functions and invoke those functions through an api gateway. These lambda functions is were you would put your script code to handle eveything.

#

I have decided to move away from those services and want to build everything up in house. That way I have full control of everything and how my system works.

#

The funny thing to is. If you have the team to set all that up on a third party system your throwing your money away when you could use that team to be developing those same systems but in house.

empty axle
#

@inner cove you should first probably research who will be your server provider based on your budget. A lot of them are providing tools for servers orchestration, matchmaking etc.

inner cove
#

@empty axle I have no budget, I will launch a kickstart if the project goes well. What do u personally recommend?

#

Actually let me rephrase that, do you have any recommendations based on what you read that I want to do?

#

(Except AWS)

empty axle
#

@inner cove We were using zeuz.io, but I wouldn't recommend them. Generally it was pretty okay, but after some time the quality of support decreased a lot.
Azure for now seems to be really good, but they have their price.
Apart from that I don't have anymore life experience recommendations.

vale ermine
#

I am thinking about the best way tackle an issue. Currently, game type is cell based. I would like to use A* for movement along these cells client side. Each cell would be an actor on the server. These actors would control movement of other actors(Players or npcs). In theory passing information to each other as players and npcs move through the server world. Now the point of all this is to have these actors spawned back and forth between servers. Example you have a map with 1000 players on it. That is 1000 cells that have information that need to be split between servers depending on load. These cell actors need to be able to dynamically change on the servers to handle large numbers of players packed together with each player or npc on their own cell. No cell can be occupied by two players or npcs if the server can redirect players to nearby cells. So during high demand times cell blocks will be allocated to predetermined servers. When demand is low these cells can be pooled on another server. Best example I can come up with is player moves on their their client and movement is applied to their client via A*. The request to move is sent to the sever. The server moves the player through each cell making sure that it is not blocked or another player or npc is on that cell. Once the server is finished moving it will update it to the client. The client should already be where the server is if not it will update. This would also avoid replication of movement and allow for these 1000( based on map design and view range in this game design to see that many players in one location. It would be a system where each session could hold 100 players. A player would receive information for every cell they are viewing. I would use a view count on each cell to manage the server load for each cell. If I have something off here, please let me know because I am looking for best design possible. This is a 2.5D game so 3d world with 2D characters.

#

If information on a cell changes that a player is viewing the players client will react accordingly and display the visuals needed for that cell. If a player clicks on a cell. Their session will pass that information along to other sessions that have players viewing the same cell.

grand lance
#

what's the best way to handle rotating a character towards mouse positon. Right now i get direction from mouse position and player and use SetActorRotation. Do i need to call SetActorRotation on server and call a RPC to server to set actor rotation? This seems like it clashes with using character movement.

#

call a RPC from client to server

quick flint
#

Can RPC's be called before the match starts?

#

Can I call RPC's when a player is connected to a server, but AGameMode::StartMatch() hasn't been called?

#

I want to give players 30 seconds to setup before the game starts.

meager spade
#

why couldn't you?

quick flint
#

when i check my blueprint, and check the valu e being passed here, it's correct

#

but when i try to set the text on my widget, it never sets

#

even t he text here is correct

#

but nothing happens on screen when i call set text

#

why is "Timeleft" still 123456

#

when in the photo before this

#

u can see it should be 27

#

is this broken?

#

._.

#

im dumb

#

i figured it out lmao

toxic schooner
#

anyone know why GAS gameplay cues trigger twice on the same client?

thin stratus
#

OnActive vs WhileActive maybe?

#

@toxic schooner

peak sentinel
#

I made several stress tests for my listen-server based project, I get maximum 60 ping from USA to Russia

#

But sometimes, even basic movement gets jittering, I believe 60 ping is not that bad, where should I focus to improve the connection?

#

I also used PktLag to simulate lag, its fine on my computer

#

But somehow on the other side something goes wrong...

rocky night
#

Quick Question, is it difficult no have npcs in a multiplayer match? They speak and react to players with physics?

empty axle
#

AttachChildren is an replicated array in SceneComponent. How is it possible that in some cases I have nullptr components there on client side?

#

Basically they are null right after travel in IntializeComponent phase

inner cove
#

@rocky night difficulty is subjective

kindred widget
#

@shut loom Just two notes, first you have the multicast node taking a pointer, and you're asking if it's valid on the other side before doing anything, but not giving it anything from the server. Also, it'd be much easier to do this all with a simple onrep function and a death bool. Set that bool to true on the server, and let all clients and the server set the death state the same. You'd eliminate a lot of those nodes, and better yet not be reliant on whether that multicast gets dropped or not.

raven viper
#

Hi!

Anyone here have used the Variant Set Manager in a networked environment? Back in the day I have created a material/mesh switcher that uses datatables to hold the necessary data. Back then Variant Manager wasn't available. Now that it has finally reached a state that I deemed as usable in our project, I have changed the code from the custom one to Variant Manager switches. While the original code worked perfectly fine on network, the variant manager only switches variants on the server, and not on the clients.

twin juniper
#

How can I send a client back to the Menu map after a session is destroyed?

#

There is a delegate FIOnlineSession->OnDestroySessionCompleteDelegates

#

I'm pretty sure I implement that.

#

But not sure what steps to actually take?

#

Do i get world and do a server travel?

#

Back to the map?

chrome bay
#

Depends really

#

Usually client just takes themselves back to the menu

rich ridge
#

@twin juniper open menu map

#

Server can't do it for you

inner cove
#

The server travel is for the server to travel all the clients to a new map so you will probably need to open the map from the player controller @twin juniper

#

What @chrome bay said is also correct so u maybe don’t have to implement it yourself

rich ridge
#

Usually client just takes themselves back to the menu
@chrome bay I don't think server can do for client..
If server kicks out player, then it might be possible, never tried though

chrome bay
#

Server can just call a client RPC that tells them to go to the main menu

#

That's how we do it

#

Obviously if you disconnect or something, you want to handle the network error by going to the menu anyway

#

But I'm saying this as if this is a "server wants all the players to quit" sort of situation

rich ridge
#

Is it good idea to equip the AiCharacters with PlayerState(either default or custom PS for Ai) for multiplayer game??
I don't think any problem with it.
Any advice.

inner cove
#

What do you want to store there? @rich ridge

rich ridge
#

In my current implementation my ASC(Ability System Component) is tightly coupled with PS.

#

And have started working in AI enemy..

#

The reason why I put my ASC in PlayerState because I want to retain some state like kills, xp even after player has died and PS is good place to persist these

chrome bay
#

Guess it depends.. I do since there are a handful of them and they sit in place of human players

inner cove
#

@rich ridge player state has a variable called bIsABot so I don’t think you will have any problem using a player state for AI.

rich ridge
#

Cool thanks brothers

chrome bay
#

You'll need to set AIController::bWantsPlayerState to true btw to get one

#

then the gameplay framework handles it like any regular player

rich ridge
#

Yeah I did that and I use AI specific player state , not default one which is for real players

chrome bay
#

rgr

rich ridge
#

virtual void InitPlayerState() override;

#

I override this function to set my own PS for AI powered characters/

#

The code is same from super function, I just changed the default PS class to my own

quick flint
#

how do we stop a variable from replicating?

empty axle
#

@rich ridge what you are doing is actually dangerous when changing used engine version

rich ridge
#

@empty axle as per my understanding it's not dangerous..
The engine uses the value set in our GameMode

#

Only for Ai powered character I want other player State

empty axle
#

@quick flint

void AActor::PreReplication( IRepChangedPropertyTracker & ChangedPropertyTracker )
{
    DOREPLIFETIME_ACTIVE_OVERRIDE( AActor, YourVar, bShouldReplicate);
}
rich ridge
#

@empty axle if it was really dangerous then why epic will make that function protected and virtual???

empty axle
#

I would say to allow override to do custom stuff after the player state is initialized.
I generally avoid overriding and not calling super as in this case if they change the inside of the method you will remain with the old version. That could lead to bugs that no one is experiencing except you

quick flint
#

@empty axle that variable tho

#

if its set to true on the server but not on the client

twin juniper
#

But I'm saying this as if this is a "server wants all the players to quit" sort of situation
@chrome bay Doesn't OnDestroySessionDelegate get called when the host disconnects?

rich ridge
#

@empty axle whatever code is written in that function is actually from Super function, I only changed the PlayerState class.

#

And it do spawns PS for minions and it works

empty axle
#

@quick flint you need to set it on server as it is the one that drives the replication

#

@rich ridge I am just saying that you could have problems happening to you after you change used engine version, because the implementation of InitPlayerState might change and you will remain with the one from the previous version.

rich ridge
#

I override this function on the MiniondPlayerController

#

My other PlayerController don't override it

#

I understood your point , I guess I need to keep on checking the super implementation in every release of engine.. I don't think there is more graceful way to do..😅

kindred widget
#

So. I don't have a project set up to test this for myself yet, but I've been wondering at what point in the start up that the PlayerState's PlayerID gets populated. And if the ID is consistent across sessions? So if A player logs in and I do stuff based on that ID that lets say gets populated to 23415, if they disconnect and come back in with say the same Steam account or same EpicGames account, does that number get set back to the very same 23415?

rich ridge
#

@kindred widget this is function where player state is created.. so I don't think playerid will cause issues for me overriding this function to pass my custom minion player state