#multiplayer

1 messages ยท Page 180 of 1

dark edge
#

Git, Plastic, Perforce, pick one

odd hamlet
#

I know about github

dark edge
#

I like Plastic

odd hamlet
#

but the files are to big

#

for it

dark edge
#

how big are the actual files that matter?

odd hamlet
#

idk

#

tbh Idk the files that matter

dark edge
#

all the ones I didnt tell you to try deleting

#

config, content, source, the uproject

#

content is the only one with any size to it

languid finch
#

files that matter:

Build 
Config
Content
Plugins (if you use plugins)
Source (if C++ files are present)
*.UPROJECT file```
odd hamlet
#

well anyway, I am fucked for tonight

#

I love my lifee so fucking much

fossil veldt
dark edge
fossil veldt
#

It's fuckin NOT lmao

dark edge
#

and less of a PITA than Perforce

#

IDK, my stuff syncs up in like a suspiciously low amount of time compared to Git or Perforce

fossil veldt
#

You literally have to break up your checkins into tiny bits and do them in specific order

#

or it shits it's pants

#

I hate plastic so god damn much ahahah

#

it is so close to being amazing

dark edge
#

How big of a checkin?

fossil veldt
#

yet so far away

languid finch
#

perforce ftw ๐Ÿ˜„

dark edge
#

I don't do anything above like a few gigs, I don't just slap megascans in a template and call it a starting point

fossil veldt
#

especially on directory moves

fossil veldt
#

perforce can be a pile of shit too but it's the least pile of shit out of all the source controls

#

I have genuinely no idea how anybody gets any work done without multiple changelists

languid finch
#

it was a pita to set up, but everything beyond that has been smooth sailing for me.

dark edge
fossil veldt
#

you start getting errors if you don't do it in the order it likes

dark edge
#

what order?

fossil veldt
#

It's smthn stupid like it likes removes first, then changes, then adds

dark edge
#

oh yeah maybe that

#

I know it shits its pants on moves or renames sometimes

fossil veldt
#

because their checkin code doesn't do the logical thing and just process it in that order

fossil veldt
dark edge
#

testing with 850 new files 350 megs or so

fossil veldt
#

and when you are doing really really big changes, like 1000-2000+ operations at once the automatic reconcile often just ends up getting stuck hardlocking the GUI

#

drives me insane

#

It's an issue more with existing files than new ones

languid finch
#

hey at least it actually still works unlike svn which has been broken since 5.4 preview xD

fossil veldt
#

lol rly

languid finch
#

yeh

dark edge
#

IDK, other than the odd move detection problem it's been absolutely butter smooth for me

#

I just do my work, hit checkin, done

fossil veldt
#

maybe I just got unlucky

#

it happens to me a lot

languid finch
#

tbf i've done some weird shit in some of my test projects and while following tutorials and stuff, and i feel like perforce just kinda... takes it and keeps going XD worst that happens is you mess up your own files, and if so you just roll back and do it again.

fossil veldt
#

the only thing about perforce is the stock reconcile is unusable

#

it's so bad

#

but u can just not use it and then ur fine

languid finch
#

how so? i havent experienced anything weird with it.

fossil veldt
#

it's slow as shit

languid finch
#

oh that... yeahhhhh

fossil veldt
#

I use Zebs one

#

works sick

dark edge
#

plus the self hosting is def. dangerous for me

fossil veldt
languid finch
languid finch
dark edge
fossil veldt
#

1.2 seconds

#

gg

dark edge
#

It was fine, and what I'd use if I had money and a real team

languid finch
#

i dont know any linux, i run it downstairs on an old second hand dell poweredge running windows.

fossil veldt
#

im running away before blue man kills me for going off topic

languid finch
#

use tailscale for networking so u dont have to do port forwarding shenanigans or expose your network more than necessary. ez days

dark edge
#

@fossil veldtYou doing a networked factory game?

languid finch
dark edge
#

Whats your approach to keeping things in sync when the data flying around is far beyond just being replicated?

fossil veldt
#

just don't rep it

dark edge
#

Just RPCs for looking in inventories etc?

#

and replicated end results like something changing state or popping out on the ground?

fossil veldt
#

I use replicated TArray with dyn rep condition

dark edge
#

How would you approach what I'm working on? It's very similar to a factory game except its fully continuous and not discrete. Power/signal networks.

fossil veldt
#

My logic runs on counters and is built so you can accumulate it at once

#

so if stuff goes off screen you just stop running it, when you run into frame it calculates it all at once

#

then you get the rep

fossil veldt
dark edge
#

1D physics sim with power, drivetrain, signal networks

fossil veldt
#

What needs replicating

#

which states must be synced

#

as in which things break the gameplay experience if both players don't see exactly the same thing

dark edge
#

I want the gameplay-relevent and cosmetic end results to be consistent. Take a vehicle for example.
Movement of the vehicle would be server authoritative
Cosmetics of the vehicle (tire spin, sounds) would be local, driven by the sim

#

the sim runs everywhere

#

But a problem I'm running into is there's parts of the sim that are not 100% predictable but do have gameplay relevent consequences

fossil veldt
#

How many vehicles are there

dark edge
#

5-10 vehicles with up to 100 parts each

#

way too much to replicate it all, it updates at a very high frequency

fossil veldt
#

Maybe just do state syncronization

dark edge
#

Yeah I'm thinking something like that

#

for continuous stuff that'll work, like say throttle

fossil veldt
#

network prediction plugin prob can save u lots of time here

#

maybe honestly even mover might be a shout ngl

dark edge
#

Nah it's all physics

fossil veldt
#

so what

dark edge
#

The main problem comes when the analog domain mixes with events

#

since it's all analog, even your controls, things like FireWeapon is a trigger based on a signal network value

fossil veldt
#

You seen?

#

Might be what you need

dark edge
#

Yeah, might get into that, might not. The movement works fine with the old replication style, and ping lag isn't really a problem. I'm talking about stuff like triggers, things which turn continuous signals into events.

#

For example, Cockpit -> Engine -> wheel is totally fine. All I need to sync is throttle value and resultant physics, everything else can run independently

#

Cockpit -> Engine -> transmission -> wheel
-----------^-signal---------^
is trickier. Just syncing the 2 signals isn't enough, I have to sync the state of the transmission (what gear it's in)

#

disagreeing on the rpm of an engine is fine, disagreeing on what gear a transmission is in is not

#

so I think i need some sort of list of properties that are replicated, and those that aren't. Hmm

#

It all runs in a bunch of subsystems so I'll need some sort of marshaller to push values from server to client worlds

fossil veldt
#

Yea not sure tbh, it's so dependant on context, add me i'l chat you about it later, i gotta get back to work

latent heart
#

Working late?!

abstract pike
#

Is it just me or does replication graph not support DormantPartial?

I'm reading through and it looks like it just checks if it wants to be dormant yes/no but never calls GetNetDormancy to ever evaluate an actors desired dormancy on a connection. Also, it seems like it's set on the graph itself rather than connections. How is one supposed to use dormancy per connection on rep graph..?

abstract pike
#

It seems there is a FConnectionReplicationActorInfo bDormantOnConnection so I will try setting that directly in my node I guess...

#

Is there any reason you shouldn't store the UNetReplicationGraphConnection in a graph node?

fossil veldt
#

I don't like working in the day

#

I'm a night owl

neon summit
#

there's gotta be a way to attach my character for client :/

dark parcel
#

One thing to note here is everyone is running their own instance of the game. What to be communicated, what to do on host machine, what to do on client machine. That will be your design

neon summit
dark parcel
#

What are you attaching? And what's the actual problem

neon summit
#

It will move it to the location but it doesn't attach the character and he falls through the floor (because collision is disabled)

dark parcel
#

You can disable the skeletal mesh collision

#

But not the capsule component

#

They will fall for obvious reason

#

And I'm not sure about attaching a player character, they already have in built movement networking. You might be fighting against the system

#

Maybe try to disable movement replication when you attached the player character

neon summit
#

I have tried that

#

makes no difference and wouldn't the component not tick after its unpossessed anyway

dark parcel
#

Well those got nothing to do with player falling off the map anyway

#

If u disable the capsule component

#

Then they will fall off the map obviously

neon summit
#

well yes

#

but I dont want to attach it inside vehicle with collision

dark parcel
#

Maybe adriel knows something about riding a car

neon summit
#

If I disable the skeletal mesh component instead wouldnt the capsule collision interfere?

dark parcel
#

I never try to do anything remotely like that

dark parcel
#

Capsule still collide with ground, landscape w.e

#

But it won't collide with rhe vehicle

neon summit
#

yeah i could do that

#

I'm not sure why it would work fine for server though

#

I think its more a replication issue. When client gets in vehicle I dont see him at all. If the client watches the server get in he teleports to the attach location and falls through. Server sees everything fine.

#

But i can try the collision, its possible disabling the capsule ruins any replication maybe

#

But also could be unpossessing makes it stop replicating

devout sonnet
#

Ignore the HUD, I disconnected every node and I'm just using the 3rd person character pawn.
Why does my game auto-create a session and joins the 2 players?
I even created a brand new project, imported the third person character add on, set it for 2 players, and I got the same result. There has to be a setting I accidentally turned on.

neon summit
#

@dark parcel So... setting the CMC mode to None as opposed to disabling tick for it worked. Thanks for your time.

urban moth
#

ola folks.
Which way you prefer for a client authentication? Easy way through

AGameModeBase::PreLogin

or the big guys way using AOnlineBeaconClient(ALobbyBeaconClient)?

neon summit
devout sonnet
neon summit
#

and you have to have the map open that has your menus unless you have it setup for the same level

#

however your setup is idk

queen escarp
#

@dark parcel ok that was the dumbest issue ive had in years...

#

im my head the issue was that the anim bp couldent event read replicated values or recieve info from when a server would have a variable from the server side to the client somehow,,

#

but i just have to do a regular replicated varaible on the player and change it via server and it could read it just fine (like everything else)....

#

@dark edge

sinful tree
#

I believe they do put it on the playerstate but they use a proxy to replicate the data through the character for faster updates.

#

Yea ๐Ÿ˜›

dark parcel
#

So yeah trying to do server rpc stuff or even any inventory logic in anim bp is clearly not the right move

#

Handled the variable in your player character or else where. Anim bp read the state and values from its owner

queen escarp
#

๐Ÿ‘

neon summit
#

I've figured out attaching the character to my vehicle but it works the first time but when I get out and get back again it doesn't seem to work. Any ideas why?

heady copper
#

Hlo

#

Good morning

#

If RPC are called from controllers to make a pawn move or anything are they meant to be any limitations?

latent heart
chilly haven
#

Hi.
I wanted to use something much more lightweight (physics, bandwidth) than a character, so I switched to pawn with FloatingPawnMovement.
However, it seems the network support is missing (i.e. controller inputs sent to server, interpolation, correction, etc).
Is that right?
Should I:
A. roll my own pawn replication
B. use character, but try to make it lightweight
?

chrome bay
#

Why does it need to be "lightweight"? Character is already pretty optimised for the network

chilly haven
#

60+ player combat in an open terrain... the physics and networking together chew up the CPU

chrome bay
#

Well consider that Fortnite and lots of other games do 100 with CMC ๐Ÿคทโ€โ™‚๏ธ

#

CMC is capable of scaling to 100 players

chilly haven
#

Presumably relies on relevance tho

#

But anyway I don't even want physics...

chrome bay
#

CMC doesn't use physics it's kinematic

chilly haven
#

I just want a smooth moving blob

#

characters use physics... interacts with ground right?

chrome bay
#

It's not part of the actual physics simulation, it's a kinematic mover i.e. all movement is calculated via the component

chilly haven
#

ah well when I profile, physics and network for characters are the heavy parts.

#

So I thought, use a floating pawn. should be lightweight

#

but... only moves on client

chrome bay
#

I guess what I'm trying to save you against is engineering your own solution when CMC already handles network movement pretty efficiently

#

But yeah, you would need to roll your own for anything other than character. CMC is the only one that has full network support.

chilly haven
#

and vehicles? projectiles?

chrome bay
#

Also nope

chilly haven
#

Maybe I can turn some bits off in CMC to make it lightweight?

chrome bay
#

Any actor can replicate it's movement ultimately, the problem is the prediction, reconciling, smoothing etc - which is what the bulk of CMC makes up

#

Vehicles are physics based usually so endlessly difficult

chilly haven
#

vehicles must do all that surely

chrome bay
#

Vehicles are usually interpolated and/or client authouritive

chilly haven
#

In my dedi server once I have 60 or so characters running around, the FPS hurts

chrome bay
#

yeah, it's not cheap by any means

chilly haven
#

ok thx @chrome bay - food for thought

tardy fossil
#

i rolled my own network character movement / prediction and rollback... was quite tough to get it to work 100% and i wouldnt recommend it unless you have a very specific reason lol

chilly haven
#

well because I can use a sphere for my avatar - no physics, just hovers above the ground. So character seems wasteful.

#

Maybe I'll just get it replicating first without worrying about prediction, then profile to see how it compares to charactee

chrome bay
#

Just using a "flying" character seems the easiet way tbh

chilly haven
#

yeah i'll try that too, See if I can make character lighter

#

I saw someone made a multiplayer FloatingPawnMovement addon. Back in 4.x

twin juniper
#

Is this good for shooting logic? I have been reading the compendium to improve my code.

normal valley
#

i'm running into some replication issue that is confusing me...
Is there a difference between declaring a varible replicated in C++ as opposed to blueprints?

for some reason, get ability system component is only valid on client.

#

it is from an event that is called on server

#

im wondering if there's something im fundamentally not understanding abotu how replicated variables work

short arrow
#

I'm pretty sure setting up gas itself is like a whole thing

normal valley
#

oh this has worked before i just wanted to move one variable from Blueprint to C++

#

it was working before i broke it ๐Ÿ˜›

#

thanks for the tip i'll ask there ๐Ÿ™‚

fossil veldt
twin juniper
#

What's a good way of replicating cosmetic stuff like hit sounds and particle effects? Will i have to use the server multicast method or is there a better way?

wanton bear
ivory snow
#

Hello people I am trying to replicate a jetpack feature made starting from lyra project, and I would like to know more about lyra multiplayer replication and how it works. Could you suggest some very good video about it?

worthy knot
#

are oncomponent hit events network replicated by default?

surreal fox
#

if I have a old pc or a raspberry pi , can I use it as a dedicated sever for a game? How much storage will be needed if I have 1000 - 2000 active players?

neon summit
#

Why would attaching my character not work after the first time?

odd hamlet
#

in order to get back to where I was

#

I had to delete the class that I had in plus that was crashing

#

I like that here are so many experts but no one really cares about your work and trys to help you for real just throw words on this chat

dark edge
#

show how you're spawning this actor

#

if you're not spawning it at runtime, show other stuff like the door mesh components etc

#

you have 2 meshes, somehow

#

also you should be using repnotify for this

#

not multicast

#

why is door anything to do with inventorycomponent?

#

wtf is going on lol

gray blade
dark edge
#

How is it the part of this actor?

#

child actor component?

gray blade
dark edge
#

why is the door itself not the thing being networked through, why is it going through your inventory component?

#

it should be this simple

#

DoorActor:
InteractedWith -> set bIsOpen (replicated, repnotify)
OnRep bIsOpen -> do the opening/closing logic based on bIsOpen

Character:
Input -> ?????? -> Run on Server Event to interact with thing (the door)
RunOnServerEvent -> call Interact on passed in thing

#

assuming you have an interaction system

#

if you don't you can just directly call a run on server event OpenDoor(DoorToOpen)

gray blade
dark edge
#

thats fine, it should stop at the door. The door itself can be replicated with a replicated repnotify bool bIsOpen

#

after telling the door "You just got interacted with", the character is done. Now it's all the doors responsibility

gray blade
#

figured that part out

neon summit
#

What could cause the character to attach to vehicle the first time but when I get out and try to get back in it doesn't attach?

neon summit
gray blade
# neon summit

well the first this I see it the attach component to component node is not even attached so therefore not being fired

neon summit
neon summit
gray blade
neon summit
gray blade
neon summit
#

idk it all fires. It works the first time. I get in and attaches. I get out. Then try to get back in and he doesn't attach to the vehicle. It's synced accross both server and client but only attaches the first time I get in

#

I belive its an authoritive issue or something.

gray blade
#

ok, so what id do is put print string on the end and keep moving it back until you stop seeing it fire then youll know where the problem is. it would take me good 30 minutes of staring at all your screenshots for me to understand whats going on

neon summit
#

I'm about to test if spawning the vehicle with a spawner would make a difference as opposed to it placed in level. I noticed its owner is ai controller when its placed in the level

neon summit
gray blade
neon summit
dark edge
#

repnotify is just so it automagically happens when the bool changes

limber gyro
#

I understand that the CMC are not meant for the same thing but is there anything that the CMC can do that GAS cant? in theory...

unique summit
#

myhouse.wad ? ๐Ÿ˜›

gray blade
unique summit
#

it looks a lot like a doom level known as myhouse.wad

hollow eagle
#

you're asking for a comparison between two completely unrelated systems that solve unrelated problems

unique summit
#

yes

#

the CMC can move your character.

#

as its name implies

#

I'm about to implement a CMC custom mode. I want my character to be "wheeled" (specifically on a skateboard) and to be able to wall ride, wall jump, glide on ramp, and dash.
Is it the right choice ? Am I in for a world of pain ?

dark edge
unique summit
#

Yeah, i'm afraid that pigging back on walking mode will be janky as hell

#

The lack of documentation on this subject surprises me though

#

I can read CMC code though. about 15K loc

#

source code is always the ultimate doc anyway

#

never out of date. never lies.

neon summit
#

is there a console command to connect a new client? I swear I've seen someone do this

unique summit
#

open 'IP'

gray blade
#

if you dont need to worry about hackers you can get smooth synch for $20 but if you do and dont wanna be bothered by c++ you need to but the general mover component and its like $600

unique summit
#

First, I want to try to do it myself

#

cause I enjoy writing code

gray blade
#

there a good series

unique summit
#

If unable, i'll shell out the 600USD

neon summit
#

hm. I want to test a player joining late. Can you connect a new client like this?

gray blade
# unique summit If unable, i'll shell out the 600USD

https://discord.gg/uQjhcJSsRG
In this video I am introducing a series I will be making which explores the character movement component and how you can extend it in depth.

0:00 Intro
1:00 What is the CMC?
2:00 Do you need a custom CMC?
5:35 What does the CMC provide?
7:10 Outro

โ–ถ Play video
unique summit
#

yeah, watching it

#

yeah @neon summit, as long as the remote IP is listening

mighty talon
#

I'm kinda new to UE5 and if someone can help I'm having replication issues with my team assignment.

My Player controller runs a on server reliable event to call this function. This function is correctly on server side assigning the player team (replicated) to the player state and works on run. When testing disconnects and reconnects about 20% of the time the server states its setting the correct team but the clients not replicating to the correct team even tho the server is correctly assigning it.

neon summit
unique summit
#

what is your game mode post-login doing ?

neon summit
#

well. I'm usinga test game mode so I can bypass my menus

gray blade
#

ill probably switch to gmc if i can scrap money from my project cause smooth synch can look of alot

unique summit
#

isn't smooth sync handled by the CMC already ?

gray blade
#

no smothsynch is a plugin, which has extrapolation and is client side predicted

unique summit
#

Yeah, but isn't CMC doing that, for characters ?

#

seems useful to have this for non-character actors though, I'm bookmarking this plugin

gray blade
unique summit
#

hu ? I never had any rubberbanding with a Character actor, even with very very bad latency

lost inlet
#

That's news to me when I shipped a multiplayer game using cmc

unique summit
#

(using CMC on a pawn is useless though)

#

you do need to implement things in a particular way for custom modes to avoid rubberbanding from what I gathered

gray blade
unique summit
#

I tested it with about 200ms latency

lost inlet
#

Yes and I said shipped. It's been out for years and ships on multiple platforms with 24 player matches

unique summit
#

If you have a pawn with CMC it is expected to rubber band though

unique summit
#

CMC and Character class are closely related

lost inlet
#

FPS

gray blade
lost inlet
#

Yes because you have to if you want to add on top of it

sinful marlin
#

And tons of multiplayer games have shipped using UE's CMC and they are just fine shrug

dark edge
#

Rubber banding is basically a big correction when your many little corrections didn't do the job

lost inlet
#

Broad statements being made from a place of little experience are my favourite thing

sinful marlin
#

dunning-kruger effect our beloved

gray blade
sinful marlin
#

It absolutely does not though

#

I'd honestly be surprised if sswires and their team, or any team, had to make heavy modifications to make it functional for multiplayer

lost inlet
#

You only need to modify it if it needs to be more capable than what you get out the box

#

We had stances and sprinting so we modified it for that

unique summit
#

if you want a char that can simply run and jump CMC seems to work out of the box

#

even on high latencies

#

not really experienced though

gray blade
#

apparently ive been lied to

lost inlet
#

Well if that's just something from YouTube tutorials then... yeah

gray blade
#

the moment I tested with latency cmc brakes down for me

unique summit
#

how to you know which tutorials are trash btw ?

sinful marlin
#

You generally don't until you reach a point where you wouldn't need it...

unique summit
#

I had the same issue learning MAO. Lots of teachers. Many bad ones.

#

I observed an inverse relationship between the click baitiness and the quality

lost inlet
#

And it's not just a painting by numbers situation

unique summit
#

good teachers use the pratical lessons to teach the underlying principle

lost inlet
#

Avoid anything clickbaity like "I made GTA6 in a week using Blueprints"

sinful marlin
#

Tutorials are meant for people who know next to nothing on the topic. If you know next to nothing on the topic, then you have next to none of the necessary knowledge to make that kind of judgement call other than "How well are they presenting the information" shrug

#

But plenty of people can present bullshit excellently

unique summit
#

It is, alas, a required skill, in the modern world

gray blade
#

but like I dont understand why when I use cmc and try to sprint it ruberband with any latency

lost inlet
#

Well how did you implement it?

unique summit
#

Did you add CMC to a pawn ?

#

if so, that is why

lost inlet
#

There are a bunch of things you need to override in C++ to actually use CMC's take on prediction

unique summit
#

you must use the Character instance

lost inlet
#

But at the very minimum, the server needs to know the sprint happened

meager spade
#

@gray blade if your just increasing max speed you will rubber band, there is 2 simple ways to reduce it, or a proper way which involves flags, etc

#

also you need to ensure client and server both have the speed at the correct time

#

else client maybe ahead of server, and server will just snap them back

lost inlet
#

It'll be nice when Mover is ready for production use in 2035

unique summit
#

Mover ?

lost inlet
#

The successor to CMC but it's early

meager spade
#

upcoming replacement for CMC not tied to ACharacter

unique summit
#

oh very nice

meager spade
#

replacment/successor

gray blade
unique summit
#

kinda annoying that CMC is so tied to Character

gray blade
meager spade
#

they won't replace it, too many legacy games use it

#

mover will be an alternative

unique summit
#

rule 0 of libraries providers: DO NOT BREAK USERLAND

lost inlet
#

Mover is kind of a side project that's in the engine because Epic doesn't like its employees having personal projects lol

lost inlet
unique summit
#

๐Ÿ˜“

#

haha

meager spade
#

lol, must be new to Unreal

unique summit
#

very hard to do though

#

Microsoft are the GOAT regarding this

meager spade
#

dropping cascade stopped a lot of people migrating to UE5 for projects

#

niagara is great if you have the team and time to convert your cascade stuff to niagara

lost inlet
#

At work we're likely jumping from 4.27 to 5.3 so that'll be fun. Our effects are like half and half for Niagara and Cascade

#

The worst part is just PhysX code right there in the game module

meager spade
#

finally got my profile system plugin done

#

does requests to my backend service, and sends back a json of owned items, parses them, and builds up ItemInstances (both a struct representation and a UObject for BP use)

dark edge
sinful tree
# gray blade but like I dont understand why when I use cmc and try to sprint it ruberband wit...

My guess here is that you're changing the max walk speed on the client first, then sending an RPC to the server to indicate the speed change. In a 0 latency world this would work absolutely fine.
The problem in this situation is that the CMC sends continuous RPCs of data to the server in regards to where it thinks the client should be based on the movement values it has and there is some latency involved here, and then you're also sending a separate RPC to indicate the speed changed. You don't know exactly when that separate RPC will be received in regards to the movement speed, so then the server can end up seeing that the player requested to be moved too far based on the movement speed value the server has for them, and thus, you get a correction and the character snaps back to where the server thinks the client should be based on the movement speed values it has, until it properly "synchronizes" again and the client and server are moving at the same speed. The fix for this is usually adding a flag that you set with your movement in the CMC's data that it sends to the server so then it can know exactly when the movement speed was increased on the client.

A good test of this would be to press your sprint input, give it a moment, and then start moving - you should have no rubberbanding at all. If you stop, release your sprint input, wait a moment, then start moving and press your sprint input, you'll get a correction, and probably a series of them until you stop moving so it can "synchronize".

dark edge
#

It's not like Unreal Engine 4 dropped and we all waited around for 2 months for tutorials to come out

unique summit
#

I have vast programming knowledge, but not related at all to UE, or even video games haha

#

I have been a backend programmer for the last 15 years

dark edge
unique summit
#

Issue is often "I can do it this way... but is it the right way"

lost inlet
#

Also I'll take anything written over a video any day of the week

dark edge
#

if you're brand new to Unreal the most important thing is to understand the structure of the engine and the base gameplay classes

unique summit
#

like, to have a good intuition where to put code, between game mode, game instance, etc.

lost inlet
#

Way too much waffle in videos

unique summit
#

And I could not find a concice documentation of the lifecycle of these classes

#

had to find out by trial and error

dark edge
#

but it's pretty easy to intuit that the pawn is the thing you drive around, the playercontroller is the most direct and private representation of a player, the playerstate is the public representation of a player, the gamestate is the public "abstract" representation of the game itself, the gamemode is the private representation of the game itself, game instance is the representatino of the process, actors are things in the world, components are bundles of state and logic on actors

unique summit
#

yeah, but I had trouble finding out what the game instance is used for hehe

dark edge
#

It lasts from boot up to shut down

unique summit
#

yep

dark edge
#

might be useful, might not be, depends

unique summit
#

This is where I store stuff that I want toi persist between maps

#

like when going from lobby to gameplay map

dark edge
#

sure, either that or through your save game system, depends on your setup

unique summit
#

I hesitated between the two

dark edge
#

lots of people use save games as you'll need that anyway to persist between sessions

#

basically rebooting on every hard map load

unique summit
#

Yeah, everything beside game instance is created from scratch when loading a level ?

#

anyway, I expect that implementing a custom mode for CMC will be challenging hehe

dark edge
#

most things you'd have access to for gameplay purposes anyway

#

yeah custom CMC movement mode is not day 1 material

thin stratus
#

I have the joy of using Mover and NPP in production already

#

Badum

dark edge
#

How is it?

unique summit
#

NPP ?

dark edge
#

I never touched CMC much, maybe I never have to

dark edge
thin stratus
#

Pretty sure I answered you that question already

unique summit
#

ah !

thin stratus
#

With SirKais NPP and Mover changes it most likely works just fine. Takes a bit to get used to but should be fine to use.

lost inlet
thin stratus
#

Yus

#

Especially with the work SirKai put into adding the missing smoothing etc

#

Bit of a boilerplate code hell when adding new systems but well

lost inlet
#

But the fixed tick policy would be really nice if there was clientside interp like Quake and Source

thin stratus
unique summit
#

btw is copilot useable with unreal code ? or is there too few examples online ?

thin stratus
#

We use FixedTick

#

Independent wouldn't work for us

lost inlet
thin stratus
#

Pinned

dark edge
thin stratus
#

It's a custom engine repo but the changes are limited to two commits

#

One to NPP and one to Mover

#

They don't touch the actual engine fwiw. Only the plugins

lost inlet
#

I'll take a look, thanks

unique summit
#

are you allowed to change engine code btw ?

lost inlet
#

Hopefully they'll PR it if they haven't already

thin stratus
lost inlet
#

But we all know what happens to PRs

thin stratus
unique summit
#

I know you can, technically

#

It is allowed by the licence ?

lost inlet
#

Yes?

#

Most big studios use native builds and make edits all the time

unique summit
#

oh wow

#

that's very nice

thin stratus
#

Yop we have changes on ours too atm

unique summit
#

Not the right chan but. It is possible to use Rider debugger ?

thin stratus
#

As opposed to?

#

VS?

unique summit
#

as opposed to not using a debugger at all

thin stratus
#

Sure

#

I use Rider exclusively with UE. Only touching VS when I have to.

unique summit
#

I tried vs, and it seemed a mess

neon summit
#

Could possessing a pawn and then unpossessing and possessing again cause an role change?

unique summit
#

And, well, i already use jetbrain stuff every day

thin stratus
#

Rider has way nicer support by now. Even has Slate formatting

unique summit
#

It worked out of the box

#

I was impressed by the integration

#

really effortless

unique summit
#

The fact that it opens directly UE project is really good

thin stratus
# unique summit I was impressed by the integration

There are a lot of hidden gems. E.g. it has context sensitive creation options when right clicking different folders. Source gives you options to add Unreal Classes. While plugin allows you to add plugins via the menu etc.

neon summit
# thin stratus Uff. Why asking?

I got my character to attach to my vehicle for server and client but the second time I get in the vehicle it doesn't attach only works the first time.

unique summit
#

I can only get so rect, Cedric

#

(are you french by any chance ?)

meager spade
#

who said he's french?

unique summit
#

Cedric sounds very french

#

I never met a Cedric outside of France(I'm french myself)

meager spade
#

iirc he is from Germany, but could be wrong haha ๐Ÿ˜›

unique summit
#

I hesitated because the last name is very german haha

thin stratus
#

German

#

And Cedric is a Scottish name afaik

#

So French is a tad off

#

The last name is somewhat of a hint haha

meager spade
#

This name has Old English origins and means "kindly, loved."

#

aww

unique summit
#

kinda famous among my generation (i'm 40 yo)

#

In all case, thanks you all for the help ๐Ÿ™‚

thin stratus
#

No worries

neon summit
#

I'm not sure what would cause it to not work after the first time

quasi tide
gray blade
#

i feel so lied to right now

#

I had multiple people plus youtube tell me cmc was garbage unless you modified it in c++

#

https://www.youtube.com/watch?v=YB_ew3j_HFw would you guys say this video is total bullshit then?

sinful tree
# gray blade I had multiple people plus youtube tell me cmc was garbage unless you modified i...

You basically have to modify the CMC in C++. The thing I mentioned about adding the flag into the movement data - that's a C++ thing. You can have it do things in blueprints and even expose some of what it does to blueprints, but there is C++ that needs to be done to make those kinds of changes.

And no, I wouldn't say it's BS. He even mentions the problems with modifying the CMC movement through blueprints and that when you introduce latency how it breaks it.
He outlines your solutions:

  1. that you'd need to learn C++, and this would then allow you to modify the CMC yourself or code your own properly networked movement component
  2. Smooth Sync - Effectively a client-authoritative solution, so then the client is the one in charge of where they are in the world, and the server tells everyone else, thus it allows clients to potentially cheat. You wouldn't be using the CMC at all in this solution.
  3. General Movement Component - I don't know lots about it, but it's probably no different than the CMC in that there's likely a lot of code that is locked behind C++, but they may have made it much easier by exposing a lot of the functionality that the CMC does into blueprints. Again, no CMC involved with this solution.
gray blade
sinful tree
# gray blade I have been using smooth synch, the game im working on is pve. Should I just sti...

I haven't used anything but the CMC myself (but I have made some modifications to it in C++), so my opinion wouldn't weigh very much. If it's working for you, and you understand that players could literally teleport anywhere in the game at any point in time which could introduce game-breaking behaviors and even potentially crash the host, their client, or other clients, then I would say go for it.

lost inlet
quasi tide
#

Part of the allure of GMC is that you don't have to muck around in C++

woven basin
#

Yeah - GMC is awesome - I'm throughoughly enjoying it - although I'm C++. But BP support is there.

But you still cant get away from if you think you need that level of movement control, then you probably are going to need other things that c++ gives you for multiplayer...

open adder
#

Hello, when I change the map in a peer-to-peer system, should I keep the data of the characters selected by the players and other data to be used within the level in the 'game instance' of the player who is the server? When the level changes, the game mode, game state, player state, and more are recreated.

open adder
#

Isn't there another way?

dark edge
#

I mean maybe persistent actors but you don't want to do that most likely

#

What's the problem?

#

You can also just not change the level

#

or rather, not change the persistent level

open adder
# dark edge What's the problem?

I have level 2. One is for the lobby and the other is for the playground. When it says start, I change it to OpenLevel. and I lose information.

dark edge
#

Then either save the stuff in a save game, store it in gameinstance, or use level streaming or whatever it's called

open adder
#

thanks, ill try it.

odd hamlet
#

bro coming back with the problem with the doors not rotating, they basically are rotated but not visibly, do you have any advice?

#

basically what you told me here I already have

normal viper
dark edge
#

What in the fresh hell is this

#

The fact that he uses cast as an action verb in the first minute makes me nope right out

normal viper
#

idk but name of this video boils my blood

dark edge
#

the whole thing makes me queasy

normal viper
#

like you dont even have anything to support multiplayer in other engines, like in unity you need to use plugins, idk about others

#

in unreal you literally have working multiplayer from start

#

not like he could avoid what he wanted to do by doing it in other engine

native warren
#

a topical question perhaps, I have a simple wingsuit mode in the (networked, blueprint) prototype I'm working on, and it requires calling simulate physics on the character collider. That works fine, but using the debugging tools I can see the server & client de-sync badly when I un-simulate physics. I'm new to unreal (but not programming) and the question I ask myself most at the moment is, should I call this method (in this case simulate physics) on the server alone or client as well. I've tried various flavours of disabling the movement mode around this. Any input would be appreciated, thank you.

dark edge
#

Are you synced in wingsuit mode at all to begin with?

native warren
#

yes, the built in debugging tools, and one I've added myself seem to show that in wingsuit mode, simulating physics, I'm synced

dark edge
#

idk how the hell lol

#

what do your inputs do when flying?

native warren
#

heh, I realise this is all going against the CMC, and probably not kosher

dark edge
#

I mean what's the path from inputs to something happening physics wise?

native warren
#

inputs from owning client -> server, all changes affected on server
so I'm happy with that simple model for now, the server can be totally authoratative and the client just rep'ing away

#

my initial uncertainty was around whether to call SimulatePhysics on the server alone, or client as well

#

but if I call it on the server alone, wingsuitng works fine, but coming out of it creates a ridiculous de-sync - I was expecting that having a "dumb" replicating client it would just do what the server does

dark edge
#

You're not getting corrections out the ass while simulating? Did you change the default replicated physics settings?
Anyway, you're obviously landing in a slightly desynced state, either that or you're trying to predict landing

#

I'd honestly just make a wingsuit movement mode but that's me. I don't like mixing CMC and physics, just choose one or the other.
How do you detect landing?

native warren
#

well this de-sync is visible when I toggle out of wingsuit mid-air, outside of a landing / impact
so it must be around the process of un-simulating physics and restoring character movement

#

when you say make a wingsuit movement mode, how might I do that? just generally ofc
I'm open to all suggestions

#

I saw in the movement mode node there's a custom mode, presume this is a user created mode, how do you flesh the state for that out?

dark edge
native warren
#

I do appreciate that my issue lies around character movement being inherently kinematic, just hoping there might be a way of taking the CMC out of band for the wing-suiting

dark edge
#

that's where you'd do your gravity and lift and tracing and such

#

I think it's the prediction that's hanging you up

#

you're going from predicted movement to not, back to predicted

native warren
#

right, that makes sense

#

I did try setting the movement mode to None at the start of wing-suiting, then restoring it on end, but that didn't seem to help
I'll do some reading around making a custom movement mode, thank you for your help there.

dark edge
#

you're basically making WingSuit instead of Walking

native warren
#

Ouch ok. Will have to see if this prototype warrants that sort of effort....

gray blade
#

If im making an in game day and night cycle with a time should I program it in the gamemode?

dark edge
#

but not exclusively the gamemode, the replicated TimeOfDay would be in GameState

gray blade
thin stratus
open adder
#

When my Character changes in GameInstance, this(pic) works. And it changes my non-replicated Character variable in PlayerState on the Server.
Client 1: When it switches to Character_1, it works correctly. Client 2: When it switches to Character_2, it works correctly.
Server (client): When it switches to Character_1 or Character_2, all clients receive the character that has been switched to.
What is the issue here?

sinful tree
#

May also need an isvalid check on GetPlayerController to ensure there's no errors from clients.

open adder
sinful tree
#

PlayerStates exist on the server and the clients, so "Begin Play" executes on the server when the server creates it, then it also executes on every client that receives the PlayerState.
For clients, they end up binding their character change event to every playerstate too, but because they don't own every PlayerState, the server RPC gets dropped and only goes through when it's executed on their own PlayerState.
For the server however, as it doesn't have to RPC to itself, it ends up executing the "Run On Server" event anyway as it is the server, and because it's bound on every PlayerState, whenever the host changes the character on their game instance, it'll end up executing the CharacterChange_Event on each playerstate that has begun play

open adder
#

thanks for your interest, attention, and effort, i think i understand now ๐Ÿ™‚

scenic turtle
#

Hey all, anyone here has experience with UE 5.3.2 and playfab GSDK? Updated from 5.2.1 and now my dedicated server is not deploying on playfab. Stuck on "Pending heartbeat"

#

Is there a new project setting perhaps with 5.3.2 for networking or a new dll perhaps?

thin stratus
#

Your best bet might be asking on PlayFab itself.

#

There shouldn't be any new dlls or settings.

#

You may want to print the Heartbeat function on your server and then get hands on the logs.

#

@hollow gate Random question: Do you happen to know if there is a RTT sitting around somewhere that I can get access to inside NPP or any given Simulation?

hollow gate
thin stratus
#

Na, I'm doing some hacky custom stuff for systems that aren't using NPP but need to affect NPP.
And I need the RTT for that.

#

The CompressedPing sits on the PlayerState, that much I know. Was somewhat hoping that NPP is also utilizing RTT/Ping somewhere and has convenient access to it.

hollow gate
#

no it does not use ping or RTT anywhere.

thin stratus
#

Not even for independent tick stuff?

#

I could swear CMC was taking something like that into account to calculate the Timestamps or so.

hollow gate
#

yeah not even for that. it just uses the sim time that is passed around for time claculations

thin stratus
#

Hm hm hm ok

#

will just use PlayerState then

hollow gate
# thin stratus Hm hm hm ok

btw i did PR the changes. you can see the full changes in the ue5-main branch of the repo. has a couple of things i didn't put in 5.4 branch. (physics code clean up and a fix to a bug that made simulated proxies buffered time increase but never go back down.) , i am have my doubt it would get accepted by at least would make them look at the NPP plugin. i have a feeling they are working on implementing smoothing but for mover only not NPP itself.

#

will update the 5.4 branch next week.

thin stratus
#

Awesome. fingers crossed

grim prism
#

hey, im trying to replicate picking up a gun, on game start the player shouldn't have it, then upon pickup the gun should become visible, held animation started, and be able to shoot, here is part of the code, for some reason when one player picks it up, the other player still gets it and all its functionality,

Can anyone help?

thin stratus
#

@hollow gate Do you happen to know if one can add a custom TCommonReplicator_AP or similar, by defining it with the custom ModelDef, similar to Services?

languid igloo
#

Any tips for testing replication?
Can I simulate a player?
Maybe record some behaviour and play it back?

hollow gate
# thin stratus <@396299599654027265> Do you happen to know if one can add a custom TCommonRepli...

as far as i know, only services can be templated.. and only the tick service itself has the template definition. so by default you can't template the others. i did add the template definition to all services, but that is not in repo yet. will be next week. however those replicators are not services. they are used to bind function to the net serialize of the Network prediction proxies replicated variables ( found in the backend class of mover).

#

i didn't phrase that right.. the replicators have the functions that are bound to replication proxies variables net serialize to write and read serialized data to and from them.

#

usually one 1 role writes and 1 role reads.. server would write to simulated entities Proxy variable and simulated entities read from it. except for replay that's a different matter.

thin stratus
#

Yeah I know how they work and what they do. Would have been cool to customize them for specific sims.

rotund sail
#

I'm having a bit of an issue with my inventory system, first the equipment slot items aren't replicating properly on pickup (I think the issue lies within the Pickup Actor func call in my pawn class). However I can't figure out a second issue which is that items are duplicating and not properly updating their info when removed from a slot.

#

im using that uobject replication plugin for bp and it works fine afaik

rotund sail
#

tho I might rewrite in c++ to simplify idk

grizzled stirrup
#

Am I correct in saying that COND_OwnerOnly on a RepNotify property in the Character will only replicate to a single character at most? (the locally controlled human client)

#

As in if you have 30 AI controlled characters and 5 human controlled characters, this property will only replicate down to one locally controlled human character (the one that owns this character), and no one else?

ancient adder
#

Is it normal for a headless client to take around 20-25% of ryzen 5600x?
Normal client takes around 35% and I expect the headless client to take much less, Do I need to do other things other than adding -nullRHI?

rotund sail
#

solved the first bit of my issue. Still having issues with items not properly removing from the inventory, this is what Im calling but im not sure what to call on the client tbh

woven bramble
#

Hi.
Create session in Standalone mode always fails when Steam is open.
Changed game mode, not solved.
Tried with new map, not solved.
No extra settings, just Create session, again not solved.
I changed APPID, not solved.
Removed Steamsocket and tried SteamNetdriver, no solution.
Intermediate etc. deleted, Unreal Engine updated, not solved.

'[OnlineSubsystem]
DefaultPlatformService=Null' (before it was Steam)
When I do, the 1st time it can't create session again, but, the 2nd time it connects. (But others can't join that session, and can't find it)

NOTE: +1k people have tried this game instantly before, no problem before.

twin vessel
#

How do people usually deal with those "press <key> to pickup" widgets in multiplayer?
Cause making it show up for the right player is easy, my problem is more about what if a player changes the keybind? How do i deal with that?

My idea was to pass the keybind to the widget, as parameter of the function i call to make the widget visible, and from there call a blueprint implementable function to update the text.

Is there a better way?

formal solar
#

5.0.3 seamless travel bug is pretty bad like

maiden flame
woven bramble
outer sphinx
#

Hello guys, I have a question, what do you recommend to compensate for the lag? I have a small server mounted on an instance in New York and connecting from Latin America I have lag and the setups and systems are not working as they should.

dark edge
#

There are a ton of approaches

woven bramble
woven bramble
formal solar
open adder
#

I want to ask something. I've looked at a lot of sources, and they're storing users' controllers inside the PlayerControllers array created within the Gamemode.
We can retrieve this from the default PlayersArray in GameState.
Is there a reason they do this?

formal solar
#

game mode only exists on server, game state is replicated to all clients

outer sphinx
open adder
formal solar
#

if you are confident that you are on listen server then you can access game mode

#

if not you won't be able to access game mode

dark edge
#

It's hard

chrome quest
# open adder I might be confused because I'm working on a peer-to-peer system. For the client...

I don't think UE supports p2p(someone correct me if I'm wrong).

What you're describing is a listen server. In which case there is no separate server/client for the listen server. The client IS the server, and anything you do on that client is server authoritative.

It's not like the player spawns a server in the background, then creates a client to connect to that server. The client is the server.

To answer your question, you can access and modify properties on the game state from the listen server authoritatively

quasi tide
#

You'd have to implement it yourself.

twin vessel
open adder
outer sphinx
dark edge
#

lets you have widget in 3d space

quasi tide
#

I'd just access the data via the gamestate. It's readily accessible.

#

Until I get too annoyed of doing GetGameState()->TheThing ๐Ÿคฃ

dark edge
#

What is the actual data or mechanic?

twin vessel
quasi tide
#

You know it is templated right?

#

GetGameState<MyGameState>()

#

Nope. Can't

#

But you can make a function library that does it for you

dark edge
#

I don't think a poker game is doing anything at high enough frequency for it to even be measurable lol

#

If you know the table will not change within a game, it's fine to
Begin play -> get gamestate -> cast -> get table -> save a ref / pointer

#

then later you can just talk to the table without the chain

quasi tide
#

It really depends on the frequency of access

dark edge
#

ye

#

just whatever makes the most sense

#

If you're constantly getting at Table.This and Table.That then just store Table.
If all you care about is Table.That then store it

grizzled stirrup
#

When passing in previous values to OnRep funcs on a listen server, the client will automatically pass the prev value in when the OnRep function calls and the host must manually pass the prev value in when calling it, correct?

#

(I know best practice is to have the OnRep call another func and only the host call this func but same difference in this case)

sinful tree
#

This message usually indicates that the actor isn't owned by the client that is making the RPC call. Are you sure you're assigning ownership correctly and to the correct player?

#

What is that Player variable set to?

#

Like how does it get its value?

#

Ok, no need to get the controller from the playerstate to the pawn as the playerstate actually has a "Get Pawn" function you can utilize.
Try verifying what the "Player" variable actually contains, like print the display name of the object before spawning the actor.

sinful tree
#

Again, are you sure the owner is the correct pawn? How do you choose which playerstate you're using to determine the pawn to use?

#

How do you choose which playerstate is my question. Like what triggers this sequence where the playerstate is retrieved.

#

And yes, owner is normally replicated and setting the ownership on the server should be sufficient.

#

What starts this process? Which event?

#

If it's being spawned, and you're spawning it on GameMode then it's running on the server for sure.

#

Yes, it should be the same on both

#

caveat: the display name may not be the same on both.

#

But the reference would be to the same object.

#

The event i'm using actually fires on both server and client, but with the has authority it's ensuring that the server is executing the spawning of the actor.

#

It shouldn't matter.

#

The only other issue could be order of operations.
If you for sure have a replicated actor, and are setting its owner to an actor owned in some way by a client (like their playerstate, controlled pawn, or player controller) then the client should be able to send RPCs on that actor.

#

It doesn't matter what blueprint spawns that actor, other than it is spawned on the server.

karmic panther
#

Hi, so if I put as listen server p2p connection. Is the host player considered the server in game play?

sinful tree
karmic panther
sinful tree
#

P2P = all clients are responsible for handling the state of the game.

#

there is no central authority.

karmic panther
#

Ah

#

So when I make a game and there is like a server to multicast custom event only the host can run that right

sinful tree
#

P2P means you can have a bunch of players in the game, and any one of them can quit and the game can continue.
Client->Server means you can have a bunch of players in the game, and if the server quits, everyone else loses connection.

karmic panther
#

That make sense thank you!

sinful tree
#

Oh yeah that'll do it

#

Glad you found it ๐Ÿ˜„

#

Correct

neon summit
#

Is there differences when you possess a pawn that is owned by an ai controller vs one with no owner?

unique summit
#

Damn, characterMovement seems very fun to override. Lot of liberty to mess around in here

#

Does not possess kick out other controllers from the pawn ?

#

can multiple player possess the same pawn ? ๐Ÿค“

echo pasture
#

man I have the weridest bug

#

somehow a replicated bp variable on a server spawned actor is not being registered as replicated

#

it just behaves like an unreplicated variable

neon summit
echo pasture
#

yea

#

and then additionally it works the other way around too where if I do set it on the client, it keeps that value on the client (should not be happening of course)

#

yeah i'm completely lost. spawns from the game mode, actor is set to replicating and always relevant

echo pasture
#

yeah but even then, why would the server not be able to change its value?

brazen anvil
#

If I am running something like procedural recoil on my character, would it be better to have the proxies just play a animation of the recoil versus replicating the procedural?

fossil spoke
#

Have you accidentally set its Replication Condition to something like Initial Only?

fossil spoke
brazen anvil
#

Ok thats what I was thinking, thank you!

echo pasture
fossil spoke
#

How do you know its not replicating?

echo pasture
#

I test with PIE, spawn 2 players, one listen server host and one client, change the value of the variable on the server, put a debug breakpoint to check that it was changed (it is), put a breakpoint for where the client tries to access variable, don't see the change

fossil spoke
#

C++ or BP?

echo pasture
#

I also tried with the object just pre-existing in the level instead of spawning it, still no luck

#

it's BP

fossil spoke
#

Show your BPs

echo pasture
#

it's an array of BP structs if that helps

#

I actually setup this quick test to make it easier for you

#

variable is still false on client

fossil spoke
#

Restart the editor?

echo pasture
#

I did a few times, it still didn't fix anything

fossil spoke
#

Show the Replication settings

echo pasture
fossil spoke
#

And the Actor itself?

echo pasture
#

it really does feel like GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) is not being called

fossil spoke
#

...

#

So you are using C++

echo pasture
#

no i'm using bp

fossil spoke
#

Then why would you post C++ code

#

Is this Actor based on a C++ class you have created?

echo pasture
#

I was just explaining what it feels like

#

no it's parent is just actor

fossil spoke
#

Its just confusing.

#

So this isnt a C++ project at all?

echo pasture
#

the project is C++, but the actor in question here is not

fossil spoke
#

Are you using Hot Reload?

echo pasture
#

no

fossil spoke
#

Well Im not sure why its not working then.

#

Seems like you have everything basic setup correctly.

echo pasture
#

yea that's why I'm losing my mind

#

I have plenty of other things in this project that are replicating just fine too

#

but thank you for at least trying help, I really apreciate it

#

ok now i'm even more confused

#

just made a duplicate of the blueprint, the duplicate is working fine

#

maybe the original is somehow corrupted?

fossil spoke
#

That is entirely possible.

amber vale
#

Hey guys, what's the best way to enable adaptive net update frequency? Would something like this work? This successfully changes it inside the editor, but I'm not sure if it will stay enabled when the game is packaged.

const auto UseAdaptiveNetUpdateFrequency = IConsoleManager::Get().FindConsoleVariable(TEXT("net.UseAdaptiveNetUpdateFrequency")); UseAdaptiveNetUpdateFrequency->Set(1);

open adder
#

logically, i cannot create an Event in the UI Widget and say Run on Server, is that correct? (n listenserver mode)

fossil spoke
#

They are local only, so there is no where for them to send network information anyway.

open adder
fossil spoke
#

GameInstance is also a class that is not Replicated...

#

You need to read the Network Compendium

#

It is in the Pinned messages on this channel.

echo pasture
#

the rare case where something can fail even when setup correctly

#

it was a mistake on their behalf, they shouldn't have replicated the way they did, but the're still learning, so can't say too much

#

and a good reminder to always check the logs, because there were warnings in there about too much network data

empty matrix
#

Guys, I'm going to start studying dedicated servers on the unreal engine, what shouldn't I run on a dedicated server besides visual things?
If anyone has any material on this subject that they can share, I welcome it!

worthy oak
#

For example if you have an inventory, the server should keep track of the inventory and just replicate what its contents are to the player

empty matrix
#

I understand! Thanks for the insight.

worthy oak
#

of course ๐Ÿ™‚

empty matrix
#

I noticed that when I run it in Client Only, some things in C++ fail, i noticed that when I run it in Client Only, some things in C++ fail, in this case just use a

if (GetNetNode() != NM_DedicatedServer)
{
}

Am I right?

worthy oak
#

Not sure what you are referring too. But generally, you shouldnt need stuff like that

empty matrix
#

For example, I have this code here in the weapon class of my project working normally on a listening server, but when I test it in dedicated server test mode (Client only in editor) it throws an exception in the code and does not present any value in the debug so I can check and test

FVector AFNRFireWeapon::PredictDispersion() const
{
    const FTransform CameraTransform = IFNRWeaponComponentInterface::Execute_GetCameraTransform(CharacterOwner);
    return (CameraTransform.GetRotation().GetRightVector() * (FMath::RandBool() ? WeaponData.MovingSpread : -WeaponData.MovingSpread) +
        CameraTransform.GetRotation().GetUpVector() * (FMath::RandBool() ? WeaponData.MovingSpread : -WeaponData.MovingSpread)  + CharacterOwner->GetVelocity()) *
            -IFNRWeaponComponentInterface::Execute_GetSpreadMultiplier(CharacterOwner);    
}
worthy oak
#

Listen serves and dedicated servers are different. A listen server is also a client, so UI stuff will still work on it since the host is both server and client

#

A dedicated server is just that, a dedicated server with no client stuff on it. So in your example, while Iโ€™m not sure without seeing the error. Iโ€™d wager itโ€™s your camera stuff

empty matrix
worthy oak
#

You would be surprised

#

But as I said just a guess without seeing what specifically isnโ€™t working

empty matrix
#

Sorry, I forgot to mention it, this error only occurs if I drop the weapon, I think the problem could be between the screen and the chair (me), hahaha

worthy oak
#

Isnโ€™t it always ๐Ÿ˜‚ and I donโ€™t mean to say that in a rude way. As the saying goes a computer will always do what you tell it to do XD ๐Ÿ˜‚

empty matrix
#

exactly! lol

empty matrix
minor crest
#

Hey guys I'm having an issue where I'm using repnotify to trigger an event and it works fine for the host but on the client side it is firing the event twice. I have this set up in a weapon blueprint component. Anyone have any idea what it could be?
(Its not an issue with the OnRep function as the print string is appering twice for client)

sinful tree
#

Or you perhaps have two weapon components attached and both are being triggered.

minor crest
#

I have the blueprint components attached from begin on the character blueprints. I just don't understand why only the client is firing twice while the host is working as intended.

sinful tree
#

Show what your begin play looks like.

minor crest
#

I dont know why but I just added the code directly to the char BP instead of using the BPC and now it works so it must have been attaching it twice for the client for some reason

#

This is what it was before for the char BP

sinful tree
#

Begin Play fires on both the client and the server.

#

So when your server character spawns, it'll fire on the server adding that component. When a client receives that replicated character, it too will add that component, but it doesn't effect the server at all since it's a client.
When your client's character is spawned, it'll fire on the server, adding that component which replicates to the client. When the client receives that replicated cahracter, it too will add that component. This time, the owning client will end up having 2 components that it is in control of, and both will respond to the input event.

minor crest
#

Oh okay should I use a Is Locally controlled branch for begin play events to avoid duplications if I wanna still use begin play? Also yeah I just added the BPC as a component of the character on the left tab instead of begin play and it worked thank you

#

Holy shit I just did that and it fixed all the bugs I was having with this thank you so much @sinful tree

native warren
#

the biggest thing I'm struggling with at the moment in my (blueprint, prototype) project is knowing what common built-in methods are automatically replicated by the engine.
For eg. on a replicating actor, is AttachActorToActor replicated out to the clients automatically for me?
How about setting SimulatePhysics on the character capsule collider?
Is there a heuristic or documentation for that?

devout sonnet
#

Once again, I'm just trying to figure out how to implement certain aspects of replication. the entire game is what you see (enter a name, join a session, have your name displayed on the player list). I would like to Player List to show the chosen username that the player typed. Someone please help me end my struggle.

neon summit
#

I think instead of getting all playerstates you just get their own playerstate and get the variables there

sinful tree
#

Need to have some way for the widget to know when the name changes to update itself

#

And using the built in playername in the PlayerState won't work in Blueprints as you don't really have a way to set the name.

#

So player types name in widget > RPC to server in some player owned actor > server sets onrep replicated string variable in playerstate
On Rep Fires > Broadcast an Event Dispatcher "OnPlayerNameChanged"
Widgets that need to care about a playerstate need a reference to the playerstate they are paying attention to. On Construct > Bind to OnPlayerNameChanged of the PlayerState it is paying attention to > Read PlayerState for New Name > Update Text Field

#

@devout sonnet ^

devout sonnet
devout sonnet
devout sonnet
devout sonnet
#

and do what?

sinful tree
#

Read the PlayerState it cares about for the new name > Update your text field

devout sonnet
#

@sinful tree I definitely missed something in the PlayerState but this is what I did

sinful tree
#

That's the one you would bind to.

#

and read from.

sinful tree
#

Your widget also needs to do a "SetText" to the actual text field, unless you're using a bind, but you shouldn't if you've already gotten this far with an event dispatcher.

#

This one here.

#

This is the one that needs to know about the specific playerstate it seems like.

#

And don't bother with index or IDs for players. It just makes it hard to manage. The PlayerState itself is the reference to the player.

devout sonnet
# sinful tree

can I just create a PlayerState variable set to expose on spawn?

devout sonnet
#

so i passed in a ref of the playerstate

sinful tree
#

And now that widget needs to bind to that PlayerState's event dispatcher so it can update itself.

#

To kick, you can pass a reference to the playerstate along rather than using the IDs.
To ensure that the kick only appears for players that aren't the host, you check if the the playerstate's player controller is local controller, and if so, that's your host.

#

Instead of "GetPlayerState" in this image, you'd connect up your PlayerState variable you've passed into the widget.

devout sonnet
#

@sinful tree this is what i got so far

sinful tree
#

This part should really be "Get Owning Player -> Get PlayerState" rather than Get PlayerState 0.

#

This part here, you need to make sure your bound event also does a SetText to upate the name in the text widget.

#

This part here, you don't really need to cast outside to get the name as you have the playerstate reference within the widget itself. you also don't need the ID # or the name as variables, just read directly from the playerstate.

devout sonnet
#

@sinful tree I'm still missing something.

sinful tree
#

Don't need to have "Username" as a variable in the widget.
You also need to ensure that you set the text OnConstruct too, not just on your bound event.

devout sonnet
sinful tree
#

Nope... need to read it from the playerstate.... Should be hooked up like this.

#

Err

#

oh

#

You need to set up that bind before your server check.

devout sonnet
#

like that?

sinful tree
#

Yes, but you still need to set the name in the text field during the OnConstruct event, just read it from the playerstate.

#

Copy this part up to where it's pointing.

devout sonnet
#

@sinful tree Now i just get the default value I put in the playerState

sinful tree
#

AI stuff is server only.

sinful tree
devout sonnet
sinful tree
devout sonnet
sinful tree
#

Everything is normally lost when you move between levels without some additional set up done in C++.

devout sonnet
#

damn

sinful tree
#

Main menu you wouldn't normally be networked.

#

You can store what you want set in the GameInstance, and then have the player RPC it in the begin play of their player controller in the lobby, but just make sure you're check if it's a local controller before sending the RPC.

sinful tree
#

Did you set up your project settings to use BP_GameInstance as your game instance?

devout sonnet
#

probably not..

devout sonnet
vagrant dragon
#

Hi guys im having an issue related to replicate movement in the client, i need one character to grab another but i dont know why the client character does not replicate the movement when its grabbing the server. i have replicated collisions and i have deactivated movementcomponent but its still not working. Heres the video, i can enter a voice channel if u want, thx for help.

vagrant dragon
#

it seems that the collisions are not replicated, but i setted them to do so.

neon summit
#

Physics don't replicate very easily

#

Especially if you turn off the cmc

vagrant dragon
neon summit
#

There's no client prediction

vagrant dragon
vagrant dragon
neon summit
#

That's what cmc does

vagrant dragon
neon summit
#

Are you disabling collision for client?

#

It's not loading video atm

vagrant dragon
neon summit
#

I think you'd have to do a repnotify to do it on all clients

#

Or repusing since you're in c++

vagrant dragon
#

??

neon summit
#

Not in my experience

vagrant dragon
#

hmmmm its dificult to do onRepNotify? im new in that terrain

neon summit
#

I think that just replicates properties of the component

#

Not really

#

I don't do c++ so I can't really help you there

vagrant dragon
#

how can i do it no bp?

neon summit
#

I know it's called replicateusing and then you declare the function It calls

#

You set a variable to repnotify and it will automatically create a onrep function. Whenever the value of the variable is changed on the server that function will fire for server and clients

lost inlet
#

that is the properties within the component

vagrant dragon
lost inlet
#

what part of that is complicated?

#

replicating a component doesn't mean "make every property of this component replicated"

#

the properties within the component have to be marked as replicated to be replicated

vagrant dragon
#

yh, they are marked here

lost inlet
#

yeah please read the words I'm writing

vagrant dragon
#

hmmm srry im not eng so im trying to understand

lost inlet
#

it doesn't matter if the component is replicating if the properties related to collision aren't

vagrant dragon
#

ohhhh okay

#

so then how i set that properties replicated??

#

RepNotify??

lost inlet
#

you don't

#

make your own property

#

in your actor

#

and use that to set it on the client

vagrant dragon
#

okay... ill try hehe thx

neon summit
#

how can I disable tick on possessed for not locally controlled pawns

#

basically this but i want to do it on possessed

dark parcel
#

So you will only change the tick behavior of the server's version

#

in cpp, you can use OnAcknowledgePossession

#

that one runs on Client

neon summit
#

yes I know currently trying this

#

I also tried doing it if role was not autonomous proxy but didnt work

#

I am not doing c++

dark parcel
#

Make a function that sets the tick to true/false in your character (Client RPC)
OnPossess -> Get Pawn -> cast to your character -> Run the client RPC

neon summit
#

ah thats what I tried before this but didnt work either

#

get pawn as object for cast?

dark parcel
#

try again and show your codes for others to inspect. If you want to use OnPosses, you need to do client RPC to actually tell the client machine to do stuff.

#

The pawn is passed thru OnPosses function

#

I'm gonna sleep, gl.

neon summit
#

yeah I tried that but I probably did the cast wrong. I used get controlled pawn from the controller ref

dark parcel
neon summit
#

thats on the controller

#

but I understand what you're saying I should be able to figure it out

#

I may have mistyped I mean't I'm doing this on Event Possessed in the character. Sorry for confusion

magic vessel
#

So I have been trying to fix this all week and am really hoping someone knows what might be going wrong here. I'm trying to rearrange some Pawns on opposing teams. The AI controlled ones face the correct direction, but the player controlled ones seem to have their control rotation reset. I've looked in the entire project and there is no where that should be setting the control rotation after it's being set after the rearrangement.

thin stratus
#

I think if at all the Viewport player

#

Not sure if there is a hotkey to do it in other windows

dark edge
#

try shift f1

vocal tapir
#

Do stably named references use FNetworkGuid when replicated or the full asset path string?

vocal tapir
#

Assuming there isnt any other code manipulating the data, it could be from using it in the construction script. Maybe class defaults are applied after construction. Which variable is it causing the problem?

hidden rover
#

Hello, I'm looking for someone who can answer several questions relate to Unreal Engine Replication system. I'm working on my small project on my free time and i feel like my current replication solutions are far away from perfect, lack of knowledge on this topic is killing me =/. So if someone have experience in that topic i would highly appreciate to have a small ~30 min call to present what my concerns are ( as it will be easier to show on project directly ). Thanks in advance!

ruby lodge
#

I am working on a customization system that should be replicated in the menu as well. Reason is, In the menu there can be other players as well, ie. the party or the friends who joined. It is built for a dedicated server setup but it's not working unless the player is the server which means the replication is not working correctly. Right now the player customizing their own character and all others can't see the changes. As a listen server the player customizing can at least see their own changes. Here is a description of what I am doing:

Right now I have it that when I press a button of a customization item in the menu, ie. I select it, it calls from the menu widget blueprint a function called "Update Appearance" in the character blueprint and inputs the name of the Data Table and the ID of the item selected in the function call. Then this function inside the character blueprint gives these two values and calls a Run on Server event in the character blueprint called "SR_UpdateAppearance" (Image here, breakpoint has not been called when playing as client and print string not been printed). This event then takes the values that were input into the call and stores them in a replicated name variable for the Data Table called "AppearanceDT" and a string repNotify variable called "AppearanceID". Inside the "OnRep_AppearanceID" function it gets the value of "AppearanceDT" and uses a Switch on Name with the different Data Table possibilites to get the correct Data Table and call the correct Get Data Table Row node. Then it gets "AppearanceID" and uses it for the Row Name . The outputs are used to update the skeletal mesh components.

ruby lodge
#

Oh I found the problem. Unpossessed pawns can't run Run on Server RPCs

open adder
#

In my GameMode, within the postLogin function, I get the x actors in the scene and loop through them. I change the y object reference variable of the x:1 actor.
When a another client joins the game 5 seconds later and performs the same action, the y object reference variable in the x:1 actor appears empty. ??

fossil spoke
#

Is the Actor set to be Replicated?

#

Is the Object reference property marked as Replicated?

open adder
fossil spoke
#

Why are you spawning pawns like that?

#

Why arent you just using the DefaultPawnClass setting?

#

On the GameMode?

open adder
#

These are static characters, they will not be played

#

if I make changes to an actor that I accessed through the GameMode, those changes will be made on the server, right?

torpid lantern
#

Unless the player joins after the change event happened; which looks like may be happening based on your description.

#

When I hit jams like this, I usually move to rep notify. Wish I understood them better.

open adder
#

thank you, I will try writing it differently from the beginning.

neon summit
quaint tendon
#

Is there a way to detect in a blueprint if the build is packaged server? I have a GameInstance that inits an SDK, but I only want it to ever run if it's packaged and is a server.

sinful tree
quaint tendon
#

'Is Packaged For Distribution' only works for client build as far as I could find. Not for server.

grizzled flicker
#

correct

#

server is going to be built as 'development'

#

perhaps theres a 'packaged for development' node

quaint tendon
#

LE Extended Standard Library plugin supposedly has a 'With Editor' node I'm going to try.

grizzled flicker
#

in hindsight, why would u ever need a bp like that

#

if its the server u already know its the server...

#

its redunant

quaint tendon
#

Need it because I have an Amazon server build that creates a server object and inits an SDK. It crashes the editor, debugging the C++ isn't worth it. The SDK and server object are completely unnecessary in the editor.

I can just disconnect the nodes and stop the process then reconnect when packaging the server but it's a wrinkle in the pipeline that would ideally not be present. I've forgotten a few times and it's just getting annoying. Trying the LE Extended Library.

#

Here we go, hopefullly this works. Works in the editor, it doesn't crash anymore now just need to upload and test in AWS.

grim prism
#

Hey, i have a bit of an issue and am wondering if anyone can help,
As you may be able to see, when the client fires a lava bullet, on the other client its shown as a regular bullet. I may be hard to see but of the client firing the bullet, a regular bullet is fired along with the lava one,
Any ideas on what i could do/how it could be fixed?

quaint tendon
#

Gonna need more information than that. Show us how you're firing the bullets and assigning the red lava bullet.

The lava bullet assignment isn't being replicated correctly (it's red in the owning client and grey in the other) and the fire event isn't being replicated correctly the owner is receiving a message from the server and it's also firing it's own bullet so you're repeating the same event on the owning client. You have two separate issues.

grim prism
final thicket
#

Best way to setup a default location for the player camera when joining a multiplayer map, before they get assigned a pawn? ๐Ÿค”

blazing thicket
#

Hey, guys! Need some advice. Faced with such a problem - when a player gets on the server map is loaded in parts, it turns out that you get almost on an empty map and after some time all the assets on it is loaded. This does not happen for a long time, but still annoying. Maybe someone knows any options as you can first load the entire map and then already let the player there? I would appreciate any advice

chilly haven
#

Hi,
How do you structure actors in a multiplayer game when you want to use an instanced mesh?
Right now I have hundreds of actors of the same type each with a static mesh. Different sizes and materials.
I understand I can switch to using an instanced mesh. I could make all the actors refer to that mesh.
But it occurs to me that I could also just use a single manager actor containing the instanced mesh and an array of per-actor data.
I assume that replicates efficiently? In which case it would generally be a desired optimization?

grizzled plank
#

hi, quick question, are functions replicating by default?

#

functions on the player character

dark parcel
grizzled plank
#

ok

polar python
#

Trying to get Steam session to join invitation, does someone know how I could fix this :

#

LogOnlineSession: Warning: STEAM: Failed to respond IP: XX.XXX.XXX.XXX

#

AdvancedFriendsInterfaceLog: Warning: UAdvancedFriendsInstance Return a bad search result in OnSessionInviteAccepted!

grizzled plank
#

i'll capture it and show you

#

this is the code, and i'll capture gameplay

dark parcel
#

you are only calling the function locally. This aiming stuff can probably be done with a RepNotify function.
The general rule is to read the compedium 4 times, practice and another 6 times if you still don't get it.

#

You probably should try to sync a variable first, if you can't do that, then you are already jumping too far ahead.

grizzled plank
#

i tried to sync an object

#

and succed with some jittering

dark parcel
grizzled plank
dark parcel
#

@grizzled plank btw summoning and removing the crosshair shouldn't involve networking imo

grizzled plank
#

imo too

#

that's why i asked if functions replicate by default

#

i figured it out i think

#

if its in a custom event which runs on server, does that mean that the following custom events also run on the server even if the custom event does not replicate?

#

and if so, how do i call the non replicated function when i holster the weapon?

rose egret
#

is is possible to write custom replication system over UE to support ECS to not use Actor ?
something like MassReplication ? I Found DeltaSerialize till now but dont know much

dark parcel
#

Basic multiplayer is like knowing what runs on server, what runs on client. What to sync, what the client sees/have access to, etc.

grizzled plank
dark parcel
grizzled plank
#

ty so much !

rose egret
#

@chrome bay yey im seeing its code right now its more like a mess not mass
isn't there any other way to replicate directly by having channel , custom net driver, ...

chrome bay
#

not AFAIK, the entire replication system is pretty centralised around actors

rose egret
#

i wonder if its possible to implement priority or rate control through one DeltaSerialized property ?
what if we serialize large data ? i guess the actor tries to send it in smaller chunks ๐Ÿค”

chrome bay
#

priority and rate control is all done at actor level

grizzled plank
dark parcel
rain slate
#

Hi, I'm working on my first multiplayer project, basically it's a "dodging game" the players are positioned on a board and giant objects are sent to the board if a player gets hit they die. The problem comes from the synchronization between the server and the clients, because the objects have physics and bounce, the problem is that the bounces are not identical and the clients die without even seeing what is killing them do you know how can i fix or trick it ?

#

I'm actually only using blueprint

dark parcel
rain slate
#

@dark parcel Oh thanks for your quick reply, i'll probably go for fake physich system then

lament flax
#

i got a box, on client 1 the collision is disabled, on the other clients, it enabled and blocking them.

the issue is that when the client 1 goes inside, for the other clients it will render weird stuff for the client 1 (like if if was blocking him)
any ideas on how to fix this ?

graceful flame
lament flax
#

I need to have areas blocked to specific clients

graceful flame
#

are you sure about that?

lament flax
#

yes

graceful flame
#

perhaps instead of client specific collision it can be character specific or channel specific

#

so that way both clients and the server have the same simluation of events

#

one player might have a character which can overlap certain actors and another player's character can't but they just happen to appear the same so to the player it looks like one of them is passing through the box but their character can not

#

that way you have the same end result without a difference in the overall simulation

lament flax
graceful flame
#

it doesnt even have to be a different character it can just be a temporary collision change but it should be replciated so that other players have the same state

#

basically what im saying is you want the state to be replicated to all clients so that the simulation is consistent but you also want to maintain a difference between what certain players can and can't do

#

could you describe the context a bit more to help me understand?

lament flax
#

as said above i cant use custom channels.
and since one client is the listen server, i have to change collisions on the specific client, not the server

graceful flame
#

Here's an example. Say there are two player controlled characters in a prison cell and one of them has an ability to walk through the cell bars. You would first activate the ability via key press on client side, then RPC a change in collision behavior so that the server receives the change and replicates it out to other connected clients. Then when the character walks through the cell bars it doesn't appear to get blocked from another client's view.

The cell bars might be a world dynamic while the rest of the prison cell walls are world static. While this ability is active the character can overlap world dynamic actors. Meanwhile the other character in the same cell doesn't change but still receives the update in state so that everything appears to be correct.

lament flax
#

using channels would be a good solution if i only had a few situations.

but in my game there is a ton of situations AND scenarios, so using channels is not possible

graceful flame
#

You don't need a unique channel for each situation

#

You have a change in state for each situation

lament flax
#

if i have 50 boxes

i want client 1 to access box 25.

how would you do that ?

graceful flame
#

each box would be made unique via tag or something

#

or using an int as an id

lament flax
#

and ?
how would you block the collision using that

graceful flame
#

They'd all be part of the same bp_box with a public variable int called ID