#multiplayer

1 messages Β· Page 59 of 1

fathom aspen
#

Just a warning before it's too late

spare orbit
#

anyways thanks. I'll probably go to bed and read some tomorrow. If I got any question is it ok to pin you in this channel?

fathom aspen
#

No sorry, I only answer questions when I want to πŸ˜‰

#

So feel free to ask and I will feel free to answer if I spotted one of those πŸ™‚

spare orbit
short arrow
#

anybody know a cheap way to replicate physics? πŸ˜„ currently I am snapping the actor back to a reasonable location whenever it goes too far off from the server. Replicating the physics seemed to be really costly when taking into consideration that there are hundreds of these actors

prisma snow
#
potent coral
#

is possible to play online with friends in PIE or do i have to make a shipping build?

winged badger
#

Eos can do it

#

You can also do it in standalone - .uproject -> launch game

#

And any packaged build can do it, it doesnt have to be shipping

potent coral
winged badger
#

Epic online system

potent coral
#

what about steam?

winged badger
#

Pie wont connect with steam client

potent coral
#

ok then epic it is

potent coral
potent coral
winged badger
#

it can

potent coral
#

well so far apparently i cant even connect to my LAN session xD

#

keeps returning failed on finding sessions even though im hosting one on other game instance

#

ohh derp now it works, i connected the player controller to the wrong pin xD

woeful ferry
#

What makes FText so bad to replicate? Is it purely the size or something else? Because they replicate by ID so the localization still works locally.

kindred widget
woeful ferry
#

And another question, how well does FGuid replicate?

near granite
#

Client can't join to server..How and what can i debug with?

What server saying?

vivid lichen
#

I was working to integrate gamelift sdk using the video series from aws on yt. In the third episode at 7:00 when he executes the command to build ms from the cmd i am getting errors. The docs are very outdated and I am trying to integrate sdk in 5.1, maybe my commands are wrong. Thanks for help guys!

#

This is the error I am getting when executing the build command msbuild ALL_BUILD.vcxproj /p:Configuration=Release

rose pollen
#

Anyone have a chat / combat log plugin they would recommend, I think my needs are pretty basic and don’t want to reinvent the wheel writing it myself

fierce grove
#

Up to where do you support Lag / Packet loss with prediction/correction when do you say "hell no you're out"

potent coral
#

im having an issue with multiplayer sessions in packaged game

#

it finds the session but it shows the wrong player count and name

#

when i launch game from project files this works, but not from packaged version

#

though steam shows that im playing spacewar

winged badger
#

Your steam id needs to be configured in the config file

potent coral
winged badger
#

Google it, i dont know off the top of my head, probably game

potent coral
#

i have this in my DefaultGameIni

winged badger
#

That 480 id spacewars id

potent coral
#

yeah

winged badger
#

You need an id you own there

potent coral
#

nope you can also use spacewar

twilit radish
#

You don't 'need' to but I assume the issue right now is that you're running into other people's their sessions (unless you have very specific filters). You're not the only one testing with that appid and Steam/Unreal limit the amount of sessions you can search for.

potent coral
#

it only finds 1 session and thats mine

#

i know because it goes away when i close it

#

when i do in PIE it works fine

#

same for running from .uproject

#

but in shipping build it finds this

twilit radish
#

Does it work outside of PIE in the editor?

potent coral
#

maybe it will be easier to use a different online subsystem for now?

potent coral
crystal crag
#

If you have a primary data asset that gets replicated via component, and the client does not yet have that asset loaded, can you still get the primary asset ID off of it?

#

I'm not 100% clear on the rules of primary asset data. The documentation says you can still get data from primary assets, even if they are not loaded

potent coral
crystal crag
#

They're doing it in lyra

#

But when the client calls OnRep_CurrentExperience() they are calling sync load

#

I think that partially answers my question. If they can even call a sync load, then it is replicating or they have some code I haven't seen yet making that work

potent coral
#

well when in doubt, just test it

crystal crag
#

yeah

kindred widget
crystal crag
#

My approach just crashed

#

Even on the server side

#

The code used to be this:

#if WITH_SERVER_CODE
void ULyraExperienceManagerComponent::ServerSetCurrentExperience(FPrimaryAssetId ExperienceId)
{
    ULyraAssetManager& AssetManager = ULyraAssetManager::Get();
    FSoftObjectPath AssetPath = AssetManager.GetPrimaryAssetPath(ExperienceId);
    TSubclassOf<ULyraExperienceDefinition> AssetClass = Cast<UClass>(AssetPath.TryLoad());
    check(AssetClass);
    const ULyraExperienceDefinition* Experience = GetDefault<ULyraExperienceDefinition>(AssetClass);

    check(Experience != nullptr);
    check(CurrentExperience == nullptr);
    CurrentExperience = Experience;
    StartExperienceLoad();
}
#endif
#

and I changed it to this:

#if WITH_SERVER_CODE
void ULyraExperienceManagerComponent::ServerSetCurrentExperience(FPrimaryAssetId ExperienceId)
{
    ULyraAssetManager& AssetManager = ULyraAssetManager::Get();
    /*FSoftObjectPath AssetPath = AssetManager.GetPrimaryAssetPath(ExperienceId);*/
    TArray<FName> BundleNames;
    BundleNames.Add("Server");
    BundleNames.Add("Hybrid");
    AssetManager.LoadPrimaryAsset(ExperienceId, BundleNames, FStreamableDelegate::CreateUObject(this, &ThisClass::OnServerExperienceAssetAsyncLoadComplete, ExperienceId));
}
#endif
void ULyraExperienceManagerComponent::OnServerExperienceAssetAsyncLoadComplete(FPrimaryAssetId InExperienceAssetId)
{
    const ULyraExperienceDefinition* Experience = Cast<ULyraExperienceDefinition>(UKismetSystemLibrary::GetObjectFromPrimaryAssetId(InExperienceAssetId));
    /*TSubclassOf<ULyraExperienceDefinition> AssetClass = Cast<UClass>(AssetPath.TryLoad());
    check(AssetClass);
    const ULyraExperienceDefinition* Experience = GetDefault<ULyraExperienceDefinition>(AssetClass);*/
    check(Experience);

    check(Experience != nullptr);
    check(CurrentExperience == nullptr);
    CurrentExperience = Experience;
    StartExperienceLoad();
}
kindred widget
#

Ah. On the server side you mean. That makes sense. I thought you meant the OnRep.

#

A data asset, primary or not and like any other asset(like textures or sound), will be loaded when the OnRep is called.

crystal crag
#

Yeah I was talking about the client at first

#

but my approach didn't even work on the server, so the client question is kind of useless until I get it working with the server

kindred widget
#

Where was your crash?

crystal crag
#

On check(Experience);

#

it was nullptr. I could see InExperienceAssetId had the right path, so I don't know what went wrong

#

When OnServerExperienceAssetAsyncLoadComplete gets called, that asset should be loaded into memory...

kindred widget
#

Out of curiosity. Why the Async load here?

crystal crag
#

Just a learning experience. The game can switch experiences after each "experience" completes

#

But it sync loads everything

kindred widget
#

Hmm. Well you might want to attach a debugger to the server and breakpoint in GetObjectFromPrimaryAssetId. Make sure your manager is valid and that if statement passes.

crystal crag
#

I'm doing a PIE, but ok yeah, I will try that

kindred widget
#

Even easier. πŸ˜„

crystal crag
#

Yeah πŸ™‚

#

So it looks like

#

it's finding it, but is failing on this !Info.bHasBlueprintClasses condition

#

Looks like that is the difference, because in their implementation, they're not using GetObjectFromPrimaryAssetId

#

That's how I've always converted a loaded primary asset ID into the actual asset, but up until messing with lyra, none of them were BP assets

#

I guess that's why I never hit this problem before

#

I'm not sure what the equiv. would be to get it to work with BP primary assets

#

I guess I could include their TryLoad code, since it would be loaded, it wouldn't load it again anyway

#

But it seems like there should be a more elegant way to do it than that.

kindred widget
#

Not sure what that boolean is for. Seems to get passed around a lot, but not really used anywhere other than the Kismet stuff.

#

Kinda curious if you could just pull the UAssetManager::GetIfValid, and the GetPrimaryAssetTypeInfo and use that instead of calling the static itself.

potent coral
#

damn i switched to EOS now and it just works lol

potent coral
#

hmmm

#

does my game actually have to be verified on epic to connect online or should it work right away?

rose pollen
fierce grove
rose pollen
# fierce grove Mm true, packet loss over 2% is harder than 200ms

Yeah, I think tbh it’s a bit of a business decision and really is going to vary game to game (deciding what level of correction/normalization to provide to people). If you end up spending a ton of time on 0.5% of your player base instead of improving the rest of your game that is a mistake imo

fierce grove
#

Agreed .. might take a really under 100 below 1% approach … that always is infuriating when games allow huge latency differences

grand hatch
#

I seem to have an issue where when i login/spawn another player the first one stops working for some reason. Anyone know why this is? (it was created as a blank blueprint project)

twin juniper
#

I have two projects, one with Enhanced Input and one with classic Input Actions.

With Input Actions, if a client moves they don't experience lag client-side. As in, when they press W or S, they move instantly, just as if they were playing offline.

With Enhanced Input, if a client inputs movement there is a noticeable delay before they move. I imagine this has something to do with the action being sent to the server first?

How can I fix this. I like Enhanced Inputs a lot but this is not an ideal situation for obvious reasons

quasi tide
#

Has absolutely nothing to do with it.

twin juniper
#

What setting would be causing the discrepancy then

All replication settings appear to be the same

quasi tide
#

If there is a noticeable delay - it is either your code or the engine itself. But enhanced input does not send to the server first.

twin juniper
#

Why would increasing the simulated ping cause client-side movement input delay then

quasi tide
#

Again - either your code or something in the engine. Input does not get sent to the server.

twin juniper
#

Gonna try redoing this with axis events to see if it still has a delay

#

These two are borderline fresh its possible I accidentally enabled some feature or setting somewhere

#

Yeah both input methods cause the same result in this project

My framerate is great on all clients but as I increase the simulated ping the movement delay also increases. This seems like some sort of setting to me

Nothing "extra" is being sent over the network atm, the only replicated variable is the PossessedCharacter which is just a character reference

#

Whereas in the other project it doesn't matter how bad simulated conditions are, clients movement is immediately responsive

rose pollen
#

Sounds like client predicted vs not

twin juniper
#

Yeah I guess where I'm lost is that in my other fresh project the client doesn't wait for a response from the server to move whereas in this one it does

I'm searching client predicted now or anything I've thought of related to this and I can't find it

rose pollen
#

Not at pc atm so can’t look

upbeat heron
#

So I'm having some problems.
Basically I have a few delegates inside GameState that call global phase messages like Start Game.

It worked initially fine, but now I'm running into an issue where the client seems to arbitrarily find a different game state object. Depending on when it subscribes via GetGameState(), it may or may not get a reference to the "correct" one that the server calls RPCs from. It will randomly subscribe to some other "dead" GameState object.

It seems to find the correct GameState at the instant of the level loading, but calls (of GetGameState()) after that are to the "wrong" game state.

#

Top is client, you'll see it creates it's own gamestate for some reason, I used a replicated GUID to track the gamestate instances. You can see that the first gamestate matches the servers.
It could be due to the messages that says OSS: No game present to join for session, but I have no idea what is causing that, nor is there any information online.

deep shore
#

My game is on a dedicated server. I want to give myself in-game permission to do things that absolutely no other client can do. Using a login system, I was able to give myself a special designation. Is there a secure, persistent way to save this designation as a boolean that can be checked against at any time?

winged badger
#

if you have security concerns

#

i would put that "special designation" and all its related RPCs into a separate object, spawned only on the admin's PlayerController

#

it is super easy to just hack a boolean from false to true

deep shore
winged badger
#

if you're sending it via login system

#

gamemode knows if you have permission at the time you log in

#

before it spawns your PlayerController

#

so it also spawns the replicated object on the PC

#

that handles hard travel, override of HandleSeamlessTravelPlayer can handle seamless travel situations when the PC changes, by checking if old one had the extra object, and spawning it on a new one if it does

deep shore
#

thank you very much for the advice. I probably should just use a save object in the meantime while I brush up on this a bit more. security isn’t a huge issue at the moment

winged badger
#

its not drastically different then what you're doing now

#

instead of

#

if (bHasAdminPriviledges) { DoSomething(); } you do if (AdminObject) { AdminObject->DoSomething(); }

green fjord
#

does onRep function only called on client when RepNotify Variable changed?

near granite
#

Another client's hand is visible at my level origin eventhough i unchecked the replicate option in pawn

twilit radish
twilit radish
#

Also @near granite unless you turned off the pawn's entire replication then components will still show up. If I for example add a cube to my character that's not set to "Replicate" it will still do it regardless. The option is for the component internally not sending data.

#

At least.. For non-runtime registered stuff.

latent heart
twilit radish
#

Please tell me I'm not the only one who didn't know you could do this:

public:
  UFUNCTION()
  void OnRep_CustomVector(FCustomQuantizedVector PreviousValue); <---- PreviousValue

  UPROPERTY(ReplicatedUsing = OnRep_CustomVector)
  FCustomQuantizedVector CustomVector;
void ACoolClass::OnRep_CustomVector(FCustomQuantizedVector PreviousValue)
{
    UE_LOG(LogTemp, Warning, TEXT("Received: %s, previous value: %s"), *CustomVector.ToString(), *PreviousValue.ToString());
}

LogTemp: Warning: Received: X=0.016 Y=0.778 Z=-1.000, previous value: X=0.000 Y=0.000 Z=0.000
LogTemp: Warning: Received: X=0.048 Y=0.778 Z=-1.000, previous value: X=0.016 Y=0.778 Z=-1.000
LogTemp: Warning: Received: X=0.079 Y=0.778 Z=-1.000, previous value: X=0.048 Y=0.778 Z=-1.000
LogTemp: Warning: Received: X=0.111 Y=0.778 Z=-1.000, previous value: X=0.079 Y=0.778 Z=-1.000
LogTemp: Warning: Received: X=0.143 Y=0.778 Z=-1.000, previous value: X=0.111 Y=0.778 Z=-1.000
LogTemp: Warning: Received: X=0.175 Y=0.778 Z=-1.000, previous value: X=0.143 Y=0.778 Z=-1.000

pallid mesa
#

what exactly?

twilit radish
#

Automatically getting the previous value in an OnRep.

pallid mesa
#

ah πŸ˜„

#

very useful yeap

twilit radish
#

πŸ₯²

#

All this time of storing previous variables manually while I could have done this and no one told me? 😭

pallid mesa
#

😬

twilit radish
#

I was looking at how OnReps got processed and noticed they give back the previous value x)

#

I blame Wizard for not telling me πŸ˜‚

hardy monolith
#

hello! I made my game features work in multiplayer and was testing it through "Play as Client".

Now when I tried to make one of client host - I noticed many artefacts (like UI not showing).

Im pretty sure this is because of how I checked if player is client.
I used "Switch Has Authority" node for that, and my assumption was that we are Client if we are Remote, which is not the case for Host.

#

My question is - what is correct way to check if I'm a client and have ownership locally

twilit radish
#

That's correct. On a Listen Server the host has Authority because it's their local game that processes everything. Usually the way I do it is using "just" IsLocallyControlled if it's a pawn or character and otherwise using the player controller with IsLocalController.

#

There are also checks for the net mode which I often use, but those are not available in BP. Although there's a generic IsServer node I believe.

hardy monolith
#

Awesome!

#

And one thing that bugs me for a long time - is there any good pattern to split Server and Client logic?
I feel like it's really dirty to do it through such switches and at the best would like to have it in completely separate places.

One idea that I have for it - create separate node Graph for Server and Client
Another - create custom type which will have Server_BeginPlay and Client_BeginPlay events that are handled under the hood.

But maybe there are better ways?

twilit radish
#

There’s not to my knowledge. This is pretty much how everyone does it. Which honestly would get more annoying in the end because plenty of times you do the exact same thing on the server and client. Unless you use dedicated servers I suppose yeah, then it can get a bit annoying at times.

hardy monolith
#

Thanks for your help, it's really appreciated πŸ™‚

peak notch
#

are Advance sessions compatible with android EOS integration now?

wooden abyss
#

I have a problem with the Advanced Sessions Plugin. When I use the "Find Advanced Sessions" Node it always returns duplicate sessions. Same blueprint with the normal "Find Sessions" Node returns no duplicate sessions. I couldnt find anything about this, like why this is happening or if i just have to configure something. Anyone knows why this happens?

potent coral
#

is the NULL subsystem a requirement or can i turn it off when working with other subsystems?

twilit radish
#

It’s not a requirement, it’s the default but it can be freely swapped out.

potent coral
#

im trying to log in with accountportal auth type but nothing happens and the on failure callback fires

twilit radish
#

I would recommend asking in #epic-online-services , people there know more about it. I'm not quite sure how it works, but you can definitely swap out subsystems.

potent coral
#

thx, didnt know they had a channel for that lol

blazing spruce
wooden abyss
#

I did multiple things to test it. Without changing anything on the "create session" part i just swapped out the "find sessions advanced" for the basic "find session" node. I added a debug message printing out the length of my "Results" array from the find session nodes

#

I started the game in standalone with 2 clients. One creates a session and on the other client I try to find the sessions

#

With the "find sessions advanced" the array length is 2

#

The basic "find session" node only returns an array with length of 1

#

I only use a for each loop on the result array and create session widgets to list all the found sessions

#

I did try the same with the basic create session node and create advanced session node

#

Results were the same

#

So I do think it has something to do with the Find Session Advanced node

#

Well it's probably not "duplicating" in a literal sense. But it does return the session twice

oblique mortar
#

So in my project I have a procedural world where every player is supposed to only receive information about the parts of the world surrounding that player. I read through a lot of unreals networking documentation but it seems like the built in replication features are not really ideal for something like this. Also looked into online beacons which also don't seem ideal at all. Does anyone have experience with similar projects?

The best way to deal with it from what i read would be to have an actor for every client which manages sending only the part of the world that's currently relevant to that player. However I am even more uncertain about whether to use RPCs or work with RepNotifies since I am sending a lot of data and RepNotifies have less overhead, i feel like I'd have to do some weird work arounds to use them though...

blazing spruce
rich furnace
#

I've tested Find Advanced Sessions last night on two separate computers and steam accounts and it couldn't find a session. I was able to create an Advanced Session with no errors. I did not get any errors or anything. Is that due to Steam SDK/Dev ID?

twilit radish
# oblique mortar So in my project I have a procedural world where every player is supposed to onl...

Online beacons are not relevant to that whatsoever FYI.

But your question really depends on the game, a world that's generated through voxels would for example be different from a world generated with meshes. Unreal can support a decent amount of actors with some optimization, Fortnite is a great example of this. A hundred players running around in a pretty much networked destructive game with thousands of actors. Although it's a dedicated server, the concept still stands that there's plenty of room for things. But as a disclaimer this was also obviously made by a team with a lot of engine knowledge, experience etc.

Some things you can look into are for example dormancy. If we're talking about voxel worlds you can find specific data structures online for efficiently storing that data, you could even use the Minecraft 'technical' wiki (or whatever it's called) if you're building something similar like that.

wooden abyss
#

So just 2 clients locally on my machine

blazing spruce
# wooden abyss So just 2 clients locally on my machine

Mine did the exact same thing when testing locally, i never did figure out why it done it but it is exactly the same session for some reason, although it doesn't happen at all when its actually online over steam but yeah i think its just a weird advanced sessions thing

oblique mortar
# twilit radish Online beacons are not relevant to that whatsoever FYI. But your question real...

thanks for your reply!

yeah, my world is voxel based, technically i already got the data structure isself at a point I'm pretty happy with it. Not quite sure if dormancy is what i need here (if this is what you where talking about: https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/ENetDormancy/). In my case I need to send some data in the form of compressed arrays to the clients and I'm just not sure whether i should use a single variable on a replicated actor for each client that(the variable) i replicate once for every chunk I'd send and then grab it client side via RepNotify or just have an RPC that i call for every chunk.

for fortnite they used their "Replication Graph" but I don't think this is what I'm looking for as i don't need a lot of actors replicated between a lot of clients (https://docs.unrealengine.com/5.1/en-US/replication-graph-in-unreal-engine/) (please enlighten me in case i got something wrong)

twilit radish
#

They were just some general tips, I don't know how you've setup everything of course so pick whatever you think fits in the end πŸ˜›
In general if we're talking about chunked data and especially stateful data we usually recommend replicated variables as they also deal with stuff that doesn't arrive and new joining players, but if you want to assign that per player the latter doesn't really matter I suppose. If you're concerned about performance for that in specific you could try using "push based variables" as those are a bit more efficient. But I've personally never used those.

In the end it's going to come down to how efficient you can get your chunk data though. Doesn't really matter if it's an RPC or Replicated variable (as both use very little network data) if your data is too big. But I don't know what fits for your game in specific.

wooden abyss
hardy monolith
#

Because of that, listen server doesn't display UI widget, but everyone else does

#

😱

twilit radish
#

Is your pawn reference valid? Is your cast failing? You'll need to do some more debugging πŸ˜›

hardy monolith
#

It's correctly used in other places of this component, but let me check

#

Yes, it's correct

#

There might be important how I spawn players

twilit radish
#

It may very well be possible btw that your controller didn't possess your pawn yet when BeginPlay runs.

hardy monolith
#

But how do I track it then? πŸ˜•

twilit radish
#

Try overriding "OnPossess" or whatever it's called in BP, print a message and see if it runs after or before your begin play.

hardy monolith
#

Yes, it's possessed after πŸ€”

#

That's quite unfortunate

#

I'm curious what could influence that, since it works fine on client

twilit radish
#

I believe it has to do with how Unreal handles it internally with networking, either way if you're not swapping out controllers between pawns I'm pretty sure you can override "ReceiveRestarted" or something similar in BP.

Event called after a pawn has been restarted, usually by a possession change. This is called on the server for all pawns and the owning client for player pawns

quasi tide
#

In C++, there is "AcknowledgedPossession" or something like that. Which is fired on client side possession.

twilit radish
#

There are multiple ways of doing this yeah.

#

Pretty sure Wizard and I at some point dove into the code to find a single event for both client/server though. Which if I recall correctly is that restart one.

#

But this in specific is a really weird system as it's so not intuitive whatsoever. Most stuff either gets called on the client or server but rarely ever both :/

quasi tide
#

Yeah, Restart is the one.

hardy monolith
#

It worked, but it sucks πŸ˜„

twilit radish
#

There should be a function override for it too.

hardy monolith
#

So much little intricacies

#

Yes, but as I do it in ActorComponent, I have to use event dispatchers

#

Since I'm also trying to follow best practices and keep logic in components

twilit radish
#

Ah yeah, forgot about that πŸ˜…

hardy monolith
#

Now I need to go and check every component for the same issue 😭

twilit radish
#

Also just random but components are not always that great. For performance critical code you want as least components (scene components!) as possible as those are pretty heavy because of the physics/transform updates underneath them. For networking component networked calls have a slight overhead (but tbh this only matters in very specific cases).

hardy monolith
#

But thanks everyone for helping me out again, you make this harsh world better

#

If I meet that I'll come here and you can tell me later xd

rose egret
#

anyone ever used UPathfollowing in client side ? will it work ?

naive wyvern
#

is this normal?

  • I have two clients running locally
  • both respond to someone pressing Y
  • if I'm using one client, and I press Y, both clients will respond to the key press
twilit radish
#

What makes you say both respond to pressing Y? What happens?

naive wyvern
#

I printed out which objects are hitting a certain function, and I see this:

twilit radish
#

How are you calling the code?

naive wyvern
#

that seems to tell me that both the actors are hitting the function that's called when I press Y

#

this is extending the character movement component, and using the custom flags
So from the start, I bind an action
PlayerInputComponent->BindAction("Rewind", IE_Pressed, this, &AShooterCharacter::OnShooterRewind);
then that sets a couple bools to true, which then switches the Custom move flag to "rewind", and in an update, I call a function PhysRewind(), that handles the physics (for our purposes, this is where the log happens)

#

hope that makes sense

#

weirdly enough, I'm now checking who triggers the OnShooterRewind(), only pawn_C_0 triggers the function

#

but for some reason, the log from the above screenshot is definitely from a state where both pawns are doing the physics, which should only trigger if they're rewinding

twilit radish
#

That still sounds very much to me like something goes different in between, I asked because the engine never 'focusses' on multiple clients at the same time when you're playing. Unless you directly modified the engine I'm not aware of a way to do this either. So you pressing Y should never allow multiple clients to do the same. With perhaps the exception of you finding an extremely obscure bug I suppose xD

#

Are you sure this isn't simply being executed on both server and client? Those Phys functions get called on both ends.

naive wyvern
#

!!!

#

that might be it

#

can I check if it's the server or client with this function? GetOwner()->HasAuthority()

twilit radish
#

If you're using a listen server authority will also validate true for the actual listen server.

naive wyvern
#

gotcha, well I'm currrently just running a Client, so I think there should only be one server right?

twilit radish
#

Preferably should use IsLocallyControlled(), however you should not run different behaviour in those things if you ask me for the reason that it will desync the server and client as they are expected to give the same output.

#

If you set the mode to "play as client" a server is started in the background. But that's not considered a listen server.

naive wyvern
#

gotcha

twilit radish
#

Perhaps a better question, what is the general thing you're trying to do?

naive wyvern
#

for this specific case? I just want to print if it's the server or client, to make sure that this isn't a different pawn

#

generally speaking, the behavior is implementing a tracer-like rewind

twilit radish
#

No as in, what are you trying to achieve with the rewind stuff etc.

#

Ah I see. Starts Google.

naive wyvern
#

ahaha, sorry, from Overwatch

twilit radish
#

Basically you can just rewind your movement?

naive wyvern
#

yeah

#

it's actually working, I'm just working out some kinks

#

this was just something I found as I was debugging πŸ˜„

twilit radish
#

The methods are called both client/server side because basically all the CMC does is send over the input data (and some other things) but you probably already saw that. But it simulates the movement the same way to keep in sync with what the client did. So if you start up changing that on one of both only it gets messy and you'll likely desync your player and cause it to desync.

#

That's why I suggested not changing specific things in there based on server/client. But it depends I guess,

naive wyvern
#

ahhh, so maybe, I just say like "print whether or not you're a server", and therefore, the output is the same, but the data might be different?

twilit radish
#

Well generally you want the input and output to be the same. If the client walks forward you also want the client to walk forwards in the same way on the server.

#

But yeah, if you just want to debug stuff you can print "is the server yes/no" or whatever.

#

IsLocallyControlled() should do the trick for that, although probably need to call it on the actual character instead of the component. Could also indeed use HasAuthority() next to it if all you play is "as client" πŸ˜„

jaunty panther
#

anyone by chance know who was just in vc with me about 20 mins ago?

naive wyvern
#

hmmm, okay, that makes sense, much appreciated Thom! πŸ™‚

#

figuring out what was causing this issue also just led me to resolve a bunch of other problems I didn't even realize I had lol

naive wyvern
twilit radish
#

Yeah.. CMC can be really tough to change depending on what you want to do. Feel free to ask any questions if you have them, although I can't promise I have an answer my self though. I really hate the complexity of that thing πŸ˜‚

naive wyvern
#

seriously

pseudo lance
#

what is cmc nvm found it with google

twilit radish
#

Character Movement Component, it's what the character system uses for client side predicted but server authoritative movement.

pseudo lance
#

I'm trying to make my own dedicated server apart from unreal engine, and just run threads in the game that communicate with it. Does anyone know of any resources I should read explaining how physics works precisely so I can replicate it in my server?

twilit radish
#

I'm going to be honest with you, I don't think you will find many or any resources on that as it's pretty advanced. You'll need to use the same physics engine and setup in general as Unreal does if you want to get the same physics as Unreal does. Which seems like a ton of work and just isn't commonly done.

verbal tendon
pseudo lance
#

Is there some simpler way I can gain fine grained control over the netcoding? I don't want it to do ANYTHING without my say so, I want to dynamically adjust the tick rate (and sometimes use tickless communication instead), I want to only authenticate certain actions in certain situations (such as if I send a packet stating client A did an action to client B and client B says based on his gamestate that's impossible/contradicts client B)

#

For example a situation I want to avoid is where in both clients screens they saw that client B got sot by client A, but the server sees that that didn't happen and over-rules it.

verbal tendon
#

None of that is extraordinary in terms of game design and doesnt warrant a custom server outside of unreal engine

#

It's really just a case of learning the basics and how to apply them

pseudo lance
#

@verbal tendon thankyou.

peak sentinel
#

So anyone ever thought of a solution to expand vori's generic rewinding component? https://vorixo.github.io/devtricks/simple-rewinding/

This sunday I had a little bit free time and decided to brainstorm over it, nothing came to my mind other than expanding the component into a subsystem that factors all relevant actors to shooter weapon Thonk

short void
#

i am trying to get an event dispatcher to get called, when triggered by a client, on the gamestate... but for some reason only the server is able to trigger the event dispatcher. Any reason why this would happen? The event dispatcher gets called from the playerstate.

fossil spoke
short void
#

The first screenshot is on the PlayerState, 2nd screenshot is on the GameState

#

The server's car will call the final print string in the 2nd screenshot when it overlaps the finish line, but a client doesn't.

fossil spoke
#

Why are all of these events Multicast?

short void
#

Originally they weren't, but I was told to change them to MC

fossil spoke
#

Did they explain why?

short void
#

No lol

fossil spoke
#

This is likely your issue BTW

short void
#

Oh, so I need to get all actors of class and do a for loop?

fossil spoke
#

No

#

Lets start from the top.

#

Which of all of these events is called first?

#

My guess is OC_PS_LapsComplete?

short void
fossil spoke
#

Where is that called from?

short void
#

It's called Checkpoint1, I didn't share that code, but it's a trigger box at the start/finish line

#

It's called every time someone crosses the line

fossil spoke
#

Ok well you will likely want to only call that on the Server by guarding it with a HasAuthority instead of it being a Multicast.

short void
#

Oh

fossil spoke
#

Actually, scratch that.

#

Keep it as is.

#

Dont set it to Multicast.

#

Its unnecessary as all the Cars will trigger it locally anyway.

short void
#

OK

fossil spoke
#

Next you should stop CheckToSeeIfWinner from being Multicast as well.

short void
#

Gotcha

fossil spoke
#

Since its being called by OC_PS_LapsComplete it also does not need that since its being called locally for all Clients.

#

Where/How is this code called?

short void
#

Event Begin Play on the GameState

fossil spoke
#

Ok, so.

#

The Server and all Clients have everyones PlayerStates.

#

Using that node is bad practice as it can return an arbitrary one.

#

(Depending on join order/creation order etc etc).

#

You should instead have this being dealt with in BeginPlay on the PlayerState.

#

That way you are ensuring all PlayerStates when they are created (regardless of order) will have the event.

#

Alternatively since WinnerDetermined is part of the PlayerState already.

#

It is likely better to just set that variable in that Event from the PlayerState.

short void
#

So if one PlayerState has the RaceEnded boolean set to true, it can replicate it to all PlayerStates?

fossil spoke
#

If that variable is set to Replicate, yes.

short void
#

I see

fossil spoke
#

Remember, the PlayerState and GameState exist on all Clients for all Clients.

short void
#

Correct, so would you recommend setting Race Ended? as Replicated or Rep with Notify?

fossil spoke
#

Well what purpose is it serving? What information is it trying to convey, what systems/events rely on it being changed?

#

Keep in mind, I didnt specify that you needed to move that variable to the PlayerState, only how it is set.

#

Whichever PlayerState is the one to complete the final lap is the one that would be setting it to true.

#

It can remain on the GameState, since its specific to the outcome of the game itself, not necessarily specific to an individual player.

short void
#

It's a timely event that lets other clients know that the winner has been awarded, so when they cross the finish line, they run separate logic and not the logic that the winner receives

fossil spoke
#

If there are subsequent consequences for the change of state of that variable, then setting it to RepNotify maybe an option for you to enact on that change.

short void
#

I'll let you know if this works

fossil spoke
#

Multicasts are generally unnecessary, there is usually a better way to handle things. Sometimes they are useful, but its important to understand when and where.

short void
#

So that worked as expected, but for some reason, at this branch node, all cars seem to travel through false, even though the RaceEnded? bool seems to be getting set to true

#

Variable Set! prints when the client finishes the race, but when other people finish the race, WB You Won Widget is getting added to their viewport too, even though they didn't win

#

Until the server's car crosses the finish line, then the variable is set and people go through True on the branch

fossil spoke
#

This may need to be an Server RPC to set the variable?

short void
#

I'll try that

#

That did it

#

Thank you Matt... I am forever grateful

fossil spoke
#

πŸ‘

blazing spruce
#

Hi, im trying to make a 'noise detection' system where it displays a widget at a players last known location, I've got it set up so there is a radius overlap for my BP_Caretaker character class, anytime any BP_StudentBase character enters the overlap it starts a timer, if the player is moving whilst inside the overlap it'll display the noise indication widget every 5 seconds by spawning a separate actor that contains and displays the widget then destroys itself after 5 seconds, if the player stop moving it'll invalidate the timer, if they start moving again whilst still overlapping the radius it relies on the RepNotify to start the timer again, I've got everything working now but I only need the widget to be display on my BP_Caretaker class regardless of it its the client or server who is the caretaker character

#

So i need the BP_StudentBase character to spawn the BP_NoiseLocation actor as its from their location, but only be visible to the BP_Caretaker character?

fossil spoke
#

@blazing spruce Since this is a local only effect, you shouldnt need any RPCs.

blazing spruce
# fossil spoke <@605390088247050271> Since this is a local only effect, you shouldnt need any R...

Interesting... If i dont have the start timer event as run on server the host player playing as the Caretaker class wouldn't see the widget when the Student class player would overlap, only the Student class player themselves would see the widget, but what I'm trying to make it so the Student class spawns the actor that displays the widget but they shouldn't see it themselves, only the Caretaker class should

#

I dont want the clients spawning actors anyway do I? wouldn't I want the server to do that considering the Caretaker class could be a client or a server player

fossil spoke
#

Overlaps can occur on all Clients/Server/Host. So for a cosmetic type event the Client that wants to know this piece of information (Caretaker?) can spawn the Actor as needed.

#

You just need to work out who should be spawning what and when.

dark edge
#

In Caretaker just filter by IsLocallyControlled and then only whoever is the caretaker will do the thing

fossil spoke
#

You have the When (overlap starts the timer on that Client, which in turn does the spawning.)

dark edge
#

unless you want everyone to see the stuff

fossil spoke
#

Who, you need to work out as being the Caretaker which would start the timer for themselves.

#

Thus only spawning the Widget Actor for the Caretaker.

blazing spruce
#

So the Student class is the one who spawns the actor because it works off of their GetActorLocation so I need the Student class to do the spawning, but the Caretaker class calls the start timer event on the Student class when overlapped, which spawns the actor that displays the widget

#

So caretaker class needs the student to do the spawning but somehow only be visible to caretaker

fossil spoke
blazing spruce
#

Not sure what you mean?

fossil spoke
#

So the Student class is the one who spawns the actor because it works off of their GetActorLocation so I need the Student class to do the spawning

#

Just because its working from "their GetActorLocation" doesnt mean that others dont have access to that same information.

dark edge
#

In Caretaker:
Get Overlappingstudents -> spawn thingy at students locations

indigo brook
#

Hey guys, quick question

I created a multiplayer prototype with a listen server config. It works fine and well on my machine but I'm about to start riffling off some builds to friends. Will they be able to see the hosts server fine? Do I need to do some IP magic? I did it via blueprints. Port forwarding? Does it "just work"?

fossil spoke
blazing spruce
indigo brook
fossil spoke
#

Sessions are sessions regardless of what platform.

#

But yes, thats what Im talking about CreateSession.

indigo brook
#

Rock on, thanks a bunch!

dark edge
#

if it's not important for the student to know anything about this whole system then they shouldn't do any of it

blazing spruce
#

The widget displaying depends on if the student is moving or not, if they're not it shouldn't spawn

#

unless they start moving again

dark edge
#

just check velocity

#

Locally. Caretaker can just look if the overlapping students are actually moving

#

I would just have a timer at 5 seconds and every time the timer fires, get all overlapping students, and if their velocity is > SomeNumber, then Do the Thing

#

Timer -> get overlapping actors by class Student -> for each student -> if velocity > somenumber -> show thingy at Student.ActorLocation

#

dummy simple

low helm
#

Add movement input once

#

Add the vectors together

#

You can just read from MOVERIGHT without an event

elder sable
#

Is it ok to use the playerstate as net owner ?

deep shore
wheat niche
#

hey, i want to create a advanced steam session in c++ i got so far: but it wont create a session because a player controller is missing or am i wrong

{
    FOnlineSessionSettings SessionSettings;

    SessionSettings.NumPublicConnections = 5;
    SessionSettings.bShouldAdvertise = true;
    SessionSettings.bUsesPresence = true;

    // Get the current Steam name
    FString UserName;
    if (IOnlineSubsystem::Get()->GetIdentityInterface().IsValid())
    {
        UserName = IOnlineSubsystem::Get()->GetIdentityInterface()->GetPlayerNickname(0);
        GEngine->AddOnScreenDebugMessage(-1, 30, FColor::Green, FString::Printf(TEXT("Current Steam name: %s"), *UserName));
    }
    else
    {
        GEngine->AddOnScreenDebugMessage(-1, 30, FColor::Red, TEXT("Failed to get the identity interface"));
        return;
    }

    SessionSettings.Set(TEXT("SessionName"), UserName, EOnlineDataAdvertisementType::ViaOnlineService);

    IOnlineSessionPtr SessionInt = IOnlineSubsystem::Get()->GetSessionInterface();
    if (SessionInt.IsValid())
    {
        FOnCreateSessionCompleteDelegate OnCreateSessionCompleteDelegate = FOnCreateSessionCompleteDelegate::CreateStatic(&USteamLibary::OnCreateSessionComplete);
        OnCreateSessionCompleteDelegateHandle = SessionInt->AddOnCreateSessionCompleteDelegate_Handle(OnCreateSessionCompleteDelegate);
        SessionInt->CreateSession(0, NAME_GameSession, SessionSettings);
    } else
    {
        GEngine->AddOnScreenDebugMessage(-1, 30, FColor::Red, TEXT("Session interface is not valid"));
    }
}```
deep coral
#

what is the difference between set hidden and turning off visibility in terms of performance?
are they the same when it comes to draw calls?

deep shore
random verge
#

anyone here using iris and have it enabled by default in their engine build and actually get the engine to compile?

#

MassCrowd module is shitting the bed when I try to compile with iris on by default at the engine level

#

and UIFramework

fossil spoke
#

Iris is super experimental, I would be surprised if it was stable at all.

random verge
#

its stable enough to use, I just don't want copies of engine binaries for each target that uses it so I'm trying to enable it at the engine level

#

if you enable it at the project level, it requires BuildEnvironment = TargetBuildEnvironment.Unique which seems pretty excessive

peak sentinel
#

Fortnite doesnt use it yet, Epic doesnt recommend yet either

random verge
#

so?

#

people are using it. it works. I'm just trying to enable it engine-wide which is where I'm having the issue. I was told that it just needs to be enabled by default at the engine level and no other changes needed. Doesn't appear to be the case though

surreal niche
#

Hello everyone, I'm not sure if this question goes here exactly but I've started to mess around with multiplayer recently and I'm not sure how to deal with this problem.

#

Are you supposed to have a sort of fixed simulation tick to be able to reliably sync client and server?
What I mean by that is while the regular Tick is tied to the render frame and would be used to interpolate values, this fixed tick would be something sort of like the Unity FixedUpdate where the gameplay simulation only updates say 30 times per second or any other fixed but arbitrary value?

#

I've read about lag compensation and all sorts of techniques but I'm not sure how to use them if the server isn't ticking the gameplay/simulation at a fixed rate

#

I could be terribly misunderstanding something, but it's obvious that the server and client DeltaTime are going to be different on Tick, so if you don't use a technique like what I described above the game state would get out of sync pretty fast.

thin stratus
#

@surreal niche well by default nothing will go out of sync. Are you thinking about some specific feature or problem that you encounter?

surreal niche
#

Perhaps it's just that I'm thinking about it wrong

#

But as an example, the movement of a Pawn

#

If the client is sending an RPC to the server for it to calculate movement, while at the same time calculating that movement on the client (so you don't have to wait for the server response) the DeltaTime used to calculate the movement wouldn't be the same

thin stratus
#

The Character has a Character Movement Component that you can look at if you want to know how they keep things in sync

surreal niche
#

Yeah, that was 10k lines long though, and honestly my eyes glazed over. I figured understanding that would take me longer than asking!

#

I mean, it has to be a rather common problem

thin stratus
#

The Client usually sends its Timestamp to the Server

#

And the server calculates the client delta time from that iirc

#

Or rather the delta time since last move

surreal niche
#

So, the client and server sync clocks, and then you use timestamps to calculate the delta since the last processed input?

thin stratus
#

It's a bit more involved. Not 11k lines but it sure is easier to have a look at the SavedMove and Server Move functions

surreal niche
#

Gotcha, I'll check em out!

#

Thank you for pointing me in the right direction, I can work with that

thin stratus
#

It's probably easiest to just start in the tick function of the component.

#

And then take the branch that runs for autonomous proxy

#

Which then gets split into client and server (cause listen server is a thing)

#

Followed by performing and saving a Move and ultimately sending it to the server

#

Server then calculates some stuff, also performs the move and either acknowledges it or corrects the client

surreal niche
#

I'll check what the component does and see if it untangles my brain

thin stratus
#

If corrected you then have the reconciliation part, where the client replays all moves that are newer than the corrected one so the correction isn't too big

#

There is also a performance improving method in that whole system called CombinedMoves where the client sends one move instead of two if the moves together result in the same destination

#

But that's usually only being used if the client has more than 60 fps (default setting)

#

That's kinda all I can give you here. Rest is the CMC :<

surreal niche
#

Wait, so here's something that just popped in my mind

thin stratus
#

(character movement component)

surreal niche
#

That means that the server could be running at 30 fps and the client at 120

thin stratus
#

Correct

surreal niche
#

Gotcha! Thanks for all the info

shy prism
#

Kinda butting in here, but while on the topic, is the client timestamp different from the server world time seconds held by the game state?

thin stratus
#

You can always have a Listenserver with terrible toaster PC

thin stratus
#

That value is replicated and averaged . And then reset once in while (GameState)

#

There is a pinned post in this channel that gives you some code for a better generally synced timestamp

shy prism
#

ahh i see, thanks

surreal niche
#

I think I'm understanding input incorrectly at this point

#

How would a 30 fps server handle potentially 120 fps of input?

thin stratus
#

Could be

surreal niche
#

Does it queue them? Average them? I should probably toy with that before asking

#

Networking is really fun but definitely not simple. I'll take my brain home for now, thanks for the help!

#

Nevermind, I lied, this question is unrelated but I just remembered it.

#

Say you have a component that handles movement (or it could be anything really), is it a best practice to also have all replication code in there, or should you have a separate replication component?

thin stratus
#

Epic itself had the replication of the CMC in the character

#

Idk if that is still a necessary step but I honestly never bothered and just replicated the component

#

My own that is, not the CMC of course

surreal niche
#

I see, so in your case hypothetically you'd have a FooComponent that handle both whatever the component does plus it's own replication, instead of having a FooReplicatorComponent to handle just replication.

thin stratus
#

Yeah 100%

#

If at all the actor would handle replication

#

Making a second component for it is definitely wrong

#

Components usually only do their own stuff and talk to the owner (actor)

#

UE doesn't have a system to require another component to exist on the actor

#

It's not the same as scripts in unity

surreal niche
#

I see, thanks again! My confusion there came from a course that recommended exactly that but I just couldn't see the benefit in doing such a thing

quasi tide
surreal niche
#

Hit on target

modest crater
#

Can someone tell me when id use HasAuthority vs IsLocallyControlled

#

or just some examples

dark edge
#

it's possible to have authority AND be locally controlled. That's a listen server's pawn / playercontroller

modest crater
#

like a HasAuth check that wouldnt normally run

dark edge
#

A good setup will work whether singleplayer, listen server, dedicated server, or client

modest crater
#

alright cool, im like 4 days into networking so im still nooby ahahj

twilit radish
#

TIL Async Physics were sneaked into UE 5.1 without any patch notes whatsoever lol.

#

As an experimental feature of course though πŸ˜›

fathom aspen
#

Wondering why this wasn't celebrated publicly?

twilit radish
#

πŸ€·β€β™€οΈ

prisma snow
twilit radish
#

Slower as in?

prisma snow
twilit radish
#

That has nothing to do with async physics, that's the chaos engine it self. Async physics are referring to a fixed step physics simulation.

#

But yes, from what I've heard the physics engine is indeed not too great on performance quite yet.

prisma snow
#

which is the one doing the async physics

twilit radish
#

I mean technically it may in the end still be more efficient than the previous system if you use async physics as you now do not have to bother with ticking your physics as much. Which is lame yes, they should totally fix the performance and I'm sure they will over time πŸ˜›

twilit radish
#

(assuming you don't set your physics frame rate absurdly high)

prisma snow
#

better put a very very fast timer instead of ticking that surely improves performance

twilit radish
#

But I'm more interested in the multiplayer capabilities it gives than the performance.

prisma snow
twilit radish
#

It should increase determinism because of that though, but no it's not fully deterministic. Unreal also will likely never implement that as barely any games truly need it.

#

However a fixed physics frame rate allows for some cool multiplayer stuff such as better rollbacks and in general even prediction. As an example the way the regular CMC works is really awkward compared to how a fixed frame rate can implement a system like that.

gloomy tiger
# rich furnace I've tested Find Advanced Sessions last night on two separate computers and stea...
Epic Developer Community Forums

Hi. I am currently on Unreal Engine Version 5.0.3 and I am using the Advanced Session and Advanced Steam Sessions. I have a multiplayer menu where the clients can join sessions. On join session the client joins a β€œlobby menu”. On ready up, the server can start the game and server travels the clients to a game map. What’s actually happening is...

rich furnace
twilit radish
#

They just 'completely' broke the Steam sessions in 5.1 and didn't even release a hotfix? Great stuff :/

twilit radish
#

Imagine being able to.. You know.. Actually play when you're the listen server.

#

Also they straight up put it under a CVar within the CMC, it does not automatically switch over lol.

verbal tendon
#

5.1 can haz broken stuff

#

πŸ˜„

twilit radish
#

Not allowed πŸ˜›

#

I wanted to look at how the CMC handled a specific part of the async physics until I noticed the CVar that I did not previously used x)

#

Really wish we had someone from Epic who would read this chat. Would be nice to know if they still plan on doing anything with it πŸ˜„

verbal tendon
gloomy tiger
verbal tendon
#

This is by far not the only thing, but it is the one thing that currently impacts our team. And we are not at a point in time where we have devops setup, and can run a custom engine build

quasi tide
#

They also broke Anim Linked Layers in 5.1 - by making the feature pretty much useless.

#

Flat out doesn't properly link another anim class.

gloomy tiger
verbal tendon
quasi tide
#

Only way to get it to work is to copy a working version of the node and then paste πŸ˜…

#

So you can go to a previous install and copy & paste that one to a 5.1 project.

quasi tide
verbal tendon
#

😁

gloomy tiger
#

You guys know the policy for minor patches?

#

Like, can we expect a 5.1.1 or something?

quasi tide
#

Β―_(ツ)_/Β―

verbal tendon
#

if enough of us tweet @TimSweeneyEpic and complain loudly enough

gloomy tiger
#

Poor Tim Baijens

#

I mean, if we could gather some intel related to these issues to give the manifesto a rationale, I wouldn't be against making some Twitter noise, lol.

twilit radish
#

5.2 is already a branch on Github, would not expect a 5.1.1 any more.

native vector
#

so i was poking in source code and re writing some stuff i dont remember replicated physics actors being so smooth
did i fix something ? by mistake
i remember on client replicated physics actor are kinda laggy ?

twilit radish
#

I mean you have essentially no ping in the editor, try turning on an emulation profile and see what that does I suppose.

native vector
#

on emulation profile is set to average
it is smooth ye there is a lag with interaction but this is expected

wooden abyss
#

I have a question regarding switching levels in a listen server/client model scenario. Right now I'm using the async loading screen plugin for loading screens when opening a new level. Now i have added a lobby level that is opened before the actual gameplay level. In the lobby level I use the execute console command node with "servertravel [levelname]" to open the next level. But there is a delay of like up to 5 seconds before loading screen starts and the new level starts loading. Is there a better solution to solving this? Right now I'm working solely with blueprints, but I'm not shy to use some c++ if that might be a solution

#

This is my current level transition πŸ˜…

blazing spruce
dark edge
#

although I'd lose the event overlap and end overlap

#

just have the timer run forever, for the LOCALLY CONTROLLED pawn

#

in the case where the timer fires and there's nobody in the area, nothing happens

blazing spruce
blazing spruce
#

Okay so if i put the IsLocallyControlled check on the timer event and call it on begin play, the host playing as the caretaker class returns false so the timer doesn't get started?

red pollen
#

Hey.
Just wondering what is the best way to start creating a server-auth networked game in UE5?
I have a good grasp on networking in general, have worked with lots of tools.
I see that the 3rd person template project has replication, is this also server-auth and client predicted?
Are there any tools that anybody would suggest looking into? I have looked into GAS but unsure if it is suitable.
Would it be possible to just start digging into the blueprint system and create client predicted actions, or would it be best to use C++? (I am not very familiar with the language)
Any help would be very much appreciated!

dark edge
#

The most important thing to keep in mind is that this actor exists on ALL machines.

#

if you want it to do something on the owning machine, gate by LocallyControlled

#

if you want it to do something on the server, gate by HasAuthority

#

It'll be both in the case of a listen server but that's fine, just gate the appropriate stuff and it'll all just work

dark edge
#

Everything else is up to you

red pollen
#

Are there any decent tutorials on using GAS to make an ability that's client predicted? Can't seem to find much, everything is just how to create one.

blazing spruce
# dark edge It'll be both in the case of a listen server but that's fine, just gate the appr...

So ive got the timer event being called from begin play with a IsLocallyControlled check before it which fails, but if i put a timer before the IsLocallyControlled check it works, i know this isn't a fix tho it just means beginplay is being called before something else that makes IsLocallyControlled go true so i just need to start the timer somewhere else thats a little later for it to work.. however, the client who is the student class is still seeing the widget spawned, what am I doing wrong?

#

And this is the begin play but again im gonna change this once i get the widget not showing for clients to be called somewhere else without the delay ofc

dark edge
#

Just do it like this.
Begin play -> locally controlled? -> set timer

Timer -> check for students -> for each student -> spawn the thingy

#

the thing you're spawning should NOT be replicated

blazing spruce
#

i had replicates ticked on that actor lmao

#

you're the man! appreciate your help mate

dim trail
#

Do multicasts cost less than server rpcs?

#

I’m worried about multicasting damage text rather than keeping it only on the client

#

And how it might affect the load on the server

fossil spoke
#

Same with Replicated Variables.

#

You want to send as little attached data as you can get away with.

#

Instead of sending Text itself, send an Integer which represents a lookup ID into a table which all Clients would have that they can use to retrieve the Text they need.

#

Sometimes you just cant get around having to send something like Text, a chat system for example. Kind of need to send exactly what the Player is wanting to input. And thats OK, because there is just no way around that.

dim trail
#

So, damage text would be quite intensive then

#

Wouldn’t sending an integer for a lookup table be almost exactly the same thing though?

fossil spoke
#

Sending text is far more expensive than sending an Integer. I can only give you generalized knowledge without understanding exactly what you are hoping to achieve.

dim trail
#

Well, player hits enemy for 1222 damage, and the text actor floats above their head

#

For example

fossil spoke
#

I’m worried about multicasting DAMAGE TEXT rather than keeping it only on the client

#

Its important to be specific.

#

You specifically said Damage TEXT

#

Would be part of the RPC (Multicast)

#

Sending the damage value as a float or integer would be more performant, yes.

short arrow
#

couldn't they just predict the damage that was does? or figure it out themselves

fossil spoke
#

Probably, but we dont know anything about his setup so no point in speculating about what he could or couldnt achieve in that regard.

hybrid crown
#

Dunno if this is fitting in the context, but if you have rpc who fire really fast (like a gun shooting), this from far the best way to do it.

fossil spoke
#

This isnt related to his question

hybrid crown
#

Oh, he is not asking for sending/receive data in a cheap way like damage ?

dim trail
#

The way I’m doing it right now is multicasting a widget every time the player deals damage

#

I’m assuming this is really not performant at all and there are better ways of doing it

hybrid crown
#

Yup -> Burst counter.

#

but this is really if you need optimisation.

#

Like for a gun this make sens, as you can send sometime about 20 RPC / seconds (depending of the rate of fire of the gun).

dim trail
#

Doesn’t the burst counter assume the widget will be the same every time? The damage text is variable

hybrid crown
#

The damage amount you mean ?

dim trail
#

It could be 500, or 200 etc

#

Yes

hybrid crown
#

If the damage are deterministic, then you don't need to send the value.

#

As someone mentionned earlier.

dim trail
#

Not sure what you mean

hybrid crown
#

Your damage are random ?

dim trail
#

No

hybrid crown
#

So, you "know" what is the amount of the damage.

#

The client can figure it out.

dim trail
#

Yes, but other clients also need to see

wooden abyss
#

Anyone knows why this returns an Array with 2 LobbyController instances for the server but for the server the host lobby controller is just an unknown class?

hybrid crown
#

Yeah, they can figure it too.

#

let's said your damage is something like SkillDamage * DistanceFactor * Power (i don't know).
This is value you can have shared on all your clients.

#

so you can recalculate the damage output on the client.

wooden abyss
#

This is what the server gets in the array

#

And this on the client

#

Oh wait.... i think its the own controller thats unknown

dim trail
#

I haven’t played around with it(or understand fully) but how would the main client know how much damage the proxy clients are doing if the calculation is done on the server?

hybrid crown
hybrid crown
#

And your server only need to know that you have attacked.

#

After, if i can have the context... it will be better to understand, are you doing somekind of RPG ? is it skill based ?

dim trail
#

Basic tab target combat similar to WoW

#

Using GAS

hybrid crown
dim trail
#

Yes

hybrid crown
#

Then burst counter are not so usefull in this case, correct.

#

But you send a multicast RPC when you execute a skill, correct ?

#

If yes, all your client need to know, is this : what skill has been thrown.

dim trail
#

It depends. I only multicast effects

#

But, I understand what you are getting at

hybrid crown
#

The "good network" practice is : you only send data you absolutely need.

#

So if you know what skill who has been throw, then you don't need to know the damage output, as you can figure it out on the client.

#

Let's make it simple :

If your skill is "fireball", you know fireball do 500 fire damage (ex)

#

So your ServerRPC will just contain "Fireball"

#

as every client know this is doing 500 fire damage.

#

and the multicast will return fireball too

#

Only the skill who has been thrown.

#

You can attach some bool like bIsCritical bHaveMiss

#

(and better, you can even compress those data but it's more advanced stuff, and only needed in extensive use of network, like mmorpg)

sweet ore
#

how can i add some delay to players to avoid stutter (jittering) because in my game players movement is very bad while ping 60 - 90

dark edge
modest crater
#

How reliable is it to have something like a damage widget popup run in client side using an OnRep_HealthChanged or something? I assume its cheaper than a Multicast?

gloomy tiger
#

OwnerOnly rep condition?

#

if so definitely better since your other clients (i.e. clients that dont care about that data) won't receive any useless packets.

dark edge
modest crater
modest crater
sweet ore
gloomy tiger
# modest crater Is this still preferred since its only a damage widget (cosmetic)? I just want t...

I don't know your game is about and how frequent you'd expect other clients to receive these health changes notifications, but:

  1. If it's something really frequent and you're really into responsiveness, etc, do it w RepNotify without conditions.
  2. If it's something really frequent and you want to make sure it never misses, do it w Multicast
  3. If it's something that can wait a little and a small delay would be fine, perhaps it would be a good idea to schedule these health changes.

And when I say 'frequency', I'm talking about really intense fights where people are losing/recovering health at all times, etc.

modest crater
dim trail
lost inlet
hybrid crown
smoky dune
#

using the health on server side as check?

prisma snow
#

if the client cheats he might deal more damage locally but it will never propagate to other users

#

(nor the server)

wooden abyss
#

So, I've already asked this question in #multiplayer but didnt get an answer. I'm using the advanced steam session plugin and listen server/client model. After packaging a development build I can run the .exe on my local machine and get the steam overlay in-game. When I try to copy all the files to a different machine with a different steam account the game is not able to use the steam overlay and I cant find any games. If I disable the steam overlay and test it locally with 2 standalone games it works fine. So now I'm wondering if there is something wrong with my configuration of the subsystem or if there is a different reason why I cant find a session over the steam subsystem. Can anyone give me some pointers?

fathom aspen
fossil spoke
wooden abyss
#

@fossil spoke I did use seperate steam accounts. And I'm still using the developer appid 480. My game isnt yet "on steam" so what do you mean by "both accounts own the game"?

fossil spoke
#

If you are using 480 then thats ok

twin juniper
#

Are reliable functions have the same performance like if the engine would be using TCP?

wooden abyss
#

So using 480 should work. But why does the steam overlay not work with my packaged dev build on a different machine with a seperate steam account? Is there some configuration that needs to be set? I just made a normal packaged dev build for windows

twin juniper
#

I had the same issue with my game. I can check when I get on my pc

red pollen
#

Could try this. I remember having to do this

wooden abyss
wooden abyss
#

Ah well it's just about the steam_appid.txt. I did try to add that but to a different location. I'll try this again and see if it changes anything

red pollen
#

Fingers crossed for you

wooden abyss
#

If I'm using the listen server/client model do I need to actually add this line? "If using sessions" sounds like I do when I use the advanced sessions plugin πŸ˜… Just making sure cause a lot of older tutorials I saw on this didnt even have this line

#

; If using Sessions
; bInitServerOnClient=true

#

In the DefaultEngine.ini

red pollen
#

I'd try with first and then without after

#

I mean, it looks like you wouldnt

#

Because you're not gunna have a "Host" with a plaeyr who is server

twilit radish
fathom aspen
#

therewasanattempt.jpg

twilit radish
#

Also the entire system is whack. The callback for the async tick does not run on the game thread…

#

So you have to hook directly into chaos to do anything xD

fathom aspen
#

Wdym? Thought you went to make Rocket League 2 with that cvar

twilit radish
#

πŸ˜‚

#

They are actually porting to UE 5 though.

fathom aspen
#

Nanite RL πŸ‘€

twilit radish
#

Maybe I was a Rocket League dev all along!

strong pond
#

Anyone has any idea why Local Multiplayer is not working with a Dualshock 4? I have skip Assigning gamepad to Player 1 but both my controller and keyboard posses the same pawn always

wooden abyss
red pollen
#

So I am really rusty. Maybe someone else knows

wooden abyss
#

Well I have changed it now and just restarted UE5 and packaged a build

#

Will see if it changes anything

#

Gonna test both settings now πŸ˜„

wooden abyss
#

@red pollen Well, adding the steam_appid.txt didnt change a thing. On my local machine it works fine even without the .txt file. When I start the game I can open the steam overlay. As soon as I copy the files to a different machine with a seperate steam account it doesnt work.

#

Is there anything necessary for steam to detect it?

#

I know I could add the game manually to steam and the overlay works but this seems like an unnecessary step

twilit radish
#

What does your DefaultEngine.ini look like?

#

Also Steam is actually running right? πŸ˜›

wooden abyss
#
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

; If using Sessions
bInitServerOnClient=true

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"```
#

Thats all i added the the DefaultEngine.ini

#

Yes I actually double checked if steam was running πŸ˜…

twilit radish
#

Can you try removing bInitServerOnClient and see what that does?

wooden abyss
#

Just saving the .ini and restarting UE is enough for the changes to take effect?

#

And obviously re-packaging of course

twilit radish
#

Should be yeah, I don't think you even need to restart the editor as a packaged build should detect the change. But just to be sure I suppose.

wooden abyss
#

I'll try and package again πŸ˜… will be back in a while πŸ˜‚

twilit radish
#

Also try making a development build so you can check the logs.

wooden abyss
#

I always make a development build

#

Far from making a shipping build yet xD

twilit radish
#

If you still have the logs btw try and see if you can find something in there. For example something along the lines of:

Failed to initialize Steam

wooden abyss
#

I will take a look

#

Its weird though cause it does work on my local machine

#

But guess thats a general problem πŸ˜… "works on my machine" doesnt mean shit πŸ˜‚

twilit radish
#

πŸ˜„

wooden abyss
#

Do I need to configure a development build to log?

#

Cause I cant find any logs on my packaged game

#

Or should I package as DebugGame?

red pollen
#

Project - Packaging selecting Build Configuration : Development

#

Maybe

twilit radish
#

Which is dumb btw. Logs are absolutely invaluable if someone has issues with their game. Especially if you log stuff your self too.

wooden abyss
#

For Distribution is disabled. I activated the "Include Debug Files in shipping builds " option. Will see if that generates logs

twilit radish
#

That's not really related to logs.

wooden abyss
#

Shouldnt the Folder be called "WindowsNoEditor"? I just realized mine is only called "Windows"

#

Or did that change with UE5?

twilit radish
#

It should be WindowsNoEditor yes.

#

You are packing through the editor right?

wooden abyss
#

Yes

#

I might try using the actual Development setting and not the "Use Project Setting"

#

Might be something wrong with my settings

twilit radish
#

Can you screenshot your "Packaging Settings" (in specific the Project section)?

wooden abyss
#

The default "Development" Settings seem to do the same

twilit radish
#

Are you using a BP or C++ project btw? Mine just generated "Windows" as well with a BP project.

#

So I guess that should be fine then πŸ€·β€β™€οΈ

#

Mine does however have a log inside:

Windows\TestProject(your project name)\Saved\Logs

wooden abyss
#

I did create a BP Project but i have added a c++ class afterwards

#

Saved Folder doesnt exist for my build

twilit radish
#

But if you don't have a saved how the heck does your game even run lol.

wooden abyss
#

I dont really know πŸ˜‚

twilit radish
#

Can you try removing your explicitly set build target? I don't think a single project I created has that.

red pollen
#

Just wondering if you started the project with Starter Content? Apparently that has some settings ticked to have a Saved folder created? Maybe lol

twilit radish
#

The project I just packaged to test with did not have starter content.

wooden abyss
#

I did use the Third Person Sample to create my project

#

I'm packaging without the Build Target now

torpid girder
#

hello, i am trying to understand why my player isn't starting in spectator mode, i set bStartPlayersAsSpectators = true; in the gamemode, and i am running as a listen server

wooden abyss
#

Well nvm

#

The build target setting was the culprit

twilit radish
#

@torpid girder The spectator system is an absolute mess of a system. Would highly recommend just doing it your self with your own bool (or similar) to indicate a spectator somewhere and running logic from that.

wooden abyss
#

Now it did create a log

#

Thank you @twilit radish and @red pollen for your time! I will try again and see if the logs help me with my problems πŸ˜…

torpid girder
#

but what would i know

red pollen
twilit radish
#

I tried to use it at some point, I don't think Epic ever actually used it them selves as it fell apart with several bugs for me within minutes. You're free to try though, as always take people's advice with some salt but it's not complicated to do it your self without the weird system Epic created xD

twilit radish
twilit radish
wooden abyss
#

Yeah first look already showed that the steam subsystem shuts down when the game is started

#

I just send the log from the other machine over to mine

#

Gonna check the logs now

red pollen
#

Keep us posted

wooden abyss
#

I'm kind of confused after reading the log. Need to test it again and I will come back afterwards. There seems to be some fishy things going on....

wooden abyss
#

Turns out the folder where my wife pasted the files to was protected. Game wasnt even able to write the log file

twilit radish
#

I'm giving up on async physics for now, what a mess. The callbacks all run on the actual physics thread which means basically no regular movement methods work (Like sweeping with SetActorLocation for example) because those all check for the game thread. Then you run into the issue that actually doing anything requires you to simulate physics, which I didn't want in the first place along with a very unintuitive API. The CMC uses some weird workaround with a callback on the physics thread pushing and pulling data from the game thread(?) and then doing stuff with that πŸ€·β€β™€οΈ

wooden abyss
#

I've pasted the files to a different folder where she had complete access and everything worked fine

#

Stupid mistake that I didnt realize but atleast I figured it out now πŸ˜…

twilit radish
#

Nice xD

wooden abyss
#

Thanks again for all your support πŸ˜„

red pollen
#

@wooden abyss Steam overlay on 2nd pc?

hybrid crown
#

You just display them

wooden abyss
red pollen
tired mortar
#

Hi guys, what's the best way to synchronize Actors props (like materials/static meshes... that can change during the game) with a new Client joining in after these changes? Is RepNotify the best solution for these cases? Because it seems like i need to replace most of Multicast functions with a RepNotify variable, am i right?

twilit radish
#

In general it's a good idea to use replicated variables instead of things like multicasts yeah. They first of all deal with packet lost and indeed also deal with new joining players / actors that become relevant to someone again.

tired mortar
#

So should i replace the Multicast function with... booleans?

#

with RepNotify

twilit radish
#

Booleans?

chrome bay
#

If you're modifying the state of the object it should be done with properties

tired mortar
#

Yeah i mean, if a server wants that an Actor downloads an image and displays it on its mesh, the server should change some variable to trigger the RepNotify on that Actor

chrome bay
#

yep

tired mortar
chrome bay
#

You still do it with variables that reflect the state

#

E.g. CurrentMesh etc.

#

Using multicasts won't just break late join, it breaks relevancy too

tired mortar
#

I tried to replicate a uobject, but it seems like it doesn't work

chrome bay
#

Depends what the object is

tired mortar
#

A DynamicMaterialInstance for example

chrome bay
#

But that's also irrelevant for multicast vs property - you can't send a UObject over the network at all unless it can be resolved

#

You can't replicate those

#

You can't send them via Multicast either

tired mortar
#

Yeah i know

#

That's why i change it in each client individually

chrome bay
#

You send the properties that the client needs to make their own identical material instance at their end

#

And ideally you find a way to send the minimal amount of info possible to recreate that state

tired mortar
#

But my problem is if another client joins in

chrome bay
#

Exactly

tired mortar
#

How do i recreate the state only for that single client?

chrome bay
#

The client does it themselves

tired mortar
#

With RepNotify u mean?

chrome bay
#

E.g.

OnRep_MaterialParams
{
    SetupMaterials();
}```
#

yeah

#

always with rep notify

tired mortar
#

Yeah but repnotify on what variable?

#

On the dynamic instance?

chrome bay
#

Whatever you need to replicate πŸ™‚

#

No

#

Here's an example - if you want the mesh to change colour based on the team, you just replicate the team number

torpid girder
#

hello, i was wondering, can i replicate a TArray<UStruct> CharacterData ? I can't see it being replicated, as i put a UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Characters) on the

chrome bay
#

When the client receives the team number, they set the materials locally

#

You don't replicate the materials themselves

torpid girder
#

DOREPLIFETIME(AAvalonPlayerControllerBase, CharacterData); so its configured correctly

tired mortar
#

Ooh maybe i understood.
Because in my case i have an array of image urls that each clients need to download

chrome bay
tired mortar
#

So i should put the repnotify on the urls ?

#

Ooh ok

chrome bay
#

It's an odd case, but yeah that's what you would do

chrome bay
#

Should work fine, so long as FAvalonCharacterData is a USTRUCT() with it's own UPROPERTY's

torpid girder
#
    UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Characters, Category = "Avalon|Data")
    TArray<FAvalonCharacterData> CharacterData;
#

sorry my bad

chrome bay
#

And FAvalonCharacterData has UPROPERTY's?

#

If so, should all work

torpid girder
#
USTRUCT(BlueprintType)
struct FAvalonCharacterData
{
    GENERATED_USTRUCT_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName _id;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName character_class;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon|Character")
    FString name;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName owner;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName hair;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName actor;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName skin;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName gender;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Avalon")
    FName race;

    FAvalonCharacterData()
    {
        _id = NAME_None;
        character_class = NAME_None;
        name = FString::Printf(TEXT(""));
        owner = NAME_None;
        hair = NAME_None;
        actor = NAME_None;
        skin = NAME_None;
        gender = NAME_None;
        race = NAME_None;
    }
};
chrome bay
#

yeah that will work fine

#

I'd check to make sure the actual itself is replicating

torpid girder
#

i bet i forget to set replicates = true

tired mortar
#

I think that also OnRep_Characters should have UFUNCTION() on it

twilit radish
#

FYI. You can just do name = TEXT("");, perhaps even the empty string literal "". But not sure about the latter πŸ˜›

twilit radish
#

How did you check if it didn't work btw? What exactly doesn't work, does you OnRep never get called?

crude marlin
#

Hey, I'm working with a system that uses Procedural Meshes, so I have one question related to the replication of this system.

So I'm trying to attach a replicated (ProcMesh)actor component to another actor's component. While this wasn't in a networked environment, I could just use the Rename function to change the outer and attach it to the new actor. But in multiplayer, this doesn't really work if I only do the renaming and attaching server side. The clients will get this error message:
UActorChannel::ReadContentBlockHeader: Sub-object not in parent actor.

So I'm curious if anyone has an idea to move and attach a replicated component to another actor's component, so I don't have to rebuild it manually on every client, because that wouldn't be that perofrmance friendly in my case.

torpid girder
#

hello, i've been working on my replication graph, i am getting an error No ClassInfo found for AvalonPlayerControllerBase, it is very strange as i see IsSpatialized unravels the object inheritance until it gets to UObject and then crashes

wooden abyss
#

So after testing with my working steam subsystem and logging πŸ˜… I found out that the Find Sessions Advanced finds way more lobbies than I was expecting. I'm thinking it probably has something to do with multiple people using the dev id 480 for testing purposes and it also finds all those lobbies? If that is correct, is there a way for me to filter those lobbies to those that are only relevant to me (so only the ones I actually created in my game)? Or do I just have to live with that?

quasi tide
#

I believe you just have to live with it. I just got my own appid. Easier that way. Going to put it on Steam anyway.

wooden abyss
#

Yeah I want to put it on steam as well at some point but I've basically just started developing the basic skeleton of my game and wanted to implement the basic multiplayer functionality as well and then go from there. So I'm still far from going to steam and dont want to pay 100$ at this point πŸ˜‚

#

Not sure how long this will take or if I even make it to steam

quasi tide
#

I mean - you can always change the name of the stuff on Steam anyway. So even if not this game, another game.

torpid girder
#

hello, i am trying to test out my dedicated server, i am not 100% sure what mode to run in, I have a feeling i need to run two instances one server, one client

twilit radish
twilit radish
torpid girder
#

i get the impress when you play as client you are automatically connecting to the server

twilit radish
#

If you launch it in standalone mode you can see the actual process. But yes it does auto connect.

torpid girder
#

i wanted to simulate finding sessions to connect to

twilit radish
#

There was also another way but I'm trying to find it again.

torpid girder
#

hang on did UE 5.1.1 drop?

twilit radish
#

Yeah.

torpid girder
#

wow i was sure 5.2 was on the cards as the cross compile for linux info talks about a 5.2 release

twilit radish
#

5.2 branch exists which is why it's weird yup.

#

Also you can launch a server through this:

"C:\<YOUR INSTALL PATH>\Engine\Binaries\Win64\UnrealEditor.exe" "A:\MyProject\MyProject.uproject" -server -log

#

Just run it in some console with the appropriate paths πŸ˜„

blazing spruce
torpid girder
twilit radish
#
Epic Developer Community Forums

The 5.1.1 Hotfix is now live, with over 350 fixes for Unreal Engine 5.1! Feel free to discuss this release on the 5.1 Forum thread. If you experience a bug with the 5.1.1 Hotfix, please follow the How to Report a Bug guide to report it on the Bug Submission Form. Issue Summary UE-168544 Audio works with only one Media Plate Actor UE...

quasi tide
#

Oh hot damn. Finally.

#

This patch should also be what fixes the anim linked layer issue

balmy hound
#

Hi, can someone help me with that?

#

I have a function like this

UFUNCTION(Client, Unreliable)
void ClientApplyWindForces(UVehicleMovementComponent* VehicleMovementComponent, TArray<FWindForce> WindForceList);
twilit radish
#

Does it actually not compile or is it just the error from your IDE?

balmy hound
#

It does not compile

twilit radish
#

What is the compiler output?

#

(If you're using VS it's underneath View -> Output)

#

How have you defined the method inside the cpp file?

quasi tide
#

Your 2nd param is not right.

#

Just need to do what it says.

balmy hound
balmy hound
twilit radish
#

As in not the implementation but just how have you defined it?

quasi tide
#

const TArray<FWindForce>& WindForceList

balmy hound
balmy hound
balmy hound
twilit radish
#

The forum post I found lied to me 🀣

balmy hound
#

the weird thing is that I tried with * but gave me the same error

twilit radish
#
  • is a pointer. Not a reference.
quasi tide
#

Why go to a forum post when the error was right there πŸ˜…

balmy hound
#

yeah but why the pointer doesn't work?

quasi tide
#

Because thems the rules

twilit radish
#

Epic Games being Epic Games I suppose πŸ˜›

twilit radish
quasi tide
twilit radish
#

I guess I just have never had to pass a TArray in a RPC πŸ˜„

balmy hound
#

well thanks guys!

quasi tide
#

Unless the word must is just a suggestion these days 🀣

twilit radish
#

Mustn't πŸ˜›

quasi tide
#

"Must on Tuesdays"

twilit radish
#

Exactly.

#

But I guess to enforce better performance?

quasi tide
#

Sounds like a question for Zlo/Jambax

fierce grove
#

anyone had a problem with camera lag with high velocity vehicules?

twilit radish
#

Also are you sure your camera is not marked to replicate the position to the owner?

fierce grove
#

Spring arm is not replicated / camera is not replicated but when accelerating I can have some weird jitter happening

twilit radish
#

And it's not the vehicle it self at that point that jitters?

fierce grove
#

if no cameralag no problem (that's a ship but that should the same)

#

ok did my own cameralag and now it's working

peak sentinel
#

When you pass by reference, you copy the adress of the FProperty

#

at least on VM side

#

So replication framework might trying to benefit from that thing

twilit radish
#

It might be to just prevent the TArray from copying the internal data tbh. Regardless of blueprints.

peak sentinel
#

Ofc but I believe its also related with how reflection system works rather just trying to avoid copies

#

Blueprints VM is also tightly coupled with FProperty system i.e. reflection system

#

so I dont mean the BP graph there

#

the system runs everything basically

clear bloom
#

Hi guys, I have some down time at work and want to throw this question out there, if you can't answer it without additional details / blue print screenshots etc., no worries, I can ask again later when I have access to my project.

I'm trying to wrap my head around some bits of replication. I have a bool stored on my character called isCrouching that I check in my animation blueprint to run my crouch animation (couldn't get the crouch / uncrouch functions that I'm aware are replicated by default to work). But using my variables (set to replicated), my character crouches, but in a multi client environment, both characters visible on the client I press my crouch key on perform the crouch animation, and neither character on the other client do anything. I feel like I'm missing something key here to get only the character pressing the key animating on both clients. Does anyone know what I might be doing wrong?

winged badger
#

Im guessing you have getcharacter[0] wired in your blueprint update animation

#

Which makes both characters read crouching state from local pawn

clear bloom
#

Hmm, yes you may be right, I believe that is indeed the case

winged badger
#

Use TryGetPawn instead

clear bloom
#

Roger that, will try that when I get home today. Thank you very much

quasi tide
#

Surprisingly enough, I haven't dealt with a shotgun weapon type yet. I had to actually deal with it last night. I don't like dealing with shotguns in networked games. That is all.

#

Like...I get it - just grrr

winged badger
unborn nimbus
#

does UE_SERVER work for listen servers too?

#

the comment above the declaration implies only dedicated servers

twilit radish
#

Pretty sure it's only for dedicated servers yeah. There's however WITH_SERVER_CODE which can be used with both.

unborn nimbus
#

Thanks!

twilit radish
#

Although I think the purpose of the latter is mostly to just strip out code whenever you aren't using multiplayer whatsoever. Probably for smaller build sizes or something? πŸ€·β€β™€οΈ

#

So kind of depends on what you want to do I suppose @unborn nimbus πŸ˜„

unborn nimbus
#

making a plugin for single player and multi

twilit radish
#

Really wish those defines were better documented :/

unborn nimbus
#

so just need to handle both cases

twilit radish
#

It seems to suggest that it's false with a "Client only" build.

Gets whether this is a client only (no capability to run the game without connecting to a server) platform.

#

Not quite sure when that's the case though.

south crest
#

i have this in the PlayerController...very simple code to show an attack hitbox outline when a player attacks...why doesnt it replicate to all clients? character and hitbox are set to replicate. only the client who attacks sees it, and the listen server

#

all clients see the print string

twilit radish
#

Because player controllers are not replicated to other clients except the owning client.

south crest
#

where do you put RPC code then?

#

im told to put it in player controller...

twilit radish
#

You can for example use the player controller to RPC towards the server but you need to execute that multicast in for example the game state, player state, pawn or whatever is visible to all clients and makes sense.

south crest
#

damn really...its so confusing...ok thanks

twilit radish
#

It will make more sense once you have done it plenty of times. But it's indeed not always obvious in the beginning what exactly is available where πŸ™‚

south crest
#

in my FPS i put the RPC code in player character and it all seemed to work pretty good

#

obviously i still dont understand it lol

twilit radish
#

Your player character is owned by a certain client but is replicated to all clients. So that can work just fine in general.

#

The rules are pretty simple in this regard:

  • A client can only call a server RPC on an actor that the specific client owns. So their own player character or player controller to name some examples. They can for example not directly call a server RPC on the game state because they do not own that actor despite it being replicated to them.
  • An actor that is not replicated or relevant to certain clients can not receive any updates like RPCs from that actor because it simply does not "exist" from their perspective. This can be implemented per actor though and may take a bit of time to learn which exact actors are replicated to who.
south crest
#

thanks for your help Thom πŸ‘πŸΌ i have lists of these kinds of rules and still dont really "get it" but i'll keep going at it

twilit radish
#

Just keep going and you'll get it eventually πŸ™‚

quasi tide
#

Practice practice practice.

#

Can't tell you how many times I've started a super small project because I didn't understand something at first. No shortcut about it. Practice.

south crest
twilit radish
south crest
#

i like, very good

clear bloom
torpid girder
#

I've managed to get a dedicated server running, however i can't see data being replicated to the client

twin juniper
#

Hey, one question about actor dormancy - I set netdormancy equal to DORM_DormantAll. Is it normal that struct (replicated using onRep) with NetSerialize() func in struct is replicated to clients? My actor wasnt "wake up"

low helm
#

Nothing to go on

torpid girder
low helm
#

Ok general performance/planning question.

I've had variations of this conversation before but I'm old so I'm allowed to repeat. I'm working on an open world coop shooter, featuring combined arms warfare, tramways, turrets, reusable rockets (thanks Elon). I'm pretty good at writing efficient BP code, and I can afford to convert heavier functions to C++ later in development. Map size is 1x2. AI behavior is somewhat standard. So far the game runs well at a steady 120FPS in editor with AI.

So here's the question, which may require a longform conversation (I can paypal you a coffee or 2).

Should I try for Listen Server or Dedicated Server setup?
Host costly really are Dedicated Servers?
How much would a Dedicated server impact the player count?

Because it's "combined arms, I'd like to have player counts as high as possible, hopefully in the 20's or more, but solo-playability and lower budgets are also nice. Assume I can spend around 100k closer to launch.

#

Arm-chair-general advice is appreciated

torpid girder
#

if i run UnrealEditor.exe Avalon.uproject -server -log, am i running the development server?

twilit radish
#

I would kind of assume so. But I'm not 100% sure, would be really weird if it used a different target though.

fossil spoke
#

Its more of a question of what type of gameplay/genre your game is.

#

Is it session/matchmaking based?

twilit radish
#

Also.. Rather if your business model can afford it too. If that's not the case it doesn't matter because then it's no option. They are expensive πŸ˜„

low helm
#

There is a Game mode that is session based, and a Game Mode based on permanent worlds

torpid girder
#

i liked server lists more than match making

low helm
#

Either one fits what I'm doing

fossil spoke
low helm
#

Hmm

#

Mayhaps

fossil spoke
low helm
#

Well I do prefer permanent worlds, but if the player counts are lower I go for session based

#

I'm happy either way

fossil spoke
#

Ok hold on.

#

Talk in terms of Listen vs Dedicated

#

Instead of using your terms

torpid girder
#

i persist my world in an external service

fossil spoke
#

As they mean multiple things

torpid girder
#

just can't get the states to replicate down to the client

low helm
#

Ok so if clients are running listen servers, the game is easier to make, but the player counts for battles are lower.

fossil spoke
#

Sure, that can be true.

low helm
#

If I run dedicated servers, I get bigger battles

fossil spoke
#

Potentially.

low helm
#

I'm trying to gauge the relative benefit of dedicated

#

In terms of player count

fossil spoke
#

What is your game designed around?

#

Player count wise?

torpid girder
#

surely if you go dedicated that is a game design choice

pallid mesa
#

you are not tied to a player hosted machine resources

rose egret
#

where was the right place to handle Connect Failed or connection lost ?

rose egret
#

what func I dont see

#

im 5.1 btw

fossil spoke
low helm
#

It's combined arms shooter, touches of Overwatch and Planetside, but some players in the back are also sending artillery and rocket-borne-supply/turret drops, so that whole combat dynamic makes more sense with more people.

pallid mesa
#

I'd directly recommend a DS model

fossil spoke
low helm
#

24 would be excellent

#

16 is workable

rose egret
#

@fossil spoke ?

low helm
#

100 would be Sex

fossil spoke
#

Ok well the next question is then can you manage Listen Servers to support 24 players.

#

Which is unlikely.

#

My advice.

#

Support both.

#

But focus on Dedicated

#

Make sure your systems work in a Listen Server environment, but focus on working towards your target (24 players) with Dedicated.

pallid mesa
#

and in listen servers you might want to offer host migration.. and in Unreal that's complicated to implement. I encourage following the strategy Matt mentions

fossil spoke
#

This way, you can at least test gameplay design choices on a cost effective listen server, before committing to large scale tests that might cost money on dedicated servers.

low helm
#

Ok

twilit radish
#

@rose egret Engine.h has two events you can use if you like.

OnTravelFailure()
OnNetworkFailure()
or just NetworkFailureEvent and TravelFailureEvent

low helm
#

I had considered that approach to be poisonous, but you are making it sound nice to just keep both options alive, but aim for Dedicated, which is honestly more of what I want. Thanks all.

Please DM me your paypal for your coffee.

rose egret
#

@twilit radish ya I saw them now I gues they are better than GI