#multiplayer

1 messages · Page 606 of 1

hollow eagle
#

getting variables... doing what? Listing sessions? Trying to join a session from someone else's game? Spacewar is open to anyone, so you're going to end up seeing sessions that aren't from your game.

feral glacier
#

sorry

#

searching for then joining a session

hollow eagle
#

sounds like you're joining the wrong session then

feral glacier
#

just grabs the first one. is there a way to filter?

hollow eagle
#

either that or take the results and filter them down yourself somehow

feral glacier
#

alright. new project for tomorrow thanks

summer tide
#

Or Do I have to replicate the Idle Sound variable as well.

hollow eagle
#
  1. Did you try it? Why ask if something works when you have the ability to test it for yourself and already implemented it?
  2. You seem to be triggering this from an animnotify. I assume this animation is playing on all clients - if it is, there's no need to replicate the sound as the notify will execute on all clients when they hit that point in the animation. Don't check if you're on the server (you should be using an authority check in most cases anyway), just play the sound "locally" from the notify.
summer tide
#

These are in my animBP os it has no switchwith auth node.

vestal ferry
#

Hey Guys, I'd appreciate some multiplayer expert advice as I'm having some trouble with multiplayer implemntation and would really appreciate some help.
I'm using the steam multiplayer configuration for online multiplayer, both characters spawn just fine and work normally until they interact with each other via hit (or overlap, I'm not sure), basically, when they touch each other the client stops responding to input (any type of input, movement, and other keys) while the server continues to work just fine, any ideas? Also, the client always sees the server perfectly, but the server doesn't see the client moving at all, they are on the same network and the behavior persists when switching PCs. Would really really appreciate some help guys, even pointing me in the right direction of what to look for!

silent valley
#

Has anyone used Gauntlet for multiplayer testing?
Is it supported in any way (e.g. spawn server, spawn 2x client, do test involving 2 players)

edgy sedge
#

Is there any way in C++ to determine who is calling a server RPC?

chrome bay
#

It'll be the result of GetOwner()

#

Since only the owner of an actor can call a Server RPC

edgy sedge
#

What about if it's on an ownerless object e.g. a chest? Or is it expected to structure code so that everything goes thru local player e.g. MyCharacter->InteractWith(AActor* Other)

chrome bay
#

If it's on an ownerless object then the server RPC won't ever be called, it'll be ignored

#

You can't call a Server RPC unless you own it, server will just ignore it even if the client sends it

#

To interact with objects like that, you would typically build some sort of interaction component or actor that the client owns yeah

edgy sedge
#

Ok, thanks for that

ember osprey
#

How would you replicate patrol points for an AI across all clients to have all AI patrol points synced?

chrome bay
#

replicated TArray<FVector>?

#

Can't have those points in the controller itself of course

#

Would have to be in a PlayerState or something

#

Or the pawn (maybe, if your AI doesn't have player states)

ember osprey
winged badger
#

why would you replicate AI patrol points?

ember osprey
#

The problem is that each client's version of the AI moves to different places because they are chosing different points each one.

winged badger
#

the only reason i can think of is to mark those points so client can see them

#

other then that, AI is server auth

#

and only thing that should be replicated is its movement

ember osprey
#

IK I have to rep movement, but each AI is choosing different points to move to.

winged badger
#

if you managed to get AI to act independently on clients, you probably need to explore the concept of AIController

chrome bay
#

yeah, I mean the ideal setup is have the server running the AI logic itself. Doesn't make a huge amount of sense for clients to be doing the same

#

clients just rely on replicated movement then

ember osprey
#

ok,

#

so how would I ensure this? Like make sure hasauthority get new vector for that AI and then what?

chrome bay
#

If you're using the engines' AI system then everything already runs server-side only, since it's all done with AI controllers

#

(which don't replicate)

ember osprey
#

not using AIC rn.

#

all movement is on pawn.

#

itself

#

Bot flys to patrol point, gets near it, and then chooses another, and then flys to that new point, and repeats.

#

But each bot on each client is choosing different points to fly to, unsynced

chrome bay
#

Yeah they would do

#

So yeah, have that logic running server side only

ember osprey
#

So how do I ensure client AI follow the HasAuthority random vector?

chrome bay
#

Well if you're replicating movement, they already will

#

Because their transform information will be replicated from the server

ember osprey
winged badger
#

controllers responsibility is to decide what the Pawn does

#

Pawns responsibility is to know how

#

logic to choose the patrol locations does not belong in the Pawn

#

and then you also don't need any Auth checks, since the AIControllers aren't replicated

ember osprey
winged badger
#

yes

ember osprey
#

ok thanks

stoic ore
#

Someone has good resources about multiplayer? Are the pinned resources good enough? Wanna dig pretty deep before I start my next job on a multiplayer title which I only scratched before.

chrome bay
#

Blueprint or C++?

stoic ore
#

c++

#

mainly

chrome bay
#

Cool in that case grab the ShooterGame template from the Launcher

#

It's a good learning resource

stoic ore
#

Afaik they use both but my position is for c++

chrome bay
#

Even if a bit long in the tooth at this point

#

C++ is essential for Multiplayer tbh. You can only get so far in BP alone

stoic ore
#

ok, thanks. I will dig into it. The ShooterGame Template has full Multiplayer support?

chrome bay
#

yeah

stoic ore
#

nice ok.

chrome bay
#

So you can pick it apart and get a general idea

stoic ore
#

if I wanna dig deeper?

chrome bay
#

There are a lot of "gotchas" in multiplayer but really you only find them by doing

stoic ore
#

ok, thanks a lot. I wanted to make a small multiplayer thing before for learning, so I guess I will fall into some pitfalls next weeks

ember osprey
#

and neither does pawn movement out of the box, but the character movement component does replicate out of the box.

chrome bay
#

Almost nothing replicates out of the box

#

Anything that does usually has special support for it (i.e. characters)

rich ridge
ember osprey
#

I had to make an ISM manager on each client

chrome bay
#

There is a very good reason for that though

unkempt tiger
#

ISM being instanced static meshes?

chrome bay
#

It's very expensive to replicate a massive array of transforms

rich ridge
#

if i remember correctly if there are two copies of same mesh in world , then engine automatically converts other to ISM

#

so main static mesh should replicate, right?

ember osprey
#

the entire component does not replicate period

chrome bay
#

It's not really meant too

ember osprey
#

This was a big gotca! For me because my game's main feature depends ISM.

#

The other big gotcha was the Flying pawn does is not replicated like the character movement.

#

I had to implement movement rep myself.

unkempt tiger
#

i think for me everything multiplayer related was one gigantic gotcha :P

dark edge
#

So what is the scope of the upcoming Network Prediction plugin? I've only seen it used for physics but the name.makea me think it's a bit more general. If you think about it, almost all network Prediction is the same, no matter if it's CMC or GAS or other.

chrome bay
#

AFAIK it's only meant for movement-related stuff

#

And will inter-op with GAS eventually

dark edge
#

If you think about it though, it really makes sense that you would eventually end up with a One-Stop shop for Network prediction. After all, taking damage to your HP or getting launched are pretty much the same thing. Just a property, a context in which it exists, and an action.

chrome bay
#

Yeah but most stuff you wouldn't predict

#

Plus it gets messy and harder to reconcile as it starts piling up

#

Really you should just predict as little as you can get away with

#

And encourage people not to join servers with 400 ping or something stupid

unkempt tiger
#

I found that it's really helpful for sanity to distinguish between a predicted state and a non-predicted state

#

i lost my train of thought blobsweatsbutfast

chrome bay
#

pretty much proves my point 😄 it gets complicated quickly

#

I find it best to predict player actions that need to be responsive, so long as it's all relatively self-contained

#

But general game state prediction just isn't worth it IMO

unkempt tiger
#

speaking of... ugh

#

multiplayer? i need to tick aggregate my physics objects

#

I want the server to snapshot object states at fixed time intervals, and those fixed time intervals can actually change dynamically based on the importance of the prop

#

so if a player is ineteracting with a prop, up the snapshot rate ETC, if its not very important lower it to 10/5/2 snapshots per second etc

#

And I can't really think of a nice way of doing this other than defining several tick aggregators each with its own rate:

#

does this seem logical? it feels far more on the practical side than on the elegant, or ideal side

#

so I'd have another UNetworkedPhysicsPropTickAggregator_30HZ, and then a UNetworkedPhysicsPropTickAggregator_10HZ, etc

winged badger
#

just make one UObject

#

have the WorldSubsystem instantiate them

#

and manage them

#

instead of having a subsystem for every one

#

that also allows you to derive a BP for those TickAggregators as required

unkempt tiger
#

what would that UObject be in this case?

#

The tick aggregator?

winged badger
#

yes

#

and single world subsystem would be its manager

unkempt tiger
#

I like it! Thanks :)

silent frost
#

is ot possible to do level streaming in multiplayer, or do you only do worldcomposition?

twin juniper
#

Setting onlyownersee sets vissibility only on server, all the clients won't change visibiliy, while calling a multicast results in a game crash; what should I do to change my Actors visibility?

kindred widget
#

@twin juniper Multicasting that should be fine(Not sure what the crash is about), but that sounds kind of like a state setting. A replicated boolean might serve you better in the end with that.

steel fox
#

@floral crow I've found the issue in my code and why variables in BeginPlay() were not set correctly, basically I spawn that actor in the level using DeferredSpawnByClass and I didn't know that I have to call finish spawn after it too, as a result BeginPlay had this strange behavior and Owner some times was missing too(GetOwner() was returning nullptr)

floral crow
#

Ohhh so deferred spawning it was haha Glad that you figured it out and thanks for sharing the results. I was curious

next fable
#

Hey ... wondering if someone could point me in the right direction. I'm working on a muliplayer game. My characters have replicated variables such as damage and score and thats all fine.
My problem is that I have some variables that I am trying to load from Saved Game and then replicate. What I find is that when spawning players from the server, they pull the SaveGame values from the server machine, and thereby replicate only the server players values.
I have no idea how to get around this 😕

magic helm
#

I suggest using the player controller for this, on the client to first load the save file and then get the save game obj, get the values your wanna replicate then send it to the server and just have the server set it's values to what the client just sent.

next fable
#

Ok ... It's the one object I haven't tried... so I'll try it.

#

Not sure if I'm doing it all correct... but when my player host a game and join the game ... all their objects get destroyed and recreated... even player state, which seems wrong to me.

#

I know there's some "passing" methods for player state but I have never gotten those to work.

magic helm
#

Nonono that's correct, when you join a game it's loading a new level in a NetDriver. So it's going through the path of loading a new level. Which first destroys the previous level and then loads in the new level(which destroys the previous actors and stuff and loads the new actors and stuff)

velvet parcel
#

for some reason when I spawn a replicated actor that has a decal component on it. The decal does not appear on clients. It works perfectly for the server even if a client spawns it.

#

any idea why?

next fable
#

right so the only client side object that maintains is game instance ... is that right?

magic helm
#

Yeah game instance is not replicated because it's technically and object not an actor

velvet parcel
magic helm
#

Maybe try multicasting it?

velvet parcel
#

Its not a variable I am setting. I am setting the decal in the component itself.

#

its weird

magic helm
#

Oh wait misread it my bad, yeah so is the decal set before hand or at runtime?

velvet parcel
#

if I put a static mesh on it that will appear

#

its set before hand at the moment

magic helm
#

Are you setting any values in the decal at runtime?

velvet parcel
#

nope

#

I plan to in the future but atm its just a decal

magic helm
#

See if checking Reliable on the event causes it to be visible?

#

It might be network congestion

velvet parcel
#

its reliable

magic helm
#

It really seems like it should be spawning then... Might have to add some debug prints on begin play of the decal actor to make sure it's spawning on clients

#

If it's spawning then it might be something with render settings regarding the camera or the decal

velvet parcel
#

its weird because it will appear on the server but the client does not see it

#

are decals just super weird or something?

#

So, I wonder, is there really a limitation where replicated actors are unable to do RPCs because they are not net owning objects?

#

So spawning an actor that does checks to see if its overlapping is not really able to do an RPCs directly

magic helm
#

yeah its kinda mixed bag regarding that...

velvet parcel
#

I find that I am able to store data on an actor pretty effectively.

#

then the actor can run an rpc on the server player controller

#

that seems to work fine

#

but it seems like any logic directly run on the actor gets pretty screwy really fast

#

So if I have a number of status effects and area of effects running at the same time. Is it better to iterate through a couple arrays located on the server player controller using an event tick to perform the logic?

#

And just use the actors for the status effects and area of effects as data storage essentially?

magic helm
#

@velvet parcel I think I kinda understand what your talking about, it might be better to using the gameplay ability system for that since it handles the replication for that and it applies statuses and such automatically... but if you dont wanna go into the rabbit hole of that, you could just treat it like your first figuring out which actors to apply the status affect to, and then notify that actor from either the pawn/player controller to apply the effect visually on the clients prob via multicast. Then on the server handle the status effect management...

velvet parcel
#

Its not so bad to loop on an event tick set to run once a second to manage all area of effects and status effects on the server player controller.

#

But this worries me about AI, will I have to do this for AI as well?

magic helm
#

at that point I dont know enough about the game to be able to tell you

velvet parcel
#

Like if AI has a threat table

#

to choose targets ect

#

It feels strange I am just now learning about this. You would think that if what I am thinking is true then what is the point of even bothering to have RPCs on an actor

#

I guess its really only for times when the actor is owned by a player controller

#

this cant be correct... hmm

magic helm
#

Well you can have multiple actors owned by a player controller but its usually not good practice...

#

BUT it always depends on what your doing so

#

¯_(ツ)_/¯

velvet parcel
#

This is for a retro multiplayer rpg that kind of behaves with MMO style logic

#

so if you know how those games work this is one of those

magic helm
#

Honestly try it, see if you can performance stress test it and then continue from there..

velvet parcel
#

dont stand in fires, status effects ect

magic helm
#

Yeah

#

Honestly Gameplay ability system(GAS) might be perfect for that...

#

It even handles rollback

velvet parcel
#

I mean its not super crazy I can pipe everything though the server player controller with an event tick

#

I guess monster AI can do this too... just have an array for all active mobs on the server and iterate them

restive breach
#

I have two characters (multiplayer), both characters inherit from the same parent, I have a damage system and a health bar. How can I damage to player? This all happens in multiplayer (server).

#

Anybody can help please?

velvet parcel
#

Simply run reliable server custom event RPC

#

then make sure the health value is replicated

#

all clients should see it

sinful tree
#

Correct me if I'm wrong, but weren't we able to encapsulate a map inside of a struct and we could replicate the struct which would replicate the map?

ember osprey
#

How do I sync the Patrolling of the AI Pawns so the AI Pawns patrol to the same areas across all connected clients and each client sees the same AI Pawn movement to those points?

velvet parcel
ember osprey
velvet parcel
#

I think its the same thing. Once an actor is replicated and movement is checked then it should automatically be synced up.

ember osprey
#

Each client's AIs are choosing thier own random points to patrol to.

#

instead of patrol to the same points across all clients.

#

let me check something real quick!

velvet parcel
#

You might be over complicating it in your head. Telling an actor to move to a location on the nav mesh is pretty automated.

ember osprey
#

Its a Flying AI, no navmesh, give me a sec to check something in the BP

velvet parcel
#

That should do it where anything you tell the actor to do will be synced over the network

ember osprey
#

doesn't work though. I put 1 AI in the game and each client's AI goes in different directions.

velvet parcel
#

are you using random variables?

ember osprey
#

I'm getting a random point at runtime

velvet parcel
#

like get random int?

ember osprey
#

yes

#

And I tried to replicate that variable and it doesn't work either.

velvet parcel
#

That can be super tricky because it will often do it more than once if you are not careful

ember osprey
#

I'm replicating a vector.

#
UPROPERTY(Replicated, Category = Plane, EditAnywhere, BlueprintReadWrite)
FVector  TargetLocation;```
velvet parcel
#

depending on how you do the get random float it can mean each client gets completly different results

ember osprey
#

can I force the clients to listen to the server only FVector?

velvet parcel
#

if you make sure that the server is the only one doing the random variable and then making sure its properly replicated to the clients you should be good

#

but depending on how you do it that can result in each client rolling its own random value

#

You have to be extra careful when working with random variables.

ember osprey
#

Is there a source or reference that discusses dealing with random variables?

velvet parcel
#

I am just going off of personal experience with them.

ember osprey
#

Also, how would I even do the server only random variable and then replicate on all the clients?

velvet parcel
#

I usually am very careful to assign the random variable to a proper variable

#

in CPP not sure but in blueprints I just run a server reliable RPC

#

From there you can multicast

ember osprey
#

So put a Vector on the server, and then update that vector and then multicast the vector?

velvet parcel
#

sounds good

ember osprey
#

How will the server know which vector belongs to who?

velvet parcel
#

That gets into more about how you do it. maybe use an array. at this point my advice is probably not useful

ember osprey
#

how do you multcast to every client except the one who initiated the RPC?

#

I guess it wouldn't matter tho?

velvet parcel
#

Wont each client want its own vector?

ember osprey
#

yes

#

So pawn movement is not replicated correct?

#

For example, my AI pawn movement will not replicate unless I manually do it right?

ember osprey
#

I'm pretty cool with Founder Zak.

#

I'm actually in the game they just published early access to.

#

Markiplier roasted me in his lets play video

velvet parcel
#

oh yeah ? hehe

#

Oh I think I saw that XD

ember osprey
#

yeah he laughed at my Game Developer Comedy thing.

#

A poster of my YouTube channel is in the game, and its me on the Poster. lol

velvet parcel
#

Yeah thats pretty neat, small world

ember osprey
#

it is.

velvet parcel
#

Hopefully I am helpful on this. There are a dozen or so ways you could do patrolling AI. In my current project I just used behavior tree

ember osprey
#

Yeah, I 've done it in the past just not multiplayer, and its flying AI so there is no character movement component or navmesh stuff.

velvet parcel
#

That definitely makes it harder

ember osprey
#

I'm honestly thinking about dropping bots for multiplayer and just make it a local thing for now.

#

its eating up too much of my time.

#

@velvet parcel Do you know Zak?

velvet parcel
#

I might

#

especially if he is active in VR

ember osprey
velvet parcel
#

Dooly is the one who got me inot the discord

ember osprey
#

ahh ok

#

well later.

vital heron
#

Do you need to port forward to set up a dedicated server?

#

And if yes is there another way to test servers because there is a problem that's not letting me port forward because Xfinity is awful.

hollow eagle
#

for someone to access the server outside your network, yes

#

port forwarding setup needs to be done on your router

vital heron
#

But for setting up a server and testing, will it work?

hollow eagle
#

if you're only testing with computers on your local network, yes

vital heron
#

outside ue4

#

Oh ok

raw quarry
#

it's not in the release notes for some reason, as far as I can tell

#

anyone taken advantage of it yet? I'm thinking about updating to 4.26 right now just for that

vestal ferry
#

Hi Everyone, trying again since i didn't get a response yesterday 🙂 I'm really new with multiplayer so i'd really appreciate the push in the right direction.
I'm using the steam multiplayer configuration for online multiplayer (blueprints), both characters spawn just fine and work normally until they interact with each other via hit (or overlap, I'm not sure), basically, when they touch each other the client stops responding to input (any type of input, movement, and other keys) while the server continues to work just fine, any ideas? Also, the client always sees the server perfectly, but the server doesn't see the client moving at all, they are on the same network and the behavior persists when switching PCs. Would really really appreciate some help guys, even pointing me in the right direction of what to look for.

dawn ledge
#

@vestal ferry lookup ue4 network compendium by Cedric Neukirchen. It helped me get started with multiplayer

silent valley
#

@vestal ferry do the logs have any useful information in?

dull magnet
#

General (and very open) question - I'm currently working on an online co-op 2 player game. I have set up most of the mechanics on the characters, including an objective (quest/task) system & inventory system (each on their own actor component). However, I've started to wonder whether or not i should just move both the objective component & inventory component over to the Player State instead - as that is natively replicated. Anyone have opinions on whether or not this sounds like reasonable thing to do?

vestal ferry
vestal ferry
silent valley
#

Have you even looked at them? There's often a very obvious problem listed. Do you know where the logs are kept?

#

<ProjectDir>/Saved/Logs/<ProjectName>.log

#

the fact it's Steam should be irrelevant - does the bug happen when you try Play In Editor with 2 clients?

vestal ferry
#

In standalone, not through the editor, i have i host and 1 client from a different pc

#

I have not looked in the logs as i'm not quite sure where to look and what exactly to look for, quite new at the multiplayer stuff

split siren
#

I have ran into a problem and I am not sure what is the "proper" solution. I would like to replace ActorA with ActorB seamlessly (on the same tick).
On server, I can call
ActorA->Destroy() SpawnActor(ActorB)
But that does not guarantee that it would happen on the same tick on all clients.

exotic jay
#

Why does it need to happen in the same tick?

bitter oriole
#

Something as heavy as creating an entire actor will definitely never happen on the same tick

split siren
#

It has the same mesh, but ActorA has ton of optimisations (when actor is far) and ActorB has more features (when actor is close).
If it does not happen on the same tick, the actor would disappear for a moment and then reappear

#

So when Player gets close to an actor, I would like to seamlessly replace it

bitter oriole
#

Yeah, no, that won't work

#

Nothing about this can really work

exotic jay
#

Sounds like a strange setup. What if the player wobbled back and forth at the threshold?

bitter oriole
#

Actors are shared for all players on the server so it will have to be the heavy variant

#

Optimize at the actor level instead

#

Disable componenents, etc

#

All of that stuff can happen locally only, per player, without networking

split siren
#

@exotic jay There is a cooldown and few other control mechanisms

#

Is it possible to bundle a pointer to old actor and access it on Begin Play when new actor is spawned?

exotic jay
#

It probably just doesn't make sense to do what you're doing

bitter oriole
#

Why not try to keep one single actor if you are trying to optimize ? Spawning is very expensive

#

And slow, and network intensive

exotic jay
#

What's an example behavior that you're trying to hide by swapping actors

split siren
#

I have simplified the scenario for demonstration purposes. The actual mechanic is cutting down trees in multiplayer game. The optimised actor I talked about is InstancedFolleageActor. If player interacts with the tree, I remove it from the instanced meshes and spawn it as separate actor, that can be damaged, change mesh or whatever.

#

I need the removal of the instanced mesh to happen on the same tick when the new tree is spawned.

#

I hope this scenario makes more sense

bitter oriole
#

This can't really work if either of these actors are replicated, though

#

Since replication takes a random amount of time to recreate or destroy actors on clients

#

Why not keep all actors available at all times, and disable one of them ?

#

That can happen locally

split siren
#

I have it working by having Tree actor, be replicated and instanced meshes be clientside with synch calls to server to prevent desynch.

silent valley
#

This is quite a complex scenario for many subtle reasons. After many variants this is roughly what I do:
When foliage is hit, server spawns replicated Actor to replace the instance.
When this instance is replicated onto clients, it triggers the foliage component to hide this instance (scale=0)

#

this way only the one Actor needs replicating. I also use this actor to handle save/load of foliage state, respawning and health, etc

split siren
#

@silent valley Thank you for confirming it, that is almost exactly the setup I have atm, but it felt a bit dirty

silent valley
#

When the actor is destroyed, show the foliage instance again

split siren
#

@silent valley How would you "bundle" the information what instance to scale to 0 upon replication?

heady python
#

Does anyone know how I can get playfab into my 4.26 project?

silent valley
#

👍 it took me a long time to get this right, especially with streaming worlds involved and actor relevance issues.
Actually I store the original transform for each instance in the derived UFoliageInstancedStaticMeshComponent.
Loop through each instance and cache it in ::InitializeComponent()

split siren
#

Yeah that should work

silent valley
#
// cache the original transforms
int32 n = GetInstanceCount();
Transforms.SetNum(n);
for (int32_t i = 0; i < n; ++i)
{
    verify(GetInstanceTransform(i, Transforms[i], true));
}
#

if you are using streaming worlds there's some other fun stuff to worry about at some point 😉

uncut atlas
#

Anyone know where I can learn PlayFab? I can't find any documentation or tutorials to implement in C++.

bitter oriole
#

The PlayFab doc I guess

uncut atlas
#

They have none specifically for UE4. Only for Unity.

bitter oriole
#

Why are you using it in the first place ?

uncut atlas
#

Yeah I saw the quick start. I was looking more for a deep dive into implementing the other features. It's for potential contract work. Connecting a game to PlayFab and having the game communicate with servers for things like player login and so on.

bitter oriole
#

The quick start tells you the Unreal specific stuff

#

The general Playfab doc will tell you the non-UE specific stuff

uncut atlas
#

Ok I'll look at it again. Thanks

floral tulip
#

hey just a quick question about steam sdk, everything working fine, invite friends via ingame invite and accept the invite works, but the buttons in "steamoverlay" for join game & invite friend dont appears.. only invite to watch

#

using my own steam app id... and if i send a invite via ingame code its works

#

any ideas?

woeful cove
#

Having some trouble with my game. If I run it as a listen server, with 2 players. One of the player cannot move once the other one has connected. If I start moving, his position and view gets reset, and I can now only interact with the connected player.

Pretty much the same thing happens when net mode is set to client. Except player 1's view is stuck at 0, 0, 0 right away

#

Also an additional problem but I'll get to that once I fix this

sonic fulcrum
#

Hey all, does anyone here have experience with UE4 + Amazon Gamelift to host dedicated servers on AWS? I seems to have hit a snag with using multiple servers across different ports on the same instance. Has anyone worked with similar before?

wheat magnet
#

my client can't see server montages

#

but server can see client montages

#

how to fix this issue

#

i'm running first event on server, and then multicast and then montage play

steel fox
#

How can I show/hide weapons correctly based on player role(client/listenserver) if I use first person and third person mesh?

floral tulip
#

@steel fox you can use visible for owner, however in some unreal version its bugy, so you stick with generaly visiblity in some cases

steel fox
#

Yeah, I've tried with SetOnlyOwnerSee and SetOwnerNoSee but they're not working as I'd expect in a server rpc

#

So, should I set them through a multicast?

floral tulip
#

yeah you can do that, or you could use a replicated boolean, for things what swaps a lot

#

like weapon swap

#

and make a rep notify with a function to handle that

#

@wheat magnet do you have a screenshot?, and can other client the client montages?

#

see*

woeful cove
#

So, my camera's pitch is not being replicated for some reason, even though I've set it to replicate

#

No clue what's happening here

#

Clients can see the host look up and down. but the host cannot see the clients look up and down

#

And also clients can't shoot up or down either

sage magnet
#

Hey guys, so i've been wondering how to make sprint multiplayer replicated with using the Kubold's Movement animset, i use root motion animations but with curves, so it should be replicated, but don't know how can i show the animations of the sprinting 😦

floral tulip
#

@woeful cove do you replicate the pitch variable in the actor, and read the same variable in the animation blueprint?

woeful cove
#

I don't have any animations in at the moment

#

I'm just expecting to see a weapon mesh rotating

floral tulip
#

you need a anim blendspace with atleast lookup, lookdown and look forward pose

#

and drive that with your replicated pitch value

#

or you can hock up a event tick in the actor for fast testing purpose if you dont have a animation blueprint yet

#

but you have to read the replicated variable and do something with it

split siren
#

If I may have one more question. Is it possible to ensure variable is replicated before Destroy is called?

#

In this code, clients check during destroy process if bRespawnInstance is true or false, but the variable never gets replicated because Destroy clears the "to send" buffer (as far as I understand it)

floral tulip
#

i think force net update should do the trick? @split siren, you should stop your running logic.. replicate stuff and think what you want.. and after 5 second or something you can destroy it saftly

#

multicast with visiblity and collision changes should do the trick

split siren
#

Thanks! I will give it a try @floral tulip

split siren
#

@floral tulip Delaying the destruction by 3 seconds works well, though it feels like a hacky solution.

#

Thanks for the help

odd iron
#

hi guys are there any changes happend with Steam Advanced System Plugin ?
i've installed it in 4.24.3 and its wont work ?

#

The Plugins Enabled but its not Showing the Overlay or anything

hollow eagle
#

The steam overlay does not require a plugin (or the game to support it in any way).
It only appears if you launch from steam.

kindred widget
#

@split siren Just curious. How come your client needs to know that it's being respawned?

odd iron
#

on Editor you have to use the Advanced Steam Session

hollow eagle
#

Again, the steam overlay only works when you launch from steam itself. And you don't need a plugin to do that.

#

I don't know that the overlay would work in-editor anyway, and I'm not sure why you'd want it to.

odd iron
#

The Steam Overlay Works once you install the Plugin if you start the game in Stand-alone Version so you can test if the project integrated successfully with the Steam

#

When You Press Shift + Tab

split siren
#

@kindred widget Sure, if player interacts with Tree Foliage instance, I remove the instance and spawn a normal blueprint instead.
If, after x seconds of inactivity player leaves the tree without cutting it down, I want to destroy the actor and add mesh instance instead.
But before I call Destroy, client needs to know if it should respawn the mesh instance (aka tree was not cut down) or not.

serene berry
#

I noticed that if my pawn is spawned via the game mode's default pawn that it is replicated to all clients even if replication is turned off. Is this something special about game mode's spawning process?

sinful tree
#

@stray thunder If you store your values and calculate whether someone wins in Game State, players have access to the game state, and could potentially modify things on their end that they should not have access to and cause their client to behave unexpectedly.

stray thunder
#

but those are run on server - and the has on authority would protect against cheating. I'm just trying to connect the dots atm.

odd iron
sinful tree
#

having authority means nothing if you have control, which clients can have over their computers. Cheating can take place on any client that has access to values. For example, what if in your game state you called for the client to do something after winning. The "On Authority" call means nothing if the player manipulates the memory of their game so it makes them appear as the authority anyway on their end.

Game mode is effectively restricting access to players entirely - they have no knowledge of what is in the game mode. The game mode can make clients do things, but no matter what, the client cannot make the Game Mode do anything.

#

It doesn't exist on the clients at all.

#

Maybe an analogy would help.... When you are logging into a service somewhere, the service is not going to send you a list of all the passwords they have to verify that your login was successful on your end.

terse prawn
#

If the gamemode creates an instance of a sublevel and loads it will other clients see that same instance loaded or will it have to tell all clients to load that instance?

stray thunder
#

so the player dies and needs to respawn - should it go:
BP_Character - EventAnyDamage(run on server) -> Set w/ Notify isDead
BP_GameMode RespawnPlayer(Multicast)
?

sinful tree
#

Game mode, does not require you to multicast anything.

stray thunder
#

So no custom events in gamemode? i don't understand

terse prawn
sinful tree
#

Game mode is on the server and does not exist on clients. If your actor is set to replicate, it will spawn on all clients.

#

So any events you have in game mode, will only ever run on the server.

terse prawn
#

Actor A: Does not Replicate
Acror B: Does Replicate
Gamemode spawns both actor A and B
All clients will see actor B but only the server will Actor A

#

because Actor B replicates and the gamemode only exists on the server

#

while on the topic of repplication.
if the gamemode picks a random element from a "Name" array and load an instance of the level. All clients will see the same instance right?

#

I'm not the most familiar with multiplayer level streaming

stray thunder
#

assuming the gamemode is only run on the server, then yes.

#

i still can't quite connect the dots on how when a character's hp reaches 0 on the char's BP and then how it can call the gamemode to respawn it.

terse prawn
#

then the have the gamemode spawn a new character, use the controller reference provided by the interface event, unpossess the pawn, spawn a new pawn and possess that. destroy the previously controlled pawn and tadaa

#

respawn

#

Interfaces are nice for that stuff because if the client uses the interface to respawn themselves they cant because there is no gamemode on their end and you dont get any access nones from the interface

stray thunder
#

yea an interface was on my todo to make it better but i just thought I could make it work first. I think I put stuff in the wrong BPs. maybe I'll just do the interface since I'm gunna have to redo the whole thing anyway...
grrrrr

terse prawn
#

Gamemode will only run on the server. Clients cannot access anything thing from the gamemode or access the gamemode its self

stray thunder
#

so is that the way a client can tell the gamemode that it needs something?

terse prawn
#

The way I usually handle something like that is along the lines of having the client tell the server to run something more often than not.
Like the client telling the server "hey I wanna shoot!" and the server says "okay I'll do that for you" then the server tells all the rest of the clients "Hey this guy shot, here is what happens"

stray thunder
#

wait... shooting would be an interface as well?

#

but that doesn't go through the gamemode

terse prawn
#

If the client wants to shoot, they cannot tell the game to spawn the projectile because they dont have the right to tell other clients to shoot

#

only the server does

#

client tells the server they want to shoot and then the server does the functionality of shooting that just replicates to the clients

sinful tree
#

I don't think the client usually needs to communicate with the game mode directly. Even upon death, the death should be happening on the server's version of the player, not on the client.

winged badger
#

needs? it can't

sinful tree
#

Misused the term directly... You could make an RPC to feed information into the game mode.

#

Is what I'm getting at.

#

But I don't think you'd want clients to do that.

winged badger
#

nods

#

you don't, i do use GameMode to Client RPC all controllers in few different scenarios

#

for that, its excellent fit

#

like sending them the match stats along with match over message

kindred widget
#

@stray thunder Client does input for shooty stuff. Servery stuff happens that does damagy stuff. Server does damagy stuff, server does check if health > 0. Health isn't greater than zero, so server tells it's game mode to kill and respawn the character? TLDR, all of your health stuff should already be happening on server, so client is already not involved in any way with the respawn process unless you're looking for a way to do it via button click, that adds a few layers.

stray thunder
#

yea, the shooting checks are just run on server custom events.
I'm just trying to fully understand the communication with the gamemode.

kindred widget
#

In short. Don't. GameMode is abstract from clients for a reason.

terse prawn
#

If you want your client to send a message to the gamemode they Cannot
Like Datura said, you would have to have the server feed the info to the gamemode i.e player controller tell the server to tell the gamemode etc.
and that really shouldnt happen because its a potential threat of cheating

stray thunder
#

ok i see the issue - I'm using "client" as a player that is not the listen server.
I should be more clear when I'm talking about the "version of the player that is running on the server".

terse prawn
#

the 'character/pawn' that exists on the server representing the "client's" character should have access. but not the character on the client's, well client.

#

for instance. Event AnyDamage when executed will only execute on the character/pawn/actor that exists on the server. never on the clients. So you can then after that tell the gamemode to execute functionality i.e casts. or interfaces because that event only fires on the server's character (the one 'representing' the client's character)

stray thunder
#

yea i have that bit already.

edgy sedge
#

random Q: PlayerState is owned by the player it corresponds to, right? Or is it owned exclusively by the server

sinful tree
#

Server

winged badger
#

actually, its the PlayerController

#

thats the owner of its PlayerState

#

also the way to fetch the PC from PS - GetOwner

#

@edgy sedge @sinful tree

summer tide
#

When you see the client not seeing all the SK meshes of the server's char. What does it mean? That happens after the players goes to the gameplay level from the lobby.

winged badger
#

does server see client meshes ok?

summer tide
#

yes

winged badger
#

does client see its own meshes ok?

summer tide
#

Since server gets their before the client so that means ...

winged badger
#

and what about when client is looking at another client?

summer tide
#

yes client sees its own fine

#

I only have two pc to test this. It happens in packaged game. So very difficult to debug

winged badger
#

so doesn't happen in PIE?

summer tide
#

No - right now i'm testing with 3 clients in pie

winged badger
#

odds are your SK replication is fucked for simulated proxies

summer tide
#

PIE works fine even with 3 clients

winged badger
#

replication works just as well in packaged and PIE

#

but the order of things happening might not be the same

summer tide
#

So here's what I did.

#

I have a player settings in my player controller with some SK meshes.

winged badger
#

if the autonomous proxy sees itself fine

summer tide
#

In my character's custom component, I get the settings from player ctrl and then assign it to a variable in the component using server event.

winged badger
#

your simulated ones finish their setup before the autonomous has RPCed what it needs to to the server

summer tide
#

IDK what that mean

winged badger
#

im guessing there is a lobby

#

and game level

#

seamless travel?

#

and you are stuffing your setups in a GameInstance?

#

then RPCing them to server on a game level

summer tide
#

From game instance to Player controller by letting server set the replicated variable

winged badger
#

the rest of it, lobby, seamless travel? that correct?

summer tide
#

Well I don't use seemless travel in PIE only in packaged game. Since it won't work in pie

#

i have a lobby

winged badger
#

so

#

in packaged game

#

in lobby, your server should have everything it needs

#

before seamless travel even starts

#

written in each players playerstate

#

after that you no longer have race conditions you can't manage

summer tide
#

I'm not using player state since I'm doing all these in BP

winged badger
#

what does that matter?

#

you do multiplayer, you use playerstates

#

if you did, you wouldn't have this problem

summer tide
#

I couldn't figure out how to transfer lobby PS data to gameplay PS. Any example or tutorial on that?

#

Using BP only

winged badger
#

CopyProperties function

#

its an event in BP

#

it should get called on your lobby PS

#

and give you a pointer to the game PS

summer tide
#

But I have diff char in lobby and in game

winged badger
#

so you just cast the new PS, and set whatever data you need from lobby PS to game PS

#

doesn't matter

#

doesn't matter if its the same class either

summer tide
#

So I create Player settings replicated variable in both of my PS

winged badger
#
void ASolsticePlayerState::CopyProperties(APlayerState* NewPlayerState)
{
    Super::CopyProperties(NewPlayerState);

    if (ASolsticePlayerState* PS = Cast<ASolsticePlayerState>(NewPlayerState))
    {
        const bool bSteamIDSet = UUWorksLibrarySteamID::IsValid(PlayerSteamID);
        if (bSteamIDSet)
        {
            PS->PlayerSteamID = PlayerSteamID;
        }
        PS->SetBotStatus(BotStatus);
    }
}
#

this PS is a base for both lobby and game PS

#

it holds the variables that get transferred when seamless travel happens

#

and CopyProperties just copies it over

#

you don't have to pull a common base

#

but its a little bit more elegant

#

its the same thing in BP

summer tide
#

So in lobby PS, I created a variable called player settings. That' where I set the settings from my lobby.

winged badger
#

both your game and lobby need to have it

#

or you can make a base player state with PlayerSettings from which both lobby and game inherit

summer tide
#

Ok So I have a parent PS and a lobby and gameplay PS. The player settings variable was created in the parent PS.

#

Now in my char selection I cast to lobby PS and set the settings.

winged badger
#

and you need CopyProperties implemented on base PS

summer tide
#

Now in gameplay PS I call that event

winged badger
#

where it just casts the NewPlayerState to BasePlayerState and does SetPlayerSettings to its own PlayerSetting

winged badger
#

yes

#

and now your game PS has the PlayerSettings available before the game Character is spawned

#

for all players, on server

summer tide
#

Ok so do I cast to my character and set all sk meshes in game PS. Or do I cast the player state in my character BP then apply the settings with sk meshes

serene berry
winged badger
#

you now need to add the PlayerSettings to your game character as well

#

your GameCharacter and GamePS are 2 Actors that replicate separately

#

so even if you were using c++, and had the ability to override engine OnReps... you would have to cover case where Character replicates first, and where PS replicates first

#

to avoid juggling that

#

GameCharacter and GamePS are created in the same frame on server

summer tide
winged badger
#

you should override HandleStartingNewPlayer in the GameMode

#

to inject PlayerSettings into the Character

#

(you have to call Parent function if you're depending on the engine to spawn default pawn)

#

then copy the settings into Character

#

and you have to use OnRep

#

construction script client side executes before replicated variables are set

summer tide
#

i c

winged badger
#

you can alternatively use BeginPlay

#

which will execute after replicated variables arrive

#

but that would force you to handle special case on the server, where BeginPlay would happen before it gets PlayerSettings injected

#

which makes OnRep the simplest solution = best solution

summer tide
#

So I need to create another player setting variable with repnotify in my character bp.

#

Which gets set in the gamemode.

winged badger
#

that path has no replication races at all

#

and a clear cut order of execution on both server and clients

#

which circles back to simple = good

summer tide
#

nice let's see if I can get it to work. almost done

#

So I assume I can't assign the variable to my character from a controller. And i can't either spawn my character in game mode.

#

Currentl from game mode I use HandleStartingNewPlayer then call an event in my controller to find a player start in ym level then spawn character.

#

I shouldn't spawn in game mode but should do it in controller isntead

winged badger
#

nonono

#

after character is spawned and possessed, still inside HandleStartingNewPlayer

#

you access the PlayerState and Character via controller

#

then copy PlayerSettings from PS to Character

#

and why you put a server RPC inside the GameMode is beyond me

#

no Server RPCs required for this to work

winged badger
#

that should do it

#

altho parent node will Spawn the Default Pawn and possess it

#

but thats fine

summer tide
#

In ym gameplay level I have none set to pawn since i spawn manually.

winged badger
#

fair enough

#

this is a very good place to do custom spawn logic manually

#

best hook for it in the engine imo

vital heron
#

Are you done with your current conversation? Like I said before I don't want to interrupt

summer tide
#

Zlo can we talk in private? After I set the settings. if I do print string in my character bp, i don't see the value from settings. Yes I have that.

dull lance
#

Is there a way for the Listen Server to spawn actor classes that replicate but force them to not replicate until "X" event?

winged badger
#

they have to be set on the PS in lobby on Server

dull lance
#

I was thinking about Net Dormancy but it should only happen with a very specific type of spawning method / logic; all other spawning of said classes can start up just regularly

winged badger
#

for it to work

summer tide
# winged badger for it to work

When I set them on the lobby PS in lobby I see the proper value. But WHen I spawn character and fetch the val from gameplay PS, it's empty.

winged badger
#

that requires seamless travel for a test

summer tide
winged badger
#

you did verify that lobby PS has the correct information before seamless travel?

summer tide
winged badger
#

next step

#

verify the data curing copy properties

winged badger
#

that does nothing 🙂

#

might as well remove them

#

same thing

summer tide
#

Thats in child

winged badger
#

i know

#

print the settings during copy properties

summer tide
#

Wait that should be in parent or child, since I'm casting to base from base. Currenty that's in base

winged badger
#

if both PSes inherit from base

#

then base

#

if not you did something wrong

#

you should also verify that seamless travel is working via logs

#

and that your travel map has the same game mode/pc/ps as lobby

summer tide
#

I have diff GM/PC/PS for lobby and gameplay levels

winged badger
#

it doesn't

#

travel map

#

what does it have set?

summer tide
#

My lobby has lobby gm, lobby PC, lobby PS. TOtally diff from the gameplay level.

#

The execute console comman is in my lobby GM.

winged badger
#

travel map

#

the one in between

#

loaded during the transition

#

did you verify you are doing seamless travel with the logs?

summer tide
#

Well seamless travel only works in standalone not in pie. that's how i tested. Where do you want me to put the logs. Is there event for it?

#

Only my lobby GM has seamles checked. I don't think the gameplay has to be checked as well.

winged badger
#

engine will write it into logs

#

by itself

winged badger
#

so its seamless good

#

now your travel map

#

do you know what it is?

sharp star
#

What SDK is best for using Dedicated Server?

vital heron
winged badger
#

that wasn't an answer

#

and that isn't a travel map

#

now make an empty level

#

call it TravelMap

#

set its GameMode to be the same as lobby

#

and set it as TravelMap in your project settings

summer tide
winged badger
#

thats for dedicated servers

summer tide
#

anything else? What am I looking for in the log?

#

So now the level loads faster. I see the print string output which is good but the values are still empty even in PlayerState.

#

I didn't find any docs on CopyProperties BP. Does it only works in c++, IDK?

#

Or I made a mistake somewhere

winged badger
#

it works in bp

#

you sure you reparented both your playerstates to the new base?

summer tide
#

AFter adding TravelMap I do get Print String but empty:
'''ogBlueprintUserMessages: [PS_Lobby_C_0] PS BASE: true == =='''

winged badger
#

i didn't see the sceen with printstring

#

so don't know whats expected

winged badger
#

does lobby or game playerstate implement copy properties as well?

summer tide
#

No they are children of base

winged badger
#

that doesn't mean you didn't put a copyproperties node in them

summer tide
winged badger
#

no

#

if you do then the base event does nothing

summer tide
#

Currentl I don't have it in children

winged badger
#

ah

#

i see your problem 😄

summer tide
#

So children don;t inherit>

winged badger
#

no the error is in your CopyProperties in base

summer tide
#

is it the cast to PS_Base, since it' sin the base

winged badger
#

you need to set the NewPlayerState's PlayerSettings to the value of this object PlayerSettings

#

you didn't do that

#

you copied the NewPlayerState's PlayerSettings into themselves

winged badger
#

no

#

the other way around

#

NewPlayerState is new

#

it doesn't have any info

#

object that is executing the logic (Self) has

#

so you need to copy from self to newplayerstate

#

(you don't actually need self node)

winged badger
#

yes

#

now test it

summer tide
#

It works now for the server.

vital heron
#

I just want to ask how to check if the player owns or doesn't own the pawn.

#

I did this to check it in my pawn class and the first one does work and call but checking if it doesn't own it, doesn't work.

winged badger
#

now its a matter of replicating it

summer tide
#

But I'm using repnotify in my character bp. Do I have to do switch with auth then server and multicast based on auth?

lost inlet
#

but on a player controller, it'll be true no matter what the role is

vital heron
#

yea I just found out that GetNetOwner() is always returning true after some testing and looking at it's code

lost inlet
#

GetNetOwner doesn't return a boolean value

vital heron
lost inlet
#

if you want to know which controller is possessing a pawn, use GetController

vital heron
#

I mainly just want to check whether the player owns a certain pawn or not.

winged badger
#

first define works on server

winged badger
#

A - Server sees everyone correctly

lost inlet
#

so from the player controller, use GetPawn

winged badger
#

B - Everyone sees Server correctly

#

and no multicasts for stateful changes

vital heron
summer tide
winged badger
#

so all characters are good on server

#

and no character is good on any client?

vital heron
lost inlet
#

???

#

where is this code, also this code makes no sense

#

controller can be nullptr when a pawn isn't being possessed, or if you're a client in a multiplayer game because you don't know other players' controllers

vital heron
lost inlet
#

it still makes no sense, it'll always evaluate true pretty much

vital heron
#

oh yea your right

#

so what should I do now?

lost inlet
#

I don't know what you're trying to do and why

vital heron
#

I need to check whether the player owns a certain pawn.

lost inlet
#

in what context

#

you didn't really cover the why

vital heron
#

That wasn't a good explanation nevermind

lost inlet
#

wouldn't it be suitable for prediction stuff to use IsLocallyControlled?

vital heron
#

It worked thank you!

lost inlet
#

it'll probably have to be more !HasAuthority() && IsLocallyControlled()

summer tide
winged badger
#

what did you onrep?

summer tide
#

The player settings struct in character bp

winged badger
#

you just told me server has correct settings for all characters?

summer tide
#

well yes

winged badger
#

and clients see server ok?

summer tide
#

Clients can see server ok

winged badger
#

then you didn't RPC the settings to the server while in lobby

#

one Server RPC, in your lobby PS

summer tide
#

That's the first screenshot above

winged badger
#

that is not a RPC

#

and delays aren't required

summer tide
#

So Create a server event in PS_Lobby and set the settings. Call that RPC from the widget?

winged badger
#

yes, and RPC obviously has input of type PlayerSettings

summer tide
#

Yes

#

When I'm calling the RPC in PS lobby from the widget. The widget event has to be on server as well

#

in the first screenshot

winged badger
#

widget event can't be on server

#

since widget can't rpc

summer tide
#

oh i ye

#

owning client only

winged badger
#

only the PS one

summer tide
#

Isn't this will set the same data for both

winged badger
#

that looks fine

summer tide
#

Yes it works now. Let me test this in packaged project since my preivously working setup didn't work there. I could set materials the same way I assume

#

Also if I have to update any of the SK mesh. I could just simply set the player settings struct right

winged badger
#

on the character this time, yes

summer tide
#

Thanks a lot.

potent cradle
#

Anyone know how Rust can pull off such high player counts on servers? Different engine and all, but thought there might still be something to learn from it.

vivid prawn
#

Hi guys, a quick question, I have a throw stone feature in my game, and I'm using prediction, everything works perfectly, but I'm getting strange result when Server is
not looking, like there is a bit of offset, does anyone has experience such issue? also I set my character and my stone Always relevant, replicate Movement, New Load on Client and Replicates

odd iron
#

Hii guys goodday how can i check if the project requesting a specific port ...
Because i dont know for somehow steam plugin not working and i tried to turn off fire walls port forwarding everything still not working

#

Im using 2nd router connected with the main one as a bridge WAN connection

bitter oriole
#

Steam does not need open ports

#

Or port forwarding, or stuff like that

#

Just have your two machines connected to the Internet in some way and that's all you need

odd iron
#

Yes but i was curious why suddenly i cant connect or using the plugin through any project

#

Im trying to get the overlay like just you are playing War space notification

#

Its not working

#

Also i tried to get the steam id or account name still null mean its failed to fetch

bitter oriole
#

Is it a shipping build

odd iron
#

No

#

Stand alone in editor

bitter oriole
#

Close the editor, right click uproject, hit launch

odd iron
#

Nothing also

bitter oriole
#

Be sure to have Steam online and connected

odd iron
#

I tried many projects

#

Many versions

#

I tried a project i was using before was working

#

But also nothing

bitter oriole
#

That's weird, all you need to get Steam working in UE4 is one config change in the project

odd iron
#

I used my App id and 480 id

#

Thats why i asked maybe someone have same problem

#

I still think in the routers

#

My main router using simcard maybe because of that ??

#

Its not DSL or Fiber optics

bitter oriole
#

Well yeah maybe your ISP simply blocks Steam to save bandwidth

#

But that wouldn't block the overlay from working, as long as you're signed into Steam

odd iron
#

Yes its working on other games

#

Yesterday i ve tried to check the ports my PC using and i launched the game

#

Its not requesting the Steam port

bitter oriole
#

The Steam overlay does not need anything more than the Steam client running, there are no ports involved

odd iron
#

Oh

#

Idk its weird never happend before

bitter oriole
#

Make sure you haven't broken the engine somehow, like installing plugins in the engine folder instead of the project folder ; make sure the Steam setup in project is correct

odd iron
#

I thought because im using Playfab also i tried fresh project same

bitter oriole
#

Verify the engine, etc

odd iron
#

I tried 4.23.1 and 4.24.3 and 4.25.0 and downloaded plugins again 😋

bitter oriole
#

Just so we're clear no plugin is needed for Steam

#

Pristine vanilla engine, simple config file change in project

odd iron
#

Yes the plugin is the Advanced Sessions

bitter oriole
#

Not needed for the overlay

odd iron
#

Weird really

#

I will reach the PC soon

#

And try again

#

Last question please

#

Is EOS have same services as Playfab and does it free

bitter oriole
#

No idea what either service does, never used them

rich ridge
odd iron
#

And how is the cost of Playfab is it too High ?

#

@rich ridge its wrote For Development 100k User per title

#

free

rich ridge
#

EOS is completely free.

odd iron
#

But i think the plugin is 100$ something like that

rich ridge
rich ridge
odd iron
#

EOS Plugin

odd iron
#

i thought this one xD

#

is the plugin supporting Blueprint also ?

rich ridge
#

epic will release full plugin soon

thin stratus
#

Yeah I would not pay for an EOS plugin I think.

rich ridge
#

dont buy it

odd iron
#

So i will wait

rich ridge
#

you can use code from master branch

#

and that code is compatible with current 4.26 release.

#

at max you can expect plugin around UE5 release.

thin stratus
#

Ah, I would be careful with saying that

#

Epic was never good at keeping their release schedule for stuff like that

rich ridge
#

epic need something to show for the mega release of the decade.

thin stratus
#

They have enough to show :P Doubt that plugin will be part of that

rich ridge
#

but i m optimistic they will ship it

ember osprey
#

Does EOS replace the OnlineSubsystem?

twin juniper
#

What should I write in the game instance? Looking at the shooter game sample is a 2000+ lines of code file and It's a bit intimidatory

chrome bay
#

very little usually

#

ShooterGame is pretty old, so just use it as a resource rather than as a perfect example of how to do things

#

There are better ways of doing a lot of things now, it's just still the most comprehensive MP sample

ember osprey
#

The ShooterGame is rediculous.

#

I wish they would update it

chrome bay
#

They won't now, it was around even during the UE4 beta so it's old as

#

They make minor changes but with UE5 on the horizon they probably have new samples lined up

#

Certainly hope they do

ember osprey
#

Is EOS replacing OnlineSubsytem?

rich ridge
#

no

twin juniper
#

I can't wait, do we know how much will ue5 api change and when it will be released?

rich ridge
#

OnlineSubsystem will encapsulate EOS within engine.

ember osprey
#

hmmm, will or does?

rich ridge
#

does

ember osprey
#

ok

cosmic pollen
#

When l start my test my players dont spawn l dont know can anyone help me ?

odd iron
#

@bitter oriole I verified The Engine and its worked Thanksss

cosmic pollen
silent valley
#

Have you added any PlayerStart objects to your level?

cosmic pollen
#

yes

#

3

#

as my players

#

@silent valley any idea?

#

@silent valley if l played it offline that works perfeclty

#

l mean player mesh

silent valley
#

not really... if you're using C++ you can override GameMode and hook into a few functions, like FindPlayerStart_Implementation for example.

cosmic pollen
#

blueprints

silent valley
#

but the default should work ok

cosmic pollen
#

is default

silent valley
#

Play as Client or Play as Listen Server ?

#

are your PlayerStarts definitely above the world (e.g. player not falling through)

cosmic pollen
#

play as client even first player have problem but play as listen server works for player one

silent valley
#

I don't know 🤷
Check the client log files for anything suspicious

#

and the Server I guess

cosmic pollen
#

l wil start over again

#

only aniamation and spawn

#

@silent valley l believe is something with posses

#

but when l use my print for see how my index goes it is ok

meager fable
#

Anyone achieved something like "Set Physics Angulat Velocity" in multiplayer? That one requires simulate physics on and that causes a desync in multiplayer 😦

lilac creek
#

if GTA 5's map was running on a listen server, with only 8 players in the game, and the listen server being a ryzen2700x cpu with 16 gigs of ram, with all the players in the US, would the game run smooth?

dark edge
#

Sure, if you set it up right. Gta 5 runs smooth enough already and I guarantee their servers aren't that beefy.

lilac creek
#

no

#

i have a map that large

#

so if i run it on listen servers

#

then would it be smooth?

#

listen server being a ryzen2700x cpu with 16 gigs of ram

#

players in the US

#

only 8 players

winged badger
#

it could be made smooth

#

it won't be out of the box

#

listen servers don't like spending too much CPU time evaluating actors for replication

lilac creek
#

so what about a 5*5 landscape and a city half size of los santos

#

would that be smooth?

silent valley
#

The thing with a Listen server and streaming world, is that worse case you have 8 player spread out over the map.
You have to run all the logic for all the missions, AI, collision etc for those 8 areas of the map.
In addition to all the rendering and local logic for one player.
If you design the game for this then sure it can be done - but it won't be easy.
Also, Listen server and streaming world is not supported out of the box (tiles are not loaded for remote clients).

weary badge
#

Hey,
Can anyone tell me what exactly happens with the code in the following circumstance ?

In a multiplayer game - During the event post login event, a player leaves the game and the event on post exit gets fired. Does the post login event run until it's over or does it get interrupted ?

sacred spire
#

If 8 players spread out, the replication is lesser isn't it since less interactions among players, except walking around.

#

Or you can just rent cheap dedicated server maybe.

bitter oriole
#

@lilac creek A server running a map that large is going to put a heavy strain on the system. Think about players dispersed in the level - the host will still need to simulate everything happening

#

The CPU load would be close to linearly N * the cost of GTA itself, for N players

#

So simply put, it's a tough one

meager spade
#

CPU is the issue we have with listen server

#

8 players can easily add 4-5ms gametime on the CPU on the listen server :/

#

only leaves 10ish ms for your local player

#

if you want 60fps

sacred spire
sacred spire
bitter oriole
#

The CPU load.

#

Assuming GTA V runs gameplay in 2ms on the CPU, a listen server with 8 players is likely to need about 8x more

sacred spire
#

Usually host calculates the AI stuff for sure since host is the server. The players interactions are different thing. Only host need strong CPU

bitter oriole
#

Assuming same optimization

sacred spire
#

I see

bitter oriole
#

The point is that GTA V likely needs more than 2ms and your average UE4 game likely has a lot less CPU optimization out of the box, and so this endeavour appears difficult at a glance

sacred spire
#

If player were to spread out do walking only. Then replication ratio is 1, right? As long as the 8 players are not constantly interacting to each other, he should be fine

#

You are right

bitter oriole
#

The host still needs to run all clients

#

Having players spread around is the worst case

#

You're more likely to have each player needing an entirely different set of objects to simulate

#

UE4 is not really well built for CPU loads - it doesn't do ECS, it uses inheritance extensively, the gameplay framework has all but no multithreading support

#

So I'm just saying it's a tall order here

sacred spire
#

I always thought as long as the players spread out means lower replication ratio. Like how we see in generic Battle Royale

#

Guess i am wrong

bitter oriole
#

I have no idea what a "replication ratio" is, and I'm talking about CPU load here

dark edge
#

Spread out is more thinking, less talking. Clustered is less thinking, more talking

sacred spire
dark edge
sacred spire
#

Uh i see. Thank you

dull lance
#

quick q on fast array serializer. Marking Dirty on Client will still be meaningless for a replicated struct, correct?

winged badger
#

it doesn't do anything

#

it might throw a warning, not sure about that

#

@lilac creek it doesn't matter how large the thing is, it matters how many replicated actor it has

#

and how good your optimizations are

#

you can make a 10 by 10 meters area that has so much stuff in it that it just doesn't work

lilac creek
#

So actuallh

#

Im on my phone

#

Lame ask this

winged badger
#

you will run into trouble over 13km, as you'll lose float precision

#

collisions will start feeling wonky

lilac creek
#

I'm getting 60 fps in a blank map in ue4, with just a cube

#

And one plyer

#

What is my CPU compute time in ms

woven terrace
#

vsync on? 🙂

lilac creek
#

Yeah

lilac creek
#

What do you guys think

winged badger
#

if you put 500 AI that just walk around with CMC

#

your game won't work

jolly siren
#

yeah, to vsync on means your fps is being limited to your monitor refresh rate

lilac creek
#

Right, turned it off

winged badger
#

so there is no general way to answer your question

lilac creek
#

I get 96 now

winged badger
#

and editor is taking most of it

lilac creek
#

What would be my CPU compute time, like an estimayion

#

The level has nothing

#

96 fps while running standalone game

#

@winged badger

winged badger
#

no, that is a standalone with editor binaries

#

which is very different from packaged

lilac creek
#

Ah

#

Anyways what would be a estimate CPU compute time?

winged badger
#

96 fps is just over 10ms

lilac creek
#

Nice

#

Thanks

winged badger
#

its not an estimate

#

it was a typo tho

#

1000 milliseconds in a second

#

1000 / FrameRate = frame time in ms

woven terrace
#

10 ms is not bad though (for a finished game).

winged badger
#

yeah, but is meaningless with editor binaries

woven terrace
#

just started with ue, (coming from developing form the ground up) so alot of things make zero sense to me x)

winged badger
#

you can play a game with 4 players, in standalone with -log argument

#

if you type log lognet veryverbose in the console

woven terrace
#

editor binaries = ?

winged badger
#

you'll drop to 2 FPS

#

just because all the logging

dull lance
#

@woven terrace google time!

woven terrace
#

right keep forgetting thats a thing xD

dull lance
#

or AskJeeves if you're into that

winged badger
#

build target that has "Editor" in it

#

includes running DevelopmentEditor or DebugGameEditor from your IDE, double clicking .uproject to start the editor, or running unpackaged standalone

#

by far the least efficient build, and one that should never be used to measure performance

dull lance
#

@winged badger it's decent to measure relative performance though [for starters anyways]

winged badger
#

only performance info you can get from it is relative to editor baseline performance

#

so you can see if you made something better of worse

dull lance
#

💯

winged badger
#

in absolute terms, its meaningless

dull lance
#

how dare you say that PIE is not 100% representative of a shipping build performance angry_thonk

winged badger
#

especially given that you could be running the editor on a shitty i5 or a shiney new ryzen

rich ridge
dull lance
#

I was being sarcastic

rich ridge
#

My bad

vivid prawn
#

Hi guys, quick question, If i have piece of equipment as Child Actor Component under my character class, do I have to always call it as server? or I should call it as Client and then the equipment handle the effect for server and client?

#

...also part of the equipment (bone to be specific) moves based on Control Rotation of the Player

winged badger
#

i would avoid child actor components in MP like the plague

vivid prawn
#

why is that?

bitter oriole
#

Let's just say they're tricky

#

They're a hack really, components are meant to belong to one actor

#

Child actor components put that on its head

#

If you can avoid them, it's always a good idea

vivid prawn
#

i see...

#

so what would you suggest? just simple create class and attach to socket?

bitter oriole
#

Things like character equipment would likely work better as a component

vivid prawn
#

hmm... you mean construct object from class?

#

yeah, i would say it slightly easier, so later on i don't have to define Owner and Instigator on possessed

dull lance
#

@vivid prawn even if you want to have them as actors (say a weapon per say), just don't add it to the actor via child actor component

#

In your Inventory manager component or whatever, spawn the actors and keep a ptr to them in your comp

vivid prawn
#

i see... so I don't need to create them directly in character? I make a component to manage the creation and storing them right?

dull lance
#

Features like that are usually nicer as components since you can encapsulate logic which is easier to handle and troubleshoot

#

Otherwise, you're tied to actor classes

#

and then... what happens if you want to have a chest with inventory stuff? Well you can't since you did it at the ACharacter Level. Now you have to copy + paste all that logic over to your AMyChest class

vivid prawn
#

but let's say if that equipment need to access to Control rotation to follow whatever player looking at, I need to pass the character as owner to the class right?

dark edge
#

@dull lance you still want your equipment to be actors, just that the actors would have some sort of component defining functionality. Like in my game, all weapons are actors, but they have projectile weapon components or whatever on them

vivid prawn
#

I encounter an issue, cause if i want equipment to do something, i ask server to do it, but control rotation doesn't seems like pass correctly if player (the host/server) not lookign at it

dull lance
#

@dark edge yeah; I meant the inventory manager

#

but the feature of a weapon itself would also be encapsulated (either struct, uobject, or uactorcomponent)

dark edge
#

@vivid prawn controllation should be synced. How are you modifying it, add control yaw and add control pitch?

vivid prawn
#

from the equipment owner (which is the character) getting the control rotation to get the Yaw and Pitch

#

however, the yaw and pitch works fine for client only.but the moment i ask server, it only works if the (host/server) looking at it

dark edge
#

What do you mean by looking at it? That doesn't make any sense

vivid prawn
#

ikr

dark edge
#

Like when the host looks away from a client, the controller rotation quits being synced?

vivid prawn
#

it's seems joins are not animating if host not looking at it directly

#

yup

dull lance
#

that's a major code smell

#

likely smth you're doing

#

did you play with the Net relevance settings at all?

vivid prawn
#

i set it to always relevent

#

i found someone has same issue

#

but nothing works for me

dull lance
#

back in 4.12 😛

vivid prawn
#

yeah, 2017!

dark edge
#

You are probably doing something f******. Start by printing control rotation in the character on tick

#

Make sure it's synced

vivid prawn
#

i did

#

the moment, server turn around it all go back to idle position

dark edge
#

Idle position isn't a control rotation, can you confirm that the control rotation stays synced?

vivid prawn
#

no it's not syncing

#

okay, my equipment using Skeletal Mesh with AnimationBluePrint

#

and since i'm using actor in AnimationBlueprint i get the component owner and then owner and cast it to actor to get the Instigator (which is the character) to get the Pitch from control rotation

#

now I'm not sure what is AnimationBluePrint limitation

dark edge
#

Well since you're control rotation isn't synced, I'd start with figuring out why that's screwed up. Don't even worry about your animation blueprint, that's the least of your problems

vivid prawn
#

I try to print out the pitch on screen, and it's alright

#

but I'm using pitch to move the joins in the rig

#

and the rig is moving

#

even server is not looking

#

but the forward vector is wrong