#multiplayer

1 messages · Page 4 of 1

graceful flame
#

yeah

distant turret
#

Problem is i dont have a budget or spare money to pay for these services

graceful flame
#

Well you can have lots of cheaters by using a save file to store stuff, or you can try to setup and host your own database server, or figure out how to pay for a cloud db.

sinful tree
#

Community hosted servers with non-persistent data between those servers? Save game handled on the server's end is fine.
Community hosted servers with persistent data between those servers? Forget about it. It's completely unsecure and people can manipulate any server data, including things that aren't necessarily their own unless you're going to give each player their own login to your database, but still wouldn't recommend since players could then muck up whatever data is entered into your DB.

Company hosted servers (eg. you control the servers) then you can use save games or a database, but a database would probably be better as you can then also easily create external tools to access and manipulate the data if necessary.

distant turret
graceful flame
#

So if you're making an mmo you pretty much have to host your own servers and use a database.

#

Unless its more like a sandbox type game (Rust, Ark Survival...etc) then you can have community hosted servers and they can track progress using save game on server but there's no data transfer between the individual servers unless you have a database like Datura said but that can open up a can of worms with new sorts of problems.

#

If you're making a co-op PvE or friends only type game and make it so the players host the games themselves (Listen Server), then you might as well not have a database and just use save game files locally because cheating is already trivial at that point. You could still setup a database and have secure persistent data (amount of gold) but only to find out that cheaters can still manipulate the game to "print gold" at their will.

chrome quest
#

If I want to send data from Server to Client without using Replicated variables, I have to use two RPCs right?

Basically a Client making a request to the server to retrieve data.

I would use one Server RPC that calls a Client RPC with the data as input, right?

Or is there any other method?

short arrow
#

no other way

uneven chasm
#

I have an actor that the server sets a variable on a component (replicated owner only) but on the client controlling that actor the component does not get this update. any thoughts ?

chrome quest
# short arrow no other way

Great. I wanted to confirm is there's no other message passing system besides RPCs and Rep Vars.
I know about TCP but I'm not using that.

Thanks

hybrid zodiac
#

@uneven chasm make sure both the actor AND the component are set to replicate

uneven chasm
glacial ermine
chrome quest
#

Obviously a custom server can't perform movement simulations the way the one from UE does

glacial ermine
#

Yes this is one of the main issues. My current solution is a quick and dirty one, using collision tolerances and allowing the client to run around freely while I check the last 10 positions according to what the server has indicated. Any divergence above a threshold is “gently” corrected

#

But of course my game is forgiving of these issues

#

Not a competitive 3D shooter or anything

#

😅

glacial ermine
#

I assumed you meant physics etc

civic belfry
#

I'm using the beta plugin for network prediction on a single physics ball and I'm wondering what the best practice is for where to apply impulse to the ball - would you have the server run the impulse only, or multicast it from the server to all of the clients. When I compare the two, multicast feels just a hair more responsive

#

but in my brain it feels like replicating the physics without multicasting the impulse should be more responsive since the next update the clients get would be the ball's position changing, instead of having to apply an impulse locally and then wait for the ball to get hit. I guess this is wrong though due to prediction? Local clients need to know an impulse happened in order to not try to correct the difference?

uneven chasm
#

repnotify function can only exist in the component the variable is in right?
Component A has variable, Component B has hud stuff I want to update. Can I create an event from a function on Component B with a target of component a ?

glacial ermine
civic belfry
#

lol I gotta learn more about how this works but I think that's close to it. I think applying it locally results in less difference when it compares. Shits confusing but working so far lmao. The beta network prediction plugin crashes for anything complex but seems to work just fine for one physics ball and a few actors to smack it around. Fun stuff!

chrome quest
# glacial ermine I assumed you meant physics etc

Oh, no. The current model is for UE to run the game, character movement and other stuff. Then replicate data to the client for them to run approximate simulations of the world.

This works well because client code is a copy of server code. Dedicated server.

With a custom server, you'd have to run the world somehow. I'm just wondering how?

#

Like if a character moves, does your server run the movement logic. If so how does it match UE's model

winged badger
#

i have no idea what you mean by "custom server" here

chrome quest
winged badger
#

if the classes rep layout doesn't match, and i mean for any class that tries to replicate

#

unreal net driver will boot the client out

static sable
#

hi, when I call SpawnDefaultController() on my pawn to enable the behavior tree, for whatever reason, repnotify with COND_OwnerOnly doesn't work. It seems that when I set SetOwner(PlayerController) it somehow collides with already existing default controller. Anyone has clue how to fix it please?

chrome quest
winged badger
#

AIControllers do not replicate

#

you either use unreal networking, or you do everything yourself manually

#

doesn't matter what kind of server it is

chrome quest
winged badger
#

also note that with Condition OwnerOnly, the Owner has to be set server side for it to work, too

static sable
winged badger
#

turn on replicates and only relevant to owner

split siren
#

I forgot what is the debug command that shows the bounding box where "server" thinks the client is. It is used to compare the current "client" position and the actual server location. Do you know please?

winged badger
#

and set the owner on server right after its spawned

#

p.ShowNetCorrections

#

i think

split siren
static sable
winged badger
#

yes, and you can turn only UseNetOwnerRelevancy

#

so the AIController Actor doesn't replicate to other clients at all

#

then it will be like PC in that scenario

static sable
#

thanks let me try that

lime echo
#

Hi there! I wonder what makes more sense to do when making a multiplayer game: Check the context before each chuck of code (IsLocallyControlled(), HasAuthority()...), or instead manage to spawn each class (Actor or Component) only on the context (Server, SimulatedProxy, AutonomousProxy) that is relevant to it. I thought about maybe destroying irrelevant classes in BeginPlay according to the context. What do you think?

winged badger
#

2nd approach has limited uses, but its also not how it was intended to work

glacial ermine
winged badger
#

so its a pain in the arse to manage, and you really need to know what you're doing there @lime echo

glacial ermine
#

Collision is done via quad tree + simple aabb

winged badger
#

extra non scene component with the Tick off on an Actor doesn't cost anything

#

also, getting net addressing to work with locally spawned Actors/Component is much more involved then just having them on the CDO

lime echo
winged badger
#

think is

#

when you have a component on class default object

#

if the actor is net addressable, which means you can send a pointer to it owner the network

#

it automatically means that component is also net addressable, as it has a stable name (component name) relative to net addressable owner actor

#

as soon as you start spawning them, if you don't turn their replication on, that no longer applies

lime echo
#

So it seems like the first approach is the one to go with, right?

winged badger
#

which makes it easier, with virtually no performance difference, to just disable the component where you don't need it

#

instead of destroying it

split siren
#

Can I have a question about movement replication and moving platforms?
When a player with large ping jumps off and on a platform with replicated, constant linear movement, I see server correction and it makes sense because the platform is at different location when client lands/jumps off.
Possible fix?
My idea is during server FSavedMove replay also roll back the platform, but that seems like a lot of work (both coding and CPU time wasted), so before wasting days on this I wanted to pick brains of the far more experienced community members.

What confuses me is that the rotation FQuat StartBaseRotation; and location of the primitive component (platform) are already included in the FSavedMove_Character so I would assume UE prediction would handle this already.

#

More context - To get better at networking I wanted to make Fallguys type map with moving and rotating platforms.

pallid mesa
#

it deals with based movement and rollback

#

and yes, it is kind of coupled with the cmc

split siren
#

Oh lucky me! Thanks for the pointer

chrome quest
twin juniper
#

hi guys

#

i want to make a online game using aws in unreal 5

#

but i didnt find aws sdk for unreal 5

#

i can only see aws sdk for 4.26

#

or 4.27

#

how to download for ue 5

#

dose aws skd for ue5 is there?

split siren
split siren
#

I wonder how many people made CMC cry so far.. We need a counter!

twin juniper
#

so it can work?

#

4.26 sdk

split siren
split siren
# pallid mesa you are lucky as UT4 has a lift implementation you can use as an example

Thanks for the UT Lift tip, but it left me more confused than before. I have read UTCharMovementReplication UTLift and UTCharacterMovement but found no extra code for base platform rollbacks (or anything similar). It uses the default "SetBase" call as in default CMC https://github.com/EpicGames/UnrealTournament/blob/3bf4b43c329ce041b4e33c9deb2ca66d78518b29/UnrealTournament/Source/UnrealTournament/Private/UTCharacterMovement.cpp#L1768

I am very likely missing something obvious, thus would you mind giving me more hints what to look for?

pallid mesa
#

oh, it was a long time since I last checked... as far as I remember I believe the platforms were rollbacked for hit registration but I dont remember the details or if I even remember them correctly, I'd have to re-check

snow tiger
split siren
snow tiger
split siren
snow tiger
split siren
snow tiger
wheat magnet
#

is actor blueprint owned by client?

#

or only character blueprint owned by a client?

#

what mean by this statement

split siren
wheat magnet
#

so if i spawn an actor in client side, then server will spawn that.

#

but the owner will be server or the client who is executing that event to spawn

split siren
#

If you spawn an actor on client, server will do nothing.

wheat magnet
#

unless i do rpc on client, right?

split siren
#

If you do an RPC on an actor that does not exist on the server, it will be ignored.

wheat magnet
#

how an actor can't be exist on server.

split siren
#

If you spawn it on client, then server will not spawn it on server side.

#

You need to spawn actors (that you want to replicate) on server side always.

wheat magnet
#

consider this example

split siren
#

And then if you want to allow certain client to use RPCs for that actor, you give that clients ownership of that actor.

wheat magnet
#

event run on server inside player character

split siren
#

Yes, that is asking the server to spawn the "New Blueprint", which is different than spawning it on client.

wheat magnet
#

if i make this event non rpc, then it only spawn on client

#

so no server and other clients can see?

split siren
#

yep

wheat magnet
#

so it means when i run event on server, then what exactly server does

#

server replicate that event to all clients?

split siren
#

The server spawns the actor on the server side. That's all the code does.
I guess your question is how does the "New Blueprint" actor gets to clients?
That is part of replication. If the actor has Replicates enabled, it (the actor on the server) informs all clients "Hey, I am at 100, 200, 0." and clients create the actor on their end.

wheat magnet
#

yes replicates set to true

split siren
#

And do your clients see the actor?

wheat magnet
#

of course

split siren
#

Wonderful

wheat magnet
#

that's the thing I'm trying to understand

#

the other question is "what is use of multicast" if server already informs to all clients with server only event?

#

i'm running event only on server. but server tells to all clients. however multicast do same thing?

split siren
wheat magnet
#

so every event gets called on server means all clients can see that event

#

but that event doesn't gets called inside each client, rather it just only server event?

split siren
wheat magnet
#

exactly. you mean server event and multicast is totally different

split siren
#

Yes

wheat magnet
#

server event = runs only on server and other clients can see what is happening on server

#

multicast = run that event inside each client blueprint graph

split siren
#

Not exactly, server event just runs on server. It does not inform clients if not further instructed

wheat magnet
#

well. that sounds like same

split siren
#

If you run Print("Hello") as a server event, it prints it only on server. If you run it as multicast it prints it on all clients

stray thunder
#

are replicated variables automatically inherently multicasted?

wheat magnet
#

i spawned cube in client side with server rpc. other all clients also see that cube and server also see that cube

#

so all clients can see

split siren
wheat magnet
#

right now cube blueprint is set to replicated

#

and gets called on server

#

i didn't do any multicast

split siren
#

It did internally

#

If you turn the replication off, you will see it still spawns on the server, (steps 1-3) but it does not do the step 4

#

But it will exist on server

wheat magnet
#

correct. now i tried multicast. when i spawn on client, it spawn two times

split siren
#

If you spawn an object using multicast, it will ask each client to spawn an object. But that object is not "the same object" from the server perspective. So if you move the cube on the server, it will not move clients because those spawned their own version of the cube.

wheat magnet
#

yes that make sense. since server also spawn

split siren
#

So the correct way is to spawn it server and have replication turned on on the actor.

wheat magnet
#

great. from where did you learned these concepts? any video references or guide to become expert

split siren
#

Official docs + trying it out

stray thunder
#

pinned comments- 5th comment down

wheat magnet
#

ok got it. i already downloaded this book

#

when executing custom events with rpc, then it will necessary to pass parameters inside event? or they can be directly connected like in image

#

are both images have same behavior?

stray thunder
#

should be

#

yea

wheat magnet
#

ok

stray thunder
#

so, once you run something on server, you can't take that execution line and not have it running on the server, right?

#

you'd have to sequence that before the server calling node?

wheat magnet
#

only inputs passing with custom events or they inputs can be passed directly? like above two images. i thought they have different behavior

stray thunder
#

i don't know what you mean

#

the two images above are identicle

#

they will have the same effect

wheat magnet
#

images are not identical. but technically they might have same effect?

stray thunder
#

are you saying they don't have the same effect?

wheat magnet
#

well. that is my question

stray thunder
#

visually not identical - technically, identical

wheat magnet
#

thanks for clarification

stray thunder
#

question:
so, once you run something on server, you can't take that execution line and not have it running on the server, right?
you'd have to sequence that before the server calling node?

wheat magnet
#

yes

plush wave
#

How do I replicated variables that are in a component subclass?

#

If the component is owned by an actor does it just use the actor channel?

wheat magnet
#

can i set variables of game state from client?. or i can only read variables of game state inside client but not change them?

latent heart
#

Only the server can change variables.

#

If you want to change things, ask the server.

#

(You can set local variables to whatever you like, they may or may not get overwritten by the server at some future point.)

unique sparrow
#

What is the best way to send a bunch of 10 different float properties all together to the client on demand when the client asks through a server rpc?
Simple approach is to pack all them into a struct and send. Is there a better way to achieve this?

latent heart
#

TArray would be pretty simple?

unique sparrow
latent heart
#

It really makes no difference which data structure you use.

unique sparrow
#

I am worried about the network performance when sending these many properties all together

#

I mean is there a ways to make it optimized over the network? Suppose the struct have 20 properties, still the normal flow would be all fine?

solar stirrup
#

20 floats is nothing

#

Depends how many times a second you send them over

#

And to how many connections

fading talon
#

about actor replication and garbage collection: if a actor is owned by a specific PlayerController and the playercontroller does vanish (becasue of disconnect or whatever).
does it also detroy the actor it owned? or does it stay behind like a unwanted child? or does ownership just jump up the ladder?

#

actor without ownership should not be possible. or can it?

chrome bay
#

It'll stay behind

#

Just without a valid owner

fading talon
#

so i need to explicitly need to brake it down if i don't need it anymore then...
good to know 🙂 ty

regal geyser
#

on EventPossessed I spawn BP_Chat for each pawn, also setting the owner of this BP to given pawn. But when in BP_Chat an event is triggered, it says that only server's Pawn is the owner (in Standalone, in PIE it works fine, also LAN it works in Standalone too, online not). Why?

#

It looks like Owner reference isn't replicated to clients. On server it correctly says who is owner, but how am I supposed to call ServerRPC inside BP_Chat when owner is only set on server?

stray thunder
#

i believe the rep notify is running on server, and i can't get it to get back to the client's pc to update the UI client-side

#

any ideas?

woeful ferry
#

delegates

stray thunder
#

i'll give that a go

latent heart
#

Why not just Destroy() ?

stray thunder
latent heart
#

So you're applying 10 damage to the player when they pick up health ?!

#

That's most bizarre.

#

Also, the red server part of your paste should be at the very top. Only the server should deal with collision with pickups.

stray thunder
#

you've missed the point

latent heart
#

No, I'm totally not helping with what your actual problem is. I'm just giving feedback on your methodology.

stray thunder
#

the event any damage is the server event

#

and that event can do damage as well as heal... its just an int

sinful tree
latent heart
stray thunder
latent heart
#

I do.

stray thunder
#

oh wait... they do

#

i think that was the problem

#

i thought they just inherited that from the actor

stray thunder
devout granite
#

Does anybody know how to send a rpc call from client to server in unreal ? I am able to update the clients with events or variables over replicates but cannot update the server :D

quasi tide
#

That's what a Server rpc is. Can only be called on actors the client owns.

twin juniper
#

this compiles despite giving the error, and OnRep_ItemSlots is an onrep function in parent class that is overriden. will this still be properly called?

twin juniper
twin juniper
solar stirrup
#

i'd just make a new on rep function

#

and just call the other function in it

unique sparrow
#

Can any talented peep tell me any talented idea to make a player's talented property only replicate to his talented teammates?
Thanks for your talent in advance.

prisma pelican
#

does stuff inside animbp need to be replicated

solar stirrup
#

anim blueprints don't get replicated

#

you'll have to replicate the state of the character and use that in the anim bp

unique sparrow
solar stirrup
prisma pelican
#

@solar stirrup okay thanks!

#

ill look into that

unique sparrow
#

Thanks my talented frient

#

friend

prisma pelican
#

@solar stirrup why does my animations still play on both server and client if animBP doesnt replicate?

#

shouldnt i only see it on client side?

stray thunder
#

do you want it to?

stray thunder
# prisma pelican <@244165871562391552> why does my animations still play on both server and clien...
BRY

📹 Part 4 of our replication series unlocks limitless potential with Multicast and RepNotify! In this video, we dive deeper about how Unreal Engine's Actor Replication really works as well as introduce ourselves to a variable replication and how combining the power of variable replication with an event driven design can help us build a multiplaye...

▶ Play video
#

idk if that's your problem but it might help

plush wave
short arrow
slim terrace
#

having a bit of jitter client side, have a pawn that has forces applied to it on tick on server side but movement replication is jittery

#

any way to smooth the movement?

#

playing as a listen server is fine though

split siren
#

To do a proper test of your current system I would recommend adding some lag using net pktlag=200 and see how the car behaves with some non-minimal lag

acoustic drum
uneven chasm
#

Curious to get some multiplayer thoughts on best approach.
Context: I have 2 components and a hud widget

  1. component A manages health equipment and other related variables/bps
  2. component B manages all the different ways you can take damage
  3. hud widget with a event that updates health ui. this event takes an input of health & max health to do a % for the widget bar. Then it sets the current health / max health text getting the health values from component A

The problem:
component B sets component A sets health to the new value after damage is applied and health is replicated, owner only.
then component B calls widget event to update ui but the event updates the bar correctly as the data comes though the input correct but the text being set for current health/max health gets it from component A and is always one "attack" behind on its value.

flow is something like this weapon collision anim events (component) -> taking health (component) sets equipment (component) health variable AND calls Hud update event which gets the replicated health variable

Is the event being called to quickly for replication of the health value to happen? Its always one "hit" worth of damage behind

sinful tree
# uneven chasm Curious to get some multiplayer thoughts on best approach. Context: I have 2 com...

Your game logic shouldn't really call changes to UI directly. Use an event dispatcher in your components and call it whenever your health changes (Health should be an OnRep variable, yes? Put your call to the event dispatcher in the OnRep function) and have your UI bind to it so the UI can update itself. This gives you additional flexibility in your UI in case you want other things to happen whenever a player's health value is changed, or you decide to scrap the UI entirely.

uneven chasm
sinful tree
#

What is owner only?

uneven chasm
#

health variable

sinful tree
#

Why?

#

Other players don't need to know the health?

uneven chasm
#

yea eventually just getting it working for its own hud 😄

#

just to make sure if i wanted it replicated for everyone else is that leaving it with no condition ?

sinful tree
#

Then it doesn't need to be set to owner only - no condition is fine.
Regardless, your Health Variable should be "Rep w/ Notify". That'll create an OnRep function that'll be called whenever the variable is replicated.
The OnRepFunction can then call the event dispatcher.

In the OnConstruct of the UI that cares about the player health, you bind to the Component's dispatcher, so you'd have to get a reference to that component within the widget.
You can also make the event dispatcher pass values as well, so if you do, then on the receiving end in the UI it can directly read the values from the dispatcher without having to get reference to and look at the variables in the component.

#

Later on if you're wanting to see other player health values, you'd do the same thing - get a reference to the component that contains the health of that particular player, and bind to the event dispatcher to listen to values changes in whatever UI you want to see the value.

uneven chasm
#

Makes perfect sense, Ill let the component dealing damage just worry about applying the damage, add the OnRepFunction and tell it to call the ui events which should guarantee all the numbers are the same at that point

#

@sinful tree thank you for guiding and validating that direction 🙏

clear copper
#

how can I set Seamless Travel depending on how I'm testing? I'm so tired of turning Seamless Travel on for testing in steam then having to turn it off when testing PIE.

stray thunder
#

so, mystery time...
why when i pickup a health pickup the listen server logs it twice, but the client logs it once?
everything works fine, but its just weird and i want to find out what it is if i can before i move on.

#

I load in and they both update to max fine.
the server actually loads the default color of the progress bar after it loads correctly, but I just use the same color np.
then i hit a button to take damage and 2 of them show up. Then I run over the health pickup and 2 more show up.

clear copper
#

it seems more complicated than necessary

stray thunder
acoustic drum
acoustic drum
#

If you can figure out where the initial trigger is coming from then you've basically solved your problem already. You can hopefully do that using the call stack or maybe even the execution trace

sinful tree
# stray thunder

In what class are you creating your widget? Character? PlayerController?

uneven chasm
#

@sinful tree does a repnotify function run on the server too if so and I am just updating the hud then I should switch auth remote path is my thinking

sinful tree
uneven chasm
#

yea isserver check will work

karmic shuttle
#

would anyone know why this doesnt seem to be changing?

#

this is on an actor in the world

sinful tree
#

To fix, replicate the selection through a player owned actor, like the player controller, then when running on server hop over to the actor.

karmic shuttle
#

it should now, ive made an adjustment to forward owning client -> server

#

its a modkit btw if that clears up some confusion lol

rancid monolith
#

Is "rollback netcode" a common thing in FPS or other online games that use projectiles? I'm imagining a system where a client fires a projectile, and the client immediately sees the projectile spawn and start moving, and then when the server knows of the projectile's existence, it places the projectile to approximately where the client is currently seeing it, predicted based on latency

#

I don't imagine I'm the first person to have thought of that

#

Anyone know if that sort of thing would be hard for a beginner (in terms of online multiplayer) to implement?

rotund onyx
#

Ok I have a very basic question because I am doing something wrong. Can someone show me a node setup that sets a replicated variable?
For me my clients seem to get two calls of a function. So if I increment a number by 1 they get 2 instead. I don't understand why this could be, but I'd really like to see an example of something that works, because I can't find much online.

#

The other thing is spawning an actor, and no matter how I try I can't seem to get that to work either

#

I can call a server event in order to spawn it and still it only happens for the client. I just don't get it

sinful tree
#

Jokes aside....

#

For replicated variables you typically only want to set them when you know you're running on the server.

rotund onyx
#

So I definitely don't want to set them in a multicast then

sinful tree
#

No

rotund onyx
#

When is multicast actually useful? So far it seems like every case where I try to use it is wrong

sinful tree
#

When you have some kind of event you want triggered on all clients. Like playing a sound or visual effect.

#

Something that is fire and forget.

rotund onyx
#

So basically visual stuff, never actual gameplay

sinful tree
#

It can be gameplay oriented too, but there may be a better way of doing it.

rotund onyx
#

Hey I'll be happy to cut multicasts out of my diet

sinful tree
#

It's just an event that you want triggered and all relevant clients to respond to.

rotund onyx
#

Do you have any idea why I might have events that trigger twice for the client but not the server?

sinful tree
#

In other words, it's like making a "Run on Owning Client" but making all relevant clients do something.

sinful tree
rotund onyx
#

It's basically just calling a server event on the player controller, which then calls a server event on an owned object

glacial ermine
#

Can anyone suggest a good tutorial for multiplayer coding where the focus is scale of numbers of concurrent players to the hundreds? Think Diablo style game not battlefield if that makes sense.

rotund onyx
#

If I call a server event in a player controller, which then calls an event in another actor, does that other event also need to be a server event since we would already be in one?

fathom aspen
#

You can try calling SetOwner anytime after you call SpawnDefaultController though most probably this will cause issues to your NPC. If it doesn't work as intended, you probably have to spawn an actor that is owned by your PC and that each NPC pawn references and changes its values. I'm still not sure what you're trying to achieve with this though.

sinful tree
fathom aspen
glacial ermine
#

But educating myself a bit more I see that there are no player limits per se. So if your unreal server is simple + well done = you could handle hundreds of players.

#

I think I’ll continue down my track of having a custom server and use Unreal mostly as a front end + renderer and communicate via websockets initially

fathom aspen
twin juniper
#

hi guys so iam following AWS for unreal tutorials

#

Welcome to Building Games on AWS, an AWS Game Tech YouTube series where we teach you how to use AWS to build games! Building Games on AWS will cover a variety of topics, including analytics for games, AI/ML for games, hosting game servers, game engine integration, and more.

This second series will be about integrating Amazon GameLift with Unrea...

▶ Play video
#

in this video

#

iam getting this error

magic furnace
#

seems like some target is not set

civic belfry
#

Dumb question, but is it normal for a multicast event to update only the clients, not the server lol? This doesn't update the server's variable when on multicast, but does when set to run-on-server with the variable set to replicate

winged badger
#

that is a really bad way to run a timeline

#

you're replicating a variable that changes on Tick

#

and the time flows at the same rate on server and all connected clients

civic belfry
#

lol yeah when you put it that way...

#

guess I should run the timeline without replicating anything, then replicate the result when it stops eh?

winged badger
#

Timeline is a full ActorComponent that does its stuff on Tick packed into a single node

#

you should replicate start/stop events

#

but they can handle the update on their own

#

always simulate everything you can get away with

civic belfry
#

ahhh ok! That makes sense

#

thank you~!

thin stratus
#

Does a Non-Possessed Character not cause Overlaps on ServerSide? :<

#

I have a Character that moves forward by default (custom CMC). It works all fine if the Character is possessed, but as soon as I unpossess it, it won't trigger the Overlap on the Server anymore.

#

Neither Hits nor Overlaps. Guess I'm stuck trying to see where that is filtered for no reason

civic belfry
#

doing something similar lol. My hits are like 50% from the server. Haven't figured out wtf's causing it yet. Characters are possessed in my case so it's going to be me being a n00b again

unique sparrow
#

Does the player state & player controller persist when a user disconnects? Suppose we want to make him reconnect, so a new player controller is spawned? and what about the playerstate?

split siren
unique sparrow
split siren
winged badger
#

player state gets duplicated and stashed into inactiveplayer array in gamemode

split siren
#

I was wrong then

winged badger
#

you can override OnDeactivated on PS to stash any additional data you need to restore player on reconnect (c++ only i think)

#

as the unique net guid is unique for a particular service (like Steam) the engine is able to match reconnecting player with their inactive player state

#

it lasts for 5 minutes before its deleted

fathom aspen
#

Though you got Reset() in that case

winged badger
#

copy properties is not meant for this

fathom aspen
#

It is

winged badger
#

as you are likely to need to pull some data from the pawn itself

#

in order to restore it properly on reconnect

#

copy properties can't do that

#

like, make it reappear on the spot it disconnected from

#

requires PS to know Pawns disconnect time location, which it normally doesn't

twilit radish
#

Hey, does anyone know if Unreal has a callback for when a user presses this button in the Steam overlay? 🙂

winged badger
#

OSS has OnSessionInviteAccepted i think for that

#

or something very similar

#

OnSessionUserInviteAcceptedDelegate = FOnSessionUserInviteAcceptedDelegate::CreateUObject(this, &USolsticeOnlineSubsystem::HandleSessionUserInviteAccepted);

twilit radish
#

Thank you! 😄

fathom aspen
winged badger
#

for copy properties to work

#

PS has to have all the data you need already

#

and for restoring disconnected players, it often doesn't

#

even if you had the foresight to put your inventory on the PS so it remains

#

you still need more

#

i have a FDisconnectedHeroData struct in PS

#

that gets populated exclusively from OnDeactivated override

fathom aspen
#

Hmm... I see. I should play more with this then. I mean it's really strange that CopyPropreties is the one called inside Duplicate. If it causes issues, then we've all been misled 😦

winged badger
#

i mean sure

#

you need that data

#

but

#

you usually need much more

fathom aspen
#

Yeah unless, you fall in that hole, you never know it

#

I was also wondering how transient properties and non-uproperties do really persist. They get copied with no issues whatsoever.

#

I asked the guy what was his real issue though and he didn't remember 😄

#

He just didn't duplicate the PS, but kept the original one, which feels like counter attacking the engine, and that solved it ^^

split siren
#

While the experts are here, I wanted to ask about CMC client-side prediction on moving platforms.
When a client with high ping jumps up while on a moving platform, it triggers correction (both when starting the jump and upon landing).

While running on the platform it behaves correctly. I assume the correction it is due to the fact location used in saved moves is relative to the base (primitive character is standing on), so when user jumps we switch from relative to world space.

Is there any way to fix the correction when jumping on a moving platform?

My first attempt was to teleport character to the location client said it performed jump (which is unsafe) before executing PerformMovement, but that also resulted in big location delta and correction.

winged badger
twilit radish
fathom aspen
winged badger
#

im always expecting glitches

thin stratus
# thin stratus Neither Hits nor Overlaps. Guess I'm stuck trying to see where that is filtered ...
    /**
     * If true, movement will be performed even if there is no Controller for the Character owner.
     * Normally without a Controller, movement will be aborted and velocity and acceleration are zeroed if the character is walking.
     * Characters that are spawned without a Controller but with this flag enabled will initialize the movement mode to DefaultLandMovementMode or DefaultWaterMovementMode appropriately.
     * @see DefaultLandMovementMode, DefaultWaterMovementMode
     */
    UPROPERTY(Category="Character Movement (General Settings)", EditAnywhere, BlueprintReadWrite, AdvancedDisplay)
    uint8 bRunPhysicsWithNoController:1;
#

Run PHYSICS With No Controller

#

Table flip material

fathom aspen
#

I mean that means turning this to false won't let the character keep walking, preventing him from going into that trigger box?

thin stratus
#

It's false by default

#

Yeah, I mean the char keeps moving

#

But doesn't trigger overlaps for server

#

Setting teh boolean to true makes it work

fathom aspen
#

Good find! Goes and writes down notes

winged badger
#

you'd typically do const FData&, UHT might even enforce it for an RPC

graceful flame
#

Use p.shownetcorrections 1 in console to visualize the capsule corrections. It looks jittery to me because it’s lacking animation blending.

How much simulated lag are you using?

unique sparrow
#

How to get data from a player state of a disconnected player like name, team ? As I read that player state gets destroyed on disconnecting.

wheat magnet
#

what is playfab platform? and what is use of that in video games?

chrome bay
#

By default it doesn't get destroyed instantly, it gets put into the "inactive" player array in the GameMode for five minutes and is then destroyed. Why would you need to access that info though?

wheat magnet
#

is playfab dedicated server?

#

or is it just like steam/eos?

graceful flame
unique sparrow
unique sparrow
chrome bay
#

Well technically if the player has disconnected, they are no longer a Teammate

#

That's fine but so long as they aren't in the match, they aren't playing and not gameplay relevant. So really that pawn should just be nuked, then you spawn a new one and reassign them as a teammate when they rejoin.

#

If you disconnected from an online game, it seems unfair to allow other players to kill you while you aren't playing, then rejoin and suddenly be +10 deaths or something

graceful flame
#

I think naman wants to keep the disconnected player’s name and score.

chrome bay
#

you can keep that just fine

#

The player state will be automatically assigned back to the same player if they rejoin within the window

chrome bay
#

IIRC that's the default yeah

unique sparrow
#

When a player rejoin, a new controller is spawned right? So it will be assigned when we repossess the pawn?

chrome bay
#

You won't repossess the pawn, a new pawn will be created

graceful flame
#

So during the 5 mins their data is available under InactivePlayer array

chrome bay
#

The old pawn should be removed when they leave

#

Which IIRC is the default behavior

unique sparrow
#

How do we assign the player state again

chrome bay
#

The engine does it itself

unique sparrow
#

Is it something like device id?

chrome bay
#

It uses the uniqueID of the player from whatever online service you're using

unique sparrow
#

How does the engine keep track?

chrome bay
#

See AGameMode::FindInactivePlayer

unique sparrow
#

Oh ok. Thanks a lot

reef cave
#

how would i sync procedural generation onto multiplayer? Right now i have it that one client has a combination of blocks. But on the other client has a different combination of blocks. How would I make them have the same combination of blocks?

sinful tree
#

Depending on how big the proc gen is, you could also just make the actors that are spawned replicated.

reef cave
#

well its not spawning actors, its destroying actors and leaving the others left over

sinful tree
#

Same thing. If marked as replicated, then it can be handled by the server and destroying them should remove from everyone else.

reef cave
#

i have the left over actors as a variable, how would i change said variable to be replicated?

#

wait i think i just found it

#

no i didnt

sinful tree
#

Why would you need to replicate it?

reef cave
#

wait

#

i found it

#

i think

#

hold

#

yes i think

#

i think...

#

it works

unique sparrow
chrome bay
#

No, there's a dedicated setting for it. You can't have them stick around forever though, or you risk the server being inundated with inactive players. Remember they still replicate even when inactive.

graceful flame
sinful tree
graceful flame
#

Ahh, that makes sense.

unique sparrow
unique sparrow
sinful tree
unique sparrow
queen flower
#

trying to make a simple chat

#

I have functionality working for the local player, when they send a message, but doesnt show up on other clients.

#

Is it the events replication that needs to change... or am I supposed to create the chat widget somewhere else besides the players, like on a game mode or game state or something?

#

Basically, how do I get the message to be created on other players? Do I NEED to be connected to steam or some other server. Atm playing as client, and as listening server, return the same result.

#

my understanding is that player controller 0 is local player.

solar stirrup
#

Are you calling the RPC in the widget

#

Widgets don't replicate

fathom aspen
#

I'm wondering how it did show up on that client 1 screen

solar stirrup
#

Probably the client who wrote the message

fathom aspen
#

I mean if it was a listen server I would be ok

queen flower
#

The custom event is on the widget, and that custom event is set to replicate.

solar stirrup
#

If you want the message to show up on other clients, you need to send it to the server through an actor the client has ownership of, and then to the other clients from there

#

Widgets only exists on their clients, so they never replicate

queen flower
#

I do have a HUD class but that is just another widget.

fathom aspen
#

Widgets don't replicate. So you can't RPC

queen flower
#

Hey Exi. Thanks for your documentation.

fathom aspen
#

The doctor has came

thin stratus
#

Chat messages are usually send through the PlayerController or a replicated component on them

fathom aspen
#

There is a system already in engine. ULocalMessage thingy

thin stratus
#

Which should be accessible via GetOwningPlayer in the Widget

#

If you supplied it when spawning the widget

#

You can then push that into some replicated array or so in the GameState. Or send a multicast if you don't care about chat history

#

+- limiting that array in size so it doesn't grow too much. Specially in blueprints

queen flower
#

I like that idea for chat history. Save all messages to an array.

#

I am creating the chat widget in the HUD I mentioned. Youre saying I can create it there but need to provide this owning player with get player controller?

fathom aspen
#

It would work. But it might not work as you expect sometimes, that's why he said GetOwningPlayer

#

See his compendium, he explains what GetPlayerController(0) returns on different configs

unique sparrow
#

Changing net update frequency at runtime not working. Do we need to enable adaptive frequency update to manually change netupdatefrequency too?

queen flower
#

so when its created I should use GetOwningPlayer instead of GetPlayerController 0. The engine just knows who the OwningPlayer is?

fathom aspen
#

Yes. HUD is owned by a PC

#

Even spawned by it

#

So not that hard to tell who is who

thin stratus
#

CreateWidget has an owner pin

#

Which you should usually supply

#

It's important to specify it

#

Imagine a split screen scenario

#

Good to make it a habit right from the start to stay relative to classes by getting them like this instead of using static getters

queen flower
#

right. Bad habits from making lots of single player games lol. Very rigid systems.

#

Do i have to be using steam or eos for this to work?

thin stratus
#

No

queen flower
#

so i am giving it (main menu) an owner on creation. Chat widget is attached as a child.

#

And giving the "create chat message widget" node an owner too.

#

the custom event is running on owning client, because we are targetting owners of the widgets so thought that was a good idea.

#

btw I read the compendium haha and reviewed several times.

#

Some stuff dooesnt stick so decided to use this chat as a way to practice and get real understanding.

#

here is the play settings so we're on the same page

sinful tree
queen flower
sinful tree
queen flower
#

So a local player types and sends a message and then somehow other players have to get the message themselves

sinful tree
#

A global chat message flow would be like:
Submit Chat message > Get Player Controller > Run RPC to Server on PlayerController sending the message > Server Gets Game State > Server Runs Multicast with the message + sender data > Multicast updates UI somehow of incoming message.

#

Probably best to do an event dispatcher in the gamestate, then your UI can just bind to it when its constructed and receive messages automagically.

queen flower
#

ok I will try and process/setup the steps you laid out and most likely be back haha

regal geyser
#

What is the difference between Event Handle Starting New Player and OnPostLogin? And which is better to use in a gamemode that waits for all players to connect so it can start the game? (I've also found out several forum threads complaining that one or the other doesn't work in seamless travel, don't know if it's true, but I use seamless travel)

queen flower
latent heart
#

That font.

sinful tree
#

ComicNeue (Not ComicSans XD)

latent heart
#

Still awful!

fathom aspen
stray thunder
#

The attacker does damage to another char. hp works. the other char doesn't fall down dead, but the attacker does.

Is this a targetting problem or networking problem?

fathom aspen
#

This is most probably a GetPlayerXXX(0) problem

stray thunder
#

solved it awesome

kindred widget
# thin stratus CreateWidget has an owner pin

While not bad practice, this is only required for widgets created outside of the controller, or an already owned widget. So if you're three widgets deep creating rows for an inventory that was already specified by the container that created and opened the inventory, it's not necessary to worry about. Basically as long as you specify the owner on the main widget that creates and owns the rest, you'll be fine ignoring that. Amusingly, there's no HUD check here. I wonder if I could PR that...

graceful flame
#

How do you play audio and effects for something like a weapon immediately for the player who used it while also playing the audio and effects to other connected clients without hearing / seeing them twice? The player who shoots the gun hears/sees the shot and the network delayed shot when using a multicast.

fathom aspen
#

In the Multicast: Check if IsLocallyControlled? If yes skip.

#

I was right after all xD

graceful flame
#

I moved the audio component to be on the character firing the gun instead of the bullet and play the audio using the actor's location which I can now hear once per client because I'm checking isLocallyControled.

fathom aspen
#

Yeah makes more sense for it to be on the pawn

fathom aspen
# chrome bay No, there's a dedicated setting for it. You can't have them stick around forever...

Are you sure the PlayerState still replicates even when inactive? I'm aware of the OverrideWith non-sense but I don't think that has to do anything with this. I mean this is what I see when I look at this sane source code at least:

// AGameMode::AddInactivePlayer

// make PlayerState inactive
NewPlayerState->SetReplicates(false);

// delete after some time
NewPlayerState->SetLifeSpan(InactivePlayerStateLifeSpan);
fathom aspen
queen flower
#

for multiplayer, is it best to create HUD and add to viewport within the HUD class, or should I do it in the controller?

#

Ive always just done it directly inside the player character but have the impression that is no good for multiplayer.

quartz smelt
#

Are there any huge risks/issues with destroying/respawning actors repeatedly on servers?

fathom aspen
# queen flower for multiplayer, is it best to create HUD and add to viewport within the HUD cla...

It's not really a question of multiplayer as it's a question of better practices and better code management. You can go for both ways as long as you know what you're doing. Though using the HUD to create widgets is better as you've got one instance for each client which is easily accessible from the PlayerController. Also UMG code inside PC can bloat that class very quickly resulting in a less optimal class

#

TLDR: Use the HUD to manage your widgets

fathom aspen
queen flower
#

This is within the playercontroller

fathom aspen
#

Have you specified that HUD class in your GameMode settings?

queen flower
#

yep

fathom aspen
quasi tide
#

When does the HUD class actually get created 🤔

fathom aspen
#

So BeginPlay is called on both ends. server and client

queen flower
#

thought perhaps playercontroller begin play ran before HUD begin play had a chance to create the widget.

fathom aspen
#

Before BeginPlay guaranteed

queen flower
#

I added a 1s delay for the playercontroller begin play, before the casttoHUD, and still fails.

fathom aspen
quasi tide
#

Never use a delay node in multiplayer

queen flower
fathom aspen
fathom aspen
queen flower
#

So i want to store the HUD in playercontrollers begin play, after a switch HasAuthority from its remote pin?

fathom aspen
#

Yes

queen flower
#

like that?

#

The HUD for sure is created so no idea why this is failing.

fathom aspen
#

Are you sure you are executing that breakpoint xD?

queen flower
#

Am i also supposed to have a switchhasauth for when the hud is created?

quasi tide
#

@fathom aspen From what I can tell - HUD gets created during PostLogin.

#

In the GenericPlayerInitialization(NewPlayer); call

#

(Which should still be before begin play, I know)

queen flower
fathom aspen
quasi tide
#

What is that from?

fathom aspen
sinful tree
fathom aspen
queen flower
stray thunder
#

Is it better to us interface or delegate when communicating with game mode?

fathom aspen
#

What works best for you?

queen flower
#

relaunched and same issue. If youre not apposed, willing to share my screen to save time.

#

not in hurry lol just feel like with the amount of things that could be wrong.. might be worth going through the steps.

fathom aspen
#

There is nothing more I can provide than what I did

#

It should work fine

quasi tide
# fathom aspen My next blog post

That seems so wasteful to do this twice. PostLogin gets called even in non-network scenarios. In there it sets the HUD as well. PostInitializeComponents will set the HUD only if is a client as well.

fathom aspen
#

Shit I didn't ALT+G. Let me take a look for a sec

#

Hmm

#
/** Spawn a HUD (make sure that PlayerController always has valid HUD, even if ClientSetHUD() hasn't been called */
virtual void SpawnDefaultHUD();
quasi tide
#

In what scenario would it not be called?

fathom aspen
#

PostLogin doesn't get called when seamless traveling

#

Ok but if it was spawned already where does it destroy the old one? Or skip spawning it?

quasi tide
#

ClientSetHUD will destroy that one

#
/** Set the client's class of HUD and spawns a new instance of it. If there was already a HUD active, it is destroyed. */
UFUNCTION(BlueprintCallable, Category="HUD", Reliable, Client)
void ClientSetHUD(TSubclassOf<AHUD> NewHUDClass);
fathom aspen
#

I see. Why the hell it's done like that though?

quasi tide
#

dafuq if I know.

#

There has to be a situation that we're just not seeing.

#

Either way - HUD is created prior to begin play 😅

fathom aspen
#

Wow, I have to look into that

quasi tide
#
void AGameModeBase::PostLogin(APlayerController* NewPlayer)
{
    // Runs shared initialization that can happen during seamless travel as well

    GenericPlayerInitialization(NewPlayer);

First comment mentions seamless travel.

fathom aspen
#

Yeah because it's called inside HandleSeamlessTravelPlayer

#
// Initialize hud and other player details, shared with PostLogin
GenericPlayerInitialization(C);
quasi tide
#

The plot thickens I guess

fathom aspen
quasi tide
#

But in what situation could it not be valid 😭

queen flower
#

except in my case lol

quasi tide
#

A question for Zlo or Jambax I guess

fathom aspen
#

Guess we'll have to ask uncle Tim

queen flower
#

So Ive moved to creating the main menu (and chat) within the controller and finally have the text appearing at least on the screen of the player that typed it.

#

referencing the mainmenu widget instead of the hud.

fathom aspen
#

I'm pretty sure James will go insane if it seems to be another UE non-sense no one has noticed before lol

queen flower
quasi tide
#

So I just got curious about when HUD actually does get created.

fathom aspen
quasi tide
#

Or wizard and I just don't know something that Jambax and Zlo will be able to clarify

fathom aspen
queen flower
#

Just to clarify, I should be creating the chat for all local players/clients, and not on the server only correct?

#

ah.. widgets dont replicate..

quasi tide
#

Nah - client only

fervent yacht
#

That kind of makes sense as it'd seem they're likely to be local specific

#

It does seem you could have replicated data set up updates for each client though.

queen flower
#

Just to cover all obvious bases, a controller is spawned for 2 players if I set the number of players to 2 correct? I dont need to manually tell something else to create a 2nd controller, for player 2, for example?

#

and playercontroller 0 is always local?

sinful tree
#

SpawnDefaultHUD() is called in PostInitializeComponents() by the PlayerController right before BeginPlay is fired.

sinful tree
quasi tide
sinful tree
# sinful tree If you're running on the client, yes, but it's better to try and avoid using tha...

Widget can use OwningPlayer, HUD can use OwningPlayer, PlayerState you can get the owner which is the controller, Character/Pawn you can get the controller. Components usually would be attached to controller or the character or even the playerstate, and thus, you can get the owner of the component and from there cast to wherever necessary to get the right references. Anywhere else, you probably should be feeding in a reference to the specific controller.

queen flower
#

any idea as to the benefits of creating the main menu within the game instance? watching a tutorial and they did it there. Not sure why.

#

Game instance is also created per player just like a controller?

sinful tree
#

I think the reference / object remains, rather than recreating it again.

#

Game Instance is unique to each running copy of the game.

queen flower
#

so all players within a shared game experience... are aware of the same game instance?

sinful tree
#

So if I was playing your game, I'd have a Game Instance on my client, you'd have one on yours, and the server would have its own Game Instance as well.

queen flower
#

ah jeez

sinful tree
#

No, it's an unshared object unaccessible to anyone but the local game (can be a client or server)

#

GameState is the object to use if it's something that there only needs to be one of, but it can also be shared & replicated.

queen flower
#

so that could be ideal for creating a chat that carries between levels?

sinful tree
#

I'm not sure if the widgets will exist between level loads... Trying it out myself right now.

queen flower
#

Happy to poke holes in your knowledge haha

#

learning lots so thanks

weak osprey
#

-- sorry back to this question, does someone have a minimal viable multiplayer example where player positions are shared over the internet that's available for download or purchase?

#

I'm just trying to see an example with almost everything stripped out other than that

#

(built a multiplayer VR game like literally from scratch in JS, never wanna do that again, lol, so am looking for something a little more plug n play in unreal)

#

I was told here last time that lyra is too complex to start with

queen flower
weak osprey
elder sable
#

Is it possible to set some datas from client before reaching OnClientConnected(AOnlineBeaconClient* NewClientActor, UNetConnection* ClientConnection) ?

#

Or data are not replicated yet ?

weak osprey
#

trying to go look at the network one now and see if it's chill

queen flower
#

good luck

#

I also have this one that I made a while ago. not sure atm which engine version but it was intended to be minimal, 2 players join and you see each other moving

weak osprey
queen flower
#

Should be over the internet. I did build and play it with friends from other homes/pcs.

#

you can rebuild for ue5 but I expect it to break...... would be really interested in the results.

#

I also have a huge splash screen of text on the default level that explains things ive come to understand about multiplayer that might have useful info there

sinful tree
queen flower
#

thats super awesome

sinful tree
queen flower
#

tbh I am still having trouble with getting text to appear on the clients lol but this is good intel for future steps. I dont NEED to create the widget on the game instance just good to be aware of the benefits. so What is the different between game instance and game state? You mentioned the gamestate earlier. "Submit Chat message > Get Player Controller > Run RPC to Server on PlayerController > Server Gets Game State > Server Runs Multicast with the message > Multicast updates UI somehow of incoming message."

sinful tree
#

Game Instance isn't shown here, but it's unique and only accessible like the HUD and Widgets - only on the local copy of the game running, including on the server so no replication is available directly in it since it's only locally accessible.
Only one shared Game State exists in multiplayer that everyone can access VIA GetGameState.

#

Game Instance in this sense is like the application itself -> It's something that is running only on your computer, and it can store variables and objects (but not spawned actors) that are retained between levels.

#

GameState is a place to share information that may be common to everything and needs to be accessible to everyone but doesn't need to persist outside of the session of the game. So things like, Team Scores. Using GameState for messages makes sense to use as it's something that exists everywhere, it replicates, it has no issues with relevancy, and is easily accessible when local, so again, make an event dispatcher in your GameState that passes a message, and within your UI you just need to bind to that event dispatcher and then execute whatever you need to when that message comes through.

graceful flame
#

I'm using Owner No See on a replicated projectile and I have it spawning particles when destroyed. The problem is that the particle effect is showing twice for the owner because I'm also spawning an owner only projectile with its particles set to spawn when the projectile is destroyed as well to reduce the feeling of input lag. How can I hide the extra particle effects from the replicated projectile for the owner?

#

Player A shoots weapon. Projectile 1 (owner only, deals no damage) is immediately spawned. Projectile 2 (server RPC) spawns a similar looking projectile that deals damage and has Owner No See.

Player B sees the replicated projectile and particles when destroyed, but Player A (the shooter) sees the particle effects from projectile 1 (fake) and projectile 2 (real).

hollow eagle
#

Lots of ways to deal with it, but the simplest is to just check if owner no see is enabled and whether the local client is the owner. If so, don't spawn the particles.

graceful flame
#

I can check for owner no see, but not sure about the other one as I'm working within a projectile BP.

#

Local client is the owner?

sinful tree
#

You normally can set the owner of something when spawning it.

twin juniper
#

how are the initial properties of an instanced object treated when the object is constructed treated? are the changed properties from the base object sent?
i.e. Instanced object that has an actual representative class i.e. like data asset but in raw UObject - 2 floats in instanced property no properties are changed, nothing is sent, but if a float was changed, that would be sent? And essentially all properties that are changed in instance that replicate will essentially be sent? / Basically all properties that are not the same as the parent it is instanced from = sent?

graceful flame
#

This is the Event Destroyed for the projectile.

#

Do I just have to make it so the fake projectile doesn't spawn particles when its destroyed?

#

and just live with the network lagged particle effects for the owner

tranquil yoke
#

LogNetPartialBunch> OutgoingBunches.Num (275) exceeds reliable threashold (4) but this would overflow the reliable buffer! Consider sending less stuff. Channel: [UActorChannel] Actor: BP_GameState_Main_C /Game/Maps/WorldLevel.WorldLevel:PersistentLevel.BP_GameState_Main_C_2147482559, Role: 3, RemoteRole: 1 [UChannel] ChIndex: 11, Closing: 0 [UNetConnection] RemoteAddr: 73.15.97.140:50483, Name: IpConnection_2147432400, Driver: GameNetDriver IpNetDriver_2147482563, IsServer: YES, PC: BP_PlayerController_Main_C_2147432396, Owner: BP_PlayerController_Main_C_2147432396, UniqueId: INVALID

This has started happening recently, I checked the GameState, and i was not able to find any reliable RPC calls, only RepNotfied strings, which has 980b data.

and also i have recently added logic for Attachment of childActor with parentActor, using RepNotifies,
i have shared a Picture of repNotified parameter.

so My question is , does having lots of RepNotified parameters active can cause this overFlow,
What do you propose should be the solution for this kind of problem ?

void nest
#

Hello. I have a question. On this video: https://www.youtube.com/watch?v=a_222b8K2Go&t=397s there is a comment saying "Use **smoothsync **for replication". However I can not find this setting anywhere and when I look it up online it doesn't seem to exist even. What is this person talking about? Is he just trolling or does this feature really exist? https://gyazo.com/9cfef286b29be4d3f07f38b90b33c29f

Hi again, its been a long time but Im back to doing videos. Today we will take a look on how to use the new chaos vehicles system in UE5.

Discord: https://discord.gg/PyNzH7N

▶ Play video
bitter oriole
#

It's a plugin

void nest
#

Ooooh ok, nvm then

chrome bay
sinful tree
tranquil yoke
#

i probably have to spend some time, to reduce number of properties.
I have another question :- lets say there is an array which is replicated, so if the size of this array is huge, it can cause the same issue right ?

fathom aspen
#

Haven't got to go deep into that just yet, but I would wager that's the case

dim trail
#

What’s the difference between the replicated tag an an RPC?

wet sigil
#

So, basic multiplayer for like a gamejam, is it possible to use the steam online subsystem? Or does one have to pay they 100$ fee to ship a game for it to work? Or does Ue5 have some new multiplayer system? I'd assume I need to open up some ports and host the server from my machine

split siren
#

Yes, uint8 is the smallest amount of data you can send (as far as I know)

solar stirrup
#

There's a good chance that it gets packed with other data, not sure though

split siren
#

Any idea how to get the time between Client Move timestamp and Server time in UCharacterMovementComponent::ServerMove_PerformMovement ?
Basically I want roll back a platform to when client performed a move, so I need to get the time to rollback by.

#

In most cases it would be close to the ping time (expect when the moves are combined)

left flicker
#

I started following this tutorial, not expecting too much out of it. All I need is the simple hosting and joining functionality in mobile. But my aim is to have it work over wi-fi, not just LAN. And I need it to work with a computer hosting and a phone joining. The computer is going to be a player, but as the host it's going to fulfil a specific role.
I have it packaged and running on mobile and packaged and running on windows, but whenever I attempt to connect the two via LAN as directed in the tutorial, it fails to join (in either direction, ie: computer hosting/phone joining, or the other way around). Can someone help me figure this out and get it working? Insert Leia holographic recording pleading for help here
Link to the tutorial series here (specifically, episode 2): https://www.youtube.com/watch?v=6paDdKcSod4&list=PLmUaAZisS932QZWIkNvwI_abxs8yhGKmy&index=2

#

To be clear, I am only following this tutorial specifically, because I've been trying to figure this out for so long and it's driving me crazy lol

Correction on one point, out of about 100 attempts to connect (approx. 50 - computer host/phone join, and 50 - phone host/computer join) I managed to connect successfully once with the phone hosting/computer joining.

#

I am also trying to figure out hosting with a dedicated server setup (on a computer), but I can't figure out how to connect from a different device there either.

split siren
# left flicker I am also trying to figure out hosting with a dedicated server setup (on a compu...

Problems with joining could have many causes.

  1. Windows firewall - ensure Windows is not preventing connection on that port
  2. Ensure Phone and PC is on the same network (if you are on data, you would have to go through internet and have public IP and port forwarding etc)
  3. Misconfigured code ( are you sure you are joining on the right IP and port?)

Things to try -

  1. Ensure you Phone can see your PC on the network. (Ping should do the trick)
  2. Ensure the port is opened
plush wave
#

When should I use FUniqueNetId vs FUniqueNetIdRepl

solar stirrup
#

Use FUniqueNetId when you can I suppose

plush wave
#

Interesting

granite wind
#

How to communicate with ue dedicated server from outside?
For example lets say i have a boss event that needs to be triggered. The time when boss event needs to be happening is decided outside the unreal environment. Now how do I tell the server to trigger the event.

bitter oriole
granite wind
bitter oriole
#

Free Web hosting, a few lines of PHP, the Unreal side is like 10 lines

devout granite
#

I am incredibly confused why something is not working in the way I think it should.

  • this is in the player controller
  • if the client sends the request then update logs "hello" from server AND client
  • if server sends the request, then only the the server is logging "hello"

shouldn't multicast always run on all clients and servers when called from the server ? as described here https://docs.unrealengine.com/5.0/en-US/rpcs-in-unreal-engine/

split siren
latent heart
#

Is it a listen server or a dedicated one?

split siren
#

If it's a player it would make sense it would just execute it once, because the client does not have the "server" player controller

devout granite
#

it is a listen-server player yes

latent heart
#

What pavkon said

split siren
#

Multicast executes the command on each client that has the actor, But you don't share the "server" players controller with the client

latent heart
#

If you want a player-owned thing like that to run on all clients, use the PlayerState, not PlayerController

#

Or GameState for Server->Client Multicast RPCs is generally a good idea.

split siren
#

PCs are shared only to the owning clients

devout granite
#

thank you very much!

dim trail
#

Difference between replicated tag and using rpc

devout granite
#

Just one more small question :D
client widget button click -> send "button clicked event" to player state -> update all players to know that a button has been clicked in the same widget

What is in your opinion the best way to pass the "button clicked event" back to all widget ?

split siren
devout granite
#

thank you @split siren :D

latent heart
# dim trail Difference between replicated tag and using rpc

Replicated tag is the Epic way of doing it more efficiently than you can. A manual RPC is a way to circumvent that if you need things sent every tick or only in certain situations or on events, etc. Also RPCs work from client to server, where Replication does not.

elder sable
#

Can i make un serverTravel from a beacon connection ?

twin juniper
#

hi there

split siren
twin juniper
#

is there anyway in BP to get port number ??

#

I am working on multiplayer project and i want to get the port number
cause I am running multiple dedicated server (session) on the same AWS server

solar stirrup
#

yes

pearl fog
#

hey! what could cause all references to an rep actor client-side to not be properly set? (stored inside an array of FastArrayItem but I tested outside)
the actor is properly replicated though

quasi tide
#

@chrome bay @fathom aspen and I ran into something last night but we couldn't figure out why something was the way it was. It seems like both the GameMode & PC create a client side HUD. Can you think of a situation in which that is necessary? (PC happening in PostInitializeComponents and GameMode happening as the very first step in PostLogin)

chrome bay
#

Hmm I've only seen PC create a HUD

#

GameMode tells PC to create it though

quasi tide
#

From what we could tell after our digging, they both end up creating the HUD.

split siren
#

@chrome bay I have been randomly finding your answers on Answerhub while Googling issues and wanted to just thanks for posting those over the years

quasi tide
#

Destroying the previously created one in the process.

#

GameMode calls ClientSetHUD and PC calls SpawnDefaultHUD

chrome bay
#

That's not what my version has

quasi tide
#

🤔

chrome bay
#
{
    if ( MyHUD != NULL )
    {

        MyHUD->Destroy();
        MyHUD = NULL;
    }

    FActorSpawnParameters SpawnInfo;
    SpawnInfo.Owner = this;
    SpawnInfo.Instigator = GetInstigator();
    SpawnInfo.ObjectFlags |= RF_Transient;    // We never want to save HUDs into a map

    MyHUD = GetWorld()->SpawnActor<AHUD>(NewHUDClass, SpawnInfo );
}```
#

That's it

#

In 5.0.3

quasi tide
#

Yeah, that's the implementation.

#

I'm talking about where ClientSetHUD actually gets called

#

Which is in the GameMode's PostLogin function. First call is to GenericPlayerInitialization

#

Inside there, it checks if the PC is a client and will call ClientSetHUD

#

Which would run this

#

But also in PostInitializeComponents for the PC, it will call SpawnDefaultHUD

chrome bay
#

Oh I see. Look like that just spawns an "empty" HUD class

#

Why I have no idea

#

Might be a legacy thing?

fathom aspen
#

GenericPlayerInitialization is the function that does that. Either in PostLogin or HandleSeamlessTravelPlayer

quasi tide
#

So which one is the real HUD 🤔

fathom aspen
#

So it's done for both hard and seamless travels

chrome bay
#

The one from ClientSetHUD

quasi tide
#

So GameMode's call

chrome bay
#

The one created during PostInitComps is just the base AHUD class, and that gets destroyed when ClientSetHUD is received

#

Presumably they initialize it there to some value just so GetHUD returns something, but that does seem dumb tbh

#

I can only assume it's legacy code

#

And a lot of the old legacy code is dumb

#

Epic sadly didn't seem to care about tidying it all up for 5.0

fathom aspen
#

Yeah both points in time are called before any BeginPlay, so I'm not sure why they need that early dumb HUD

quasi tide
#

Maybe just to be safe? Even if it's the base AHUD class, there is still guaranteed to be a HUD.

fathom aspen
fathom aspen
stray thunder
#

my "set input mode game only" (only runs on client) is inside a multicast. do i have to run it inside run on owning client to get the proper PC? It doesn't like any of the PCs I've given it.

pearl fog
elder sable
#

How could i get more informations to know why my game net driver is not created ? my beacon net driver is working and it's the same configuration in the engine ini so i'm out of ideas

fathom aspen
shell forum
#

Anyone have their DefaultGame.ini and DefaultEngine.ini settings they used for voice chat in a released game? The default ones cause stuttering and saturation but changing them causes it to crash.

stray thunder
#

anyone have one of these made already or know where one is?
I'm having a really hard time keeping my stuff organized in my brain and its showing in my project.

kindred widget
quick sparrow
#

I need to know

elder sable
#

Is it possible to use beacons in PIE ?

stray thunder
valid imp
#

In split screen multiplayer, is there one "client" per player? Or is data shared?

fathom aspen
#

As the local controller is on server, so input is handled there too

kindred widget
#

It is, but it should never be considered. This code should be network agnostic. It should act the same as a client to a dedicated, standalone, and as a listenserver.

fathom aspen
#

I know, that's why I said it only runs on the local controller

#

Nice, thanks for the confirmation

sinful tree
kindred widget
#

@fathom aspenIf you want some nice input handling change. You should check out CommonUI. They have a concept of ActivatableWidgets. Basically the leaf-most activated widget determines the current control input. I'm using this right now. My first person game has a MainGameDisplay widget that is set as GameOnly basically. My other widgets are defaulted to Menu which is basically UIOnly. So when I push my inventory screen to be the leafmost activated widget, it automatically changes from game only input to ui only input. It is soooo much cleaner to use than constantly tracking that state yourself.

#

Could very easily use this in multiplayer by making the server tell client it needs to be in some state and client responds by simply adding a widget to screen. Boom, new control mode.

fathom aspen
#

Wow, thanks for the suggestion. I tried playing around with that plugin after UE5 came to the scene, using the ContextExamples project, and I must admit that is awesome. I should give it a try once again, really thanks for the insights!

#

So if I get it right, widgets are like nodes, right? When you add a widget to the screen it gets added as a son node to the current node, aka, the widget active right now?

kindred widget
#

I'm not a fan of some of the widgets. I'm still using a lot of my own personal widgets for a lot of things. Text, etc. But I am using their CommonButtonBase, and ActivatableWidgets which is most of the framework.

fathom aspen
#

And that current widget becomes inactive?

#

Yeah the two you mentioned may be the best of them all. I like the idea that you can have a centralized style for all of your widgets of the same type

kindred widget
#

Uh.. Sort of. You can put activatable widgets anywhere. So far I've personally found it best to have a single UUserWidget added to screen that contains stuff like the WidgetStack or a Switcher. For example, this widget here is AddToViewport at HUD's PostInitComponents. It's not an activatable widget, just a base UUserWidget that contains the CommonActivatableWidgetStack

#

This gets called in it's construct that adds my base gameplay widget. This is the one that overrides in a C++ class to set the control mode as Game

#

Note when you push a widget to the stack, it's activated then. So then when I say.. open an inventory. All I do is this.

#

Push a new widget class to the stack, It creates it if it wasn't already, adds and activates it and stops drawing the one below it.

#

If you wanted overlaid widgets, you could easily add multiple stacks etc.

#

Because inventory doesn't override that input config it defaults to Menu. So when I press "I", that inventory adds, activates, and I immediately get a shown mouse cursor and no more PlayerController/Pawn/Gameplay input.

chrome bay
#

Urgh Discord give us Bookmarks already

fathom aspen
#

Amazing summary Authaer! I should check them like real soon ❤️

kindred widget
#

Also. Save this somewhere. Sanity saver.
CommonUI.DumpActivatableTree 0 1 0 0

#

Writes the currently activated tree to the output log. You can use it without the arguments for the full tree but using them makes it much cleaner.

#

I just realized I could make opening widgets an ability in GAS. Which could automatically be blocked by tags. 😮 Goodbye winding HUD framework.

#

Or add tags for animation states. They weren't kidding, you can use GAS for everything.

kindred widget
#

Nice! Now cannot access inventory or building screens if player has stunned, or uncontrollable tags. 😄 And they still show up and work perfectly.

nimble pike
#

What is the difference between these two methods?

void AVILECharacterBase::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
    Super::GetLifetimeReplicatedProps(OutLifetimeProps);

    //METHOD ONE
    FDoRepLifetimeParams SharedParams;
    SharedParams.bIsPushBased = true;

    SharedParams.Condition = COND_None;
    DOREPLIFETIME_WITH_PARAMS_FAST(AVILECharacterBase, PawnData, SharedParams);

    //METHOD TWO
    DOREPLIFETIME(AVILECharacterBase, PawnData);
}
#

Or are they just a different way to writing the same thing?

fossil spoke
#

You mean DOREPLIFETIME_WITH_PARAMS_FAST and DOREPLIFETIME? @nimble pike

#

The first is for usage with PushModel, the other is for normal replication.

nimble pike
fossil spoke
#

It most likely works inplace as a regular declaration for replication as well.

#

But is meant for PushModel, as I believe it is in the PushModel Header anyway.

#

Could be wrong there though

nimble pike
#

I see, thank you

latent nest
#

I’m making a online fps, using steam advanced sessions. Is there a way I can get a server so that can host the game over a player. Thanks

shell forum
#

So let's say I only want an object in the world to exist on the server at start? Is that what "net load on client" is for? Would setting that to false not load it at all?

graceful mango
#

How do i send RPC only to clients i want?

#

For example: i dont want to send fog of war data of some team to another team - it will lead to hacks

fathom aspen
#

Why this is yiddish to me?

fathom aspen
#

What class this is in? Seems like you are modifying the engine

past totem
#

dedicated server
UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.12, Real: 60.01, Good: 60.01, DriverTime: 1756.75, Threshold: 60.00, [UNetConnection]
how do I make this Connection Timeout Threshold higher?

#

I already put this in my [PROJECT]/Config/DefaultEngine.ini but it doesn't work, still says timeout time is 60

#

if I try to load in like a few times then it will work randomly so I'm sure it doesn't work cuz the timeout time (big map), so I just need to figure out how to increase the timeout time thing

fossil spoke
#

Only Clients and the Server have PlayerControllers.

rotund onyx
#

how can I call a Server event in an actor the player does not control?

quasi tide
#

You don't. You can only call server events from actors you own

fossil spoke
rotund onyx
#

how do I get around it then?

#

I can think of lots of cases where that has to happen, so how do people normally get around it?

fossil spoke
#

Use a proxy, like the PlayerController?

quasi tide
#

RPC to the server what you're trying to do. So on your PlayerController or the possessed pawn, do a server rpc doing w/e it is that you want to do.

rotund onyx
#

I am trying to, but it doesn't work for clients

quasi tide
#

Show code.

rotund onyx
#

oh never mind I think I found it

#

I assume hit result under cursor does not work on server side

#

I had fixed it for some other stuff but must have forgotten in this case

latent nest
#

I’m making a online fps, using steam advanced sessions. Is there a way I can get a server so that can host the game over a player. Thanks

dark edge
dark edge
latent nest
sinful tree
# latent nest Yes. Should I use a dedicated server once I publish the game

Listen Server: A player's instance of the game acts as the server, while also allowing them to play. If the player hosting leaves, everyone is booted.
Dedicated Server: A standalone instance of the game that acts as the server that has no player, so it's only acting as a means for players to connect. If all players leave, the server can still be running.

Depending on the type of game, you may not want players running their own servers, whether listen or dedicated, in which case, you would have to use dedicated servers that are hosted on your own computers / server hardware.

dark edge
crystal crag
#

Oh I should have read the rest of the channel

#

Your question makes me think you need to try a much smaller game first

left flicker
#

I'm looking into Flopperam's Amazon GameLift tutorial series, I was directed to it a few times. I'm just wondering if anyone has gone through it and had success with it?
I found a comment on the first video that says, that the gameliftSDK only supports up to 4.25 or something and I'm using 4.27. Does anyone know if that is going to be a problem or if that is true or anything? The comment is a year old.
Also I found that there are two GameLift Plugins in the UE Marketplace, are those worth it for whatever reason? I haven't looked too much into them yet.

plush wave
#

Guess I should be using FUniqueNetIdWrapper the most?

split siren
# left flicker I'm looking into Flopperam's Amazon GameLift tutorial series, I was directed to ...

I am working with AWS Gamelift on my latest project, and I can confirm that the SDK works. I started with 5.0.2 but due to the many bugs I reverted to 4.27 without any issues with the SDK. I have not watched the full tutorial from Flopperam, as I built my own solution using slightly different products from AWS.
I don't think plugins are necessary, because you will need to make your AWS backend anyways, based on your specific needs/game. Basically the only communication between Gamelift and AWS is handled via the SDK, the rest needs to be custom, as you don't want your users to directly talk to Gamelift and start instances.
You need to have a layer in between with your policies that limit who can start instance, who can join, who is admin etc.
Next part is to figure out how to communicate between AWS and dedicated server outside Gamelift SDK. For example user tries to join, but he has been banned/blacklisted. How/when do you check against some database of banned users? Preferably before even contacting the game server.
Damn, this was a longer writeup, anyways GL, it will hopefully be a fun journey for you.

(And be careful with Gamelift, the cost can really add up quickly)

left flicker
split siren
#

Also, contact AWS support right away to get your Gamelift limits raised right away, so you start waiting the week+ for their reply

split siren
left flicker
# split siren From my experience, there will be plenty if hiccups along the way, just be resil...

Right now I'm still working on getting the basics of it set up. (about 10 minutes in to Part 2). I'm running: msbuild ALL_BUILD.vcxproj /p:Configuration=Release
But still no luck. I'm going to start following the video you sent and see how that goes. I have an idea of the problem.

Right now, I don't have an AWS monthly budget set. After I can get the basic functionality of it working in some way and it looks like it will work for my project, I'll need to discuss budget with some people and figure that out

plush wave
#

Ok so how do I create a list of current players?

#

I can't really use an array of FUniqueNetId pointers

#

What's the proper way to do this?

split siren
plush wave
#

But I need to somehow save player id's to a list

#

FUniqueNetId seems to be this

#

But it's opaque

#

It's not clear if I should be using a pointer, or a ref

chrome bay
#

TSharedRef<const FUniqueNetID> usually

plush wave
#

Ok so FUniqueNetIdRef then?

#

Thank you

chrome bay
#

That's just a typedef to the same thing, but yeah.

plush wave
#

What is the purpose of FUniqueNetIdRepl then? Sorry, it is slightly confusing to me.

chrome bay
#

To expose it to Blueprint and replicate it

plush wave
#

Hmm so internally I should use the ref. But when I need access to the ID in BP I need to wrap it in a FUniqueNetIdRepl?

chrome bay
#

yeah

#

but rarely do you really need it in BP tbh

plush wave
#

Right

#

Dumb question but why not just make FUniqueNetId exposed to BP

chrome bay
#

They can't because it's an abstract type

#

Every subsystem creates it's own concrete implementation of it, e.g. FUniqueNetIdSteam etc.

#

That's why they are exposed as pointers

#

FUniqueNetIdRepl just copies the raw byte data

plush wave
#

Right

#

I was using the Steam OSS - and just going straight to the transparent type

#

Now I'm using EOSPlus with Steam

#

Which is why I'm trying to understand the opaque type better

#

Thanks for the info

#

Wonder what FOnlineAccountIdHandle. Maybe new to UE5?

plush wave
#

So because FUniqueNetIdRef is a ref it obviously can't be null

#

So if it exists within a struct I've made

#

I'll have to pass the FUniqueNetIdRef in the constructor, right?

#

Actually, looks like I can't do that

#

Error: 'FUniqueNetId': cannot instantiate abstract class

#
struct FMyStruct 
{
  FUniqueNetIdRef SomeID;

  FMyStruct(FUniqueNetIdRef Param) 
  {
    SomeID = Param;
  }
}
#

Figured at least passing it in would work... since it would have to be init elsewhere anyways

latent heart
#

Have you got 2 different versions of the blueprint?

#

and/or c++

#

It's an RPC. You could be getting cross-install issues

#

If it's a PIE issue, then obviously not!

humble edge
#

I am using UE5 for Multiplayer. Dedicated server is working pc connects to it but android build doesn't. Any help how i could connect it to android. My build actually notify server and log updates but android don't go inside game level
And dedicated server have weird bug my backup old version project file server works properly but later updated project file dedicated server build stucks after bringing level took ... something like this and never shows engine initialization at the end. I tested working version of server in android .. PC build connects properly and shows join succeeded but android have problem connecting

plush wave
#

Where do you get avatars from the Online Subsystem?

#

Thought it would of been in FOnlineUser

bitter oriole
#

Check advanced sessions that does it

lime echo
#

When an actor is replicated for a client for the first time (spawned), what will be called first? Its BeginPlay, or OnRep for actors who have it as a replicated property?

winged badger
#

OnReps, PostNetInit, then BeginPlay

lime echo
winged badger
#

and it will have all replicated values that were set in the Tick the Actor was spawned on server

#

even if they were set after BeginPlay server side

lime echo
winged badger
#

it might have more, the NetBroadcastTick goes after the main Tick

#

and there is no guarantee Actor will be sent in the same Tick it was spawned

#

but you can spawn it, set some variables right after, and client is 100% going to have those values before Actor's BeginPlay on its side

#

as they are sent in the same packet as the instructions to spawn the Actor

lime echo
winged badger
#

you can as long as they are not pointers to other replicated objects

#

unless those objects are the subobjects of the actor in question

#

if Actor A has replicated pointer to replicated Actor B

#

there is no guarantee B has replicated yet

#

so valid NetGUID, but still an invalid pointer

lime echo
sharp hound
#

Hi everyone. I have a multiplayer setup. when the player logs in, after the post login in the game mode, I change some attributes of the player mesh (blendshapes, textures) using some variables that I passed from the lobby to server pawn using the game instance. The first player looks fine, when the second player logs in, the first player sees the correct attributes of the second player, but the second player sees the default attributes of the first player, not the correct ones.

#

The attributes are stored in the pawn as replicated. Can anyone help?

#

Thanks

winged badger
#

game instance is local to each player, and is not a good place to stash lobby data

#

generally, using seamless travel to transfer players from lobby to game, holding the attributes in PlayerState, and using CopyProperties in PS to copy them over to new instance

#

is considered the best approach here

#

this will also cause for Login not to be called on GameMap

#

and the logic from there should move to HandleStartingNewPlayer

solar stirrup
#

or ptr

sharp hound
#

@winged badger: Thank you very much

#

I'll try

twin juniper
#

Do I have to do something special to get an replicated array to update on the client? When I add the item to the array in blueprints it replicates but not in C++.
In my code on the server I do Array[Elem] = Item; No update on client
In bp I just do set array elem, and it gets updated on client..?

harsh wigeon
#

i see this, if i close my client

[2022.08.03-15.06.33:417][670]LogNet: UNetConnection::Cleanup: Closing open connection. [UNetConnection] RemoteAddr: 127.0.0.1:57006, Name: IpConnection_2147482458, Driver: GameNetDriver IpNetDriver_2147482499, IsServer: YES, PC: BP_PlayerController_C_2147482454, Owner: BP_PlayerController_C_2147482454, UniqueId: NULL:DESKTOP-7TOEQQL-6B61C3084967693DA6A6CB924E7C9ED7
[2022.08.03-15.06.33:418][670]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:57006, Name: IpConnection_2147482458, Driver: GameNetDriver IpNetDriver_2147482499, IsServer: YES, PC: BP_PlayerController_C_2147482454, Owner: BP_PlayerController_C_2147482454, UniqueId: NULL:DESKTOP-7TOEQQL-6B61C3084967693DA6A6CB924E7C9ED7, Channels: 24, Time: 2022.08.03-15.06.33
[2022.08.03-15.06.33:418][670]LogNet: UNetConnection::Close: CloseReason:
[2022.08.03-15.06.33:418][670]LogNet:  - Result=Cleanup, ErrorContext="Cleanup"
[2022.08.03-15.06.33:419][670]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:57006, Name: IpConnection_2147482458, Driver: GameNetDriver IpNetDriver_2147482499, IsServer: YES, PC: BP_PlayerController_C_2147482454, Owner: BP_PlayerController_C_2147482454, UniqueId: NULL:DESKTOP-7TOEQQL-6B61C3084967693DA6A6CB924E7C9ED7
[2022.08.03-15.06.33:426][670]LogOnlineSession: Warning: OSS: No game present to leave for session (GameSession)

can i bind somewhere to be notified about this in game to tidy up ?

twin juniper
quasi tide
#

C++ onrep doesn't fire automatically. You must call it yourself.

twin juniper
#

and what I mean is the value wont replicate to client when I mark the property as OnRep

#

Another weird thing is I am also using UObjects and when I also add them to the array using bp, it replicates the object and all children objects without adding them to the subobject list, but if I add it to the array in C++ I have to add it to the subobject list for it to replicate (in this case it is working when marked simply as Replicated, no onrep)

sinful tree
harsh wigeon
#

thank you

#

already trying exactly that right now

past totem
#

dedicated server
UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.12, Real: 60.01, Good: 60.01, DriverTime: 1756.75, Threshold: 60.00, [UNetConnection]
how do I make this Connection Timeout Threshold higher?

if I try to load in like a few times then it will work randomly so I'm sure it doesn't work cuz the timeout time (big map), so I just need to figure out how to increase the timeout time thing

past totem
past totem
#

why is it after I login this gets constantly spammed in my server log and the whole server is like not responding when I try to do actions in game with my logged in client?

woeful pebble
#

If we did p2p multiplayer, must we port forward?

#

Using advanced sessions without a subsystem

solar stirrup
#

No need for port forwarding if you're using P2P

woeful pebble
#

My friends and i can't connect

#

and we are in two different countries

#

He can't find my server

coral wing
#

Is there a way to make custom launch parameters for my packaged dedicated server? Like launch a specific map, password, etc.

#

Like a variable that's changed by a launch parameter.

graceful flame
#

or you can apply for your own app id

pliant moss
#

Do i have to take server / client logic into account when working with AI controllers? they are owned by the server. so i guess logic for BT and tasks etc will run on the server. I mean, is there something that i should keep in mind when working with AI controllers for a multiplayer game?

graceful flame
graceful flame
twin juniper
#

Hello, I am creating a backend server for a game with features similar to Call of Duty Multiplayer mode (Scoreboard, loadouts, ranks etc.). I could not calculate what kind of average load I should be prepared for this server, which will be independent of the game server. For my game servers, this calculation was relatively easy. How many requests per second do I receive for an average of 3000 active players, does anyone have experience?

distant echo
#

can anyone help me test the functionality of my game

graceful flame
#

Also multiply by the number of clients in a session.

stone niche
#

Hi, Since moving our project to UE5, running a dev or staging build on Steam, when we map change, the connection to the dedicated server times out.
In the server log it references Cookies, but when reviewing the old server logs from UE4 builds, Cookies are not mentioned.
I have not been able to find any project settings that reference Cookies.
The problem shows here in the log;

LogHandshake: SendConnectChallenge. Timestamp: 80.590992, Cookie: 097209119106218040002113224116027049149059155195076043109020
LogNet: NotifyAcceptingConnection accepted from: 76561199008011731:7777
LogHandshake: SendChallengeAck. InCookie: 109047092251092150235216063150187149154036038173047122241031
LogNet: Finding connection to update to new address: 76561199008011731:7777
LogNet: Failed to find an existing connection with a matching cookie. Restarted Handshake failed.
twin juniper
#

how would I condense a singular value in multiple array elements to be replicated to client as a single value?
i.e. Server sets replicated array last index to 99 with an integer of 0. It will sent 400 bytes. or server sets Array of object references last index is now 99, it will send 100 bytes despite them all being nullptr. (send things that can be combined as a single thing?) or at least telling client what to initially set the size as before sending the same thing for every index.

willow prism
#

Hi guys. In my multiplayer game I have a problem that I don't know how to deal with. When a client leaves and re-enters, he sees the other players at the starting point, when they are not there. This is solved when the other players move, I suppose it is because they update the client. Is there a way that the client that enters updates all the players without the need for them to move?

fluid summit
willow prism
fluid summit
#

you are right, maybe do it from server RPC to owning client or just set location=location from server and wait for the rep on client

fluid summit
#

it's weird that they are not having the location okey on netload, i would check on to why that is not happening

twin juniper
#

Does anyone in here use the Voxel Plugin?

royal forge
#

i've been trying to figure out unreal networking, and right now i'm stumped by rpcs. i'm trying to send data through a replicated actor from client to server and vice versa, but the function seems to be executed on the calling machine

#

like, trying to call the client function on the server just runs it on the server, and calling the server function on the client just runs it on the client

#

here's how the functions are defined

fossil spoke
#

@royal forge Firstly, you should be using int32 over int.

#

Secondly, have you made sure that the Actor is set to Replicate, you can only call RPCs on Replicated Actors.

royal forge
#

yes

fossil spoke
#

Also the Actor must have whats called a NetOwningConnection to be able to utilize RPCs.

royal forge
#

oh so i didn't know about that part

fossil spoke
#

At least for a Client to send an RPC to the Server thats the case.

#

A Server owned Actor can call RPCs all it likes, as long as its set to Replicate.

#

Check the Output Log for Warnings saying something like "XXX function was not called because no NetOwningConnection"

royal forge
#

no such warning

#

it's just running the function locally

#

i did get this warning though: "Warning: OSS: No game present to join for session (GameSession)"

#

i don't know if that has any relation

#

it probably does though

fathom aspen
#

It doesn't

#

Are you calling the _Implementation version or the regular one?

royal forge
#

regular

fathom aspen
#

Good. Then just note about that part you didn't know about before

acoustic drum
royal forge
#

i'm using ue_log to log the function calls

#

and the log appears for the wrong function

acoustic drum
#

Maybe when you call an RPC on, for example, the client then the server also "calls" that function but idk