#multiplayer

1 messages · Page 723 of 1

pallid mesa
#

but if you are looking at GAS optimizations, I recommend you taking a look at my article pinned in the #gameplay-ability-system channel

chrome bay
#

How likely is it you server is running at more than 100Hz anyway?

#

Isn't the default 100 for everything?

#

Rather than increase net update frequency, keep it where it is and just call ForceNetUpdate() when you change replicated properties

#

Increasing the base frequency is generally quite wasteful

pallid mesa
#

that's a really great advice, btw James, I wanted to ask you, because maybe you've dug into this

#

an Actor with a netupdatefrequency of 0 doesn't send properties when become relevant to it

#

do you agree with the current behaviour?

#

@chrome bay

chrome bay
#

Yeah sadly NetFreq of zero just seems to break all networking

#

Has to be at least 1

#

Everything other than pawns/vehicles in HLL is at 1.0 though

#

Since it's about as close as we can get to a true push model

pallid mesa
#

that's what I feared, but I was thinking that maybe this could be changed

#

as the only gotcha that seems to be concerning is connections becoming relevant

chrome bay
#

I think still the case in UE5 latest sadly

hybrid zodiac
#

Hi everyone, I have a small issue with owner only replication. I spawn an actor on the server and set the owner to the player controller on the server. However, attributes marked "COND_OwnerOnly" aren't replicated to the client (confirmed by switching it to unconditional replication and it works). Am I not setting the owner correctly? Does it need to be the player state perhaps?

pallid mesa
#

it is

#

actually when a new connection joins the game

#

actors send properties

#

even those with a net update of 0

#

so a later joiner will indeed force properties of actors to be sent to connections relevant between themselves

#

even if the incoming connection to the game is not relevant to said actor

chrome bay
#

Yeah, likely an annoying bug in the engine somewhere

pallid mesa
#

that's the word I wanted to hear, bug.

chrome bay
#

But, it's been around since at least UE4.0 - so a fix, I would not expect 😄

pallid mesa
#

been thinking about this for a while now, but i haven't calified it as a bug

#

thanks for the chit chat 😄

winged badger
#

you still obsessing over it @pallid mesa ?

pallid mesa
#

xD I want to fix it

winged badger
#

if you find yourself wanting to fix every unreal landmine that can just be navigated around

#

you'll never get anything actually done

ivory island
#

Should my controller be replicated?

winged badger
#

no

pallid mesa
#

i know how it goes usually

raw thunder
raw thunder
chrome bay
#

Ah good, makes sense

raw thunder
#

I would like to increase it to 30 I don't know

glossy plover
#

Is there a way to include local players in the Session Result -> Get Current Players? For example 2 clients in the game, but one of them has an additional local player (so there is 3 total, but get current players still shows 2)

fathom aspen
hybrid zodiac
# fathom aspen I tested it and it works. I doubt though that it has to do something with the `O...

Hey, I ended up replicating the value in a different (and better, actually) way, but there wasn't an issue with delay, it just never replicated the value for some reason even a few minutes into gameplay. The idea was that players control a unit, and can set a target for that unit. I had an AActor* replicated value for the target, but despite setting the value on the server, it was always null on the client. Strange

#

I just replicate the value in the player controller now, so no more problems

stable olive
#

Hey peeps,
Quick question (possibly a dumb one but lets see) in regards to multiplayer, do all players share the same game instance or does each player need its own game instance?

bitter oriole
#

It persists across levels and games

stable olive
#

I'm referring to the GameInstance BP class by the way. Should have specified.

fathom aspen
#

GameInstance exists on both server and clients though it's not synced. They share info through the server

stable olive
#

OK. Is it possible for 1 player to send data through a BP class to another player? Say player 1 was running around the map but player 2 only had a HUD on their screen which they could transmit commands / instructions through? I know UMG doesn't allow network replication but could that data not be sent to say a BP Class of some kind which is then responsible for sending that data to player 1?

bitter oriole
#

Players cannot talk together, but they can RPC their data through the server with the player controller as proxy

#

GameInstance does not have any net support, to be clear

#

Neither do/should widgets

fathom aspen
#

Correct HUD is client only and relevant to the owning client. You could listen for changes from other players through PlayerState for example as it's AlwaysRelevant

bitter oriole
#

By default PlayerController/PlayerState is the main spot where players can actually send data

#

Pawns too, when they're possessed, but impractical for non-pawn-related stuff.

stable olive
#

So long story short, which class would be best for the 2nd player with the HUD to send data to that player 1 can see?

fathom aspen
#

Depends where the data reside

bitter oriole
#

Or a purely PlayerState RPC - yours-, calling the other on the server

fathom aspen
#

But usually player specific data exist in PlayerState

stable olive
#

Cool. Thank you for the help. I appreciate it 🙂

quartz iris
#

How can I make it so one button either creates a server if there's no players online, or joins any server with players in it?

fathom aspen
twin juniper
#

is there any way to switch to single precision floats in ue5?

kindred widget
#

In regards to dropped packets. How do people usually deal with the rarer cases? I have two cases now.

One is a UObject being replicated, and a GameplayTag never getting replicated.

Another is a full actor never reaching the client. This happens rarely.

I can repro it locally in PIE with some seriously bad packetloss and lag. About 600 latency on server and client and +35% packet loss. And even then it takes me ~20-60 restarts to catch the same state.

I'm wondering if this is Unreal just giving up eventually after multiple dropped packets? If yes, are there settings somewhere related to making this code more persistent? Some actors seem immune to this. Literally updating after up to two minutes. Some just seem to give up entirely.

rose prawn
#

I'm confused by the naming of this variable: bAllowJoinViaPresence
If I want to make session invite only and do not let players join from friend list, do I need to make this false?

frosty oyster
#

I have been working on building an ability to host a server, which the widget gets created, i am unable to get the joining player to see the LAN server and join or even direct connect.

#

I am looking for anyone willing to sit out and chat with me about it... maybe see what i am missing

uncut schooner
#

Hi

#

Anyone know what to do about multiplayer character collisions

#

Lets say there is half a second of latency, and I run into someone on my client machine, it does some weird jittering because I am actually running into someone server client side but not server side

#

Then there is the issue of running in front of someone, and actually running into someone but locally I am not so it does corrections

#

I haven't noticed these issues in games I played

#

Like Overwatch for example

quasi tide
glossy kettle
#

😳 did you just ping THE Zlo?

glossy plover
#

Does anyone know how to "refresh" replicated data? When one client updates a replicated variable, it goes to the server, and then server sends out a multicast event to make sure all clients update their widgets. The problem is that if I don't add an attribrary delay to the multicast events, then other clients get the event call, but their variable has not been updated yet by the replication (so they run the event using the old data)

#

Even at delay of 0.2 clients sometimes have old data still. I'd like to force the client to update it's replicated data when it receives the event call....is it possible?

bitter oriole
#

Delays should never be used in multiplayer

#

You can either have a design where the widget pulls data on tick to constantly update, or use replication events

#

Both kinda best done in C++

glossy plover
#

I'd like to be able to do use RepNotify, but how I can get RepNotify to work for another clients PlayerState? (so when any client changes a certain replicated variable in their PlayerState all clients will do some function)

bitter oriole
#

can't

glossy plover
#

For example clients all have Name variable in their PlayerState, and then all clients have a widget showing the name of all the players. Each client will loop the Player Array in the GameState, then pull the "Name" from the PlayerState for each client. When any player updates their name variable, how can I update all clients, but only after they have received the new data?

bitter oriole
#

Well you can but it needs some kind of broadcast - when it changes, any player state should notify all widgets

#

The simplest design is simply to always update, on tick - preferably in C++

glossy plover
#

Won't looping all PlayerStates on tick be very poor performance wise?

dark edge
glossy plover
#

It does, but for only for each players own PlayerState; so a client gets the RepNotify if it's own replicated variables gets updated

#

But not if some other clients PlayerState variable gets updated

harsh wigeon
#

i have changed animation asset in my character, which is replicated to other players, who are in game.
but if someone is joining that game later, this change of animation is not set and original.
how would i do that ?

dark edge
#

Whatever is driving the choice of animation should be a replicated variable. Whether it's some state var, or a direct montage reference.

harsh wigeon
#

i made a component, that should switch between a sit mode animation for sitting and standing

dark edge
harsh wigeon
#

since here, i don't know what to replicate...
that component just switches:

void UCharacterAnimationComponent::SetAnimationMode(EAnimationMode::Type AnimationMode, USkeletalMeshComponent* MeshComponent)
{
    LOG(LogCharacterAnimation, "Set AnimNode Start")
    if (MeshComponent != nullptr)
    {
        MeshComponent->SetAnimationMode(AnimationMode);
        switch (AnimationMode)
        {
        case EAnimationMode::AnimationBlueprint:
            if (AnimInstance != nullptr)
            {
                LOG(LogCharacterAnimation, "Set Anim Blueprint")
                MeshComponent->AnimClass = AnimInstance;
                MeshComponent->SetRelativeLocation(AnimInstanceLocation);
            }
            else
            {
                LOG(LogCharacterAnimation, "AnimInstance was null")
            }
            break;
        case EAnimationMode::AnimationSingleNode:
            if (SitAnimation != nullptr)
            {
                LOG(LogCharacterAnimation, "Set Sit Animation")
                GetOwner()->SetActorRelativeLocation(FVector(0.f, 0.f, 92.f));
                MeshComponent->SetAnimation(SitAnimation);
                MeshComponent->SetRelativeLocation(SitLocation);
            }
            else
            {
                LOG(LogCharacterAnimation, "Sit Animation was null")

            }
            break;
        case EAnimationMode::AnimationCustomMode:
            break;
        default:
            break;
        }
    }
    else
    {
        LOG(LogCharacterAnimation, "MeshComponent was null")
    }
}
#

so they sit

dark edge
harsh wigeon
#

NetMulticast

dark edge
#

the late joiner wasn't around for the multicast

#

don't do that

#

set a replicated variable

#

If it's STATE, use a replicated variable.
If it's TRANSIENT, multicast

harsh wigeon
#

okay, i understand that, also the problem.

#

so i would set a variable in my component, which is replicated, like a bool bIsSitting, and then ?

#

don't get it bound to the animation - also in my head

#

ahh.

#

i try ! 😉

dark edge
# harsh wigeon so i would set a variable in my component, which is replicated, like a bool bIsS...

To create the equivalent to the blueprint variable replication  RepNotify in cpp declare the variable with this metadata specifier (In this example the called function is OnRep_PlayerMaterialUpdated): UPROPERTY(ReplicatedUsing = OnRep_PlayerMaterialUpdated) class UMaterial* PlayerMaterial; The function called must have UFUNCTION() specifier: UFU...

#

Just knowing they're sitting isn't enough.

#

The state might be AChairActor* ChairImSittingIn

#

null = not sitting

harsh wigeon
#

thank you. i try to change it.

glossy plover
#

I think I found my problem the Net Update Frequence on the PlayerState is really low by default (1 per second)

#

On a normal actor it's like 100 times per second. So i will increase this on levels that i need to have clients aware of other clients PlayerState

light iron
#

Is it even worth it to try to implement Dedicated and P2P together, each being used for their respective game modes? IE. Ranked played on Dedicated, Unranked/Casual using P2P. For clarification, our project uses the Gameplay Ability System.

spare saffron
#

Noob Q: Can I write my own multiplayer server to work with a UE game front end?

#

IE, can I do arbitrary networking in UE? What if it's a REST back end? What if it's a custom UDP protocol (I know that one has to be in a faq somewhere…)

hollow eagle
#

You could, but the engine isn't going to help you much.

#

You have the ability to use literally any C++ code you want so you can implement networking however you want - there are some utilities for making HTTP calls or using raw sockets too but again, the engine isn't really going to provide much beyond that.

spare saffron
#

If I use an external networking lib, does it get blueprints bindings?

harsh wigeon
#

why and how should they ?
obviously you could make your own access classes

spare saffron
#

I want to write a game in, hypothetically, UE5 and blueprints, and separately develop one or more libraries in kotlin/native or C#. I've spent the last decade on java/kotlin and the jvm, so I imagine I could handle C# but I'm uncertain how I might shoot myself in the foot with C++

latent heart
#

Well something should be obvious! Use UE5! 🙂

spare saffron
#

Is writing libs in C# something that people do? without undue anguish?

latent heart
#

I believe there's a clr plugin somewhere. How good it is is another question...

harsh wigeon
#

@dark edge thx, that worked out

dark edge
spare saffron
#

prob would block on synchronous tcp i/o (so they'd need to be off of the graphics thread)

glossy kettle
#

gpu accelerated packet switching confirmed

dapper summit
#

hey i am dying to know what the answer is for this i am making my project multiplayer and i spent 1 whole day figuring out why the client was micro stuttering and i tried everything but i noticed when my friend hosted she had 200fps and my game was lagging like mad i couldn't move but when i hosted it was fine i had 90fps but i tested it out and if i host and cap the host fps near to what the client gets it is very smooth

warped steppe
#

profile it with insights

dapper summit
dark edge
dapper summit
warped steppe
#

we still can't see what's actually happening

#

we can't ever just take your word for it with stuff like this, we need real information

dark edge
warped steppe
#

is it running in shipping? testing? PIE?

#

is it a listen server?

dapper summit
warped steppe
#

well, that's good because you can insights trace that

#

you could just stat uobject or something to quickly see a rough overview but real profiling is generally nicer

dapper summit
#

this right?

warped steppe
#

hold on, you need to set some extra command args first

#

but yeah, run that

#

so, you probably want something like this for starters

dapper summit
#

ok i started the trace

warped steppe
#

-statnamedevents -trace=cpu,object,net,frame,bookmark,timing,counters,animation,physics,stats,counters

#

fastest way to get there is through here

dapper summit
#

thanks man

warped steppe
#

woops, object not objects

#

fixed

#

I also may be a little off because this is latest ue5-main

#

but those are mostly unchanged...

#

if you want a complete list of what's on try calling
Trace.status in the console

dapper summit
#

ok command is set

warped steppe
#

now try running in standalone and check the trace afterwards

#

keep in mind this trace file could get huge!

#

remember to launch Insights before running the standalone game

dapper summit
#

yeah i did try change it's location but for some reason there is not button in the open file dialog to set the file

warped steppe
#

yeah, afaik it's a commandline argument for the insights exe?

#

I think it's in the insights docs

dapper summit
#

shouldn't it of made a file?

twin juniper
#

Greetings, I hear that we must code Multiplayer first. But from what I've read so far of the Unreal Docs it seems like we are coding Multiplayer as we actually add gameplay features. How far am I supposed to go with Multiplayer when I haven't coded any of the game yet?

#

If I have no actors yet, why would I begin replicating?

#

We want to start with terrain generation btw, in our game.

#

But I was told to do multiplayer first, so I would make sure that the terrain is multiplayer compatible right? Coding multiplayer as I go, not before any features have even been added.

#

Thank you for reading.

warped steppe
dark edge
warped steppe
#

it's good you are thinking about this now rather than later

twin juniper
#

Ok so I don't have to 'code multiplayer' if I have no game yet. I add a feature, make it multiplayer compatible then add another and so forth?

warped steppe
#

It's more about thinking about what should be on the server, what should be on THIS client etc

#

and trying to overhaul a singleplayer game to suddenly deliniate between those things out of the blue is hard

#

so yeah, you can add stuff as you go

twin juniper
#

Yeah, that is what the docs mentioned. The hard part would be making a whole singleplayer game and then combing back over.

#

But I can only picture this as 'Make a feature --> make sure it is multiplayer compatible ---> repeat for next feature"

#

Rather than some ambiguous premptive 'make the non-game multiplayer'

#

So I will make the terrain generation, then try to make that work in multiplayer with some actors controlled by players.

#

then rinse and repeat for next feature.

#

If that sounds good, then I thank you for the responses. It clarified much. If my approach is wrong then please I implore that you let me know.

warped steppe
#

yeah, kind of hard to draw the line between what is multiplayer exclusive and what is the feature itself

#

your method should work out fine?

#

try to test with multiple clients early and often to make sure nothing gets left behind

#

but if it makes life easier there's no shame in keeping it server only for a bit (just to make the logic simple to hash out I guess?)

#

that's my rough view on it

dark edge
warped steppe
#

I think he's on the right path there

dark edge
#

Don't wait until it's 80% done then go "Hmm let's start networking this thing"

twin juniper
#

Yeah, I understand that. But I can finish a small portion , like terrain gen and then make sure that piece is multiplayer. Then repeat for the next feature. Is what I am gathering from what you're both saying.

#

Just don't want to mess up.

warped steppe
#

I would like to add you should think about the scale of the game player-wise day 1 too

#

if you want 20 players running around, test with 20 instances when you can

twin juniper
#

I think I'll do that after we get terrain gen working. Thank you for all of the responses.

dark edge
twin juniper
#

It’s not an infinite world. Finite voxel world. But I’m sure it’ll still keep my busy.

pearl fog
#

Hey! I'm currently profiling using Unreal Insights our netcode since we have some issues: when a new round begins we recreate all actors (might not be the most optimal way, we can recycle them), on insights it show a peak of 4800 bits which IMO sounds okay for that, but ingame we have reports of players having replication issues (like theirs weapons appearing seconds later, because it is not replicated) and well I don't know if it justs come from this respawn or not..

light iron
#

Several seconds later? Do you know the max time length?

cerulean parcel
#

hi guys , which is the best tutorial for learning multilpayer via coding in unreal ?

kindred widget
twin juniper
#

hello i have a quick question about replication in ue4, as i understand it Uobjects dont replicate. so i wanted to follow a tutorial on how you can get replication to work for Uobjects but i couldn't get it to work so as a work around i wanted to replicate structures with the variables that need to be replicated but structures BP also dont seem to replicate, anyone a idea of what i do wrong?

#

Here I set the structures variables on the server side

#

but on the client side the structure is empty. is this because only structures made with c++ that have the UPROPERTY() replicate?

#

the inventory component is set to replicate as wel as the player and playerController

pearl fog
#

we don't understand what's going on really haha, the only way i've redone it locally is with 500 replicated actors replicating a dumb float each tick ^^

#

we also rechecked 3x our ini settings, nothing worked out...

chrome bay
#

Structs absolutely do replicate

winged badger
#

for replicating UObjects that are not Actors or ActorComponents you do need a bit of c++

#

you need to override and tell the ReplicateSubobjects() function in their Outer to actually replicate them

#

and the objects themselves need to return true from IsSupportedForNetworking()

#

you also need to setup something that will keep those UObjects alive, simplest most bare bones version being a UPROPERTY(Replicated) TArray<UMyObject*> MyReplicatedObjects;

#

as those objects will otherwise get destroyed on client because nothing is referencing them

#
bool ASolsticeGameState::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags)
{
    bool bWroteSomething = false;
    for (UBotStatus* BotStatus : TeamBots)
    {
        if (BotStatus)
        {
            bWroteSomething |= Channel->ReplicateSubobject(BotStatus, *Bunch, *RepFlags);
        }
    }
    for (UBotStatus* BotStatus : OtherBots)
    {
        if (BotStatus)
        {
            bWroteSomething |= Channel->ReplicateSubobject(BotStatus, *Bunch, *RepFlags);            
        }
    }
    bWroteSomething |= Super::ReplicateSubobjects(Channel, Bunch, RepFlags);

    return bWroteSomething;
}```
#

this is an example of a ReplicateSubobjects override i recommend you use, with Super at the end

#

because that makes the subobjects (in this case from 2 arrays of UBotStatus) replicate before the arrays that hold the pointers to them

#

which means when OnRep_TeamBots fires, all the pointers in it are already pointing to objects that have already replicated

twin juniper
winged badger
#

i think @chrome bay made a blog about them?

twin juniper
#

And one more thing as I understand it struts are also Uobjects?

winged badger
#

they are not

#

the memory for structs is allocated inside the owning class, not separately on the heap

twin juniper
#

A oke

winged badger
#

and you generally don't declare pointers to structs as members

#

while all UObject members are pointers

twin juniper
#

So in this case the struct is a part of the invertory component witch is a actor component so it is setup for replication

winged badger
#

if you Actor is replicated, your ActorComponent is replicated and the struct is replicated

#

it will replicate

#

miss any one of those 3, and it won't

twin juniper
#

And to replicate the struct you need to tell it in c++

winged badger
#

blueprints can replicate structs

#

but they are terrible at manipulating them

twin juniper
#

Or just set the the struct variable to replicated?

winged badger
#

but its... awkward

twin juniper
#

A thanks for al the help

#

Then I just need to figure out why it’s not replicating

#

Because I definitely checked al the replication boxes

winged badger
#

if you try to replicate a pointer to a non replicated object

#

that won't work

#

no matter your setup

twin juniper
#

I think that is the issue that one of the variables in the struct is net setup for replication

lethal kraken
#

Anyone know or can recommend a lag time for simulated lag? i am using Net PktLag=100 but i have seen people use from 75 - 500, what is a realistic number ?

uncut schooner
#

Hi
Anyone know what to do about multiplayer character collisions
Lets say there is half a second of latency, and I run into someone on my client machine, it does some weird jittering because I am actually running into someone server client side but not server side
Then there is the issue of running in front of someone, and actually running into someone but locally I am not so it does corrections
I haven't noticed these issues in games I played
Like Overwatch for example

uncut schooner
#

500 should be good for those bad cases

lethal kraken
#

alright, and around 75 - 100 at default testing ? Does anything work at 500 for you ? or is it see what breaks

keen widget
#

what is a easy way to implement voice chat?

#

i was following a tutorial and it doesnt work

uncut schooner
#

Everything works at 500

#

Its just delayed messages

#

I use client side prediction for everything

uncut schooner
#

Really?

#

Isn't it 200 ping

bitter oriole
#

Should be 400 since it's incoming + outgoing lag

#

x2

uncut schooner
#

x2 so 200

bitter oriole
#

(100 + 100) * 2

uncut schooner
#

Yes

#

Thats 200

#

xD

bitter oriole
#

100 + 100 = 200

lethal kraken
#

it is not

#

its 400

bitter oriole
#

200 * 2 = 400

uncut schooner
#

Why do you add 100

bitter oriole
#

(incoming lag + outgoing lag) * 2

#

(100 + 100) * 2

#

= 400

uncut schooner
#

Ah ok

#

But thats weird

bitter oriole
#

In any case, measure your actual ping to confirm since you also add the server frame time

#

So it depends on framerate, etc

uncut schooner
#

In that case 100 should be good

#

But You can test with 150 - 200 to make sure

lethal kraken
#

yea i guess, impressive yours works at 2000 ping

uncut schooner
#

When set, will cause calls to FlushNet to delay packets. Value is treated as millisecond lag.

#

This is Packet lag

uncut schooner
#

@bitter oriole where did you find the info that it * 4?

lethal kraken
#

yea a source would be valued ;D

bitter oriole
#

Set PktLag to 100, measure ping

#

See what you get

#

If it's 220 or so, guess I was wrong

uncut schooner
#

I can't check now. Ill check later

lethal kraken
#

ill try to check aswell, but ill have to figure out how first ;D

uncut schooner
#

You can do a server rpc sending the time seconds up to the server then on that function do a client rpc sending it back

#

Then on the client rpc you can take the time seconds and minus the one sent back to you

#

And print that

#

That will be in seconds

lethal kraken
#

Thanks i will try

uncut schooner
#

Then you can times it by 1000 to get miliseconds iirc

bitter oriole
#

Or you can just get the ping from player state

uncut schooner
#

Yeah that's true

#

lol

lethal kraken
#

PktLag=100 results in a ping at around 50 - 55 for me. at 0 i get 1-3 ping. Maybe i did something wrong. I am using default listen server setup

bitter oriole
winged badger
#

pie lag simulation only applies on one side

#

need to enter it in both server and client console to have a proper 2 way lag simulation

lethal kraken
#

"Need to enter it in both server and client console". Enter what ? i have edited the default.engine.ini file with PktLag=100 do i need it somewhere else ?

winged badger
#

think that only applies to the server

#

but you can change it in runtime with console commands

bitter oriole
#

Just put it ind efaultengine.ini and it'll work

lethal kraken
#

ah, so i need a real dedicated setup to be able to test the 2 ways. ?

winged badger
#

no

lethal kraken
#

or the runtime console commands

#

ofc

#

;D

main bane
#

hello, where would you recommend to publish a mutiplayer game (don't want to own my own server)?
are the main options epic online services and steam?

lethal kraken
#

Alright, at PktLag=100 i now get 200 - 230 ping. I have run PktLag=100 command at clients aswell. but the ping is still 200- 230. Should the result be 400 or do i just x2 to represent 2 way comminucation.

bitter oriole
#

You should always trust the ping since it's a real measure

#

230 is already worse than 99% of clients will experience normally so you can work with that for a baseline

lethal kraken
# bitter oriole If you get 230 ping that means PktLag only applies to ongoing packets, while I t...

Setting PktLag=100 in defaultEngine.ini and in a player character with console command both result in 200 ping + they dont seem to add if used together. If PktLag=100 is called from a widget the ping is 100. So i think it gets applied twice. My reason is A character exist on both server and client, where a widget only exist on the client and the command is only applied once. Anyways thanks again for helping me. ;D

bitter oriole
#

Measuring is always good

lethal kraken
#

its the only way to know, for sure ;D

chrome bay
#

The actor spawned likely isn't replicated

dark edge
final oriole
winged badger
#

it doesn't let you replicate pointers, it lets you replicate objects

#

and my statement still stands

#

as i never said you can't replicate objects

final oriole
#

Doreplifetime, subobjects/pointers are replicated through that function

#

Replicatesubobjects checks if the object the pointer is referencing has changed and if it did it updates it

chrome bay
#

ReplicateSubObjects doesn't replicate pointers, but it might be used to replicate the thing those pointers are referencing. There's a difference between replicating the object itself, vs replicated a pointer to it.

#

ReplicateSubObjects does the former

twin juniper
#

Can anyone help me understand replication? I'm looking at the pdf and all that

#

I have a function in the gamemode that if the playerstate has authority (is the server) then his own pawn mesh material gets changed to another color

#

And it does work (I see the material change from the listen server perspective) but on the client side the material didn't change

twin juniper
#

Like, all I want is to address the pawn owned by the server and ONLY that pawn, I don't want anything else

#

If another client/player is sharing the code but is not the server I want it to completely ignore it

#

but switch (has authority) just executes that code on all clients

fathom aspen
# twin juniper Like, all I want is to address the pawn owned by the server and ONLY that pawn, ...

Ok let's correct some concepts here. First things first, pawn isn't owned by the server as it's owned by the controller which is owned by the NetConnection i.e, the client.
What you should say, the pawn on the server, or the server-side pawn, as the pawn exists on both server and client.

Now moving on to SwitchHasAuthority, this macro doesn't always mean do this if server, do that if client. A client only actor will always has authority over the things he spawns for example.

What is likely happening in your case the way you described it, is that you are changing the color property (that what you ought to be doing, idk what you're doing exactly) on server but you're not replicating the property, so it's not reflected on clients.

twin juniper
#

thanks for answering, I feel like I'm still stuck behind one fundamental question

#

My setup is as follows - 2 players, one as listen server, one as client

#

is there ANY way to distinguish between the two? I want to run some code if and ONLY if the pawn's client is the server

#

because if you use listenserver the server itself gets a playerstate/playercontroller and all that jazz

#

but instead every single time I tried multiple things everything I do get executed four times, sometimes even twice for every client I have

#

like if I just do a switch has authority on the gamemode and if it has authority print "Hello" I get the server saying Hello twice and the client saying hello twice, even though there's only two clients

fathom aspen
fathom aspen
twin juniper
#

I do get client prints though, two of them for some reason

#

Want me to make a quick video?

fathom aspen
#

Yes I don't mind

twin juniper
#

Nevermind I think I figured out what I wanted to show you

#

But still, I'm assuming that ListenServer is used for p2p multiplayer applications right?

fathom aspen
#

You prolly meant something else, but what you described to me just doesn't exist. A print string of "Hello" should be seen twice, one time for each connection, as the GameMode exists only on server and each connection has a GameMode server-side.

Answering your second question, p2p doesn't exist in unreal but yes I get what you mean. It's for games that need to ability to host a session.

twin juniper
#

If I do a switch has authority on the gamemode bp and ask it to print "Hello" only if it has authority I get the expected result (Server:Hello) both on client and server view

fathom aspen
#

Yes that's what you should be getting. "Client view" is a player/connection and he has the GameMode on his machine server-side

#

Also try to remove the SwitchHasAuthority and you still get the same result

#

Because as I said, the GameMode exists only on server, so why you need to switch shrug

twin juniper
#

Were I to do this on the pawn class instead (the pawn that both the server and client are using, an instance of it obviously) what should be the expected result?

#

Server:Hello and Client:Hello or just Server:Hello?

fathom aspen
#

Without a SwitchHasAuthority you get both, Server: and Client:, With, you get only Server:

twin juniper
#

But why do I get it twice?

fathom aspen
#

Because you have two machines/connections running

twin juniper
#

Ok we're getting to the issue

#

if I used Switch Has Authority why does the server run it twice? I'm expecting it to fire once since only one of them is the server

#

In other words, how do I make it so that it fires only once?

fathom aspen
#

Don't get misled by the names here. One of them is listen server and other is client right, but that doesn't mean that the client player(player 2) doesn't have a server side pawn

#

Otherwise how can he talk to the server?

twin juniper
#

You mean the replicated pawn of the server?

#

So the two prints are one from the server itself and one from that pawn?

#

I changed the condition from "authority" to "remote" and now the client is printing it... twice?

fathom aspen
fathom aspen
#

What's so hard about that?

#

And pawn exists on both server and client

twin juniper
#

What's hard is figuring out why they both seem to have authority

#

Like, let's reverse the question

fathom aspen
#

Now GameMode prints once on each machine, because there is one GameMode on each machine

twin juniper
#

How would you go about having this string print ONCE, in this scenario?

fathom aspen
#

I would check if the NetMode is ListenServer

twin juniper
#

It is

fathom aspen
#

I'm not sure if that's viable in BP

#

There's a BP node called IsServer, but I'm not sure what that checks

fathom aspen
twin juniper
#

It's baffling how convoluted this is for such a simple task

#

And no, I assure you that for a beginner this is convoluted af

#

I work as a senior engineer in an ISP and deal with complex network on a daily basis, but this stuff is worse than that

fathom aspen
#

It is, I know. Just take the time and reread my messages with a cup of coffee and you'll see how all this make sense

main bane
twin juniper
#

@fathom aspen I think I'm slowly getting it, the "two pawns" thing

#

Although one question remains, from the server perspective since he is the one checking collisions etc. how would you go about having it so that only his own controlled pawn is allowed to collide with something else for example?

light iron
#

So if you add another client, does it print three times?

dark edge
twin juniper
#

If he has to ask perhaps he doesn't know yet?

fathom aspen
#

That's at runtime ofc, you can do that in Class Defaults too(though that will do it for all)

twin juniper
#

Nah I found a "simpler" way, and finally what I was looking for

#

On the server side (has authority set to true) I check if the player colliding with that box has the same player state name as the server player state name (which I obtain from the gamestate class)

#

If it is true it means it is actually the server colliding with the box and therefore it runs the rpc and replicates the variables I need, if it's any other pawn/actor/whatever it doesn't do anything

fathom aspen
#

Cool. Why do you run an RPC though if you're already on server?

twin juniper
#

rpc is probably not the right name

#

the variable "server name" is actually stored in the game state class (a custom one), in the actual box that checks the collision I cast the game state class and I retrieve that variable

#

I assume I don't need to replicate it because the gamestate exists both on client and server?

fathom aspen
#

I'm not sure why you need that layer of GameState to have a ServerName. The PS Name is enough.
GameState exists on both right, but that doesn't make the variables replicated to clients by default. You need to do so if you need the clients to be aware of them, but in your case you're doing that server side, so it doesn't matter

twin juniper
#

At first I was getting the server display name, but now I just compare the playerstate names like you said
Yes I'm doing it in the server because it is the server that ultimately does all collisions and then replicates the result, why would I do it client side?

#

If I get that correctly, the server just receives the input from the client and does it's own checks and replicates the result

fathom aspen
#

Where did I say you need to do it client side?

twin juniper
#

I didn't say you said it, I was wondering why would you even think about doing it client side

#

Since everything happens on the server anyways

fathom aspen
#

I can't think of anything other than optimization

twin juniper
#

optmization?

fathom aspen
#

Yep. Doing everything server side isn't something you would want to do always

#

Why most games do client side prediction?

twin juniper
#

I assume it depends on the scale of the game, and also the number of events happening, and what they are

fathom aspen
#

Otherwise your server would drain out

twin juniper
#

On that note, is there any security risks in doing this sort of "who's the server check" by getting the server player state from the game state class?

fathom aspen
#

Handling everything on server can be really stressful for the server even for a low amount of players

#

That's why the CMC already does that for you

#

Just by looking at how big it's you'll understand

twin juniper
#

what's cmc?

fathom aspen
#

CharacterMovementComponent

twin juniper
#

also I have one last question - going back to the listen server thing, right now my configuration is similar to an old call of duty game for example, where one of the players in the server was also the host, correct?

#

And something else, like fortnite, actually has a "headless" dedicated server that only does calculations and doesn't actually render a world or playerstate for itself, right?

fathom aspen
twin juniper
#

(random game examples btw)

#

@fathom aspen how would you do it then? you got to have a reference to itself (the server)

fathom aspen
#

Cuz I think you want the latter and you think that's done by the former

twin juniper
#

The collision checks are (by default) done on the server, so in order for me to have it so that only the pawn controlled by the listen server client gets the privilege of triggering that collision I just check on the collision event if the other actor is in fact the server's pawn

#

How do I check that? I get the server's player state from the game state class and I compare it to whatever pawn's player state has collided with my actor

#

If they match - server was the one colliding - execute code
if not, ignore it and move on

fathom aspen
twin juniper
#

yep

#

the server / listen server player / host / authority guy

#

the big boss 😛

#

and above I explained how I did it

fathom aspen
#

Yes, you want some sort of info when the player hosts the game to tell that this dude(the host player) is really the host. You can have a bool property in the PlayerState though(GameState doesn't need to be involved at all) that tells that this is the host player.

#

In cpp it can be done using the NetMode, but that's not exposed to BP I guess

twin juniper
#

Gamestate holds a replicated array of all playerstates anyways, so what's the difference?

fathom aspen
#

That's correct, it has info about all players(or more specifically the state of the game as the name suggests), not specific ones

#

PlayerState holds info about specific players

twin juniper
#

I swear I have seen once an event that is called whenever a player logs in

#

I can't find it anymore

#

It was in blueprints, something like event OnPostLogin or something

#

Oh it's the player controller nvm

fathom aspen
#

😛

quasi tide
twin juniper
#

hmmm, I could do some tomfoolery with that

fathom aspen
#

That what fooled me there hmmm

twin juniper
#

onpostlogin, check if playerstate has authority - if so save it as the server name 😛

quasi tide
twin juniper
#

but gamemode is server side only so it makes no sense

fathom aspen
fathom aspen
#

I can't think of workarounds for BP at the top off my head

twin juniper
#

I'm trying to set that variable from the gamestate

#

Reason being I have a feeling that if it is the gamestate telling everyone who the server name is it might be less exploitable

#

Than the individual pawn / player state calculating it itself

fathom aspen
#

Ok cool. How do you set the server name though for the host?

#

OnPostLogin? Same reasoning as before

twin juniper
#

What do you mean?

fathom aspen
#

I mean how would you specify what player you assign the sever name to?

#

You have the server name defined in GameState

twin juniper
#

not in the game state

fathom aspen
#

But how you assign the host's PlayerState the server name?

twin juniper
#

the playerstate casts the gamestate and gets the variable

fathom aspen
#

the playerstate casts the gamestate
That's error 404

#

You can't cast a PS to GS

twin juniper
#

Well in reality it's actually the pawn that casts the gamestate

#

and retrieves the server name variable

fathom aspen
#

You meant to say get(and not cast) the GameState

#

But anyways I still don't understand how you specify the server name for the host

twin juniper
#

If you have a custom gamestate (child of GameState or GameStateBase) you need to cast it as your own type otherwise you wouldn't find the variable

fathom aspen
#

Correct. That's casting. You cast things of the same type, i.e have inheritance relation

#

You can't cast a PS to GS. I know that 's not what you meant, but that can be understood that way

twin juniper
#

Technically they're all uobjects though 😛

#

Also nope, since the gamemode is only ran on the server if I use onpostlogin it returns true for both pawns

#

(has authority)

#

since it's the pawn instances on the server client

fathom aspen
#

Correct

#

Ok what you can do actually to differentiate the host player from the other player, is OnPostLogin, check PlayerArray.Num if equals to 1, if yes, then that's the host, and through the PC you get the PS and specify through a property that it's the host.

#

Though that won't work in PIE, as they load at the same time

#

I guess

twin juniper
#

no they don't

fathom aspen
#

Well it can work, I'm not sure

twin juniper
#

there's a delay

fathom aspen
#

TEST

#

But it 100% works in a true host server model

twin juniper
#

I know that the first index in the playerarray is always the server/host since he connects first but I can't help but feel that just doing that is

fathom aspen
twin juniper
#

yeah, smells unreliable from a mile away

fathom aspen
#

Yep yep

twin juniper
#

@fathom aspen some c++ nerd gave me the answer lol
In the gamemode since it's server-side only use OnPostLogin and find the local player controller, which has to be the server pc

#

Works like a charm

#

Now good luck impersonating the server bozo

sinful tree
#

IsServer, IsLocallyControlled.

twin juniper
#

well there's multiple ways

#

long story short is that you want the local pc and code has to execute on the server

fathom aspen
#

That doesn't say you're the host player though

#

It says you're the server side controller

twin juniper
#

it is a reference to the server though, and that's all I need for my checks

fathom aspen
#

Haha

#

I swear you said you want the host player

twin juniper
#

isn't host player == server in LIstenServer?

fathom aspen
hollow eagle
#

Yes it is...?

#

A local player controller on the server by definition is the player hosting the game, splitscreen stuff notwithstanding.

warped steppe
#

semantic argument time

hollow eagle
#

Yeah, this is just semantics.

twin juniper
#

I mean if you're in the game mode class and you have something that returns true on local pc, it has to be the server client

fathom aspen
twin juniper
#

you can't check for authority on gamemode because every pawn would return true

fathom aspen
#

I was asking what player he wants to check collision for and he said the host player

twin juniper
#

I've been telling you for two hours that I'm using a listenserver configuration

hollow eagle
#

which is always going to be a locally controlled pawn on the (listen) server

fathom aspen
#

That's totally different than saying no matter what player that is, I want to do that on server

fathom aspen
hollow eagle
#

That doesn't matter...

#

It will get whatever players are locally controlled

#

which is what they asked for

fathom aspen
#

It does, if what he's asking for is ONLY the host

hollow eagle
#

Which player is "hosting" a game in a splitscreen configuration is up to the game to decide, there is no inherent host player in that config.

#

You could say they both are.

twin juniper
#

all I wanted to know is which playerstate/pc is actually the server's in a listen server configuration, from the gamemode

hollow eagle
#

If this isn't a splitscreen config then by definition the only local player on a listen server is the host.

twin juniper
#

so that I can pass along that information downstream without clients calculating it themselves and risking exploits

#

unnecessary? yes. but whatever

hollow eagle
#

Right, so IsLocallyControlled gives you that.

fathom aspen
hollow eagle
#

Even if we are, whether it matters or not depends on the game.

#

There is no inherent host player in splitscreen - it could be every local player, it could be a specific one as decided by the game itself. "Host" doesn't mean anything by itself.

twin juniper
#

Is it wrong to assume that the very first pawn that the gamemode spawns has to belong to the listenserver client?

hollow eagle
#

It should but I've always disliked that assumption.

twin juniper
#

I can see why

warped steppe
#

honestly the player 0 thing is such a weird aspect of the gameplay API

#

people get fooled by it all the time

hollow eagle
#

I don't think it's an intentional part of the API at all - it's just how things work out because of how the underlying system works.

#

But it's never been guaranteed to be the case.

#

Which is why I don't like relying on it.

warped steppe
#

I would argue it should at least strongly indicate it means local client players and not the like, players in the server

twin juniper
#

Would you say that declaring a variable with the server client info on the gamemode and passing it along downstream to the gamestate/playerstate etc. is safer than having each client retrieve it locally by themselves siliex?

hollow eagle
#

I'm not sure I understand the context enough to give an answer.

twin juniper
#

In broader terms, I'm passing along some info to the clients from the server directly rather than have them retrieve it by their own means

#

The idea is that the clients cannot inject it or they'd have a harder time if the info is validated and comes from the authority (server)

fathom aspen
quasi tide
#

Doing the check ON the server tells you if it is the host or not.

hollow eagle
twin juniper
#

What about dedicated servers?

hollow eagle
#

It will always return false.

#

There are no local players on a dedicated server.

twin juniper
#

I'm assuming that a dedicated server can only be coded in c++, right?

#

If you don't own an actor or pc you can't address it directly, without working inside the gamemode/gamestate

fathom aspen
hollow eagle
#

Dedicated servers operate no differently from listen servers, they just don't have a local player (and have rendering + possibly other features disabled)

twin juniper
#

right but does that mean that the server assigns one client authority?

quasi tide
#

The server is the authority

twin juniper
#

or rather, from bp only I can only talk to the server (if dedicated) via gamemode and all other server/client shared classes right?

quasi tide
#

The server will be the only thing that has the gamemode

twin juniper
#

I can't do custom logic on a pawn if it is controlled by a server or not because there's no controller right?

#

yes I know

twin juniper
#

if it's not a listen server then the server has no rendering and no pc of its own, correct?

#

if so, I can't go inside a pawn class and specify some logic if that pawn is being controlled by the server client because a dedicated server has no player controller of its own and no rendering / whatever so it just acts as a headless server doesn't it?

quasi tide
#

You can. Because a server will still have AI controllers.

hollow eagle
#

The server always has authority. It has nothing to do with whether it has local controllers or not.

twin juniper
#

But a dedicated server can't just have a player state and player controller and possess some pawn can't it?

#

because it's headless I assume

hollow eagle
#

But why would that matter

#

How do you think other instances of the game work? It's no different between listen and dedicated servers from the perspective of remote clients.

#

Clients can do literally whatever they want with anything in the game. But the server decides whether to accept what the client wants to do, and whether to broadcast that information to everyone else.

#

Nothing about this depends on the server having a player controller.

#

That's just another player that happens to already be on the server and doesn't need to send an RPC to communicate with it.

twin juniper
#

so the difference between listenserver and dedicated server is that the latter doesn't have visual rendering?

#

because a listenserver even though it is a server and has authority is technically still a client it seems

hollow eagle
#

it's not a client

#

it's a server

#

this is why you have authority checks and RPC "things you want to do" to the server when you're not authority.

twin juniper
#

a server that you can play with? on paper it sounds a lot client-like
it does remind me of like cod4/mw2 host player, but I'm not sure if that is correct

hollow eagle
#
void DoThing()
{
  if (!HasAuthority())
  {
    ServerDoThing();
  }

  // do something
}

void ServerDoThing()
{
  DoThing();
}
#

conceptually

#

writing code like this means you shouldn't care whether something is a listen server or a dedicated server

#

if you're a client you'll send an RPC so the server does the same thing you're about to do

#

if you're already on the server then you just do the thing and don't have to worry about sending it anywhere

twin juniper
#

could be any pawn?

quasi tide
#

Anywhere

hollow eagle
#

if the client player wants to do something on an actor it owns (such as a pawn), it calls DoThing()

#

if that player is a client, then it also tells the server that it wants to do something

#

if that player is on a listen server then it's already on the server and it just does that thing.

twin juniper
#

I've seen some c++ examples, you have to use macros though to tell that DoThing() is a server function right?

hollow eagle
#

in this case only ServerDoThing() would be a server RPC

#

it doesn't matter if the player is a client or on a listen server, it would call DoThing(). Which calls ServerDoThing() if necessary.

fathom aspen
twin juniper
#

ok thanks siliex so bottom line listenserver is technically peer to peer and dedicated servers is a separate entity from the actual players right?

hollow eagle
#

it's not peer to peer

#

peer to peer would be every client communicating with every other client

#

listen servers and dedicated servers are the same thing - single host, everyone connects to it. The only difference from a networking perspective is that someone is actively playing on the server instance itself with a listen server.

twin juniper
#

ok that makes sense

hollow eagle
#

from a non-networking perspective: dedicated servers also disable a number of engine features but that's simply to lower the requirements necessary to run a server (and to improve performance). It's not relevant to how you write the game, except insofar as you want to turn some stuff off on the server because it doesn't affect gameplay.

twin juniper
#

dedicated server feels infinitely less confusing than listenserver though

#

because a listenserver is also a player in itself, feels like a weird hybrid

hollow eagle
#

they should be exactly as confusing as each other

#

writing code in the way I posted above already handles both cases

twin juniper
#

thank you for all the help

#

I have on last question
how do you actually "fire up" a dedicated server outside of the editor? Like on a local server or something

hollow eagle
#

Ideally you have a separate dedicated server build, but that requires a source build.

twin juniper
#

I know in the editor I can set it to netmode "Client" and it runs one in the background, but how do I actually host it somewhere maybe aws or my own hosting or something

hollow eagle
#

You can use a normal build of the game as a dedicated server though

#

-server on the command line

warped steppe
#

would that break if you have macros for dedicated server only stuff?

hollow eagle
#

Yeah, but it's incredibly rare to use those

#

most of the time you'd want to use the with_server_code macro or w/e its called

#

because that covers everything that can possibly run a server

#

listen, dedicated, game-running-as-dedicated

dark edge
#

That's how we test, got a laptop synced up through our version control and just get latest -> run bat file -> off to the races

#

You can do it on a linux server too but since you don't have the launcher version of the engine it's a bit more involved. But you can just fire it up just like launching the game, and don't have to do any building or cooking for quick testing.

#

If you're serious about doing a dedicated server project you'd want to have a dedicated linux box you can use for testing.

twin juniper
#

interesting, thanks

#

I have a big question though now - I just created a random actor with a sphere mesh that I just expand its size with a timer every 0.1 seconds - works flawlessly and both clients see and react to it

#

but... if I check the actor properties it is not replicated? the only thing enables is "net load on client"

#

so why does it work?

dark edge
#

You've got 2 actors on 2 machines both in sync because they began play at about the same time.

twin juniper
#

so they're not synced but they seem like it because they're running the same code?

dark edge
twin juniper
#

holy F***

dark edge
#

Try make the timer delay random and see what happens

twin juniper
#

you're right

#

I just did

#

I need some coffee

#

okay I've tweaked stuff around and it syncs now @dark edge

#

one last question: I've set the actor to replicate but not its components, it still works though is that normal?

#

like the component I'm increasing in size syncs and also the text syncs using a repnotify but those component are not set to replicate, the actor that owns them does

#

and it works?

karmic shuttle
#

does anyone know how i would pass player data to a widget in the world clientside? ive been pretty stuck for days lol

#

player controller/proxy:

#

game logic:

#

where the player proxy event is being called in the widget

dark edge
#

You would need to replicate the actual components if you wanted their properties to be replicated, but you're driving their properties (the scale) by a replicated variable instead.

twin juniper
#

So the component is not getting replicated, but the variable the actor owns is and repnotify does all the magic? @dark edge

#

So if I change something about those components and the repnotify is not aware of it then it won't replicate I assume?

compact talon
#

My game is progressing well but there is a big problem with players having high ping (cross region).

I want to make my game feel better for people with high ping, and currently it is borderline unplayable.

What is it called when you do stuff to make your game feel less bad for people with high ping? I assume there are some guides for this but I am not sure what to look for

dark edge
#

How responsive does it have to be?

#

And how high of a ping are we talking?

compact talon
#

Not sure what games you are aware of but like the level of Fall Guys, Crab Game, Gangbeasts etc. Funny party games basically.

#

and primarily UK to NA ping so between 120-160

dark edge
#

So complicated movement and probably fairly responsive. It's gonna be hard.

compact talon
#

The movement isn't too bad, but its stuff like moving platforms. I figure I could make moving platforms purely client side so it will feel perfect to play on, although there will be some desync (players floating on others screens etc)

dark edge
#

Latency compensation with movement is an entire subject unto itself, hard as hell.

twin juniper
#

Am I wrong to assume that if you set the inital position of the platforms server side and then have clients move them independently you get a smoother experience?

#

Kinda like fake replication, what happened to me before with my non-replicated component lol

dark edge
twin juniper
#

If you have them start at the same time and their pattern is predictable then.. forever? Clueless

#

I assume you can do some fancy math to compensate for ping and start time

dark edge
#

Sure, but ping varies over time, and you need to figure out what plays nice with your movement system.

compact talon
# dark edge Latency compensation with movement is an entire subject unto itself, hard as hel...

Yeah that's fair. I am just using default UE movement component which is good enough for ping. Isn't perfect but its suitable for my use case.

I am mostly talking about stuff like traps/moving platforms. Like I have a pillar that spins to knock players over and I am unsure the proper way to make this feel good. I guess I would make it fully client side, including hitbox, and just have it start spinning at the same time on all clients

#

but there are times where it needs to be somewhat synced up. I cannot let it be purely client side because it would mess up gameplay

dark edge
twin juniper
#

Also I can't think of a single game that has decent intercontinental ping (say us to europe or us to asia)

#

Not even overwatch or lol

compact talon
#

I see, so what keywords should I look up for trying to find examples of this?

dark edge
twin juniper
#

@dark edge that's not the same as a fps/tps tho

dark edge
#

From the POV of the server, everyone is in the future on their own machine.

#

handling that is HARD, probably the hardest thing in multiplayer games.

hollow eagle
#

Or have super lenient tolerances before the server corrects things. Which is what, for example, fall guys does.

twin juniper
#

Or you can do custom netcode like overwatch that has multiple tick rollbacks and predictions / time stretching tomfoolery

compact talon
#

Yeah, lag compensation is a topic I want to really get in depth with and learn in great detail. Personally I find it the most important aspect of a game - but that's partially biased because my friend group consists of people from all around the world.

I found a few resources by searching "lag compensation" so I will probably start with that and look at the CMC in depth. Thanks

twin juniper
#

@dark edge can you check out my answer above?

compact talon
#

BP feels limiting at times

fathom aspen
#

at times kek

#

I'm pretty sure most of movement stuff made in cpp and not even exposed

formal solar
#

Does anyone have experience handling multiple (up to 300) AI in a multiplayer setting? I need to think of ways to optimise, profiler says that pathfinding is very expensive as well as skeletal mesh component.

twin juniper
#

Struggling again with something simple

#

How do I send to the other clients that I have changed the material of a component?

#

I tried a multicast event and replicating the components but it doesn't work, changes only on the server

formal solar
#

@twin juniper want to be a bit more specific?

twin juniper
#

I first do a switch has authority and if it has authority change the material, the component is set to replicate and so is the actor

#

but I only see the change in the listen server client

compact talon
warped steppe
#

so... you only change said component on the authority

fathom aspen
twin juniper
#

I can get it to work with an onrepnotify

#

but I have to save a variable every time and do the onrep thing

#

Is there no other way?

fathom aspen
#

You should do it with a rep notify

twin juniper
#

why?

fathom aspen
crystal crag
#

If the player party is all on the client-side and the dedicated server knows nothing of it, then how do these bigger games keep track of player parties? Do they store something that gets sent to the server that then links their players together based off of shared client info?

#

That doesn't sound right. That sounds like it would be easily victim to hacking

dark edge
#

CMC is like 50k lines dude

#

you could make some naive approach WITHOUT prediction but it'd be pretty rough

compact talon
#

Fair, the CMC is extremely bulky though with lots of options. My end game movement component would be just basic movement with jumping. I would still want to do it in C++ though I am guessing - especially if I want to do prediction and lag compensation

dark edge
warped steppe
#

there was a marketplace thing for predicted cmc + blueprints wasnt there?

#

I think mmmm made it

compact talon
# dark edge You will end up spending hundreds of hours on it and probably end up with some s...

What would you class as super out-there? Right next to multiplayer and networking my next biggest fascination with games is movement, and I really think that (personally) a game can be made or ruined by the movement alone.

I ideally want something that resembles old source or quake movement. I tried somewhat replicating it with the default CMC but I struggled. I then looked up what others have done and found people really struggled with it.

I figured to get something like this I would need to build my own CMC from scratch in C++, something I am not anywhere near skilled enough to tackle just yet - hence why I went with the default CMC for the time being.

graceful flame
# compact talon What would you class as super out-there? Right next to multiplayer and networkin...

I'm in a very similar situation as yourself. Don't really know c++ but I'm pretty solid with blueprints. My multiplayer game is using a custom movement component. This one to be exact but I've also customized it a further ---> https://github.com/ProjectBorealis/PBCharacterMovement
You might be interested in using it as a starter or at the very least as a reference. Also its worth mentioning that it isn't replicating well by default. I had to alter how the braking friction works and implement a custom movement mode and send via saved moves to reduce server error corrections. Still working on making it smoother though.

#

It was built for ue 4.25 so there were some other upgrades I had to do as well, just so it would run on 5.

compact talon
#

Yeah I saw that when I was looking up source movement. Couldn't get it to work.

I tried using it when I was completely new to UE though, perhaps now I have a better understanding I will be able to get it working

graceful flame
#

want to see it in action?

compact talon
#

Sure

graceful flame
#

come to Artist Alley voice chat and I'll stream my screen

low helm
#

on the server or the client?

elder sage
#

^

low helm
#

let's see if he passes the trick question

#

🙂

elder sage
#

at the very least I think there's "get pawn private" to go PS -> Pawn and then you can get the controller. Don't know if there's one for just the controller

#

idk tbh

#

if all else fails, dummy pawn that's invisible

#

that's a joke

low helm
#

I think there's a simpler way than this, but I know the Controller can reference the PlayerState on begin Play, and save itself onto the PlayerState as a variable

elder sage
#

I believe that the playerstate exists before the controller, so you shouldn't have to worry about a race condition there

low helm
#

this worked for me on the PlayerState

elder sage
#

I did a MP thing a while back and ran into every combination of "x exists before y so null" possible, it seems like

fathom aspen
#

GetOwner no matter where u are

shell forum
#

will that be the controller?

low helm
#

controllers are actors

fathom aspen
#

Yes

shell forum
civic seal
#

Hey guys, does PostLogin get called before, or after the PlayerController gets assigned a new default pawn?

winged badger
#

before

#

you should probably be using HandleStartingNewPlayer in GameMode @

#

its called after PostLogin, and after HandleSeamlessTravelPlayer, covering both scenarios

#

its a BlueprintNativeEvent, and the _Implementation (or parent call from BP) is what spawns the default pawn

civic seal
#

Thank you! For some reason i was told by others on the team that the HUD doesn't appear after connection to the server, and it doesn't make sense to me but I thought it wouldn't hurt to have a fallback to make sure it does.

winged badger
#

the server sends a reliable RPC ClientSetHUD early on

#

as the GameMode defines the subclass of the HUD, client can't just read it on its own

civic seal
#

Does BeginPlay get called in the client hud?

civic seal
winged badger
#

it does, its an Actor

civic seal
#

the lack of hud that is

#

Interesting

winged badger
#

note that when i say HUD i mean subclass of AHUD

civic seal
#

aight so in my HUD, on BeginPlay theres a widget getting added to viewport. It appears on screen in standalone, but does not do so in the Client simulation. Any clue what that may be caused by? It's a bare level, so there's very few moving parts

#

Not asking you to diagnose my project blind, it just seems that if there's so few bits there, it may hopefully be a common issue

winged badger
#

and what does the breakpoint say?

#

there are a couple of ways to break BeginPlay being called on clients at all, mostly with making errors overriding GameState functions

civic seal
#

well the breakpoint says that its not getting called at all

#

uh oh

#

👉 👈

winged badger
#

most common being missing Super in GetLifetimeReplicatedProps

civic seal
#

yeah I just saw it. I implemented PlayFab GSDK using sample code from Microsoft and they missed the supers

#

@winged badger Massive thanks

#

saved me from tons of headache

#

or at least you would have if this was actually the problem

#

oh nooooo

civic seal
winged badger
#

does anything else call BeginPlay on client?

civic seal
#

Hm, doesnt seem to

#

Thanks for pointing that out

winged badger
#

there are several candidates

#

but ultimately it comes to OnRep_ReplicatedHasBegunPlay

#

in GameState

#

to Dispatch BeginPlay

#

but there are dozens of ways to break that

#

mismatch of GameMode and GameStateBase or vice versa

#

missing Supers or incorrect overrides in either GameMode or GameState

#

to completely silly ones, like turning GameState replication off

civic seal
#

Well, I've yet to override any base functions in either GameMode or GameState, and now it seems its not running even in Standalone

#

this is so wild lol

#

by not running I mean BeginPlay not firing

#

Alright I'll figure it out and maybe ask more once I get specifics, consideirng how many things could've broken I doubt you can figure it out remotely

#

Thanks regardless, I really appreciate the details

gleaming bobcat
#

How I can get know if Actor is off screen on server side ?

winged badger
#

you can take a rough guess, as client does update its camera position on server regularly

#

GetPlayerViewPoint in the PlayerController returns the results

#

that point is also the center from which the player's relevancy calculations are done

dark edge
winged badger
#

its a function

dark edge
#

I'm guessing it just reaches into playercameramanager and gets info from there?

winged badger
#

updated via ServerUpdateCamera

#

not sure, never had an interest to fully dig into it

glad escarp
#

General question for you smart folks: How do you generally handle player spawning in multiplayer? I'm currently using OnPostLogin in my GameMode bp to spawn their selected player character and then I manually call an INIT function to make sure all the initialization occurs even if the BeginPlay of the PlayerCharacter first too early etc. But it's not reliable. I get crashes that seem to be related to initialization.

winged badger
#

use HandleStartingNewPlayer in GameMode

#

its _Implementation / Parent call in BP spawns the Pawn

#

either spawn it manually and init it, or call Super/Parent and then Init

quasi tide
#

@winged badger I've seen you mention a few times the order of the methods that get called. Can you tell me where the top of the stack is so I can traverse it myself? Not because I don't believe you, but because I want to build out a diagram for myself.

glad escarp
winged badger
#

you have Either Login->PostLogin in case of hard travel, then going to GenericPlayerInitialization, and then to HandleStartingNewPlayer

#

in case of seamless travel its client side ServerNotifyLoadedWorld into HandleSeamlessTravelPlayer (PC swap here), then GenericPlayerInitialization, then HandleStartingNewPlayer

#

the HandleStartingNewPlayer_Implementation calls RestartPlayer() which spawns the DefaultPawnForController by default

quasi tide
winged badger
#

this has nothing to do with BeginPlay

#

first easily usable hook is AGameMode::InitGameState()

#

but when players actually join the game, that is outside that flow

quasi tide
#

I actually think this is kind of what I was looking for 😅

winged badger
#

i hate naming of that graph

#

as that (UWorld) BeginPlay is not actually calling BeginPlay on the Actors

quasi tide
#

Yeah, seems like the GameState does

kindred widget
#

Depends on whether you're on a Client or Server.

#

GameStateBase handles both cases. But the flow is different.

quasi tide
#

There is also no StartMatch function in AGameModeBase it seems.

kindred widget
#

AGameModeBase::StartPlay() calls HandleBeginPlay on GameStateBase on Server.

The OnRep of the GameState's bReplicatedHasBegunPlay handles calling Beginplay in a Client.

#

Both do pretty much the same thing. Tell WorldSettings to call Beginplay on all actors currently existing. Then sets WorldSettings State to HasBegunPlay, which then just runs beginplay on all actors spawned in the world after that directly.

#

Er. I think the state exists in World, not WorldSettings. WorldSettings just sets it. But same idea.

winged badger
kindred widget
#

Oh. Yeah. Virtual StartPlay in GameMode.

short arrow
#

So does anyone know the exact reason a server will start to tank when too many players are close to each other, but do fine when they are quite spread out? Never understood this.

latent heart
#

Relevance?

#

How far apart is "spread out" ?

short arrow
#

The clearest example I could give is fortnite, the servers feel relatively fine when the game first starts as players are spread across the map. But if you've ever played in a scrim match where practically the entire lobby is in one spot at the end of the game. It feels like a glitchy laggy mess. I undnerstand the FPS lag comes from so many things needing to be drawn on screen

#

however it feels like the server is lagging hard when everyone is close

kindred widget
#

Most likely due to the update requirements of connections. A player near more static, lighter connections requires less server time. Each player next to each other, with player characters and other such that require more server updates cause more networking to all parties in range.

#

It's like the difference between a player standing next to a once replicated chest with an inventory component. Once replicated once, it's mostly done sans the very light replication checks. Player characters on the other hand require pitch replication at the least and it's sent every frame. Plus every other required visual and state replication. Much heavier than rarely changed actors, and those replications multiply with each person.

short arrow
#

makes perfect sense, thank you

#

so I will need to find ways to make as much as possible replicate less

#

when too many players are closer

kindred widget
#

One example of scaling using just the pitch replication.
1 player = no replicated pitch as it's locally defined and not sent to non owning connections.
2 players = 2 server replications per tick.
5 players = 20 server replications per tick. (1 replication to each non owning client per character.)

short arrow
#

wow that get's complicated fast

#

Guessing the best way to slow it down would be limiting the ticking rate of players further away from you after a certain limit is rendered on the screen?

#

and maybe players you don't see won't tick at all?

kindred widget
#

Replication Graph sort of helps with this. Server considers actors in front of a player more important for example. Might skip a couple of replications on an actor behind them. Epic had a small doc about it if I recall.

#

Sort of tiers important stuff by view. Players directly in what the server considers a players view get more updates than a person behind, or a person several thousand units away. So if every player gets in range and groups together to stare at each other, performance would still drop. But chances of that are much less.

short arrow
#

so then the best thing we can do is try and reduce the tick rate of every actor, and all player animations when the server starts to throttle

#

🤔

kindred widget
#

Maybe. Animations shouldn't have much effect on a server unless it's a Listenserver. Even then it shouldn't be terrible. Dedicated have them disabled by default for instance.

short arrow
#

right but it doesn't seem like there's a whole lot you can do to avoid this issue without players directly noticing the effects right?

#

so I am thinking the next best thing would be to try and make it feel less clunky

#

because FPS does become an issue aswell

twin juniper
#

remosloot — vandaag om 18:59
hello i am trying to make a UObject to replicate following this blog https://jambax.co.uk/replicating-uobjects/. but i get an unexpected output and cant find why its happening.

"`1>baseBaseItem.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl AbaseBaseItem::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@AbaseBaseItem@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)

1>baseBaseItem.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl AbaseBaseItem::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@AbaseBaseItem@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)

1>D:\GameDev\Unreal Projects\projects\MyFirstProject newtest\Binaries\Win64\UE4Editor-MyFirstProject-Win64-DebugGame.dll :
fatal error LNK1120: 1 unresolved externals
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command "D:\Programs\UE_4.26\Engine\Build\BatchFiles\Build.bat MyFirstProjectEditor Win64 DebugGame -Project="D:\GameDev\Unreal Projects\projects\MyFirstProject newtest\MyFirstProjectnewTest.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "MyFirstProjectnewTest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========`"

and i get this error if i try to put the "UPROPERTY(Replicated) UreplicatedUObject* testObject;" end it goes away after i comment out the UPROPERTY(Replicated).

#

i probelbly forgot somthing but i dont know what

chrome bay
#

You forgot to add GetLifetimeReplicatedProps() in AbaseBaseItem.cpp

lament garnet
#

dumb question incoming

#

when i play as a client, the player controller is spawned at the world origin and then it take some time before the pawn is spawned and possessed by the controller so i get this thing where the player is at world origin and then snap to the pawn when the process complete

blissful saffron
#

So I have my server hosting a game with EOS and it shows up in the dev portal. My client is connecting to the server and finds the session, connects, and does clienttravel to the URL we get back. The EOS dev portal shows that 2 players are now connected but the client never loads into the map the server is on. What should I look at to try to figure out what's happening?

#

I thought the clienttravel was not working but I stepped through it and don't see anything being wrong

#

The map is a basic map that both client and server have already

winged badger
blissful saffron
#

There aren't any errors, it just never loads into the map

#

I'm just not sure where to start dissecting this issue. Things seem to be ok

vocal cargo
#

I'm overriding OnRep_PlayerState on my custom Player Controller class. Any idea why it isn't printing any of the logs inside?

winged badger
#

server opens a map with ?listen, tells you its listaning on port, tells you what net driver its using...

#

client does a browse (url), tells you when it loaded the map

#

at this point you should have a handshake between the two

#

if there are no errors, find the bit thats missing, then figure out why

winged badger
#

you obviously need a client to test this, c++ OnReps don't happen server side

thin stratus
#

Or expecting it to call on the Server :P

#

DAMN IT, too slow

blissful saffron
vocal cargo
winged badger
#

listen server player is on listen server - no onreps

spiral spear
#

Hey yall, looking for some help with pausing in multiplayer games - having trouble getting pause to happen on clients - I am sending a multicast pause event but it does not seem to be working

#

any tips would be appreciated

modern island
#

When building dedicated servers, is there something special you need to do to get plugins with third party libraries to work?

sinful tree
# spiral spear Hey yall, looking for some help with pausing in multiplayer games - having troub...

From what I've read on the forums, this is because pausing the game on the server prevents the RPCs from going out correctly.
Your options are:

  1. Use SetGlobalTimeDilation 0.00001 instead, effectively pausing the game but not preventing the RPCs from going out. If you left a game with time dialation like this for 1000 seconds (~16 minutes) only 10ms of game time would pass.
  2. Use a means of confirming all clients have paused on their end before pausing the server. This involves RPCing to each client individually and them responding back before setting their own game to paused.
  3. Potentially, just use a delay on the Multicast that checks if it's the server and if so, delay pausing for a few hundred ms so the RPCs go out before setting the pause.
spiral spear
oak mountain
#

Hey guys, I've got a multiplayer setup in unreal using Steam advanced sessions, and when using seamless travel and it appears that the Event Handle Starting New Player isn't being called consistently.

As far as I can tell, when I'm testing using my laptop and pc logged into 2 separate accounts, and either of those are the host, Handle Starting New Player is called properly every time for both players. But when a friend is a host and 3 of us connect it doesn't seem to be being called in his logs (unless one of my systems is the host). I've checked that he's on the same build as me, and added a print string as the first thing called by the event... Does anyone know how that event is triggered or have any ideas about what might be causing this issue?

shell forum
#

Is there a simple way to use PawnSensing on connected clients? It appears that it only works on the server. I could use RPCs but it might get expensive since I am calling it frequently. Has anyone dealt with this before?

leaden atlas
#

is there a way to send a lot of network data asynchronously from client to server?

#

im making a multiplayer game where the client sends its save data to the server

#

idk if i should just use a client -> server RPC or something else

fathom aspen
#

There is no other way to send data from client to server but to use RPCs

random verge
#

and the old http thang

fathom aspen
sinful marlin
random verge
#

upload your 1GB + stuff to an external http host, rpc your server to tell it hey I uploaded some shit externally, then the server knows to grab the payload or "user data" if the user isn't a dbag) @fathom aspen

fathom aspen
#

Sick, good to know, thanks!

#

You still RPC to server somehow though

random verge
#

doing it that way at least you don't bomb your server while its transmitting (not that you should be taking arbitrary data from a user anyway. That's like taking candy from a stranger)

foggy wraith
#

Sorry to bother yall I am seeking help with a multiplayer skin selector in the FPS template. It works in a testing map and game mode but when I launch from the main lobby the client copies the same color the server selected. I am not the greatest at multiplayer replication and could use the help. I think the issue might be in the gamemode but I am unsure where to even start lol

sinful marlin
fathom aspen
#

Haha that's a nasty workaround

sinful marlin
sinful marlin
#

that doesn't tell me where you're storing it

fathom aspen
#

That doesn't answer in what class that enum resides though, and still if we knew in what class we need more info, as no one here can tell how your setup looks

sinful marlin
#

If it's in the game mode, game mode is server only. Doesn't exist on clients.

foggy wraith
#

Sorry its stored in the game instance

#

The code is in a bp actor called Assault Class A which was in the template

leaden atlas
#

are you storing replicated variables inside of game instance?

fathom aspen
#

Such property should be stored in PlayerState

foggy wraith
#

Oh ok interesting

fathom aspen
#

Also don't replicate materials when you can replicate boolean variables that trigger that action

#

That's a smart way to save yourself some bandwith

foggy wraith
#

One issue with that tho is FPS template does not have a player state and it semi worked in the test map with a gamemode with just the pawn but wont work with the actual gamemode like conquest or whatever like I am completely stumped and I lack the know how to really follow along so I apologize lol

fathom aspen
#

If one doesn't exist then create one and configure your GameMode to use it. Don't rush things because they work!
My advice would be to take the time and read the compendium as it goes over much of what I said here(you can find it in this channel pinned messages)

#

Storing such variable in GameInstance is discouraged before it even works or not

glossy kettle
leaden atlas
#

is there a function for when a pawn is unpossessed on the client?

fathom aspen
#

(un)possession happens on server, and so does the functions that get called in response. You would need so form of RPC/replicated properties to tell the client of the action

#

Well you already have OnRep_Owner, so you can have some way to check if an unpossesion really happened(OldController wasn't null)

young kestrel
#

So I fixed some things with my BP_BaseWeapon Actor, I got it actually replicated (I was kind of surprised to see that I had to do the Code in the PlayerCharacter and not the PlayerController)

Anyway, I have a struct which I replicate for Meshes and Animations. Now, is that too much bandwidth I send? I have a Data table where I store everything and there I have a dictionary where each name correlates to the animation/mesh.

The DT basically dictates the weapons looks, stats, etc.

Is there a more efficient way?

Also another question, where would I store the players current setup? (Like weapon loadouts) Would I use an external Server or could I use another Data table?

chrome bay
twin juniper
#

what type of system does games like lets say Battlefield make the player able to change classes in the game like Recon, Engineer, Assault and Support. i know i can make something similar using GAS but not sure if thats the best way

pallid mesa
#

well you can have a hud in which the player chooses the class in every spawn, which then gets propagated to the gamemode to spawn the appropriate pawn class

#

that's the TLDR essentially

twin juniper
#

these classes

pallid mesa
#

if your classes are hardcoded and don't require any kind of customisation you just send a RPC with an integer or byte to the server

#

and employ it in the spawning

twin juniper
#

these classes are different player_bp?

pallid mesa
#

for example, yes

#

you can use inheritance for that

#

that's the most straight forward way to do it

#

so based on the resolution of your enum/integer

#

you spawn A,B, C or D

twin juniper
#

can i message you privatly

pallid mesa
#

not now I'm about to run

#

try to stick to this chat gtg now

eager prism
#

In vr multi-player, I am not able to trigger on release/on click. Is there any solution for this?

#

For 3d widgets

loud steeple
#

guys do someone work with the
advanced session plugins ??

#

i have a problem and i don t know where it s came from

#

i fix it thanks

twilit radish
eager prism
twilit radish
#

Do inputs work at all for VR? Is it just that specific widget that doesn't work or does nothing work? If that does work have you tried printing some messages to see where the execution stops (or ran it through a debugger)?

slow holly
#

Hey all, was wondering if anyone had any experience with steam multiplayer that may be able to help me out?? Basically, after following tutorials and installing plugins, I’m able to get the steam overlay on a standalone game and I’m signed in to steam. However, when I attempt to Host a session, it fails. I can host a session when I attempt this on a PIE simulation, it successfully goes through and loads the lobby level

#

Unless I’m in the wrong place, lol just realizing the online subsystems channel may be a better fit.

oak mountain
hybrid zodiac
#

HI everyone, when I am reading "stat net" at the console, does the in/out rate in bytes refer to bytes per network tick, or bytes per second?

#

Obviously one is a lot more significant than the other 😛

graceful flame
#

My game has a weird bug where if I have two client windows running with the same character class and I hold ctrl to crouch then look around with the mouse, they both look around. This doesn't happen while not holding crouch.

Its as if holding crouch changes ownership but for the rotation only. Jumping and other abilities while crouching only works with the currently possessed pawn. This bug even happens with two different character classes using separate movement components (one custom, one default) too wtf?!?!

dark edge
graceful flame
#

Ah ha! No it doesn't. Im using Input Action (crouch) for both, but when I changed one to use Keyboard B it doesn't happen anymore.

#

So what would be the cause then?

dark edge
dark edge
#

Trying to sort out if it's the control button doing it or the crouching state.

graceful flame
#

Oh weird, when I change input action crouch to use B, it works normally, but oddly enough pressing CTRL still has the same issue. It's as if there's something binding CTRL to crouch by default hidden within the character's movement component or something. As far as I know I'm not using any Input Keyboard CTRL anywhere within my blueprints.

dark edge
graceful flame
#

CTRL does not crouch for either client, but it does sync the mouse rotation.

dark edge
#

Yeah so check your PIE settings, might be something in there.

#

Also test if it does it with launched clients

graceful flame
#

Looked through all of PIE and Game settings, found nothing. Trying launched clients next

winged badger
#

any static members holding rotation?

crystal crag
#

How do you all keep track of who is in a party on the dedicated server side since dedicated servers don't use parties at all

#

Is it just an honor system and the clients just send RPCs, telling the server which other users are part of their party?

#

I'm not looking for code, just a high level concept solution would be fine

dark edge
#

If it's game specific, then a user NOT in a party can create one by inviting another user and them accepting.

crystal crag
#

I'm not sure what you mean by game specific. Do you mean by that a party that impacts game logic?

dark edge
crystal crag
#

I'm basically wanting to be able to invite my friends to my game and then they will be on the same team, which will drive a lot of game logic such as what quests are available and shared progress / etc.

winged badger
#

steam?

#

actually doesn't matter

crystal crag
#

I originally thought I'd be doing that with the online party subsystem, then I found out that the dedicated servers don't know anything of it. I'll be using EOS

winged badger
#

Session Invites and Handling them is on OSS level

crystal crag
#

which I could in turn use on steam, but right now I just care about EOS only

#

Ah, there is such a thing as a session invite

#

Ok I'll have to look into that

#

I know there is session searching and you can search for sessions and pick one to connect to

#

is that different from what you are talking about?

graceful flame
#

Is it normal for all shaders to have to recompile whenever I launch in standalone mode?

crystal crag
#

Ah, IOnlineSession:FindFriendSession()

#

and IOnlineSession:SendSessionInviteToFriend()

graceful flame
#

I can't begin to debug because my machine basically freezes up with two standalone windows trying to compile all shaders again.

winged badger
#

our ingame invite is pretty much a button to activate steam overlay/friends

#

then you can invite from there

oak mountain
#

Think I've narrowed down my inconsistent HandleStartingNewPlayer calls a bit further - it seems like the client is consistently sending the ServerNotifyLoadedWorld RPC, which I'm assuming that triggers the 'HandleSeamlessTravelPlayer' call - but that isn't being consistently triggered...

crystal crag
#

Does your game let people send invites at anytime? I'm not using lobbies. The dedicated server is hosting a long running world

winged badger
#

this is listen servers

#

it should still work the same

crystal crag
#

Ok cool