#multiplayer

1 messages · Page 83 of 1

ruby parrot
#

Thanks for your help(2days ago, sry IRL was catching up^^).... I had it all set up properly EXCEPT that the chest itself didnt have REPLICATES on..... I only did it for the ActorComponent(Inventory) ..... im an idiot sometimes 😄

fathom aspen
#

I would have accepted the offer if the game was more involved

austere halo
#

😅

prisma snow
#

who knows when next one comes

twilit fable
#

Okay

icy jetty
#

That is weird. Did you try to just execute on server rather than replicate to it ?

broken shale
#

Anyone have a good recommendation for a tutorial or guide to multiplayer in unreal? I’ve got three books I’ve been using and only one of them barely touches on it and I don’t see much on Amazon specific toward multiplayer and unreal

quasi tide
#

Check the pinned posts

real ridge
chrome bay
#

Nowhere else really if they're character relevant

icy jetty
glass orchid
#

my unreal crashes when i initate servertravel from a console command, but only when clients are connected. Im not even sure where to begin with debugging here 😅 net.AllowPIESeamlessTravel is set to true.

quasi tide
#

Does it only happen with PIE? Because that variable is newish and traditionally, seamless travel doesn't work in PIE

glass orchid
quasi tide
#

Probably buggy PIE behavior

glass orchid
#

this makes testing a lot more difficult unfortunately

#

setting Run Under One Process to false works as a workaround, luckily

#

i hope they fix net.AllowPIESeamlessTravel soon though

jovial charm
#

Wow thanks for the suggestion, guess I got more debugging to do today 😭

real ridge
#

i dont understand

round acorn
#

Iris is now compiled by default in 5.2.... just needs to be enabled at runtime. Now I'm curious.

icy jetty
stuck flume
#

can somebody tell he that how replication works at server side and client side?

rose egret
#

is there any delta compressing for Replicated TArray ? I don't know UE does behind the scene.
if I just change the value of first element would it send just the first element or the whole array ?

round acorn
rose egret
#

@round acorn I dont want that

queen escarp
#

erhm what coul cause a RPC to fire to client2 & server but not itself (client1) ??

queen escarp
#

well im calling this from a widget inside the player

#

but it prints on client 2&server not client 1

round acorn
#

I don't think you want to be doing this inside the widget blueprint

queen escarp
#

this is on the player_Bp

#

but its called from the widget

#

RPC´ing from widget i have noticed dosent work so staying clear of that

round acorn
#

widgets are client side yeah

queen escarp
#

any ideas :/ ?

round acorn
#

why are you switching to remote authority only?

queen escarp
#

well i tried without it same response,

#

well dont want it to be casted on the server when im applying stats etc,

#

gets duplicated then

round acorn
#

are you only checking this with the print string?

queen escarp
#

yeah

round acorn
#

if client1 is true on that branch it won't print?

queen escarp
#

omg

#

im dumb XD

#

thanks!

round acorn
#

np

queen escarp
#

that solved it,

round acorn
#

though I am still curious why you don't want the server to maintain the authoritative copy of your character stats

queen escarp
#

well my stats system is very weird and ive messed with it alot, and now it works so dont wanna mess with it more X)

#

for the time being atleast

#

also i asked eXi abot a issue im having regarding the projectiles not being "replicated" properly or shown correctly and i couldent find the solution based on his answe

#

do you have any ideas ?

#

on client 1 the trajectery isent the same as on client 2

round acorn
#

you aren't replicating the full value for the projectile's direction

#

rotation around the vertical axis is called yaw

#

your yaw is not replicating, or if it is replicating, it is not being applied on the autonomous proxy (the character as seen by the other client)

queen escarp
#

so it should be something in the projectile component or ?

round acorn
#

the proxy should be firing the projectile using its copy of the projectile component and the replicated values you provide it

#

The server is probably not even firing the projectile with the yaw

#

Could be though, hard to say

queen escarp
#

hmm but im casting it inside a multicast from the server so everything should be replicated :/ ?

round acorn
#

well how are you determining the vector or direction for the projectile on the client?

queen escarp
#

well im lincetracing and then creating the projectile towards that location you could say

round acorn
#

ok, when and how are you providing this info to the proxy?

queen escarp
#

proxy being the "unit fiering" ?

round acorn
#

the proxy is your pawn but as seen by the other player

#

it's another copy of the pawn that is provided information from the server

queen escarp
#

erhm you lost me there 😮

round acorn
#

Also I meant pitch earlier, not yaw

wicked latch
#

Does anyone have any advice or potential solutions to this? My projects are at a halt till I can fix this :/

queen escarp
#

oh yeah

#

but im multicasting all of this code

#

so it should be replicated then right ?

round acorn
#

Let's say you multicast all of this code but the proxy's camera angle, which is how you're defining your aim, is not being changed.

#

Then the proxy isn't looking up, and they won't fire up

#

So you need to tell the server and the server needs to tell the proxy that you are, indeed, aiming up

#

Example: if you have a blendspace anim that shows your pawn aiming up and you don't replicate that, the other pawn won't show it's aiming up in its animation

#

Same goes for if you base your projectile aim off a non-replicated value like camera angle

queen escarp
#

hmm

#

i think i got it im just trying to think on how im suppose to do that

round acorn
#

Well I doubt you're replicating the pitch (camera angle is how you're defining this, it looks like)

thin stratus
#

Didn't I already tell you to use BaseAimRotation

#

That contains the replicated Pitch

queen escarp
#

yeah you did but i dident understand how to x)

thin stratus
#

But even then. That Actor should just be marked as replicated and spawned on the Server. Then you don't need to bother about that. Still want to use BaseAimRotation

#

What do you mean how to?

#

GetBaseAimRotation

#

Function of Pawn/Character Class

#

I'm not gonna spoon feed a picture of a node :D

#

Instead of the Rotation you are currently using for the Direction of the Projectile

round acorn
# queen escarp yeah you did but i dident understand how to x)

This really comes down to you needing to understand what a proxy is, and what it isn't. It's not you. It's the server's replicated version of you, to the other clients. The other clients don't know what you know, so their version of you won't behave like you do, unless you give them the information to know that.

queen escarp
#

true

#

gothca alot of info rn

#

imma try do it

round acorn
#

In a 2 player game on a dedicated server there are 3 versions of you.

queen escarp
#

yeah i kinda get that

#

its just hte hows thats the issue

#

for a first timer

round acorn
#

Sure but once you get this basic structure you can start to plan ahead. Important

#

And I just want to say one more time, do be careful with going down the road of not keeping important server-side stuff on the server. It's not just because people can cheat, but also because even the gameplay is going to end up broken down the road.

#

So imo, stop now, fix it. Learn why, and then keep going. Just my $0.02.

still path
#

Hello everyone - I am trying to create a game that allows players to ride on and drive physics based 2d space ships. I am running into a problem however with the ships jittering on the clients side. I know this is due to the ships position being replicated and the client trying to keep up with the server but am unsure of how to best handle this.

Note: the characters and ships in the game arent very big with the player character only being 7 units wide and the individual ship pieces (excluding the large center piece used for the demo ship) are only 50 units across.

https://www.youtube.com/watch?v=LFGy3nAyAWc

The jitter is caused by the client and server not seeing the ship in the same position (core piece's position is replicated). Not aware of any solutions around this, anything that allows me to keep the ship itself entirely physics driven would be amazing.

▶ Play video
round acorn
#

Try increasing the minimum updates per second on the movement component? This can be a really hard thing to resolve though. Depends on a lot of variables and how much you're replicating.

#

Min and max updates per second even

cold rampart
#

türk varsa yazsa unreal den ve ücretsiz paylaşımından anlıyan varsa acil...

round acorn
#

Dilerseniz Google Translate'i deneyebiliriz.

pine sage
#

Hello,
I have been working on an ability (GAS) to play a montage and spawn projectiles.
After much tests, I end up with this, working both on listen clients and clients in PIE
I would like to have your input on it, and what should be the best practices please.
Thanks

round acorn
#

Seems fine to me but my GAS knowledge is pretty limited atm

sinful tree
pine sage
#

Hum

#

I had to mark them replicated, else the play montage is not called

#

Because If I am not mistaken: if the ability is not replicated, then it does not exist on other clients

#

Hence even a multicast won't be called

#

Thanks I'll ask on the gas section also.

#

In this case the fire projectile part is working without the replication because the projectiles are replicated

#

But the issue is with the montage

#

So in this case not really dependant on the gas

#

Imo

chrome bay
#

Abilities never exist on other clients, they only exist for the Server and Owning client.

pine sage
#

mmhhh that is true

#

then it means the fact that my ability has to be replicated means to have the montage variable on the client also, or something

#

I know that if I uncheck replicated then it doesn't work anymore ...

chrome bay
#

The montage should automatically replicate to clients. You never need Server/Client/Multicast events in abilities

#

I'd check the setup first

round acorn
#

Forgot this relevant bit from GASDocumentation:

#

so yeah, Jambax is right, if you're playing that montage in a GA it should replicate

still path
#

@round acorn Im racking my brain on this - would it be alright to DM you with more details?

#multiplayer message

round acorn
#

I mean, you can, but I doubt I can help. I'm a noob with replication and server-client desync. Lots of people in here way more knowledgeable than me.

#

What's controlling the ships? Because I actually saw something in the 5.2 notes today about pawns on moving bases

pine sage
#

Thanka

round acorn
#

Like he said, sounds like some other issue with GAS setup maybe

quasi tide
#

I couldn't find it in 5.1 docs

fossil spoke
hollow eagle
#

I think that's new

pine sage
hollow eagle
#

it's not the dev community article, that's for sure

pine sage
#

Maybe I missed something

quasi tide
#

It seems more descriptive than the community article

fossil spoke
#

Ive certainly not seen that graphic before

#

Must have come out with the 5.2 release

round acorn
#

also Iris is compiled with the engine by default now

quasi tide
#

I decree that this is more information

fossil spoke
#

Its likely linked in the patchnotes?

quasi tide
#

I don't think I saw it in the patch notes

round acorn
#

oh it's in there

fossil spoke
#

We are talking specifically about the introduction page linked above, not Iris itself

quasi tide
#

I only stumbled on it while browsing through the experimental docs page

round acorn
#

oh, gotcha

fossil spoke
#

Iris expects clients to do most of the work by notifying the replication system when changes are made. This allows Iris to make several performance improvements over the existing replication system.

#

Is this right?

#

What is Iris expecting the Client to do?

hollow eagle
#

that might be a typo

quasi tide
hollow eagle
#

I think they mean to say that iris is primarily push based

fossil spoke
#

Jesus, why do I always find the typos lol

hollow eagle
#

iris is almost entirely push-based with some extra stuff for legacy replication system support, so I assume that's what they mean

fossil spoke
#

Yep

still path
# round acorn What's controlling the ships? Because I actually saw something in the 5.2 notes ...

-Working on 4.27 to avoid 5.0+ bugs for the time being
-Each piece of the ship is actually a pawn, when the player hits a control panel they possess that panel which has code to tell the ship what to do.
-I can look into moving bases
-In the video I sent, the other player controls the ship
-Only the core piece of each ship replicates position, the reset are attached with replicated movement turned off.

fossil spoke
#

Interesting, I wonder if Iris is granular enough to have different update rates on even a per property basis.

round acorn
#

That's from the 5.2 release notes

fossil spoke
#

Well I guess given its entirely push based, thats probably not even a thing.

quasi tide
#

True. Just notify when ready I guess

hollow eagle
#

It's push based but I don't know if iris sends things out as soon as changes happen - it probably accumulates changes until whenever the next network tick is for that actor.

#

I think there's more control over that rate though

fossil spoke
#

We already have a decent amount of control as is, although, it seems Iris is basically trying to simplify and extend that control.

quasi tide
#

Idk - maybe another version or two it'll be in Fortnite

still path
fossil spoke
#

A replication state can be explicitly constructed or an abstract representation built from existing property based reflection data.

#

This just sounds like custom serialization vs automatic

hollow eagle
#

yeah there's a new serialization system

#

with adapters for existing stuff

round acorn
quasi tide
#

There is also this in the patch notes

#

@thin stratus 👆

hollow eagle
#

proof that NPP is still being worked on 🙌

fossil spoke
#

Nice, thats encouraging

hollow eagle
#

it hasn't been completely forgotten about 😄

still path
fossil spoke
#

It would be such a waste if it was

round acorn
#

Does that mean don't go buy GMC just yet?

fossil spoke
#

Even though I havent used it lol

#

Its certainly something that would get a lot of use once stable and feature complete.

fossil spoke
hollow eagle
round acorn
#

Couple years? lol

hollow eagle
#

NPP itself is unfinished and doesn't actually include a new movement system to replace CMC

#

it includes some stuff you'd need to build one though

fossil spoke
#

A replacement to CMC would likely follow NPP being completed

#

Which is years and years away.

#

Assuming NPP gets done

round acorn
#

Or they could buy out GMC and integrate, one can dream

#

I will just buy it someday, likely

fossil spoke
#

BeginReplication that must be a new function for Actors.

#

What would be amazing is if you could bind delegates to the rep system that fire when a particular Actor Type begins replication.

#

Without having a reference to that Actor itself.

#

IE: When a PlayerState is created on the Client.

hollow eagle
#

that'd make too much sense

#

dealing with replication init order on clients is the bane of my existence

fossil spoke
#

Yeeeep

#

I could deal with having to figure out if the returned Actor is the one I care about.

hollow eagle
#

Hell, what about about a generic way to wait for a specific actor to get replicated? One actor referencing another that hasn't yet replicated should still be able to know about its replication id

fossil spoke
#

Thats easy enough, but just being able to arbitrarily say, "Hey let me know when this type starts replicating" would be amazing

hollow eagle
#

I just want OnReplication(SomeOtherActorsNetGuid, [&] { DoThing(); });

fossil spoke
hollow eagle
#

nah, just a callback

#

like, in a lot of cases the replication system already knows the guid of something being referenced that hasn't replicated yet. So why not expose that somehow and then let us get notified once that data is ready

fossil spoke
#

Yeah, there is a lot on the gameplay side they could do to simplify these problems IMO.

hollow eagle
#

Now I kind of want to prototype that... I wonder if there's a way to grab a referenced netguid based on an object and property replication id

fossil spoke
#

Its likely, there would probably even be a function for it.

hollow eagle
#

all I'd need is that + a way to get notified when a new object is received.

#

...and all of that to be public 😄

quasi tide
#

I'm trying to see if there is anything about a new object being received

fossil spoke
#

The closest you might get is when an ActorChannel is opened

hollow eagle
#

ah yeah, good call. Doesn't solve other UObjects but that at least is a more "public" API

fossil spoke
#

But that requires you to override the NetDriver class

#

Im looking through 4.27 code so maybe there is a better way in 5+

#

🤷

#

@hollow eagle virtual FNetworkGUID GetNetGUIDFromObject( const UObject* InObject) const override;

#

This is in UPackageMapClient

#

virtual UObject * GetObjectFromNetGUID( const FNetworkGUID& NetGUID, const bool bIgnoreMustBeMapped ) override;

#

And right above it

hollow eagle
#

Yeah, problem is then figuring out how to grab the netguid on the client when the object hasn't replicated yet. Like, the engine must store guids that are pending resolution to an object somewhere

#

and a mapping of properties that need to be updated to point at the objects when they're received

#

ugh the whole replication system is painful, I have vague ideas of where this information is stored but nothing seems to be a clean mapping of property + object to net guid unfortunately. Oh well, maybe I'll pick this up another time.

fathom aspen
#

Yeah there's UnmappedPropertiesSomething TMap iirc, but indeed that low level netcode is one hell of a nightmare

fathom aspen
#

And yeah this is indeed new. I'm already in love with the diagram/graph

quasi tide
#

If anyone is looking for something like this (or haven't already done their own)

fathom aspen
#

This is cool to know. I can tell that networking unexpectedly got some love in this release

#

RG at least got some decent fixes

quasi tide
#

There's also this. Buried near the bottom

#

FReplicationSystemUtil - didn't even know this was a thing

fathom aspen
#

These are Iris stuff right?

quasi tide
#

I don't believe so?

#

They have a bullet point that starts with if you're using Iris

#

So I think it is just in general

fathom aspen
#

Yeah maybe, but these prioritizers stuff came pretty recently

#

But if they are Iris agnostic that would be cool

quasi tide
fathom aspen
#

The more the networking stuff are decoupled the better

quasi tide
#

Though this GTS thing isn't networking related 😅

fathom aspen
#

Async Targeting Requests 👀

#

It says that it expands on GAS, so you have to be using GAS for it work

quasi tide
#

but could be used outside of the feature

icy jetty
#

So now we have GAS, GFS, GTS, everything’s a module hehe

hollow eagle
#

targeting is great, making it so that it doesn't require GAS is nice

fathom aspen
quasi tide
#

I don't really understand what it is trying to do though.

fossil spoke
#

Just seems to be a data driven way to define and execute a type of trace/sweep

hollow eagle
#

yep

#

that's basically it

fossil spoke
#

So cant imagine it would require GAS

#

They may have meant, expanding on the GAS approach to things

quasi tide
#

But why? Is there something I'm missing?

hollow eagle
#

why what, why have a way to define traces?

quasi tide
#

In this form specifically.

hollow eagle
#

it lets designers control how, for example, a weapon will fire at a target

#

will it be a line trace? a cone? something else?

#

means that you don't have to hardcode what it is

quasi tide
#

Fair

hollow eagle
#

also there's a filtering system in it so you can control what it is even allowed to return

quasi tide
#

I guess I just always do line traces so I don't see it as a problem because I'm not exposed to it all that frequently.

hollow eagle
#

yeah but what if you want like a flamethrower that hits a cone or does a sweep forward with a shape

quasi tide
#

Oh, I get the reasoning once you mentioned designers.

fossil spoke
#

Those pesky designers

dim trail
#

I need some advice from some smarter people. Im trying to implement a party system, and I initially approach it by using a component attached to players that hold and manages party data. However, when the leader would for example send a party invite, I would have to duplicate this data to the other client, and manage it as well.
I also thought of using the playerstate, but playerstates dont persist across server instances, and that is something that is needed for our project.
The other option was the game instance, but we felt that would be too heavyweight and lead to scalability issues.
Now we are thinking of using a replicated actor for managing the party. Im not sure if this would be the best approach. If anyone has any input please let me know.

quasi tide
#

Beacons

dim trail
#

I've never head of beacons

#

what if the party has data that needs to be replicated across clients

broken shale
#

I’m still struggling with the networking set up and authority filtering…. I’ve got firing logic in my character class that runs a function SubtractAmmo to reduce Ammo variable in character class by one, fire a line trace and spawn a cube at impact. I’ve read that input actions are client only so you can’t use has authority switch. So should I just use a spawn on server at the spawn point? Or set up a custom event right after the input event to run all of the following code on server? Relatedly, there is an object like a wand, Ankh, that you hold that is where the line cast is fired from. When it overlaps with a spawned cube it runs AddAmmo from character. Here I think you run an authority switch and on authority destroy actor and Add Ammo and on remote destroy actor on server and add ammo on server, is that right?

sinful tree
#

In your Ammo situation, the ammo would normally be a replicated actor, and in that case, the Overlap event can end up triggering on both the client and the server as they both can independently detect if the overlap happens. The Has Authority is used with this event because it triggers on both, so then you'd normally use the "Authority" path to only execute the following code on the server, including things that you would need to do only on the server, like adding ammo to a player or destroying a replicated actor.

#

There would be no need to use Has Authority (Remote) unless there was something you needed to execute on the client, but destroying a replicated actor will happen on all clients so long as its destroyed on the server.

broken shale
#

So if I have A) Trigger press; B) subtract ammo; C) spawn cube at impact… I could just run A > Run on Server > B,C. I don’t need to have a separate SubtractAmmo on Server and SpawnCube on Server because everything will be called through the custom event called after input, right?

I’ll check it again but as I recall running the overlap events through the authority branch wasn’t working so I set it up to run on remote as well. If the spawned cube was spawned on server it doesn’t make a difference?

thin stratus
sinful tree
#

There is more to it when dealing with client inputs > having things execute on the server, like if you wanted to do client prediction, but if you're learning the ropes of replication I wouldn't worry about that for now. Short form of it is basically having the client update values and perform visual changes while waiting for the server to actually do it, just so the client is responsive and not having to wait for the response from the server.

icy jetty
#

When I start learning more about RPC and stuff I think I’m just gonna go to Discord, hit search from user: Datura and read this plethora of great posts 😀

daring arch
#

Hiya! Quick question:

I'm testing my game (Net Mode: Play as Client) and none of my clients can see each other but they can collide with each other. It's a jittery collision which leads me to believe the clients are actually getting corrected serverside- maybe no pawns are getting spawned except of the local pawn!

What could I be doing wrong?

#

My character blueprint is set to replicate.

#

I'm also writing my character class via C++ so maybe there's some step I forgot to take there in order to make clients see each other.

#

Correction- when I say no pawns are getting spawned, I mean that for each client, only their local pawn is spawned. The server probably contains both pawns due to the collision/correction deal I mentioned above.

sinful tree
#

You have a mesh on your character, that isn't set to something like "Only Owner See"? You've ensured that your character is set to replicate? Have you messed with the net cull distance or relevancy at all?

sonic jasper
#

Anyone come actors spawned on a listen server having the owner be null?

#

Im using SpawnActorDeferred and passing the PC in a server RPC (which is server anyway right?) the actors owner on the client is right but the server/client's is null

#

if i just host a game with just the server/client its also fine

#

ah its owner on the client for that simulated proxy thats null i think

fossil spoke
sonic jasper
#

yeah the owner is an aicontroller anyway on possession, my actual error is the No owning connection for actor coming from the chaos movement comp, so i am guessing the client is trying to move the servers vehicle or something somewhere, possible need a IsLocalController() check on something somewhere. If this makes any sense.

drifting mango
winged badger
#

you should not use SimpleMoveTo at all in MP

drifting mango
#

for moba like game here is other way?

winged badger
#

AIMoveTo

drifting mango
#

use AImoveTo for player character?

drifting mango
#

for context, I use GAS example project, moved topdown movement from controller to character. I try use AImoveTo instead of SimpleMove and character not reacting to it.

kindred widget
#

If I recall correctly, AIMoveTo needs an AI controller. SimpleMoveTo can be used on a player controller. And the topdown example directly possesses the pawn I believe.

drifting mango
#

found solution in google, add strings in PlayerController for it

lime basalt
#

When emulating network latency i'm experiencing jittering on the player movement, when setting the maxwalkspeed. It seems that the variable can't be replicated and I'm using RPC to set the speed on server and client, but the latency makes the server correct the client and causes jittering. At least thats what I have come to realize. Are there any solutions to this?

swift crow
#

Simple 2 players LAN connection in oculus quest 2 application from scratch to package tutorial???

thin stratus
#

Just combine a LAN tutorial with an quest package tutorial :P

serene furnace
#

hey guys,
There is probably something that I'm miss understanding about this, can anyone explain why my reference got lost in the process ?

dark parcel
#

Can I ask how to stop rubber banding in multiplayer in relation to server trying to correct actor location

#

do we skip owner for replicated movement variables and for others pawn that is not controlled, interpolate their current local location to actual location?

graceful flame
# dark parcel do we skip owner for replicated movement variables and for others pawn that is n...

As far as I know the whole rubber banding thing in multiplayer with autonomous character movement is an unsolvable problem because lag exists however it can be reduced to a minimum when things are setup properly. Ideally you want the server to issue corrections to prevent cheating but also want to reduce the number of corrections by keeping the client and server in sync as best you can. One of the ways to do this is with client prediction and fortunately that's already built into the standard CMC with unreal. So if you're using some other form of custom movement like a dash, or a wall run...etc then its best to extend the CMC with c++ or buy one of the blueprint plugins both of which use saved moves and packed data.

dark parcel
#

@graceful flame I see, thanks

graceful flame
dark parcel
#

I will go thru the pins, cheers m8

woeful anvil
#

does Iris work with Steam Sockets?

meager spade
#

iris has nothing to do with steam, or any other oss provider

woeful anvil
meager spade
#

thats nothing to do with steam sockets or w/e

#

but if you enable iris, expect breakage

#

its still experimental

#

what rpc's are not working

sinful tree
serene furnace
sinful tree
serene furnace
#

yeah, except that it does not go invalid, it just does not return the right value of the verry first call

sinful tree
#

Are you directly linking the output from the event to the multicast call like I did here, or are you storing it as a variable anywhere then plugging it into the Multicast call?

dark parcel
#

Hmm... I tried to follow the tutorial, I can see My Yaw is updating on the owning client and the server, but the other client can't see the player moving it's gun left to right

#

Pitch works, all clients and server can see the gun being aimed up and down
but not right to left 😦
Server and Owning client can see the gun aimed right to left but other client can't see the changes

#

Hmm it's weird I tried to print the AO_Yaw too on client. It seems to be on sync but the animation remain static on other client

serene furnace
#

my goal was to pass data to know among all the clients who triggered the event bit since the reference gets lost in the process, then I had to dodge that issue

queen escarp
#

Hey guys this is how im RPCing my projectile and when overlapping with comp it deals damage, im just wonder how would i change the damage ?

#

ideas ?

young spoke
#

is there any merit in batching multiple rpc calls into 1, or does unreal already optimize data packaging within packets for you?

fossil spoke
young spoke
fossil spoke
#

You want to be sending the least amount of data as infrequently as you can get away with.

mortal mica
#

is Iris the default replication in 5.2 ?

chrome bay
#

noo

mortal mica
#

I upgraded a project to 5.2 and now it's trying to compile the code in #if WITH_IRIS

#

(which is broken in my own files xD )

meager spade
#

its compiled by default

#

not just enabled

#

@mortal mica

pastel escarp
#

Is there anything I can do to improve CMC performance in an RTS game ?

elder sable
#

Hi i'm using a FFastArraySerializer, my array contains nullptr element (not replicated yet) so when the value change from nullptr to the object ptr, is that when PostReplicatedChange is called ?

fathom aspen
#

Potentially yes

sage cape
#

what is the best way to send large data arrays?

#

for example voxel chunks?

fathom aspen
#

To send them to? client?

#

In the sense of replicating them?

sage cape
fathom aspen
#

Don't

sage cape
#

then what do i do?

fathom aspen
#

They can be static net actors and net managed by some other actor

fathom aspen
#

Not only this article but the whole blog has many tricks and hacks that you can do to stay healthy on bandwidth and server cpu performance

#

So that, the last one and procgen should get you covered

sage cape
fathom aspen
#

Yeah RPCs won't preserve state

#

That's why you got property replication

sage cape
#

how does minecraft do it?
doesnt unreal engine have some sort of support for sending lots of data?

fathom aspen
#

It does its best to chunk packets that are sent to players over the network, but it doesn't optimize things for you

#

It's not black magic in the end

#

Since why I drew your attention to that blog, since it has some cool tricks that you might find useful

#

Last article for example goes over efficient data streaming, which uses RPCs to do so. But again RPCs don't preserve state, so that's something you will have to think how you're going to play with in order to make it so...

sage cape
#

what does RPC stand for?

fathom aspen
#

Remote Procedure Call

#

Special functions that are sent over the network

sage cape
#

like a multicast event on BP?

fathom aspen
#

That is a type of RPC, yes

sage cape
#

you mean state like not having to replicate the whole array instead only the parts that were edited?

fathom aspen
#

Nope, literally the state of the game

#

For example a guy that joined seeing something different from what others see it

#

And that thing can be anything really

sage cape
#

yea

#

but how would you do for a voxel map?

elder sable
sage cape
#

like the server needs to send data from server that players have built

fathom aspen
#

Make the server send it, what's about it?

sage cape
fathom aspen
#

But yeah generally that function gets called when a change happens server-side, on any entry really

fathom aspen
elder sable
fathom aspen
#

Read the last article from the blog I pointed you with to see a valid approach for your problem @sage cape

fathom aspen
sage cape
fathom aspen
#

If you want to add element to it then yeah sure @elder sable

elder sable
#

Ok i thought change meant a change to the element values, thanks !

fathom aspen
#

Read what I pointed you to

sage cape
#

and i need to send an int8 array of 100000 elements

fathom aspen
#

Modification/Add

#

And Remove

#

All will potentially result in the callback getting called

fathom aspen
elder sable
#

It's PostReplicatedAdd and PreReplicatedRemove for add remove ?

fathom aspen
#

Yeah

#

There are 3 in total iirc

broken shale
#

Does this look right? I'm having issue with it adding two or more ammo in multiplayer but only for the player who joins. It works fine on single player or as host

#

Ammo is constructed on character class and set to repnotify

#

The subtraction seems to work fine (similar function that is called in char class when the trigger is pulled)

sinful tree
# broken shale Does this look right? I'm having issue with it adding two or more ammo in multip...

Events like overlaps or your hit there can trigger on both server and client if it exists on a replicated actor. Additionally, clients cannot send RPCs to the server through actors they do not own, so calling the server to run will not usually function on actors outside of Player Controller, Playerstate and their Controlled Pawn unless you've explicitly made a specific player the owner of the actor.

However, as again, if this is running on a replicated actor, then the server will already detect the hit event, so then you should only need to use a Has Authority node and use the Authority path.

Additionally, you cannot use "Get Player Character" or other "index" related gets of a player when making multiplayer functionality as you won't know exactly which character it is by index. In this case, your Hit Event provides an "Other Actor" pin which is a reference to the actor that triggered the collision - if this is the player, then you should be able to use that for your cast, if not, then hopefully whatever caused that hit event was also spawned by the server as a replicated actor, and you set the owner or instigator of the object to the player and then you could get the owner or instigator and use that for your cast. If it's not a replicated actor detecting the hit, (thereby, something spawned on the client and only that client would see), then you need to handle the Hit event on that client-spawned, non-replicated actor, and call an RPC back on a replicated actor owned by that client (like their character) and follow any server logic from there.

icy jetty
#

@sinful tree does the player controller index change when in multiplayer or only when it’s hot seat/split screen? I think I’ve heard both versions

broken shale
#

Holding Player is set on an oncomponent collision between the static mesh of the Ankh object (which is what collides with the SpawnedCube in the earlier excerpt), so maybe that's the key to some of this. I didn't think about the get player character not grabbing the right player.

#

I should just be able to cast to the character using holding player as reference to get to the specific player’s ammo, I think

sinful tree
# icy jetty <@218956378654507008> does the player controller index change when in multiplaye...

If you're referencing on the server (or in the case of listen server, the host) then the player index varies based on the player you want to reference. I believe there are some scenarios where even index 0 isn't necessarily the host.

If you're using any of the gets with index on a client, generally 0 will be the local client's version of everything, unless you are running splitscreen.

icy jetty
#

Oh, ok makes sense

broken shale
#

@sinful tree Seem to have it finally in working order (knock on wood.) Thanks so much for your help and patience!

mortal tusk
#

is it possible to invite a friend to a session? only using the epic's interface?

broken shale
# lime basalt When emulating network latency i'm experiencing jittering on the player movement...

I’ve been wondering the same, have you found a good way of doing this? This is what I’ve got from chat gpt but I haven’t tried it yet

Create a new function or use an existing one to interpolate between current walk speed and target walk speed: You could use the Tick function, but it might be better to use a Timer to prevent unnecessary calculations if your character speed isn't changing. In this function, you can use the FInterp To function to smoothly interpolate from the current Max Walk Speed to the TargetMaxWalkSpeed.
The FInterp To function takes in the current value, the target value, the elapsed time since the last frame, and the speed at which to interpolate. It will return the next value in the interpolation. You can feed the result back into the Max Walk Speed.

sinful tree
# broken shale I’ve been wondering the same, have you found a good way of doing this? This is w...

The real answer is to use C++ and overriding the Character Movement Component. (Not going to outline it here, there's tutorials out there that tell you how, and it's a bit of work)
The issue stems from how network moves are sent, which come in as a series of "saved moves" based on some values that are set within the Character Movement Component that the client automatically RPCs to the server. After the client sends its desired movements, the server checks if the character can move in a similar fashion. If it can, the server accepts the movement, and thus, no corrections required, if it can't move the player similarly, then you get a correction, resetting the position of the character to how the server thinks it should've happened. In best case ping scenarios, changing the movement speed in blueprints on the client first and then the server after an RPC works, but only because there's little latency, so the RPC is received and executed fast enough that the server's playback matches the client and there's no corrections. In bad ping scenarios, the saved moves don't include anything to do with the movement speed being changed, and so when the server is playing back the saved moves, it may not have received the RPC indicating the change in move speed yet, so then it sees that the player's position doesn't align and the client's location then gets corrected.

The fix involves creating a flag in the CMC that then gets added along with the saved moves that adjusts the movement speed, thus fixing the issue of the server not knowing about the new desired speed when its playing the movement.

The other option is to use client authoritative movement, which is ok to use if you don't really care if people can just move wherever they want, including in unexpected places or ways - essentially it would allow a client to teleport around at will.

Including @lime basalt as it doesn't look like they got a response earlier.

raven geyser
#

Hey guys! I've been building out a little last man standing 8 person shooter where everyone joins at the start, then if there are any empty slots they are filled with bots. It's all pure blueprint at the moment and considering moving to C++ because of the movement issues but that's another story altogether!

#

My question is, should character death be handled by repnotify or RPC?

#

ChatGPT says RPC but I'm leaning more towards RepNotify

sinful tree
raven geyser
sinful tree
#

Don't make the Die event a server RPC unless you intend for players to be able to kill themselves by calling it.

raven geyser
#

that makes sense!

#

Sorry about my butchered code, didn't realize when I was starting I probably should have made a single player experience for my first game

#

the whole thing happens within a very small arena so relevancy isn't really an issue

sick jetty
#

Wondering if anyone can confirm something for me regarding the CMC. When the client sends its input data off to the server it looks like it splits it up into an OldMove (last acked by the server), PendingMove (???), and NewMove (latest move on the client). Seems like this the sliding window technique but I'm a bit thrown off by the OldMove, PendingMove, and New move parameters so I'm not positive.

Basically what I'm asking is does the client send off inputs starting from LastAckedInputFromServer -> MostRecentInputOnClient? If so, is PendingMove just all of the inputs that fall between OldMove & NewMove?

broken shale
# raven geyser Sorry about my butchered code, didn't realize when I was starting I probably sho...

Hah, I’m kind of in the same boat. I built the game I’m working on previously in Unity in C# but hit a brick wall when I realized I should have started implementing the networking aspects at the outset instead of adding it in last. Started over a couple years later with Unreal. I’m liking Unreal a lot more but still struggling a bit with the networking and it wasn’t covered much in any of the books I’ve read. I’ve been thinking maybe single player would’ve been easier to start with but then I’d probably be dealing with a bunch of AI issues instead

raven geyser
#

I've seen a course on Udemy, it's about 20 hours and covers C++ for unreal and then there's another one that's 30 hours for multiplayer. I'm definitely considering it because it's been heaps of fun learning this stuff so far. Another damn language to learn though - already got a few others under the belt.

#

Still I've seen a few people dissing UE for still using C++ but growing up C was the shit - Quake mods and the like

raven geyser
broken shale
# raven geyser what sort of project are you doing?

It’s competitive pyramid building. Players on each team have to collect blocks to build a path to the top of their respective pyramid but you can steal or destroy the other players’ blocks. Each level will be a bit of a puzzle / parkour type challenge

raven geyser
#

Ooh that sounds fun!

#

Are you doing the whole thing yourself?

broken shale
#

Yeah except my son is going to help with the level design once I’ve finished getting the basic mechanics finished

raven geyser
#

I'm building this one for my young nephew, he had a simple idea of monkeys with rocket launchers. Then one night I thought you know what, I should actually build it and surprise him with it and came up with a few cool core mechanics

broken shale
round acorn
raven geyser
#

Maybe I should get my nephew trained in character modelling or something haha, I mean he's only 10 but I could use the help :p

glass orchid
#

Can i set the properties that need to be copied after seamless travel on e.g. a playerstate in blueprint, or is it purely a cpp thing?
edit: you can override the copyproperties function in blueprint (:

broken shale
stoic lake
#

what exactly is the difference between Switch has authority and Is server?

quasi tide
#

One deals with Authority, one deals with being a server or not

#

Authority isn't always the server

glass orchid
#

for example, the client has authority over actors that are spawned on client (and thus not replicated to the server or other clients)

clever hound
#

If I attach an actor to the player does it set the owner of the actor to the player in which it gets attached to or do I have to use the SetOwner()

#

Nvm the answer is yes just attaching it is enough. Ty chatgpt

glass orchid
#

you can always tests with print strings too

graceful flame
#

Pretty sure most of us here have steam accounts. Not sure what your question is.

#

People here won't want to test a game that isn't uploaded on Steam or Epic Games store or some other reputable platform. Why? It could have malware in it.

meager spade
#

@twilit fable please read the rules, and familiarize yourself with them #rules

blazing spruce
#

Hey, I'm running into an issue with getting my pre lobby to correctly display the names of connected players, the problem im having is that when the host creates a session they see the WBP_PlayerCard widget created properly and displaying their name, but once the client joins, their player card disappears and the clients name is displayed, as for the client they cant see any player cards created so they cant see any names, so essentially host creates session > player list creates player card displaying their name > client joins > host player card disappears and is replaced with the clients player card, any ideas what im doing wrong?

#

What it should do is whenever a player joins the session the player lists should be updated for all players and adding WBP_PlayerCards for all players in the session

steady cape
#

Can players connected to the same session be on different levels?

fathom aspen
#

No. They can be in different sublevels however

steady cape
#

👌

#

Wait, what's sublevel?

nova wasp
cerulean lintel
#

What approach do you guys recommend to trigger ragdoll (simulate physics) with replication? I mean, I don’t expect bones to replicate identical positions, just the event itself on death. Should I replicate the blend weight float?

hollow eagle
#

If the Ragdolls aren't significant to gameplay then don't replicate anything except that death happened. Let clients simulate things themselves

graceful flame
#

I just set a boolean bJustDied and it uses repnotify to start the ragdoll.

#

It also stops movement and changes collision etc

#

The ragdoll fall itself and the skeletal mesh’s final position aren’t replicated but it all happens so quickly that it doesn’t really matter before I fade the character out anyways.

round acorn
#

in 5.0+ (maybe earlier) do structs delta serialize by default?

fathom aspen
#

Yeah, they always did

round acorn
#

Thank you

#

I seem to recall arrays do not?

#

Was running into a bunch size error with my inventory stuff and I figured it was the RPC array stuff was too heavy so I serialized it and it works.

fathom aspen
#

They also do

round acorn
#

Cool thanks

cerulean lintel
left lance
#

Is it safe to use GetPlayerPawn in a multiplayer environment assuming I always want the local player (and there's only ever 1 local player). Or is it possible it would grab some other client's player pawn?

fathom aspen
#

It's not really. There's always other ways around it

steady cape
left lance
#

It looks like I should just use the first player controller and its pawn if I want the 'local' player in a multiplayer environment

steady cape
left lance
#

Thanks!

graceful viper
#

gameplay wise I think these 2 are replicated? but outside of testing how would I know

sinful tree
# graceful viper

Overlaps can occur on both clients and server if it is on a replicated actor, so the actions you have here would technically be getting executed on both if this is a replicated actor.
If you want to make sure its happening only on the server, use a Has Authority node immediately on the overlap event and proceed with the code from the Authority path. Then you can see if the functions are replicated.

#

Generally speaking, if the component you're adding is marked as replicated, then it would replicate when added to a replicated actor by the server. Same with Destroy actor, so long as it is a replicated actor spawned on the server, destroying it on the server will remove the actor instance from all clients as well.

graceful viper
sinful tree
#

It's not so much about by default, it's about where you call it and if the thing is replicated. Replicated Component attached to Replicated Actor on Server == Adding Component would be replicated. Replicated Actor being destroyed on server == Actor would be destroyed on all clients.

#

So if you added a replicated component on a client, that doesn't mean that the server and all clients would ever know about that component as you added it locally on that client only. Similarly, if you spawned a replicated actor while running on a client, the server doesn't know about it, and so, destroying it would not be replicated as it's not even sent to the server to begin with.

ivory bear
#

This may not be strictly multiplayer, but for me ts where I am using it...anyone know a good tutorial for changing characters in game? Think a game like Planetside or Tribes where you can be in light, medium or heavy armor, each with its own characteristics. Need to learn how to create this functionality.

latent heart
#

Oh wow. A tribes fan!

icy jetty
#

Could this be a GAS thing?

latent heart
#

You'd just possess a different pawn, surely?

#

Anything not related to the active pawn / armour shouldn't be stored in the pawn.

quasi tide
#

I mean, planetside you just change class

latent heart
#

In tribes basically each class was a lot different.

quasi tide
#

Sure, but the idea is the same. Create some UI that lets a client select the class that they want. RPC it to the server, server spawns that class and then possesses the newly spawned pawn.

grand tree
#

gonna ask this again here cuz maybe this channel is a better place for it

quasi tide
#

Would it be better to have this as a TArray of UObjects instead?
Not necessarily. Depends on your game. I prefer structs personally.

#

Can use FastArray if you want your inventory to be a speedy boi

latent heart
cerulean lintel
#

Hey there, quick question, I just wanted to know if I'm replicating more than I should (avoid unecessary network transfer)
I wanted to call a BlueprintImplementableEvent from C++, OnDeath event.
I'm currently using an Onrep for bool bIsDead with two ufunctions, OnRep_IsDead and UFUNCTION(Server, Reliable) void SetIsDead();. So first the server changes the boolean and then calls the Onrep. It's working but I wonder if there's any better approach to handle this?

quasi tide
#

Server handles death
Sets bDead to true
bDead gets replicated to clients and in the OnRep, you do w/e

#

SetIsDead shouldn't be an RPC.

#

Death is a gameplay critical thing - state should only change on server

cerulean lintel
quasi tide
#

Yeah

cerulean lintel
#

if I don't use it as an rpc, does that leave the door open for hacking and killing or no?

quasi tide
#

What?

#

You're removing an RPC

cerulean lintel
#

I mean the onrep

quasi tide
#

The onrep is from the server to the client

cerulean lintel
#

but I think I understand what you mean, you would only be able to "kill yourself" lol

quasi tide
#

If your server is hacked, onrep is the least of your concerns

#

Important game events (such as damage, character death, who wins, etc...) should be processed and handled on the server

#

The server then relays the relevant information back to clients.

#

IE - this character died

cerulean lintel
#

hmm, I see

#

so I keep the SetIsDead as a regular function but with an if condition for ROLE_Authority

#
void AHCFBaseCharacter::SetIsDead()
{
    if (GetHealth() <= 0 && GetLocalRole() == ROLE_Authority) {
        bIsDead = true;
        if (bIsDead) {
            OnDeath(this);
            OnRep_IsDead();
        }
    }
}

void AHCFBaseCharacter::OnRep_IsDead()
{
    if (bIsDead) OnDeath(this);
}
grand tree
twin juniper
#

I'm a little confused with the authority switch. I mean I get how it works for the most part. I just created a client for my multiplayer game with the client target and in development mode, and it still is printing text that should only be run on the server (I thought at least)

#

this is on the game mode

#

just testing to make sure the server was running. was surprised that it ran on the client though

hollow eagle
#

gamemodes only exist on the server (and make the authority switch pointless). You sure you're running as a client and not as a listen server or standalone?

twin juniper
hollow eagle
#

sounds like you're not connecting the client to the server

#

so it's running in standalone

twin juniper
#
using UnrealBuildTool;
using System.Collections.Generic;

public class KeepersOfAetheriaClientTarget : TargetRules //Change this line according to the name of your project
{
    public KeepersOfAetheriaClientTarget(TargetInfo Target) : base(Target) //Change this line according to the name of your project
    {
        Type = TargetType.Client;
        DefaultBuildSettings = BuildSettingsVersion.V2;
        ExtraModuleNames.Add("KeepersOfAetheria"); //Change this line according to the name of your project
    }
}
#

does it default to standalone if you don't connect to the server?

hollow eagle
#

...yes? how does the client show anything if it can't even run standalone?

#

a client target means it can't host networked games, it doesn't take away the ability for the game to run by itself.

twin juniper
#

I assumed that it wouldnt run any server side code

hollow eagle
#

it won't, but what you posted isn't strictly server-side code.

twin juniper
#

I see, I get it. So basically when it doesn't connect to the server, it then goes into standalone mode, which gives it authority?

hollow eagle
#

yes

twin juniper
#

Oh okay. Yeah that

#

that's cool

#

I was just worried that it would be trying to run server code on both the server and client if I did connect to the server

hollow eagle
#

when we say "something runs on the server" or "something exists on the server" it applies to whatever thing has authoritative control over the game. Which is the local game if you're not connected to a server.

#

all a client target does is remove the ability to host networked games, but the game still has to be able to operate without a server because otherwise how would you do anything on startup?

twin juniper
#

Well I was under the assumption that I would have purely client side main menu with tcp sockets for my matchmaking server

#

and then tell the clients to connect to the server when a match is found

#

is how I'm creating my game

hollow eagle
#

no, not even remotely

#

you just build a main menu level and do whatever you want in it

twin juniper
#

but, that does help me with offline bot matches, since I thought I would have to make a separate game mode mode for the offline matches

dark edge
twin juniper
#

would just*

hollow eagle
#

that's not the difference between them

dark edge
#

the difference is if they're meant to be match based with all the phases and data surrounding that

hollow eagle
#

and they all support multiplayer

dark edge
#

gamemodebase just makes less assumptions about you making a match based shooter really

twin juniper
#

Oh okay, so the base mode would be bad for my game anyway then most likely

hollow eagle
#

only you can make that assessment

twin juniper
#

Yeah maybe I need to do a bit more research into the different features of each

#

I haven't run into any problems yet, but who knows

dark edge
#

If I was making CounterStrike, I'd use GameMode

#

if I was making Valheim, probably GameModeBase

#

but you can use either and just make the stuff you need

twin juniper
#

Yeah

#

is GameMode better for matches then?

#

Regardless if it's a shooter

hollow eagle
#

it's not better or worse

#

it just provides a bit of a framework for those styles of games but it doesn't really do much

#

you can use it, you can avoid it.

twin juniper
#

Hmmm okay. From what I'm reading now it sounds like it has pre built in match phases and maybe some stuff to handle dcs

#

I might actually go with base, because I'm kind of a big fan of creating my own systems. It can be a pain to try to get another persons/company's system to work for you when it's designed for a different purpose or a more general purpose

ivory bear
latent heart
#

Of the first one? Damn!

dark parcel
#

Hi guys, I used repnotify to play an anim montage, so when a drop in player join, they get to see the current animation being played by other player.
How can I sync the time of the montage?

#

in the example, the montage being played at the start by joining client hence the anim not being sync with one another.

#

This node seems to be disabled on function too 👀

round acorn
#

Prolly going to need more than a repnotify... e.g. a replicated variable that is the Starting Position which is actually the current animation playback position on the primary pawn... something like that?

dark parcel
#

Yeah I am using repnotify in the example but Play montage doesn't exist in function

#

trying to execute a custom event from the repnotify, see how it goes

#

This doesn't work too 😦

#

What would be the best way to replicate the position of the montage?

round acorn
#

Not sure, never done it. On principle it seems like you have to get the server's opinion on that specific pawn's animation and replicate it to the new client.

dark parcel
#

I think I have printed the value and I see that it's trying to start the montage when the variable is replicated, however it's still out of sync. I believed that load time will cause problem because the replication will be called as the player loads. Read this somewhere on the forum

#

Replicated condition doesn't do jack in blueprint?

#

everyone always run it, regardless the setting Skip Owner, etc

sage light
#

When I authenticate with steam using steam's sdk I am sending a pointer to a buffer that I have allocated in memory. They will then send back pcbTicket which is the length of the buffer that they have used. Now I need to get the ticket string from the buffer. What I am doing is using the beginning pointer (pTicket) and the length (pcbTicket) to try and create a string.

FString ticket = BytesToString(static_cast<uint8*>(pTicket), pcbTicket);

Unfortunately I am getting back a ticket which seems to be corrupted(?)

ticket = L"\x15\x1\x1\x1ύ¾K#\x6”°ùj1\x5\x2\x1\x11\x2$°ae\x19\x1\x1\x1\x2\x1\x1\x1\x3\x1\x1\x1PFËb˂)±\x15h»\x1\x3\x1\x1\x1³\x1\x1\x13\x1\x1\x1\x5\x1\x1\x1ùj1\x5\x2\x1\x11\x2á\x2\x1\x1è(Ó/\xege\v\x1\x1\x1\x1šwXe\x1a'te\x2\x1\x1\x1\x1\x1\x1\x1\x1\x1ššè\xe¾À\vZÙppùމ

what am I doing wrong?

ruby lodge
#

did anyone ever upload a build to steam and might be able to help me with an error i am getting?

#

I have a running and fast internet connection rn so that's not the problem

meager spade
#

check your ports

#

we ran into that when our ports blocked the connection

#

(not sure off the top of my head what ports)

hollow bridge
#

Is there any easy way to test "late join" in an editor run?

ivory bear
hollow bridge
#

See how an object would look like for a player that joined after an event

ivory bear
wooden abyss
#

Hello, I'm using a listen-server model for my multiplayer game and my server handles spawning of actors. Each of the spawned actors "belongs" to a player (Actors have a reference to the owning player state). Now I want to highlight the actor ONLY for the owning player. I tried testing this by printing a string.

#

This code is in the Event BeginPlay of the spawned actor. The actors are only replicated to clients and spawned on the server

#

The string also prints on the server when the client "builds" the actor

#

Is there a way to only trigger this print on the actual owning player?

#

If the server spawns the actor it only triggers on the server like i want to

#

Can someone help me on how to do this so only the owning client prints the string and not the server as well?

meager spade
#

@hollow bridgethere is an experimental feature

#

go to editor settings, then experimental

#

and its something like Late joining

#

it will add a button to the top of your editor toolbar next to the play button

round acorn
ruby lodge
#

how do i check?

#

i am already at this for a few hours now so sorry if i am a little slow rn xD

hollow bridge
icy jetty
ruby lodge
#

yea still, how do i check

icy jetty
ruby lodge
#

it says port 80 is closed

#

smh all i press on are closed

ruby lodge
#

and which port has to be open

dark parcel
#

Turns out Skip Owner and all other RepNotify condition is bugged and don't work in Blueprint?

#

someone made complaint from 4.24 all the way to late version, I guess it never get fixed

icy jetty
naive bloom
#

Hi I’m pretty brand new to this but if I wanted to be able to have my friends test the game I make what is the best way to do that?

(I don’t know what section this would go under but I do want it to be multiplayer so I thought I would start here)

I’ve researched a lot but can only find out how to test multiplayer by creating two instances of play in UE5 on the same computer.

latent heart
dark parcel
#

Does anyone have a workaround for montage replication? 🥹 I would love to hear some clarification

twin juniper
#

Is it normal to have ping around 25ms when the server is hosted locally? Seems weird to me

#

I guess it is the dev server, so maybe shipping performs better

#

If I test in editor in client mode it has 8ms, which seems like it shouldn't perform better than the packaged version

prisma snow
quartz smelt
#

Hey I got a question, I hosted a lil playtest of abt 4-5 people, everything was fine except one player had this error in their logs
"no owning connection for actor"
--why was it just for one player? Nothing seemed to be wrong

prisma snow
#

maybe the way that ping is calculated introduces a bit of error even, it's something difficult to do (for example if frame time is accounted for some reason)

twin juniper
#

Yeah I guess I'll have to wait to see how it performs on an actual server before I worry about it anyway

ruby lodge
dark parcel
quartz smelt
quartz smelt
icy jetty
ruby lodge
thorn glen
#

Any way to make a function that only runs on owning client and server? Currently using 2 separate functions, just wondering if there was another way.

fathom aspen
#

You don't need to. Calling the _Implementation version will call it locally

final swallow
#

how can i change this curve values in runtime in bp or set curve value by bp

fathom aspen
sonic python
#

Hey Guys

#

I forgot how to fix the glitching when the character moves . I have the replication set I think , It was working well before but suddenly it's glitching after a long time..

#

What's the problem?

#

How to fix it?

blazing spruce
#

Hey, im trying to make it so when the camera gets close to the characters their meshes disappear but I only want it to run on owning client, right now both server and client players meshes disappear fine when their cameras get close to them but client players can see the server players character mesh disappear, any ideas how I can only make this run for each client so it doesn't replicate to everyone else?

verbal tendon
latent heart
#

I ran the t:a competitive scene for the entire world for a while.

#

I played in leagues from t1 though.

verbal tendon
#

Noice 😄

#

On a completely different note. Does anyone have any appropriate punishment ideas for artists who have been using alpha channels in normal textures?

latent heart
#

Heh.

#

Make their paycheques have 100% transparency?

drifting stirrup
#

any reason why my niagara particles might be visible in SIE but not PIE?
i have a client that spawns them via server event -> multicast -> spawning vfx, this works completely fine
but when my NPC tries to spawn them it doesnt work. it does multicast -> spawn vfx, ive also tried server event -> multicast -> spawn vfx even though it should already be server but neither work
so it cant be a networking issue right

tame kraken
#

Hey, what's the reason that if I set the max acceleration continuously in the client, I encounter difficulties compared to setting it in the server?

Here is the code:

I have this function in my code in unreal engine:

{
    if (!CharacterMovement) return;

    if (CanAccelerate && CurrentSpeed < MaxGroundSpeed)
    {
        float MappedAcceleration = FMath::GetMappedRangeValueClamped(FVector2D(0, MaxGroundSpeed), FVector2D(AccelerationStart, AccelerationEnd), CurrentSpeed);
        CharacterMovement->MaxAcceleration = MappedAcceleration;
    }
    else if (CurrentSpeed >= MaxGroundSpeed)
    {
        CharacterMovement->MaxAcceleration = AccelerationEnd;
    }
}```


It seems to be working fine for the server, but when it comes to the client, it keeps jittering and the max acceleration doesn't smoothly descend into AccelerationEnd, instead it jitters at a number far away from that. 

Why is that and how to solve it?
verbal tendon
icy jetty
spark pelican
#

How do people handle calling server events from ui. I understand the concept of the player needs to own it to call a rpc. So you would call a server event that lives on the character. However to me this becomes extremely messy when you have a lot of unique elements that do different functions. For example a widget could pop up with a button to turn a light in the world on or off. Do I really need to make a new function on the player for this one thing?

fossil spoke
#

So instead of making an RPC for "Toggle this Light"

#

You would make an RPC for the generic "Interaction" system, which might pass along parameters like the Actor being interacted with and an Integer to represent different option types.

#

Then Objects themselves decide what an "Interaction" is for them.

#

For a light, interaction by the Player would be toggling it on/off.

spark pelican
fossil spoke
#

No, you manage what types of inputs you are modifying the Interaction with via parameters to the same RPC.

#

As I mentioned, an integer can be used to "identify" different types of interactions.

#

Maybe you had a light that changes color, Red, Green Blue.

#

Instead of making an RPC for each, or directly passing the color.

#

You send through 1, 2 or 3 as the integer option in the Interaction RPC

#

Then the light itself interprets those as the appropriate color.

#

You want to make the Interaction system as generic as you can, so that as many Objects can use it.

#

So you can therefore pipe as many things through the one RPC as possible.

thorny saddle
#

how can create local multiplayer
not the game
just detect gamepads
or keyaboard

#

i mean something like this

half umbra
#

why when i click create server on the server the client also creates the server?

thorny saddle
half umbra
thorny saddle
thorny saddle
#

u mean u have listen server?

half umbra
#

yes

thorny saddle
#

ok so go for check authority

half umbra
#

i just create server from main menu

thorny saddle
#

its weird but go for check authority maybe it solve your issue

half umbra
#

still

#

prints once

#

i set Net Mode to Play as Listen Server

#

in standalone it works but why when i use Play as Listen Server and create server on server then also client open level

thorny saddle
#

idk

half umbra
#

I'm asking because I didn't have this in another project 😄
but yes, that would be fine xd

short arrow
icy jetty
naive bloom
#

ive been able to replicate things that happen on player controlled characters but not an npc enemy (such as displaying new health and when it gets destroyed) any immediate ideas im not aware of?

naive bloom
#

so not sure if this is how i was supposed to fix it but I created a (event begin play > set replicates) and then clicked on my set health action and set it to replicated. please let me know if there was an easier way to do that lol

dark edge
#

why are you turning on replication at begin play, it can just be on

naive bloom
#

i somehow did not find that checkbox until you just mentioned that wow

#

now my problem is getting the damage that the enemy does to the player to show up on client side

glossy wasp
#

Are there any GitHub repos where someone updates ShooterGame to compile with UE5?

naive bloom
#

actually i fixed that with the same solution now i cant get ahold on the client side player once he respawns

naive bloom
#

more information, the server side screen is taking over the client pawn that just spawned and ditches the one it was formerly possessing

fossil spoke
latent heart
#

There are. I forget where though.

thorny saddle
final swallow
# fathom aspen <#221799439008923648>

i added readWrite to RuntimeFloatCurve Uproperty and now i have access to it in blueprint , i can't fid a way change values and time run time, so i think i need external curve and set new curves when player select , is it true ?

jolly siren
latent heart
#

Damn snaps.

fossil veldt
#

Ayo

#

It's not killed I just set the public page onto private since there wasn't enough interest to warrant me spending time on it

latent heart
#

When is it updated till?

fossil veldt
#

There's no 5.0 support because I couldn't be fucked to support it, was a buggy ass engine ver

latent heart
#

Cool cool.

#

Lol

verbal tendon
gilded vapor
#

Have you guys tried 5.2? I just built from source and the editor wouldn’t even open 😭

#

Binaries on windows worked fine though

shy yarrow
#

PLEASE HELP !
when I possess a new player, for clients, the camera view will still in the same view as before, that is what exactly I want, but for the server, it will reset to starting camera view, please watch the video, how can I make it for the server to work exactly like clients

small grail
shy yarrow
small grail
#

Did you notice the small flash icon on posses node? It means should always on server...

shy yarrow
shy yarrow
small grail
shy yarrow
#

Wondering why it works for clients🤨

small grail
shy yarrow
#

you can very fast test it yourself with unreal default project , after possesing , the camera will be same for clients and will be reset for server !! it is not only for my project

stoic lake
shy yarrow
shy yarrow
small grail
# shy yarrow it is unreal engine third person tempelte

Ok, finally I probably understand what you want to do. You spawned a new character in a different place (I suppose a bit forward to your old one) and you want to unpossess the old one but keep the camera position no matter what you possess to a new one?

shy yarrow
#

it now work only for clients

#

but for server not work

small grail
shy yarrow
#

is it bug?

#

I mean a issue for Unreal ?

small grail
stoic lake
small grail
shy yarrow
shy yarrow
# small grail Your old character, no?

but after I give old character camera view to set view target with blend , (if it even work) after new player try to walk, does the camera follow ? I dont think so

small grail
shy yarrow
#

the problem is really really strange, need everyone to look at it !! why does it work on the CLIENT SIDE and not work on the SERVER? I will really be appreciate it if Unreal masters in Unreal slackers answer my question 🙂

quasi tide
#

I don't understand what your issue is. You are changing pawn possession and the camera is updating. What are you expecting?

small grail
quasi tide
#

Even the client looks fine in the video.

#

In both the server and client portions of the video - when they are changing possession, the camera is updating to look through the correct camera.

small grail
small grail
# shy yarrow does not help 😅

Sorry dude, I don't know what you want to implement but it seems by possession should be working like that. Maybe you should think about the needs and try another way.

shy yarrow
blazing spruce
# shy yarrow currently I only want to know why it work for clients and not work for server !!...

Technically its not 'working for client' as the behaviour that you're seeing on the server is the 'correct' behaviour, whatever the server says is correct, so the client is out of sync with the server, I personally think it looks better when the rotation isn't kept when possessing a new pawn because you're taking control of a new character so it makes sense to have its default camera angle but you can try to use Get Control Rotation before it possesses the new pawn, store it and then use Get Controller > Set Control Rotation with the stored rotation after possession on the new character, that might work

shy yarrow
queen escarp
#

how would i replicate for a specific player ?

#

how would i create this on "self" and a specific player ?

thin stratus
#

That is already on the specific player who owns that character

#

That's what Executes on owning Client stands for

queen escarp
#

yeah i know, but i want it to also show for another player

thin stratus
#

Call it on their Character too?

queen escarp
#

yeah thats what im trying to do x)

#

like this is on the "when u take damage" and i need one on the when damage dealt

#

im using the premade damage function

#

but i can get a referens like the "player controller of damage causer"

#

is that possible ?

thin stratus
#

You have two extra pins there

#

Make use of them

#

InstigatedBy should usually be the other Character

#

DamageCauser the actual actor that dealt damage (e.g. Bullet)

#

Make sure you pass that into the damage call on the other side and then you can call your RPC on that

#

@queen escarp

queen escarp
#

well thats what im trying to do somewhat but i cant get it to worjk

#

i mean this is how im spawning the floating damage

#

and it only takes player controller object reff

#

and i cant seem to find how i would get that from the damage event

thin stratus
#

Do you pass the other character as InstigatedBy?

#

Because you are totally ignoring what I just told you

queen escarp
#

no thats because its a "Controller Object Reference" wont let me hook up it to the player controller ref

#

i get what your saying thats what im trying to do really

echo bough
#

cast

thin stratus
#

Your floating UI function is totally irrelevant atm

queen escarp
#

oh

echo bough
#

basically you want the server to RPC call to both instigator and target's SpawnFloatingCombatText function

queen escarp
#

yeah

#

the only other way i know if i multicast it then all clients are affected thats not what im after

#

only the instigater and the target as u said

echo bough
#

feels abit weird but i guess its workable

#

is InstigatedBy the controller of the damage dealer?

queen escarp
#

yeah

echo bough
#

you can get controlled pawn from there, cast to your character, and call the SpawnFloatingCombatText

thin stratus
#

I mean you can also just go where you call that damage event

echo bough
#

though this floating damage functionality shouldnt be in a character

thin stratus
#

And pass the character directly

#

Or is instigatedby a controller?

echo bough
#

yeah

thin stratus
#

Then epic f'd up

echo bough
#

instigatedby is a controller

#

😂

thin stratus
#

That's unintuitive

queen escarp
#

why 😮

thin stratus
#

Everything instigator is pawn usually

echo bough
#

i would also like to know why 🤣

thin stratus
#

Check the spawn actor node for example

meager spade
#

goes back to its shooter core

thin stratus
#

That deal damage event is garbage anyway. Might as well make your own via an interface

meager spade
#

reason they said they were going to deprecate the built in damage system

queen escarp
#

instigated by is controller and damage causer is actor idnno its the pre made function ?

meager spade
#

its garbage, and every game makes there own specialization for damage

thin stratus
#

But well okay. Sorry then. I was convinced it's a pawn

#

Let's say you keep using thay

#

Then call GetPawn on it

#

And cast it to your character

#

And call the RPC on that

echo bough
#

yesh

thin stratus
#

Basically like asaka said

echo bough
#

i did forced myself to use the built in damage event when i was learning, it was weird af, kinda workable...

queen escarp
#

yeah well thats where i am so >)

#

ok ill try

echo bough
#

making your own interface might just save you the headache 😅

queen escarp
#

i mean something like this ?

#

hm the getcontroller pawn gets error null

#

what tha hell its not getting passet on : O

echo bough
#

what did you set when you apply damage 😆

queen escarp
#

oh sry im dumb x)

#

yay it works 😛

#

thanks

wooden abyss
#

Hello there! I'm having some troubles with my clients connecting to a listen server. It seems like the client connects to the listen server and loads into the level.
Then the client seems to load the PlayerController and it seems like the controller possesses a camera at 0,0,0 before it actually possesses my actual PlayerPawn.

I tried around with some stuff using Event OnPossess and Event BeginPlay. Like adding a Widget in either of them to "simulate a loading screen" (i know its by far not the same as a loading screen) but I found out that the order in which BeginPlay and OnPossess trigger can vary.

Is there any way or like some point where I can actually trigger some function that prevents the client from seeing this weird camera position? The way my level is build makes it so the player "spawns" under the map for a few seconds before actually possessing the correct pawn. Can someone explain what exactly is happening here?

#

I'm working completely with blueprints but I was looking into loading screens with c++. Could that be a proper solution for this?

#

Or is there an actual workaround with just blueprints as well?

#

Would already be happy with getting a little pointer/keyword/whatsoever I should try googling for. But for now I'm kinda lost and already tried a lot of different things

wooden abyss
#

Oh nice, so it's either the CameraManager or an actual loadingscreen 😅 guess I have to work on that now 😂

#

Thanks @sinful tree

humble cove
#

data layers cannot be enabled differently on a per client basis can they?

dim trail
#

is sending messages to other clients from a component attached to the controller the wrong way to do it?

#

should i do it from the controller itself?

#

im having issues with sending data specifically

#

to other clients

#

since i believe im having ownership issues

fossil spoke
#

@dim trail PlayerControllers only exist for the Server and the Client that owns it.

#

Therefore you will likely run into issues trying to use it to send information to other Clients.

#

You are better off using the GameState or PlayerState.

#

If you are implementing a Chat system, the GameState is likely the best option.

dim trail
#

I cannot use the playerstate as it doesn’t persist across server instances and gets destroyed. I thought about using the gamestate, but wouldn’t that be too intense on the server/not very scalable?

fossil spoke
#

Take a look at this image.

dim trail
#

Also looked into using a replicated actor, but that is also very server intensive…

fossil spoke
#

You are very new to multiplayer.

#

Dont worry to much about perf.

#

Understand how to build systems for consideration in multiplayer environments first.

#

Once you understand how to make these systems work in multiplayer, then you can consider performance.

dim trail
#

I just don’t want to have to rewrite anything in the future if I do it incorrectly, for example, if I didn’t know the playerstate got destroyed across instances then it would be a big problem in the future

fossil spoke
#

If you want to be a programmer of anykind,.

#

Be ok with refactoring.

#

Refactoring is part of the job

#

You wont escape it

sinful tree
#

Yea... You'll never program anything if you don't start with something, even if it isn't necessarily the absolute place it should be or setup perfectly the first time.

fossil spoke
#

You can minimize it.

#

But you can never escape it

icy jetty
#

Hehe, sometimes it feels like 1 step forward 2 steps back, but if you’re actually improving on things, it’s not necessarily a bad thing

dim trail
#

So, my options are either the game state or the playerstate

fossil spoke
#

For a Chat system, the GameState is a good point to start.

dim trail
#

I’ve already refactored a ton of code for this party design, I started with a component, moved to playerstate, realized it wouldn’t work for my design, and moved to actors. I profiled the actors and it was far too much to handle, and moved back to using a component

#

So, I guess I’ll play around using game state

#

I’ve been told to just send data using owning client in the controller

#

But I don’t see how that’s possible

#

Chat system is another problem entirely.. too many rpcs, would rather use an api

sinful tree
#

Client:
Enter text into text box, send message RPC to server on Player Controller
Server:
Receive message, go to gamestate, send Multicast with the message.
Clients:
Receive multicast, update whatever you need with the new message.

#

How is 2 RPCs a lot?

dim trail
#

That’s for one message

fossil spoke
#

Designing a system on paper first helps in avoiding unnecessary or tedious refactoring, however a prerequisite to good design is first having a thorough understanding of all of the tools available to you.

#

Its natural for beginners to go down the path you are.

#

As you dont have a thorough understanding

#

You gain that through experience.

#

Believe us when we say that 2 RPCs is not a lot.

sinful tree
# dim trail That’s for one message

When you're playing a multiplayer game, you're sending dozens of RPCs all the time. Heck, the character movement component alone sends tons of RPCs per second. Are you expecting people to be non-stop chatting with hundreds of messages per second?

fossil spoke
#

Whats more important than any single RPC call, is the data being passed by them. Even then bandwidth these days is pretty high.

#

Reduce data handling as much as you can get away with. But premature optimization is a curse, as you will be forever stuck trying to squeeze out more performance from a system you havent even completed yet.

#

If you havent completed the system, how can you hope to understand it and how best to optimize it.

dim trail
#

We have an outline of the project and we are expecting/designing it to handle a larger amount of players per instance, so the performance matters a ton in my case. It also drives down server costs.

fossil spoke
dim trail
#

Yeah, I’m already using GAS as well as the cmc, but we’re hoping to make some changes to the cmc to make it less intense. After watching/reading about how epic had trouble with reaching 100 players per instance it gets a little worrying so I’m hoping to understand good practices behind performance

fossil spoke
#

What are you imagining you are going to support as Player count?

dim trail
#

We’re hoping to support up to 50 per instance. I know it’s a very real possibility that the project won’t get popular enough, but we already have a few hundred people express interest even in the early stage we are in now.

verbal tendon
#

I know predictions can be wrong. But I predict your game wont reach the popularity where you can sustainably have 50 people per instance. And even if it does, you will be making mistakes in how you setup your game that youre going to need to fix when the time comes.

#

Fornite has 100 players per instance, and it`s one of the worlds most successful games. That makes it the winner in a subset of a subset of all games created

#

Most games never make it to release. Of those that do, most still are not profitable and reach a player count anywhere close to what you are imagining

#

So the odds of you being a winner in the subset of a subset without vast prior experience and expertise ... well they are not great

#

The best thing you can do is use your time to learn

#

This is of course vastly generalized and I am making assumptions that can be wrong

icy jetty
prisma snow
icy jetty
#

Aye lemme Wishlist that rq

verbal tendon
#

We`ll get right on making that magnificent game for you

dim trail
#

The scope of the project is very small right now and limited to 2 instances, however it will be persistent. I am new to the multiplayer side of unreal(~1yr) but I’ve been a software developer for a while now. I’d like to do things correctly as our project is reaching a size where doing things incorrectly can lead to bigger issues down the line.
We are using an API for player persistence, but it’s not something that I would say is incredibly huge in scale

verbal tendon
#

😄

prisma snow
#

BTW this website underestimates RTS complexity by quite a bit

fossil spoke
#

Guys lets not derail please.

prisma snow
# dim trail The scope of the project is very small right now and limited to 2 instances, how...

You're optimizing the wrong way, which is worrying about theoretical possible issues when larger issues go unnoticed due to lack of profiling or experience or just because multiplayer is hard.

Better build your game to be as simple as possible, do things efficiently and measure constantly along the way to ensure you are in sane limits. And design some ways to test or at least mock heavy stress situations for the systems

verbal tendon
#

As long as you are not putting non-powerof2 30k textures into the game

#

and doing crazy tripple nested loops that run over 50k elements each, on every tick

#

You`ll be fine

prisma snow
dim trail
#

Client optimization isn’t much of a concern for me as server optimization is. I know epic makes emphasis on the replication graph but I’m hoping iris will do a better job of being an intermediate instead of having to learn all about that

#

Also, between the CMC, GAS, RPCs, I wouldn’t be surprised if it gets tough to reach even 15 players without issues

prisma snow
#

Idk if Iris will be the magical wand that everybody seems to anticipate xD I'd use the tested and trusted tools

dim trail
#

I doubt it will be, but it’s better than learning how to use the replication graph

prisma snow
verbal tendon
#

I wouldn`t even be concerned about scalability at this stage

#

You haven`t made a game in Unreal before, let alone a MP game in Unreal

#

There`ll be plenty of challenges simply from making a game that has more than SP or 2 players in MP

#

... Judgment is incoming ... 😁

#

I`m going to be a terrible person and say teleport them by an offset 😄

latent heart
#

If you use input, it would have max speed and such applied to it.

#

Offset is the way, really.

verbal tendon
#

This is all assuming ofc that it is not a physics-based game

naive bloom
#

so the blue cubes on the third person template are ending up in different places on each screen after I walk into them and move them around how can I fix this?

#

nevermind i thing i figured it out

obtuse loom
#

hey guys i am trying to replicate my character's movement which moves through a server rpc to a multicast, but i keep getting this error, i have no idea what i am doing wrong.

#

I am playing on a standalone server with 2 people and my character and character controller have replciated set to true

sinful tree
obtuse loom
small grail
obtuse loom
#

im not actually moving it on the server

sinful tree
small grail
obtuse loom
small grail
obtuse loom
#

its more like flying

small grail
#

So you just tell other players from the server that the specific player is flying (as I remember you can change the movement type to fly)

obtuse loom
small grail
#

And how it flies is controlling by movement component which is handled by Unreal right?

obtuse loom
#

no im using the actors velocity to handle the flying

small grail
#

Is it an animation?

obtuse loom
#

and im telling the clients what the velocity is

obtuse loom
small grail
#

So you need to make a custom mode for movement type in the movement component.

#

Any character movement should be from there or it would be much painful.

obtuse loom
#

ya im going to change it later, i was using this as a testing

small grail
#

Another way is root motion movement in animation. Maybe you may try this as a testing.

obtuse loom
#

so the problem could be because of the way im setting up the movement?

small grail
#

If you could show the code, we might know the reason.

obtuse loom
#

sure

#

i have this in tick

#

this is the rest

#

and the validation returns true for both of them

sinful tree
#

The error message you're receiving is directly related to trying to call an RPC to the server on an actor that is not owned by a client.

small grail
#

It looks all right in the code.

sinful tree
obtuse loom
#

well how can i set the character to be owned by the client

small grail
#

I think you might need to move the code to player controller instead of player character

obtuse loom
#

do i just use setowner

small grail
#

Because the client owns the controller for sure.

#

It is a network owning, not the owner.

obtuse loom
sinful tree
#

It really shouldn't matter as long as ownership is properly established. Are you actually having the player controller possess the character?

obtuse loom
#

not realy i just click play

#

i dont have it set up

small grail
#

So it might spawned on both client and server side.

#

Try to spawn them on server side and possess there