#multiplayer

1 messages · Page 22 of 1

fathom aspen
#

Wow I thought I read that one, but I guess it's the headline giving me deja vu

#

Thanks for sharing

open quail
#

maybe you read this one?

fathom aspen
open quail
#

people cheating at this level gives me daily nightmares as a multiplayer programmer

fathom aspen
#

It wasn't Riot's but it was a cool read

#

I didn't fully understand what peeker's advantage meant 😛

#

Up till I read it

fathom aspen
fossil veldt
#

This one in particular is great, I have been doing the same perf profiling setup for my game atm

#

Haven't used this but pretty much exact reason i've been looking at this code in the first place

#

making my own CMC alternative, had enough of it eating so much perf

#

It's extra funny reading the Valorant blog and seeing their movement code was pretty much the most expensive thing, pretty sure they used CMC

fathom aspen
#

The only reason I would spend them $$ would be for educational purposes, but I'm not there yet 😄

#

Old CMC hehe

fossil veldt
#

yeh £400 was too much for me to justify spending on GMC

#

I prefer Quake's movement code anyways, Project Borealis movement exists but I dislike how heavily it's janked ontop of CMC

fathom aspen
#

They have a discord server where they don't let people who haven't purchased the plugin in XD

fossil veldt
#

ah lol

fathom aspen
#

I mean I just want that slight idea what people think about it

fossil veldt
#

yeh

fathom aspen
fossil veldt
#

I think they push updates every now and again

fathom aspen
#

Would be cool to check it again

fossil veldt
#

yea, idk I get fed up with the double pollution of code

#

dealing with the BS that is CMC and then slapping source movement on the top

#

blergh

#

Quake 3 Arena movement where it's at

fathom aspen
#

Haha yeah seems like an overkill

fossil veldt
#

Look how beautiful it is chefskiss

#

thing of beauty

fathom aspen
#

Turbo hacked

#

If CMC code was this easy to read

fossil veldt
#

Ikr

#

I don't need any of the root motion shit

#

so I just have lightweight Quake port built ontop PawnMovementComp

fathom aspen
#

I don't even need gas honestly lol

fossil veldt
#

I don't like GAS either lol

#

Cool enough concept but it's just like

#

A) it makes it so much harder to have control over the replication process from what i've seen

#

B) your code is now in that format forever, if you want to reuse it for a non-UE project in the future then sorry ur tied to the GAS architecture now

#

super un-portable

fathom aspen
#

Right, it has to be generic 😦

#

Still it not being convoluted is enough for me

fossil veldt
#

ye

#

lol

quartz iris
#

There's two players inside my games lobby, what's the best way to get the other players info? aside from your own

fathom aspen
#

Generally it's PlayerState

quartz iris
#

Like can i loop through the 2 players and find the one thats not you?

fathom aspen
#

Yes. You have a reference to your PlayerState (no matter on what game framework actor class you are) and from there it's as easy as traversing through the GameState's PlayerArray and checking against your PS.

quasi tide
#

Don't tell Laura 🤫

fossil veldt
#

It's more incase you ever want to use your code in a different engine in the future

fossil veldt
pallid mesa
#

hey

#

saw what you guys wrote about the cmc

#

and yes it is indeed an optimization

#

using directly the acharacter rep channel

azure beacon
#

Hi folks, I've got a (hopefully) super simple question/issue with a networked actor.

I've made an incredibly basic "moving platform" blueprint. This consists of a cube component, and an InterpToMovement component. This works correctly and the actor follows the defined path.

The issue that I'm having is that when I play the game the position of the actor is out of sync between the server and the client. I have enabled "Component Replicates" boolean within the Interp Component, but this didn't seem to make any difference. If important, the actor is simply placed in the level rather than being spawned in by blueprint.

Would someone be able to tell me what I need to do in order to get this synced correctly? Thanks!

kindred widget
# azure beacon Hi folks, I've got a (hopefully) super simple question/issue with a networked ac...

I could be mistaken, but I don't think any of the movement components besides Character are network capable. Even it doesn't actually replicate, it affects the character and it replicates. So replicating the component probably won't help. You're likely looking to enable ReplicateMovement in the actor itself unless you want to do a more thorough implementation regarding local predictive movement and network corrections.

azure beacon
#

Thanks, I've managed to find another tutorial that seems to cover it so Im going to follow that.Thank you for the reply though!

twilit radish
#

@fathom aspen all going as planned 😆

fathom aspen
#

Haha I like how it goes insane at the end

twilit radish
#

It needs a few tweaks x)

fathom aspen
#

What you ended up doing for the movement?

#

How do these actors move?

twilit radish
#

It's just the client sending a FVector and me doing some amazing interpolation on it.

pallid mesa
#

nice seeing some Beyblade gameplay

#

😄

#

rot interpolation is tricky

pallid mesa
#

specially cause u want to send out deltas

#

to figure out rotation direction

#

otherwise ull compute shortest

twilit radish
# pallid mesa rot interpolation is tricky
FRotator NewRotation(0.0f, NewYaw, 0.0f);
ShipMesh->SetRelativeRotation(FMath::Lerp(ShipMesh->GetRelativeRotation(), NewRotation, CurrentInterpolationDeltaTime));
```Like I said, an _amazing_ system 😂
pallid mesa
#

haha

#

take a look at how cmc does it

#

and beg me pardon to send you to the cmc

twilit radish
#

I was just about to say LOL

#

I'll look at it later, it works for now.

pallid mesa
#

coo gj thom ✓

twilit radish
#

I need to "tweak" some things first like the video showed 🤣

fathom aspen
quasi tide
#

That's 🧠 network smoothing

#

Throw it on the marketplace, "smooth network rotation"

twilit radish
#

Lets be fair, as long as it feels smooth people will buy stuff like that. They really don't care how it works internally most of the time.

#

"if it works it works"

quasi tide
#

Then in the docs, just put in small print, "only tested in less than 1ms ping conditions"

fathom aspen
#

I would buy stuff like this for the entertainment/education

#

As long as it's not the GMC plugin price

quasi tide
#

To be fair, as long as the GMC actually does what it advertises, that's a steal of a price.

twilit radish
#

I'll sell it to you for the small price of 500 dollars.

quasi tide
#

How much you think you'd have to pay Jambax or Zlo to implement the GMC for your game?

#

More than $350. I know that much 🤣

fathom aspen
#

Much more than the GMC costs for sure lol

twilit radish
#

😂

pure oar
#

Guys, I wrote to the level design channel, but it is a more appropriate question here.i am making an 1vs1 online game.Map 1 has Server, map 2 has Client.And in the logic of the game, sometimes the player on map 1 can switch to map number 2 and map 2 player switch to map 1.I want players not to render the other map in terms of optimization. how can I do that? I tried with LOD system but it didn't work. do you have any other ideas?

#

Also, has anyone ever uploaded a game to steam? When I do shipping, there is no connection to steam, but when I do DEV packing, the connection is established.

twilit radish
#

Just an idea but maybe attach it all to two actors and hide / destroy the relevant ones 😄

pure oar
#

to do this each object don't i have to call in code?

twilit radish
#

Well yes. But I'm not sure how you can solve this without any code/BPs honestly.

pure oar
#

it sounds very troublesome :)

twilit radish
#

Having 2 duplicated spaces in general sounds very troublesome to deal with. What you can also do is just not have them by default and spawn it all whenever the server requests a client to spawn it.

#

But honestly I'm not entirely sure what a good approach for this is.

#

They are just some ideas 🙂

pure oar
#

I get it, are there people in this discord group playing the game and telling the problems? this game is on steam right now and I would love for a professional eye to have a look

fathom aspen
#

This became a thing in ue5

#

The host would still load the whole map though, but I guess they fixed it in 5.1

pure oar
#

do you have any suggestions for ue4?

fathom aspen
#

Any solution would revolve around loading/unloading streaming levels

#

Exactly like they did in World Partition

#

Though that is a full fledged system

pure oar
#

you telling me to open separate levels?

fathom aspen
#

Sublevels

pure oar
#

thanks a lot, i will check it out

twilit radish
#

So Wizard, when are you applying for a job at Rocket League 👀

fathom aspen
#

Waiting for Psyonix to gain enough money so they don't go bankrupt

twilit radish
#

They got bought up by Epic, I think they are all fine lol.

stuck gorge
#

Hi, can I turn off a replication for specific a variable? For example we have Mesh Component and I need to replicate it without visible replication. But bVisible is a replicated variable and calls a function on Rep_Notify that I cant to override.

fathom aspen
#

DOREPLIFETIME_ACTIVE_OVERRIDE it's called

stuck gorge
#

O, thanks =)

#

I am blind +)

fallow shadow
#

any reason why GetComponentLocation() returns location relative to the parent (actor) on client and world location on server

uneven lion
#

Am I able to make a UObject with Server rpc functions, make this object a property of my PlayerController class, and then from a HUD grab the PlayerController's UObject and call the Server functions on it?

For example, I have a PlayerController class with a Database UObject. Database has a UFUNCTION(Server, Reliable) GetUserInfoBySteamId. From my HUD, I need to call GetUserInfoBySteamId and have it call a delegate on completion.

However, when I simply print "Found UserInfo from SteamId!" (in the _Implementation() function) it comes from the client and not the server..?

sinful tree
# uneven lion Am I able to make a UObject with Server rpc functions, make this object a proper...
The Games Dev

I have often seem times where people want to call RPC functions inside a UObject that has an outer of AActor, for example a Weapon Actor, could have a FireMode UObject that wants to send RPCs. As long as the Weapon Actor is Owned by an actor that goes back to a PlayerController (for example ... Calling RPC functions inside a UObject

uneven lion
#

Maybe I did something wrong because I am using those functions

#

GetFunctionCallspace returns Local and then the client prints from the _Implementation function (when it needs to be the server)

fathom aspen
#

GetFunctionCallspace is always Local for UObjects, that's why you use the Outer Actor's GetFunctionCallspace

uneven lion
#

hmm

fallow shadow
#

what kind of funky replication bs is this

#

if im on playing as listen server and call a server or client RPC to get the component location it gets the world location

#

as it should

#

but if im playing as client and call a server RPC to get the component location it gets the location relative to the actor

#

that doesnt happen on a function executing on client

fallow shadow
#

well im in bed now but i genuinely dont know what to show

#

this is just the general situation for some reason

#

the component has replication on and so does its parent actor

vivid seal
#

anyone know how client prediction would work with a FastArray? If i predictively add an element to the array, then add the same element on the server and do MarkItemDirty, am I going to end up with a duplicate on the client? If not, are they synced by index or by an == check?

chrome bay
#

They're synced by replication ID

#

You would also paradoxically have to mark the item dirty client-side so that it gets given a valid replication ID. Then you need to hope the server didn't give that ID to something else in the meantime

vivid seal
#

okay. so probably a bad idea to do this then

chrome bay
#

You can do it, but the prediction system needs to be very robust

#

And prediction only really works if the client is requesting the server to do something for it

#

Client says "I want this item with this ID", server decides to add it, or sends back a "nope, remove it"

vivid seal
#

i suppose i don't really need client prediction for this, I just need to initialize the fastarray on both the client and server when the game starts, without waiting for replication to happen

chrome bay
#

Can't just wait for a RepNotify on the client?

vivid seal
#

no, it creates a race condition where another component could check if an item exists in BeginPlay and it might not be replicated yet

chrome bay
#

Move the BeginPlay() stuff to the OnRep?

vivid seal
#

right but what I'm saying is that in BeginPlay of some other object, I would be checking this object to see if the item exists or not

chrome bay
#
{
    TryInit();
}

void OnRep_Data()
{
    bReceivedStuff = true;
    TryInit();
}

void TryInit()
{
    if (bReceivedStuff)
    {
        Init();
    }
}```
vivid seal
#

its for my Stats array, I have other components that subscribe to changes in stats (like the movement component, subscribing to changes in speed). If replication hasn't happened, the movement component will just assume the actor does not have a speed stat and not subscribe, since I don't force all actors to have all stats

chrome bay
#

You can get around it by just pushing an event that they subscribe to to check what stats are available

#

The OnRep calls that event when the stats are received

vivid seal
#

another related question, if the fast array is editor-exposed with EditAnywhere, the server and client will start with the same array. When replication happens will they be synced or will the client not have replication IDs still?

chrome bay
#

Won't have them, they are transient and don't serialize

vivid seal
#

so what does happen then? duplication of every item or overwriting?

chrome bay
#

They would have to be marekd dirty by the server

#

In theory nothing, they would just be junk data that never replicates

#

Since all repID's would be -1

#

And if you mark one dirty server side, it'll be duplicated on client as the client won't find a matching ID

vivid seal
#

if I mark them all as dirty on both server and client in InitializeComponent would they get the same IDs? or is there no guarantee that IDs are in order

chrome bay
#

Well the easiest way would be to just assign the index as the replication ID for each item - however, I'm not 100% sure if the delta serializer will be able to work with it

#

I've never initialized a fast array not at runtime tbh

vivid seal
#

yeah, the end goal is just to have a replicated fast array, but have the default values already exist on the client at BeginPlay

chrome bay
#

I don't know for sure if you can skip that initial bulk replication cost anyway

#

Does the stats array ever reorder or change size?

#

Because if not, fast array is going to be more expensive anyway

vivid seal
#

no, once it's initialized in InitializeComponent it never reorders or changes size. I'm using fast array exclusively for the per-item callbacks

chrome bay
#

And you can't initialize it before runtime?

#

I.e. serialized into the asset?

vivid seal
#

i dont know how to do that

#

😦

#

can you explain a bit more

chrome bay
#

As in just make a TArray UPROPERTY and set the starting values in the asset/BP

vivid seal
#

yeah I am doing that currently, I want to add the ability to start from a template data table and then just edit stats relative to that though, which is currently what I'm trying to figure out

#

so essentially I would read the data table and initialize stats that way, then read the modified stats list and edit any that need editing, that way I don't need to create a new data table for every single enemy type

chrome bay
#

I was wrong about one thing, ReplicationID stuff is not transient

#

So it can be saved at least

vivid seal
#

it looks like IDs are just a simple int32, so theoretically if I did MarkItemDirty on both client and server in the same order they would get the same replication ID

#

i think

chrome bay
#

They would yeah, the easiest thing would be to just set the replication ID to the index on first run

vivid seal
#

I didn't know I could just manually set the replication ID

chrome bay
#

Or just mimic what MarkItem/Array etc. Dirty does

#

If the client already knows what data table to use then theoretically they can just fill it in

#

But the danger is what happens with relevancy etc etc

vivid seal
#

yeah I can get the client to have the correct initial values, I just want to make sure that when things change on the server later they are replicating/syncing correctly

chrome bay
#

Real problem is when the client actor goes away, then comes back, client runs the initialisation code again, now it's possibly out of sync with the true state

vivid seal
#

I mean it would get the same IDs as before assuming the array never reorders though right

chrome bay
#

Especially if it's doing this in BeginPlay, since that runs after network properties have been read in

vivid seal
#

I'm currently doing all of this in InitializeComponent

#

though I'm not sure when that runs compared to network stuff

chrome bay
#

can't remember if that runs before or after, had to deal with a similar issue

vivid seal
#

net relevancy hurts me

chrome bay
#

Sounds like it can work though

#

But tbh if the array never changes order, I wouldn't even bother with fast array

#

Just use regular TArray and RepNotify to do callbacks yourself

#

Depends whats in the item ofc

vivid seal
#

does that work though? I don't think you get a RepNotify if an item in a TArray has a property change

chrome bay
#

it does

vivid seal
#

then i would have to traverse the array and compare each item to the old array to see what changed though?

chrome bay
#

void OnRep_TheArray(const TArray<float>& LastVal)

#

Plus if you already have the data table, literally all you need is the data

#

Indices can map to whatever stat it is using the table

obtuse field
#

Are there some protocols or plugins that allow multiple servers to talk directly to each other?

vivid seal
#
struct FCombatStat : public FFastArraySerializerItem
{
    GENERATED_BODY()

    void PostReplicatedAdd(const struct FCombatStatArray& InArraySerializer);
    void PostReplicatedChange(const struct FCombatStatArray& InArraySerializer);

    UPROPERTY(EditAnywhere, NotReplicated, meta = (Categories = "Stat"))
    FGameplayTag StatTag;
    UPROPERTY(EditAnywhere)
    FModifiableFloat StatValue;
    UPROPERTY(EditAnywhere, NotReplicated)
    bool bUseCustomMin = false;
    UPROPERTY(EditAnywhere, NotReplicated, meta = (ClampMin = "0"))
    float CustomMin = 0.0f;
    UPROPERTY(EditAnywhere, NotReplicated)
    bool bUseCustomMax = false;
    UPROPERTY(EditAnywhere, NotReplicated, meta = (ClampMin = "0"))
    float CustomMax = 0.0f;
    
    FStatNotification OnStatChanged;
    bool bInitialized = false;
    //TODO: Add global stat replication rules somewhere to check whether to mark a stat dirty when it changes, probably in CombatStructs with a set of Replicated Tags.
    //Currently all stats replicate to everyone.
};```
that's currently my stat struct
#

and really I just need a callback for when the StatValue changes

#

i guess the array could just be the values and the rest could be just in the data table

chrome bay
#

Up to you I guess, might be easier not to sometimes

#

My domain is micro optimising the hell out of stuff like this since bandwidth is always my concern

vivid seal
#

I'm not super concerned with bandwidth, just making sure that everything works correctly in the first place. My game is max 4 players so at absolute worst case there's 4 players and 40-50 enemies on screen, but usually a lot less than that

#

guess it depends how many stats I have replicating and if every enemy has all of them

chrome bay
#

ye, probably fine

vivid seal
#

thank you for all the help, i'm gonna mess around with just manually setting the replication IDs on client and server and see if it causes problems

chrome bay
#

yeah, just mark them dirty at both ends at startup, should be ok

vivid seal
#

i think that's the option that requires me to change my existing code the least

chrome bay
#

The key will be making sure client marks them dirty before it reads in network properties

#

And ensuring they aren't ever removed

#

If the data table is also a replicated property, then hands are tied really

vivid seal
#

data table is not replicated, its just set in editor

#

I think I'm gonna use PostEditChangeProperty to actually have it populate the fastarray before runtime

#

and then not deal with it at all later

dry pebble
#

thank you! I tried destroying all widgets before travelling but still have an issue where the health text doesn't reset after seamless travelling. The first time we go through from lobby -> game is fine but then after when calling resetgame() + seamless travel, the health part just has old default values

chrome mortar
#

Hi, would somebody push me into a direction? Getting into MP, not familliar with the terminology needed, so I can't really ask google. If I want only a specific client to call a certain function, in this case a Player overlaps a pickup object -> Boom, now the widget for "Press E" gets visible... Any documentation specifying what I need in order to do that?

dark edge
rapid bronze
#

You can just handle that locally

#

What happens on interaction tho, that most likely will have to happen server side :p

#

Unless you want a cool cosmetic that you can only see

dark edge
#

Yes you'll want your client to talk to the server like "Hey I wanna interact with this".

#

Input -> Select ThingToInteractWith -> RPC to server asking to interact with ThingToInteractWith -> Interact

OR

Input -> RPC to server IWannaInteractWithSomething -> Select ThingToInteractWith -> Interact

#

Whether or not to do the selection clientside depends really. I do it clientside

#

with a sanity check serverside so ppl aren't opening doors a mile away

rapid bronze
#

Validation is my nation

#

Be sure in case to know the difference between a Multicast and OnRep if you want states to persist out of Replication Range

chrome mortar
#

If I overlap it, the logic only runs on a server, do I need to specify that the function is local only?

dark edge
#

You can gate by IsLocallyControlled

chrome mortar
#

Legitemetly no idea, the Widget pops up only on server, even if the client overlaps it

dark edge
#

which is what you'd do in the character for showing the UI

#

Show your code

rapid bronze
#

Are you creating the Widget on the Server? :D

dark edge
#

In b4 GetPlayerPawn or GetCharacter(0)

chrome mortar
dark edge
#

Oh well this is the first we heard of you using GAS for this

chrome mortar
#

Well, that's just an effect that gives me the ability to interact with objects

#

Not the widget itself

dark edge
#

Is this a widgetcomponent on the pickup actor?

chrome mortar
#

Yup

rapid bronze
#

Is it like a 3D Widget or?

chrome mortar
#

Just a text for now

dark edge
rapid bronze
#

How do you create pickup widget

dark edge
#

@chrome mortarIs the widget not replicated?

chrome mortar
#

Set it up as DOREPLIFETIME blah blah blah, and in UPROPERTY Replicates as well?

#

Replicated*

dark edge
#

Somehow you should confirm that it exists on clients

#

I haven't done much C++ multiplayer so not 100% sure what that should look like

#

but I see nothing in your code stopping it from becoming visible clientside if it exists

chrome mortar
#

huh

rapid bronze
#

Why is PickupWidget a DOREPLIFETIME

dark edge
#

maybe GE doesnt exist clientside?

chrome mortar
dark edge
#

make your conditional just check PlayerCharacter for now

#

You gotta find out if that If is failing or if the widget doesn't exist or is rendering weird

chrome mortar
#

The widget is fine

#

Setting visibility on begin play shows it on all sides

dark edge
#

K so check your conditions

#

My money is on the GE

chrome mortar
#

The GE works

dark edge
chrome mortar
#

Yup, even shows on which one has claimed the effect

#

in the case above the 2nd client

dark edge
#

OK so does it get past the if statement?

chrome mortar
#

yup

dark edge
#

u know what

#

if server sets it visible does it become visible?

#

or does it never become visible no matter what on client

chrome mortar
#

Doesn't become visible

#

Basically only ever shows on server

#

if client overlaps-> only Server
if server overlaps-> only server

dark edge
#

That's fucking weird

dry pebble
#

does anyone know why restartgame doesn't work with steam(non seamless travel)? but for some people's projects it does and others it doesn't?

fathom aspen
fathom aspen
dry pebble
nimble kayak
#

"oh hey a simple tutorial for setting up a multiplayer game this is going to be easy"
200gb of disk space and 3 days of waiting for visual studio to build stuff later and i have barely started

fathom aspen
fathom aspen
nimble kayak
#

i have an sdd

#

two

#

still on that slow shit

#

valve's source engine 2013 sdk is 1.6 gb...

#

i7 9750h

#

still just chuggin along

dry pebble
#

does anyone know the difference between fix commit, main commit and release commit for the UE5 source code? trying to navigate it

chrome mortar
fathom aspen
#

You don't any multicasts for this

#

OnOverlap -> IsLocallyControlled -> Widget.SetHiddenInGame(false)

chrome mortar
#

Tried that, but it only works for the server

#

If I overlap on the client without "IsLocallyControlled" condition, it does it on the server, and not on the client

#

If I add the Is locally controlled, then it just works on the listen server, and the client doesn't even make it show up on the server

fathom aspen
#

That shouldn't be the case. It's straightforward

#

Overlaps fire on both server and client

#

IsLocallyControlled is needed regardless as you are doing UI stuff

#

You need the local controller

chrome mortar
#

Well, yes, I used it on the RPC

fathom aspen
#

You don't RPC

#

Again overlaps fire on both server and client

#

RPC will help you get from one side to the other

#

But you already got both sides

chrome mortar
#

-Not using rpc, not "IsLocallyControlled"

#

Not using Rpc, Locally controlled

#

Server view

#

The overlap event just doesn¨t seem to fire on the client

#

Just the server

chrome mortar
fathom aspen
#

That might be the case if GE isn't valid on client

#

So it's only firing on server

#

You need to debug

chrome mortar
#

The GE works

fathom aspen
#

Also use SetHiddenInGame not SetVisibilty

chrome mortar
#

The debug string for that given GE is on the top

terse dirge
#

Hey, I am curious: What do you think is the simpler tech to do multiplayer?

#

Should I look at epic services or steam solution?

fathom aspen
terse dirge
#

My game would be whatever prototype is needed to test multiplayer implementation

chrome mortar
fathom aspen
fathom aspen
#

It's just the magic of debugging

terse dirge
#

thanks!

fathom aspen
#

You got the debugging tools not us

chrome mortar
#

I said that you may be right in that I should debug

#

Not that it's the GE's fault

#

Now that I tried it, it was not the GE's fault

#

It's always valid

fathom aspen
#

I would figure out if the client is firing that deep code

#

Where it tells the widget to show

#

It's as easy as making sure the widget is part of the CDO, and that it's hidden by default and that the client is making it not hidden.

#

OR a better approach, make it on runtime only where you need it, i.e., have it created locally.

#

That way you don't bother with visibilty/sethidden type of functions too (well you do on end overlap pepeesorry )

fathom aspen
# chrome mortar

Oh btw (while literally doing something else), I guess the reason for your problem is that the GameplayEffect isn't replicated to simulated proxies, but only autonomous.

#

100% the issue.

#

GAS knowledge definitely helps

#

But you're checking IsLocallyControlled, so that doesn't count 😄

vivid seal
#

in BeginPlay I set a value on the server that is replicated and has an OnRep, but that OnRep does not fire on clients. Is this because the value was set before replicating the actor for the first time?

meager spade
#

if client and server values match

#

the one rep won't get called

#

you can set the property to REPNotify_Always

#

if you need the onrep to call

#

or just set the value on authority only and make sure its different to clients initial

vivid seal
#

thats the weird thing, the client IS a different value

#

in InitializeComponent, I set the value on both server and client to a default value (from the editor), then in BeginPlay the server changes the value depending on another component, but the client doesn't. The client for some reason never updates to this value, until it changes again on the server later.

kindred widget
# terse dirge Should I look at epic services or steam solution?

To be a little more clear on this, Steam vs EOS doesn't really have anything to do with learning multiplayer to a huge degree. You can build an entire multiplayer game and never touch an online subsystem. These are basically for nothing other than connecting people to your game through a platform. Whether you do or don't use them is irrelevant to 95% of your game.

vagrant falcon
#

is there any easy way to make a move to mouse pos for top down game without proxy pawn garbage and also avoid manual movement prediction? (mby somehow use movement component as location and not input direction)

i was trying using simple move to location with executing it on client and server. This was ok till my character comes to destination location but then happens sync from server and correction position leads to client jittering for 0.5s.
then i found this thread
https://forums.unrealengine.com/t/solving-character-moving-sync-in-top-down-template-multiplayer-implementation/472304/2
i tried stop movement manually when reaching destination suggested there but same result

after that i tried adding path following component and some code from ai controller inside of my player controller to be able call move to location that was originally inside of ai controller
but it doesn't help, same issue 😭

any ideas how to solve it ?

vivid seal
#

is InitializeComponent not even called on clients at all? I stuck a log statement in there behind an AutonomousProxy check and it never fires...

chrome bay
#

Should be, it's network independant

#

But it's probably called before replicated properties like Role are read in

#

Mind you, I have this - seems to work okay for me:

{
    Super::InitializeComponent();

    const UWorld* lWorld = GetWorld();
    if (lWorld && lWorld->IsGameWorld())
    {
        if (HasNetworkAuthority() || !GetIsReplicated())
        {
            InitializeSlotsAndInventory();
        }
    }
}```
#

Actually the Authority Role should be ready after AActor::PostSpawnInitialize, so way before this. Not sure if Auto/Sim proxy will be ready at this stage though

stiff ledge
#

And then i Call it on Pawn's Begin play

#

The strange thing is that the Clients that join my session can't see my new avatar (i have a default one if someone doesn't want to change avatar) but i can see their
Then i tried to call this event with a Button Key Pressed event and it works for both clients and me (Server). What i am doing wrong

#

Has anyone any idea?

winged badger
#

just at a glance

#

BeginPlay happens on every instance on every machine

#

while Server RPC will tail and spam your logs with warnings from clients that don't own the Pawn

#

listen server can still execute them

#

on its own instances, for every PlayerPawn in game

#

so you really want local player specific logic tied to BeginPlay or Tick to be behind IsLocallyControlled branch

#

also, if ChildActor refers to an Actor in ChildActorComponent (CAC)

#

you might want to rethink that approach, they are terrible in multiplayer

upbeat basin
#

For this case, I would do the following

  • Setting AvatarURL as RepNotify variable
  • Sending the string to server with an RPC and setting it to the variable on BeginPlay
  • Implementing Notify function to call the Load New Avatar, with a check to prevent it work on the server

This way, any new connecting player should trigger OnNotify function whenever the AvatarURL is replicated from server and it will start loading the Avatar

upbeat basin
winged badger
#

"No owning connection for..."

#

you can't server/client RPC from actors you don't own

#

however, from server a server RPC is just a normal function so server doesn't care

upbeat basin
winged badger
#

that BeginPlay doesn't check if they can send a server RPC or not

#

doesn't check if Pawn is LocallyControlled

upbeat basin
#

Ahhh it's calling the server RPC on pawn

winged badger
#

unless its inside that macro, which i highly doubt

upbeat basin
#

Okay I got it now

stiff ledge
#

@winged badger @upbeat basin Ok i think i understand what you say but it is my first multiplayer attempt and it is a little bit difficult to understand. So i want for each player to add his "Avatar Url" when he is on Lobby Scene and then when he join a session he will have the skin that hi choose. Where i must add this logic?

winged badger
#

BeginPlay is fine

#

but you need a Branch checking IsLocallyControlled

#

otherwise every client will try to run that for every Pawn

#

as well as server

stiff ledge
winged badger
#

well, you can put it earlier

#

probably

#

but yes

#

you don't use it to guard just the RPC call

#

but entire logic that is specific to Local Player only

stiff ledge
#

ok. And then i must do somethink else?

winged badger
#

if you have both logic that runs on local player only and on all player pawns

#

use a sequence, check locally controlled only on one sequence out

stiff ledge
#

So this was ok but i must check if my pawn is IsLocallyControlled before i set up my skin

winged badger
#

maybe

#

first, not everything has IsLocallyControlled function

#

only Pawns do

#

controllers have IsLocalController

#

UI doesn't need to check, nor does the HUD, as they are by default local only

winged badger
#

im sure someone will take over, i don't have time right now for providing blueprint tutorials 😦

stiff ledge
#

You don't say something like that?

#

Ok ok thanks for your time my friend

upbeat basin
#

Like, create a sequence, check if it's server on the first out and do you server setup on that line, check if it's locally controlled on the second one and do your client setup on that line

stiff ledge
#

I just check it and i had the same problem. Server pawn had the "default skin" and client's pawn was the new skin

upbeat basin
#

And you can do a third one to check if it's an autonomous proxy

#

That's probably because the order of connections

upbeat basin
#

If you're the first player, you're alone, you send your URL to server, it multicasts to everyone and you're the everyone

#

If someone else connects after you, they don't receive that multicast because they weren't there when the RPC happened

stiff ledge
upbeat basin
#

Yes

#

Now you have a OnRep_AvatarURL function

#

Do the downloading part in that function

#

And check if it's server to ignore, you don't need to download the image in server

stiff ledge
upbeat basin
#

This one

stiff ledge
#

Ok sorry. I am noob 😇

upbeat basin
#

No worries but be aware that understanding the multiplayer logic without understanding basics might be harder

stiff ledge
#

so i must place this on the OnRep_AvatarURL function?

upbeat basin
#

LoadAvatarServer just needs to set the variable

#

Do you know what rep notify does?

stiff ledge
#

Send the Variables value back on server i think?

upbeat basin
#

It's like multicast, whenever the server sets a variable, the OnRep_ function (if there is) will be called on all server, owning client and other clients

#

So inside that function, you'll have your AvatarURL set and ready to be used

#

You just need to call the load avatar function

stiff ledge
upbeat basin
#

Yup

#

You can add a check to see if it's server or not

#

And don't go forward if it's server

#

I believe you're going to download a texture to display so server doesn't need that, only clients do

stiff ledge
#

So i must call this Event on my OnRep_AvatarURL and check if pawn is server

upbeat basin
#

No you can delete that event all together

#

OnRep_AvatarURL is equivalent to that

#

But it will be called every time the AvatarURL is set

#

The event would be called only when you called the LoadAvatarServer

#

That was causing the issue, according to my understanding

stiff ledge
#

So i must call this instead?

upbeat basin
#

The event wasn't being fired on the late joiners because it was already past

#

But late joiners will get the value of AvatarURL from server since it's replicated. And when they to, they'll still run the OnRep function as well

upbeat basin
upbeat basin
#

OnRep function will be called when this node is executed

stiff ledge
#

So i need only this

upbeat basin
#

Exactly

stiff ledge
#

Perfect

#

So its ready for test?

#

Do you have any Documentation or Tutorial for this? And really thanks for your time and effort

upbeat basin
#

For tutorial I would recommend going through the pinned messages

stiff ledge
#

Can i share my screen with you?

#

So let's wrap it up to check if i miss something i have this to load the new Avatar.

#

and on my OnRep_AvatarURL i have this

#

And the on Beginplay i have this. I have already set my Avatar Url value to check that it works. and my coworker has exactly the same but with another value on the Avatar Url Variable

mossy zealot
#

Hey, for an object I've spawned on the server, what's the best way to destroy that from a player?

No owning connection for actor X. Function Server_Destroy will not be processed.

upbeat basin
terse dirge
upbeat basin
#

You can create a server RPC to call from client, but Destroy should happen in server

long snow
#

In networked player movement, is there anyway to get a player's actual speed(predicted speed) since there can be differences between client and server.

stiff ledge
upbeat basin
#

But isn't it the same blueprint?

#

If you run this with 2 clients, both clients will send that link to server

stiff ledge
#

To the Players pawn yes

upbeat basin
#

Try with a few different links and randomization

#

It still will be same sometimes but at least there will be variety as well

stiff ledge
#

The strange think is that it doesn't seem that it run at least for the Server Pawn but if i do this

#

it seems that it runs

#

So maybe i must add the branch to false?

upbeat basin
#

Hmm that shouldn't be the case

#

What doesn't seem to run when it's going through True for that check?

stiff ledge
#

I really can't understand

stiff ledge
upbeat basin
stiff ledge
#

I need to make it for the users to be able to choose their custom avatar, so make some default avatars for them is not a choice

upbeat basin
#

You might need a widget to set it from the screen while playing the game, instead of hardcoding it

stiff ledge
stiff ledge
# upbeat basin I don't think I get what the current issue is

So i start it from the beginning and test it again. A coworker of mine created a session and then i tried to join it. But both of us had the default Skins and not the skins that we choose. But this message was print for both of us. With "True" value for Him (as server) and false for Me (Client)

stiff ledge
#

@upbeat basin on my app the User that create a session is server to that session. So if he exit the session he destroy it. I said that because maybe it is Relevant to my issue

stiff ledge
formal solar
#

hi guys how come server client delay so much worse on standalone than pie mode

chrome bay
#

Because in PIE the latency is one frame if you aren't testing with network emulation

#

in standalone, there is an actual connection

unborn nimbus
#

Trying to make replication graph improvements where we have a section of the map that is "separate" from the rest of the map. If you are in the special area, you should only be relevant to actors within that special area. I created a UReplicationGraphNode_SpecialAreaAlwaysRelevant but I'm guessing because the player's net cull distance is large, it's not having the desired effect.

crisp wraith
#

Null identity system generates random unique net id upon login, is there a way I can provide identity via launch param, so I can get consistent IDs for tests?

chrome bay
#

Could try the StableNullID command line param

#

Check what FOnlineIdentityNull::Login::GenerateRandomUserId does

crisp wraith
#

just setting up the stable null id, I guess sequential ids are going to be fine for quick tests than FGuid::New()
thanks

bleak monolith
#

Anyone try playing with multiplayer servers with 5.1 yet? Having problems with the input mapping contexts and not sure if it is just me or if imc's are too early in development to properly work with replication yet.

eternal lake
bleak monolith
#

Seems odd they would deprecate input mappings and replace it with something that is only instace side.

eternal lake
bleak monolith
#

But its all experimental but it seems by the deprecated notice.

#

LOL Ok that makes sense... Guess I have some figuring out to do... It was just easy and simple the old way..

eternal lake
thin stratus
#

Sadly easy and simple meant that it was not able to do much

eternal lake
thin stratus
#

But as Natalo says, none of this has anything to do with multiplayer

bleak monolith
#

Yeah even the thrid person template is broken the second to put it into multiplayer... I'll just have to dig into the system and figure it out

thin stratus
#

Strange. Maybe cause it's still preview

#

Would not use it for production

bleak monolith
#

Just playing around

thin stratus
#

We have it integrated into our project without any issues so far

#

Not sure what's up with the examples then

eternal lake
#

See if Lyra works for UE 5.1 - That's Epic's gold standard now

bleak monolith
#

I think its the parent class they have it in... Where are you implimenting the IMC's?

thin stratus
#

Eh no clue atm. Think I have it in some Character dataasset

bleak monolith
#

OK thanks... I will go back to playing around with it

scenic dome
#

Hey guys, I'm coming over from Unity where I already made a multiplayer network (P2P) with a steam API running with C#. A friend told me to try unreal engine tho so I installed it. Now I wanted to try making multiplayer with epic games API but I can't seem to find any good tutorials for it. Anyone here who can help me set it of?

#

Never worked with the bleuprints system either, I did find some documentation for multiplayer but I find it a bit; not user-friendly

chrome bay
#

If you don't know Blueprint yet, Multiplayer is a bad place to start

eternal lake
pale obsidian
#

pinned messages has some good stuff too, like Alex Forsythe's video

scenic dome
#

thanks, think I also find a nice one here, which go's over it togheter with the viewer

#

Unreal Engine 5 Epic Online Services - Set Up EOS for Your Multiplayer Game

Set up Epic Online Services for your multiplayer game!

Epic Online Services Dev Portal:
https://dev.epicgames.com

EOS Documentation:
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Online/EOS/

Multiplayer Plugin:
https://github.com/DruidMech/Multipla...

▶ Play video
formal solar
#

do I need to call set control rotation on the server?

#

I thought character movement component auto handled replication

#

but in this instance it seems not to be working

unborn nimbus
sharp hound
#

Hi everyone. I don't know if I should post in multiplayer or vr-ar. I have a Pico headset with two controllers...The issue is that when I move the body the controllers are delayed if compared to the main character...Did anyone encounter this problem before? thanks.

uncut schooner
#

I have an unreal engine 5 game . I need peer to peer worldwide working in the game so that anyone across steam can join a locally hosted server

#

I have already gotten connection on steam but only if their download region is the same as the oter person

#

How do i get worldwide search results to show up

#

I heard its somethng to do with port forwarding but I am not sure how toproceed

eternal pumice
#

Hey guys, I wanted to ask if lets say I have two player characters in my and the first player character wants to get some data from the second player character, what would be the most efficient way to do it?

fathom aspen
dark edge
#

If it was something without gameplay effects, like a WoW-style inspect, you could do it all clientside.

#

Input -> InspectCharacter(CharacterYouWannaInspect)

#

If it had gameplay effects, like a WoW-style Duel

#

Input -> RequestDuel(CharacterYouWannaDuel) -> ServerRPC_RequestDuel(CharacterYouWannaDuel)

fathom aspen
#

Is TODMClass a soft ref?

#

Are you sure you are loading it for the client?

#

So how are you spawning that actor? On BeginPlay server-side and replicating it? Or no replication and on both sides?

#

I think the reason for that is you are loading that class server-side but the client has no idea it exists

#

That might be the engine trying to do it for you which I still highly doubt

#

I would wager if that class was hard reffed in the CDO you would have no issues

#

Where are you calling StaticLoadClass? A bit before you spawn the actor server-side?

valid talon
#

I hope this is the right place. I am trying to set up the Unreal engine server SDK plugin from Gamelife; however, I get a "CMake Error: Could not create named generator Visual Studio 16 2019 Win64"
I have tried with both VS 19 and VS 22 with no success. Any thoughts?

uneven kraken
#

I've got a replicating Actor with two replicated variables on it. If I synchronously change the values of both of these variables on the server, are clients guaranteed to receive the updated values of both of the variables in the same network update?

jolly siren
#

No

#

If you want that pack them in a struct or send them via an rpc

#

@uneven kraken ^

uneven kraken
fathom aspen
#

And make sure the struct is atomic

#

i.e. implement NetSerialize for it

jolly siren
#

np ☺️

short arrow
#
{
    if (HasAuthority())
    {
        if (IsPlayerControlled())
        {
            if (GetController() != nullptr)
            {
                FRotator LocalRotation = GetController()->GetControlRotation();
                ReplicatedPitch = LocalRotation.Pitch;    
                ServerPitchUpdated();
            }
        }

    }
}

void AMyCharacter::ServerPitchUpdated_Implementation()
{
    MCPitchUpdated(ReplicatedPitch);
}

Clients are not receiving the updated pitch? is this a cpp issue? 🤔

fathom aspen
#

FWIW there is RemoteViewPitch you can use

short arrow
#

The server receives the correct pitch input but the clients only receive 0.0

dry pebble
#

So if anyone's curious, the bug where a client wouldn't be able to "non seamless travel" via steam is now fixed in 5.1 I tested it today and the client moved through :) No more annoying broken widgets!

https://issues.unrealengine.com/issue/UE-151220

Unreal Engine

Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

fathom aspen
fathom aspen
valid talon
#

I hope this is the right place. I am trying to set up the Unreal engine server SDK plugin from Gamelife; however, I get a "CMake Error: Could not create named generator Visual Studio 16 2019 Win64"
I have tried with both VS 19 and VS 22 with no success. Any thoughts?

thin relic
#

A small question of noob. I want to create component I can add to any static mesh actor in my level. And i did. But if I'm trying call RPC event in this component (server event) from my character it doesn't work. Why? Component is marked as replicated

kindred widget
kindred widget
short arrow
#

I was just going to get RemoteViewPitch

#

I don't have the editor open

thin relic
kindred widget
kindred widget
stuck gorge
#

Hi, I need to override replication on variable USceneComponent::bVisible, I tried DOREPLIFETIME_ACTIVE_OVERRIDE( USceneComponent, bVisible, false );
But it under private and cannot be modified. How Can I override it? Or maybe there exists other ways to turn off replication only on this variable?

kindred widget
stuck gorge
thin relic
kindred widget
stuck gorge
#

=))

#

Thanks =)

kindred widget
kindred widget
# stuck gorge Hmmm. Why not?

Because visibility is replicated and to everyone. If you want only some players to see it, then you can just have them locally set HiddenInGame which is not networked but still affects their rendering of the object. You get the same result by leaving the object visible and changing hidden in game as if you stop visibility from replicating to set that locally.

stuck gorge
#

I am blind man.

#

So this is my way =)

short arrow
#

Is there any way to reduce the replication cost of CMC?

#

within 10 minutes ReplicatedMovement sent over 800k bytes across just 2 players

chrome bay
#

800 Kilobytes in 10 minutes?

#

That's pretty good if you ask me

short arrow
#

oh fuck

#

so there's not really much I can do to make it lower then huh?

chrome bay
#

well you can lower the net update frequency to something like 30, but you should expect to spend the vast majority of your bandwidth on moving actors

short arrow
#

ah the game is too competitive to possibly see the opponent teleport slightly

#

I guess I could have expected this

#

well I appreciate the response 😄

chrome bay
#

We're a competitive game and the server only runs at 20 ticks, you can get away with a lot

#

But 0.8 MB in 10 minutes is a good deal if you ask me 😄

short arrow
#

so your game's update frequency is 30?

#

maybe I should just test it out and see how it feels under load

ionic coral
#

for the love of god

#

this has been pissing me off

#

for years

#

and i give up

#

please PLEASE someone have a solution for this

#

basically

#

client side jittery af

#

that is it

#

i tried wacky bandwidth solutions

#

nothing

#

i tried seeing if it is something to due with events ticks

#

nope

#

i tried some weird fps type smoothing stuff

#

also no

#

i have NO idea what tf i have to do

#

i started a blank project and then just did play listen server with host and client

#

and bam there is the jitter

#

i thought it was my computer but i built the game and moved it to another computer and the jitter was still there

#

it isnt my wifi because the problem occurs at my friends houses

chrome bay
thin relic
# kindred widget It would work. But it's really terrible practice. For example if you have two th...

Thank you for answer! Does it mean my conception with adding component to actor in the level is bad way for multiplayer game? 1. I can't SetReplicates = true for component owner (Static mesh actor), i tried. Without it any property in this component can't be replicated 2. and I also can't call RPC event without owner All things that I can do It is use this component as info container (server only) then I be able to get/set this info from my character for replication to other players

ionic coral
short arrow
chrome bay
#

Inherently yes

short arrow
#

like if I set the netupdate frequency to 100 but the server tickrate is 20, then it'd only update 20 times?

chrome bay
#

yeah

#

100 would be the maximum possible per second

#

But if server is ticking at 20, it won't be anymore than 20 for everything

short arrow
#

I see, so what's the point of updating 30 times a tick? How is that necessary (speaking in general)

chrome bay
#

Because most servers aren't running at 20

#

Especially a listen server, which is running at whatever FPS the user runs the game at

short arrow
#

No I mean like why would anything need to update more then once per tick

chrome bay
#

It wouldn't

short arrow
#

so why have the max frequency more than one o.e

chrome bay
#

But if your server is running at 100 ticks - you don't want every actor also updating at 100 ticks

#

It's a per-actor limiter

#

Net Update Frequency is the maximum rate that actor will be checked at

ionic coral
formal solar
#

@ionic coral how? Plus what kind of game are you making?

#

And guys, is it reasonable to assume the kind of ping I am getting in windowed mode (4 screens plus editor open in background) is an accurate representation of ping in my packaged game? My fps is actually quite good but the ping is bad

river zephyr
#

How can i reduce memory usage of a dedicated server?

latent heart
#

Make sure you don't hard link to assets.

thin stratus
#

Does something like this trigger an OnRep?

void ASomeActor::SomeFunction(int32 Index, const FVector& SomeRandomVector)
{
  SomeOnRepArray[Index].SomeVector = SomeRandomVector;
}
#

Cause iirc, at least in BPs, it doesn't.

#

Given that SomeVector and SomeRandomVector have different values

scenic dome
#

Hey guys, I followed a tutorial online about multiplayer setup with epic games API. Everything seemed to work quite well but when I press host once, nothing happens (a little change/movement in the screen is noticable) When I press host a second time I get an error

#

I followed this guys tutorial

#

Unreal Engine 5 Epic Online Services - Set Up EOS for Your Multiplayer Game

Set up Epic Online Services for your multiplayer game!

Epic Online Services Dev Portal:
https://dev.epicgames.com

EOS Documentation:
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Online/EOS/

Multiplayer Plugin:
https://github.com/DruidMech/Multipla...

▶ Play video
dry pebble
# scenic dome

did you include the list of maps in project settings before packaging it?

scenic dome
#

I think I just pressed build, so i'll take a look at that

dry pebble
#

and you need an encryption key even though the video doesn't say

#

from someone in the comments: "in the encryption key try putting 64 zeros or create an encryption key with 64 char"

scenic dome
#

So you can make up your own encryption key, just needs to be 64 char. long?

dry pebble
scenic dome
#

oh then I might know what you mean, it's probably on the developer portel from epic services

dry pebble
#

Someone in another discord said "Stephen's EOS implementation won't work unless I set the encryption key and login to epic games, it will just default to Null OSS which use LAN"

scenic dome
uncut schooner
#

Hi, I need peer to peer worldwide working in the game so that anyone across steam can join a locally hosted server
I have already gotten connection on steam but only if their download region is the same as the oter person
How do i get worldwide search results to show up
I heard its somethng to do with port forwarding but I am not sure how toproceed

fathom aspen
low helm
#

Alright super sleuths here's a weird one. In my open world map, my draw thread is going crazy and the problem goes away if I cause my Loot not to spawn. But this makes no sense. To visualize the problem, I set the weapon scale to 25 (you can see one gun on the left of the screen) to prove that all the rest of the guns in the city are net culled.

How can net culled objects be making my Draw thread go crazy?

#

(Playing on client)

#

(Confirmed loot spawns on server only)

low helm
#

Solved - it was showing as Draw thread but it was actually the server ticking all the skeletal meshes...

fathom aspen
#

#profiling might be able to provide you with further optimizations

#

LODs is something that comes to mind (but that's a client optimization I guess)

static sable
#

hi, what are the best practices to sync actors' location/rotation over the network? I would like to to avoid "movement replication" as it is very laggy, or am I not using it correctly? In my demo solution, I calculate everything on both server and client and server occasionally updates client with right rotation and location, but it's far from ideal experience as from time to time actors get teleported around

low helm
# static sable hi, what are the best practices to sync actors' location/rotation over the netwo...

Networked movement has alot of moving parts to it. Traditionally an authority (the server if you're worried about cheating) sets where the object actually is, the client runs its own movement code so the player can feel immediate responsiveness, and the difference between those two is made up with a combination of systems (Interpolation, Extrapolation, and in the case of extreme disagreements, some system to snap the client's version back into place)

#

Interpolation means smoothly transitioning from where the object is on client to where it should be (as opposed to immediately teleporting all the way to each update from the server)

#

Extrapolation aims to account for how interpolating objects will always be behind where they should be by moving them forwards a bit, but this causes a small corrective backwards jolt if the actor stops.

#

Anyway, for the simplest setup, I recommend you have the authority move the actor around, and then just get the Smooth Sync plugin for free and it does all the interpolation, extrapolation, and corrective snapping for you

low helm
#

So clients use interpolation ot smooth that out

static sable
#

@low helm thanks, which one is more preferred? a) "movement replication" alongside "Smooth Sync plugin" or b) to calculate movement on both server and client and then use "Smooth Sync plugin"

short arrow
#

is there any good documentation, video, udemy course, anything out there someone can recommend about replication graph

#

I watched the entire unreal engine stream about it and only learned what it does, but seemed like no documentation really tells you how to set it up and actually use it

fathom aspen
#

The next best thing you can do is check ShooterGame, it has it implemented

#

iirc Lyra has one but it's pretty basic

short arrow
#

I just downloaded it, but I can't even find which actor uses it, I opened up the playercharacter cpp and didn't see anything that mentioned it

#

then I did a search in the files and found like 100's of classes... so overwhelming

fathom aspen
#

The ReplicationGraph is an object by itself. It creates nodes that end up being lists that are relevant for connections

#

Nothing to do with actor framework classes

short arrow
#

so I have to go into the replicationgraph files myself, and create those nodes and assign them to the classes that I want?

twin juniper
short arrow
#

Is replication graph even worth using

fathom aspen
#

And add actors to these nodes. Think of the RG as a better managed relevancy system

twin juniper
#

Or they added it rly recently to Lyra but I’m 100% sure that no

fathom aspen
twin juniper
#

Lyra has no needs of it

#

Weapons are not actors etc

#

Maybe for pawns, ai etc but yeah

#

ShooterGame already has a up-to-date example

#

repgraph didn’t change since

twin juniper
fathom aspen
# short arrow Is replication graph even worth using

It depends. Honestly it's really intriguing to use it, but your game can perform really well without, but again it depends. Originally it was made for Fortnite, as it has 100 connections and ten thousands of actors...

twin juniper
twin juniper
#

Oh you’re doing Fortnite 2

twin juniper
short arrow
#

no but it's a survival game with an over ambitious goal of 100 players

#

and base building

twin juniper
#

Yeah that’s another way to not say Fortnite

fathom aspen
#

Then I would use the RG no brainer

twin juniper
#

Do you have any xp with UE and MP at all before start working on Fortnite 2 or whatever you want to call it ?

short arrow
#

yes lol

twin juniper
#

But you don’t know how to subclass a class.. ?

short arrow
#

Currently we can do up to like 32 players before it becomes an issue

#

so recently I've been getting deep into c++ to use all of these tools for performance otpimization

twin juniper
#

Ah you’re doing Fortnite 2 in full BP ?

short arrow
#

I am slowly moving the problematic blueprints over to c++

twin juniper
#

It will not improve anything actually 😄

fathom aspen
#

It will end up being the whole blueprints

twin juniper
#

And getting the same result

short arrow
#

well I had a big bug with netdormancy bug in blueprints, switching it over to c++ increased performance by 10 folds

twin juniper
#

😄

short arrow
#

so I guess I have no choice but to figure out replication graph ruined

#

but yes most of the game was built on blueprints

#

very sad

twin juniper
fathom aspen
#

It's not just the performance, but that you are literally limited in BP. Literally little to no tools there

twin juniper
#

I guess there is a few comments in the source files tho

twin juniper
short arrow
#

uh

twin juniper
#

Or it’s another battle royale template

short arrow
#

the survival aspects uses survival game kit

#

if anything this is rust 2

twin juniper
short arrow
#

the problem I'm dealing with is resources scattered across the map (which I fixed with net dormancy) and the bases players make

#

there's big bases all over the map that are currently checking net relevency

#

and possibly replicating things they don't need to, to players they don't need to

twin juniper
#

There is a lot of stuff to actually optimize your game

short arrow
#

Can't level stream because you need to see bases from far away

#

I need to be able to see them without receiving replication checks for them

twin juniper
#

Fortnite uses it without any issue with players builds

#

But they might not use it on this

#

Only on POIs

short arrow
#

well yes and no, in fortnite there's lots of mountains and stuff, I'm pretty sure I've seen builds appear from thin air, as I got closer

twin juniper
#

Which make sense

twin juniper
#

But like far far far away

short arrow
#

ah true

twin juniper
#

I don’t know if there is any dev working on a large player scale game out here

#

So they can maybe help you on your stuff

short arrow
#

Jambax lol, but he appears to not be on, but I am honestly only capable of one thing at a time

fathom aspen
#

James does

twin juniper
#

Jambax works on HLL which is kind of a biiig game

short arrow
#

from the way you guys put it, sounds like replication graph is the most important as of now

twin juniper
#

You can wait for an answer from him if he see your msg

short arrow
#

you guys already gave good answers though

#

I don't really see how level streaming helps with network tthough

twin juniper
#

Maintaining a lot of players take a lot of things in count

short arrow
#

one step at a time, lol

#

a week ago I had 15 players with 7 server fps

#

now it's 32 players with 30 fps

twin juniper
#

But I will be honest if you’re doing a 100 players game

#

You should do like 90% of the core in cpp

#

You will be limited by BP very quickly in terms of optimisation

#

Things like push model etc, handling things well with a lot of overrideable function BP hasn’t

#

Etc etc etc etc

short arrow
#

when your lead programmer is a game designer who fights to keep everything in blueprint oh_you

#

he's pretty good though no shade

short arrow
#

Also isn't push model already inplemented in UE4 from what I can tell properties that don't change aren't being sent over. I found this out using the profiler

twin juniper
#

Never seen a lead programmer forcing people to make a 100 players based game fully in blueprint

twin juniper
#

There is a few example on how it is used in PlayerState.cpp

#

But yeah it’s available in BP with a few tricks

#

But again you will be limited in the future

#

If it’s not by that it will be for another thing

fathom aspen
twin juniper
#

Don’t try to bypass the fact that you need to make your game in cpp

#

You will just end up wasting time

twin juniper
fathom aspen
#

xD

short arrow
#

we have over 10k members in our discord

#

kek

#

dying to play

fathom aspen
#

I see

#

But I'm wondering how a solo dev tests that

twin juniper
#

Remind me of a game like that

short arrow
twin juniper
#

ANAREA harold

#

And then yeah it failed in a week

short arrow
twin juniper
fathom aspen
#

Because a while ago, a peep here was testing the FastShared path and he got to the point where he has 80 players. Pretty sure he did it on his own

#

But I'm wondering does the PC burn at that point?

twin juniper
#

But that’s not the issue ton maintain a large project like that

#

You need competent people

short arrow
#

well it's different tbh, If I host on my pc I can have up to 60 players before the server hits 30 fps... But dedicated servers don't really work that way

fathom aspen
twin juniper
#

Or make an arena shooter then

short arrow
#

I get to use my entire cpu

#

dedicated servers won't give you that much power amirite

fathom aspen
#

But it was a cool experience tbh

twin juniper
short arrow
#

like payed once

twin juniper
#

I told them to not release that

fathom aspen
twin juniper
#

Idk

#

It was 2y ago

#

I just remember the racist moderators and staff that was insulting everyone

short arrow
#

lmao what

twin juniper
#

And then they got exposed and yeah

twin juniper
fathom aspen
twin juniper
short arrow
#

Luckily, we've got our heads screwed on pretty tight. I don't think we'll have that issue

twin juniper
#

Short story of the game tho

fathom aspen
twin juniper
#

Core things in cpp

#

Exposing things for designers in BP

#

Things they can customise etc but not the core logic

#

This is not the job of a designer to modify or access those things

fathom aspen
#

Are you working on a scripting API?

twin juniper
#

And then scammed everyone

fathom aspen
twin juniper
#

I’m using GAS

#

I was developing my own project, but got a few stop because I’m not an animator nor a vfx/sfx artist

#

Lyra released

short arrow
#

shootergame replication graph is like 5 minutes of scrolling

twin juniper
#

And then I merged my project into it

short arrow
#

wtf

#

I'm going to get a job at walmart this is bs

twin juniper
#

I ditched 70% of Lyra, only kept UI, Experiences, animations and meshes

short arrow
#

there is no way this stuff isn't overdesigned

fathom aspen
twin juniper
#

I should make a few playtest soon (gunplay is like H1Z1/ANAREA but I’m not planning to scam anyone I promise)

short arrow
#

1.5??? ours ias currently 5 years in development lol

twin juniper
#

Like they made a first trailer with a prototype

#

Then remade the game from scratch

fathom aspen
twin juniper
#

I did more than ANAREA in like 1 year soon

fathom aspen
#

I'm feeling insulted rn kek

twin juniper
#

On it I mean

fathom aspen
#

I was

#

Not that good, you can check my messages in this server from 2019

short arrow
#

Alright well I give up, I think I'm just going to set all of the base actors to dormant and only set them to awake when someone damages it, and then set it back to dormant when they heal up. I'm not dealing with RG it's too complicated

twin juniper
#

I remember them saying programmers never wrote a single line of code and they recruited a freelance

short arrow
#

thanks guys for the help

fathom aspen
#

Quality content lol

twin juniper
#
  • the development reboot
fathom aspen
twin juniper
#

And the community behind waiting for just a single screenshot

fathom aspen
#

But I will keep pushing you towards learning it. I have it on the shelf too

fathom aspen
fathom aspen
#

We were like 3 programmers

twin juniper
#

I don’t even know where they ended up

#

They never said goodbye or anything

fathom aspen
#

One made almost everything

twin juniper
fathom aspen
#

Yes

#

Wolflow

twin juniper
#

Yeah I « know » him

fathom aspen
#

He's a good dev

twin juniper
#

Talked a bit with him on UE France discord

#

But for my game ill be honest GAS boosted my development speed by 50% 😛

fathom aspen
twin juniper
#

At the beginning I took a few of ShooterGame things and then ended up remaking it from scratch with GAS

fathom aspen
#

But again the head staff could have said no and that's it

twin juniper
#

Thats why I’m making it

#

Not a BR tho but the core mechanics are there

fathom aspen
short arrow
#

Okay so I have an idea. Players must have a banner before they can build, and anything they build is automatically owned by the banner.
What if I set the buildparts to netdormancy: initial and never touch them again, but the banner has like one big struct array containing all of the information of buildparts.. and then I enable that thing in the editor that allows you to only replicate one part of a struct? voxelthinking

fathom aspen
twin juniper
twin juniper
#

I can do so much things easily right now I’m really glad to have learned it

#

Code is clean, easy to understand for designers in BP

#

Kaos helped me on a lot of thing tho I have to credit him for a lot of stuff 😄

fathom aspen
#

Yeah he used to be a regular in #gas (I guess he still is), but most of his server messages is in that channel

twin juniper
fathom aspen
#

A real blessing for the community

twin juniper
#

Modifications that need replication*

#

I’m setting my pickups actor on dormancy when they end replicating stuff

short arrow
#

I mean do you guys think it'd be feasible to have a big replicated struct that only checks, and updates one section inside of it when necessary? I'm pretty sure that's possible right? Because that would mean only the banner is checked for relevency, and not all 10,000 base parts

twin juniper
twin juniper
fathom aspen
short arrow
#

so then I'm on to something?

fathom aspen
#

You are. That will save you some good cpu cycles

short arrow
#

I read up on the network manager, but lead programmer is scared of c++

twin juniper
#

But don’t forget what I said about cpp

short arrow
#

so I guess this is next best thing

short arrow
#

I'm gonna get fired talking so much shit ahhahaha. Lead programmer if you happen to read this. I'M KIDDING

twin juniper
#

Lead programmer is scared of programming

twin juniper
short arrow
#

In all seriousness though, and I cannot stress this enough. We wouldn't be where we are without him

#

he's BP god

fathom aspen
#

That's where net managers really shine

twin juniper
fathom aspen
#

You replicate actors without really replicating them 😛

short arrow
short arrow
twin juniper
short arrow
#

cpu is getting ripped apart by all the replication relevency stuff

short arrow
fathom aspen
#

Dynamic ones involve a bit more work

short arrow
#

he knows BP is limited, but I think he just doesn't see it as a priority yet, which is fair

twin juniper
#

This just makes no sense tbh

short arrow
twin juniper
#

It’s not something that takes 1 day

short arrow
#

Our game is only possible right now through the backers

fathom aspen
#

Static doesn't mean they can't move in this context 😄
It means they are loaded from package/disk, i.e. they are assigned static net guids

short arrow
#

we all eating noodles for dinner.

twin juniper
short arrow
#

He doesn't consider himself a programmer, that's what's blocking him. So I'm the one learning it

twin juniper
#

😐

short arrow
#

and implementing it, but we bud heads on what should and shouldn't be in c++ currently

twin juniper
#

Just put the core in cpp and things for designers in BP

#

So they have separate stuff for them

#

You should anyway have a documentation for your employees so they know what class is related to what, what it does in BP etccc

#

So designers don’t have to go ask programmers what is this thing for every time cause he doesn’t know cpp

#

I don’t know how is your workflow but this seems very very blurry atm, you need to work with the fact that other people can join you later and will need to understand your code base etc

#

You can’t put a what you want in cpp to just optimize things and the whole game in BP this is not organised at all in my opinion and again you will be limited very very quickly

#

If it’s not now or in one week the day will happens and you will have the difficult decision to remake everything in cpp and optimize all of it

fathom aspen
twin juniper
#

But again I’m speaking for your case, a 100 players game needs to be well structured, lot of players means it will requires a lot of devs in the future to handle all infrastructures people need to be able to work efficiently

fathom aspen
#

Wondering on what game are we talking

twin juniper
#

Rust 2

short arrow
twin juniper
#

Or just say to players « sorry it’s the fault of our non-programmer lead programmer, we can’t develop the game anymore, you paid but it’s not our fault »

#

I’m not saying that to be toxic or so but I’m trying to face you to the reality atm

short arrow
twin juniper
#

That’s what happened with ANAREA, head staff just throw the fault on devs and then on moderators and then on players

#

And then left

fathom aspen
short arrow
twin juniper
#

That’s sad even more if you really put 5 years of development in it, trust me you don’t wanna throw everything in the trash one day because your lead programmer doesn’t know c++ and forcing you to make everything in BP

#

It would have been fine for an arena shooter

#

But not for a game that needs to handle hundred of players

#

Otherwise PUBG, Fortnite, ARK etc would have been made in BP

#

But yeah if you’re no one in the project and just a programmer then just do the work asked I guess 🤷‍♂️

#

But I hope I could get a talk with your lead programmer i really wanna hear his opinion on all of that 😛

short arrow
#

But the lead isn't a bad guy, I don't want him to have a negative name if you did ever talk to him. But it's possible with his methods it won't be possible to reach 100 players I agree

twin juniper
#

Would just be a W for everyone 😄

short arrow
#

Actually he flat out refuses to use GAS for our project kek

#

I'm starting to feel guilty though like I'm talking behind his back though so I'm gonna stop. I have more respect for him then that. But I really appreciate the concerns and suggestions!

twin juniper
#

But he can learn those things in its free time again

low helm
#

performance savings from GAS are negligible

#

and much of Fortnite is "built in BP", C++ runs the heavier systems

twin juniper
#

All abilities are in bp yeah

#

But the core is in cpp

#

As every large players scale game should