#multiplayer

1 messages · Page 45 of 1

thin stratus
#

You usually only call OnRep by hand if you need the same code to run for the server

silent sinew
#

That is what I figured

#

And you are correct - it did not propagate the bool value

#

So I'm testing inside unreal with 'Play as a listen server" only have 2 players

#

One is the Listen server/ first client

#

the other window is the second client

#

I have narrowed it down to this bool value no being set

#

If I switch to the function setting the bool locally instead of trying to call the server func to set it and have it propagate downwards to clients- then it works fine

#

So I need to figure out why the bool value is not replicating to the clients when it is set on the server

#

In my UPROP declaration - if I specify using "ReplicatedUsing" then it acts as OnRep but with the added functionality of the listed funciton being called AFTER the value has already replicated correct?

thin stratus
#

ReplicatedUsing is OnRep

#

That's all there is to that

#

Or RepNotify or whatever you wanna call it

silent sinew
#

thin stratus
#

Replicated would just be a Replicated variable

#

ReplicatedUsing is Replicated + OnRep function

silent sinew
#

Okay so Even if a client sets the bool value - would it replicate to the other clients - OR does the value HAVE TO be set on the server?

#

and it ONLY replicates downward

thin stratus
#

Always Server -> Clients

silent sinew
#

thin stratus
#

You gotta re-read the Compendium if you ask this :D

weak linden
#

Thanks for the clarification @thin stratus, I was under the impression is was required to call OnRep to "signal the value changed"

silent sinew
#

Oh I did

#

Nice try though

#

I have read that entire thing

#

And watched a crap ton of videos

#

So here I am now

thin stratus
#

If you want the Variable to replicate to Everyone, then it has to be set on the Server

silent sinew
#

Which is what I'm doing

thin stratus
#

And the Actor it is on has to be replicated

silent sinew
#

UFUNCTION(BlueprintCallable, Server, Reliable, Category = "Character|Call") void Set_OverlayEnabled_Server(bool InIsOverlayEnabled);

thin stratus
#

What is the setup here anyway?

#

Where is that variable on?

silent sinew
#

This is the function where I set the bool

#
{
    OverlayEnabled = InIsOverlayEnabled;
}```
thin stratus
#

What is OverlayComp

#

And where is that on

silent sinew
#

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="OverlayVariables", ReplicatedUsing="OnRep_OverlayEnabled", meta=(MultiLine="true")) bool OverlayEnabled = false;

thin stratus
#

MultiLine is for Text fields iirc

#

Not sure why you have that in there

silent sinew
#

Overlay comp is a comp on the character

thin stratus
#

Is the Component marked as Replicated?

silent sinew
#

It's because I'm copying from BP plugin and I used UEs Preview bp in c++

#

To quick copy

#

I'll remove it but I doubt it's related

thin stratus
#

It's not related

#

Is the Component marked as replicated?

silent sinew
#

So I have the character set like so

#

bReplicates = true;

#

Do I need to flag the comp this way too

thin stratus
#

I'm asking about the Component

#

Yeah, it's its own Class

#

It also has to be marked as replicated

silent sinew
#

damnit I striaght up searched for an asnwer to that and didn't find anything

#

Okay so In the constructor I need to set the comp to replicate too

#

let me check real quick

weak linden
silent sinew
#

setting it now

#

Score - OnRep is being called

#

Thanks all!

#

Tis a christmas miracle

real ridge
#

what can make problem with joinin server which is on my desktop? these are my router settings I dont see anything wrong, when I create server on my laptop instead computer I can join server from computer but i cant join server from notebook which is on computer

#

any tips?

latent heart
#

If they're on the same network (i.e. not going over the internet) you won't need to forward ports on your router.

#

It's probably a firewall issue on your desktop.

real ridge
#

but I am joinin session created on server, yea I thought same I tried deactivate firewall on desktop

#

but same result

#

there is only basic windows 11 firewall

#

hmm sudennly its not workin also on laptop LOL

latent heart
#

I suggest removing your port forward.

real ridge
#

ok I changed wifi 5 G to normal wifi on ntb and I joined

green fjord
#

hi im facing problem with replicates an actor.
I have an actor cube with simulate physics options set to true.
when i grab the cube on client, the cube grabbed in client's hand character, but on server the cube still in the original place.
i already set replicates and replicates movement to true on the actor cube.
how to solve this problem?

agile loom
green fjord
#

yes

agile loom
green fjord
#

im attaching it on client (not using rpc run on server)

#

but i also want the cube actor replicates the transform all across clients and server so any client that interact with the cube physically the other client can also see.

#

for example if a client push the cube by the client's character collision, the server can also see the cube got pushed by the client

agile loom
distant vault
#

Anybody know how to fix this problem? (the variable is a structure)

real ridge
#

Guys I have one question I am in multiplayer joined on my Dedicated Server with my 2 pawns both are planes (i turned off gravity to make it easier) however I see each other joined to map I dont see their movement any tips? this is how I am changing my direction

distant vault
green fjord
agile loom
green fjord
#

because the cube position is synced between server and client

#

the cube position on client will always follow the position cube on the server. will it cause rollback move on the cube?

agile loom
agile loom
real ridge
#

working

#

bcs I used to use RPC

#

but pawn should have replicated movement

#

maybe I did something wrong

thin stratus
#

@real ridge I can already tell you, before you put too much time into this, that a Pawn will not work nicely in terms of Multiplayer. There is no Movement principals applied.
Only Character's support this. Even if you get the Movement replicated it will look choppy and at best you will be able to do fully Client Auth Movement, at which point a DedicatedServer seems redundant.

real ridge
#

there have to be some way

#

I dont know if the way is use Character for plane 😄

#

and apply physiscs there

thin stratus
#

Dedicated Server sure, but Pawns don't have any built in Movement for Multiplayer

#

They only directly replicate their Transform

#

There is no Prediction, no Reconciliation, nothing

#

The only class in UE, by default, at the moment, that supports Client Controlled Movement over Network with proper features is ACharacter

#

There is a Movement Component on the Marketplace that apparently allows for more custom behavior

#

But that is paid of course

real ridge
#

Yes I understand, but I can do it somehow in own way?

#

to make it smooth

#

or predict and rpc movement

thin stratus
#

The Character Movement Component is doing that for the Character

#

You'd need to code your own, in C++, which can take a long while and requires the knowledge for it

#

Multiplayer is NOT a Blueprint Only thing

real ridge
#

Ahhh Epic why is this not done for characters.... :DDD how are people developing multiplayer games where you need to fly haha

thin stratus
#

They either use a Character

#

Or code this thing themselves over multiple weeks

real ridge
#

I know every class I have I have c++ and then I have created blueprint part of it

thin stratus
#

In C++

#

Yeah just saying

#

You can open the CharacterMoveComp

#

And see how big that class is

#

To get an understanding of how complicated this is

real ridge
#

propably not

#

it will be curse

thin stratus
#

Maybe

#

The only thing that Characters lock you to is the upright Capsule

thin stratus
#

The rest is actually nothing character/humanoid specific

#

But again

#

If it's really important

#

You might want to look at the Marketplace

#

And purchse that custom movement Component

#

Cause that is supposed to handle multiplayer and custom shapes

real ridge
#

lol character .h has 3k + LOC

thin stratus
#

Yeah that's just the Character hehe

#

It's pricey

#

But only if you can't afford it

real ridge
thin stratus
#

Like, it's not expensive in comparison for what you get

#

Hiring someone (or doing it yourself) will cost you several hours (weeks) or multiple thousands, cause it requires a higher skill level

#

So 350 is actually cheap as hell if one really needs this

#

But I would suggest you try to use a Character first

#

Pawn will not give you the wished for results

#

As soon as you introduce lag it will be shit

#

The only thing you could do

real ridge
thin stratus
#

Is override the Movement Replication in C++

#

Exclude the owning Client

real ridge
#

lol its my monthly salary kekw

thin stratus
#

And send the Transform to the Server

#

Then it's fully Client Auth

fathom aspen
#

I need to hire someone to try it for me

real ridge
#

or perfect

thin stratus
#

I mean

real ridge
#

like character

thin stratus
#

It will be okay for the Local Client

#

But the Simulated one, will look like shit

#

On higher pings

#

Cause you are lacking smoothing for the Simulated Clients

#

Which the CMC (CharacterMoveComp) also does

real ridge
#

okay so there are 2ways

#

try to use character

#

or buy expensive plugin

#

🙂

thin stratus
#

Kinda yeah

#

Game Dev is hard, especially Multiplayer ):

#

Not trying to talk it bad for you

#

But I know you will be back with problems really quickly with a Pawn

#

And waste a lot of time

#

Yo

real ridge
#

I am here since doing eos lol haha

#

took me 7 months to do login, sessions etc

thin stratus
#

What are you two contributing here? Go to #cpp or so

#

🗡️ 🦆

real ridge
#

as c++ newbie

thin stratus
#

Laura is a c++ newbie

#

She's just hiding it

real ridge
#

Ah i Dont know what to do now fack
I also found this video where man is doing dedicated server with pawns and movement seems fine https://www.youtube.com/watch?v=pz0VasHPS5g&t=152s but I believe your words so

In episode 15 of the UE5 game development series, we'll start adding multiplayer support. We'll first look at how network players spawn and customize our PlayerStart assignments. We'll then learn how client and server movement replication works, and add a client to server RPC (Remote Procedure Call) so our movement is replicated.

Previous Video...

▶ Play video
#

need to find out something

thin stratus
#

Tutorials can be really misleading

fathom aspen
#

So UE5 doesn't have multiplayer support and they add it?

thin stratus
#

If all they do is show it on local multiplayer with 0 ping

fathom aspen
#

Well I guess, I'm just going to compile

real ridge
#

I now I appreciate all of your effort

#

now I dont know if I will buy plugin which costs same as my monthly salary

#

and then I will die of no food

#

or try to make it by myself

#

or use character

#

I can't see what did you type sorry

thin stratus
#

Actually

#

On low budget

#

You should stay away from Multiplayer

fathom aspen
#

So MP is rich people exclusive now?

thin stratus
#

Yes

#

Always has been.

#

Na, but if you really have no budget, you should take the smallest scoped project you can manage

fathom aspen
#

I've been a millionaire all this time without knowing it

thin stratus
#

So how's your Multiplayer Project going?

fathom aspen
#

Banter aside, yes servers need money

real ridge
#

I will choose this but not sure if character can work fine as "plane" kekw

fathom aspen
#

But I was referring to the learning process

real ridge
#

NOTHING IS IMPOSSIBLE

thin stratus
#

Yeah I mean of course you can make a Multiplayer game with a non existing budget, especially as a hobby.

#

But then keep the damn scope small and fitting to UE

quasi tide
#

Just do co-op. Then you can do silly stuff in networking because you don't care about the hard stuff 😈

thin stratus
#

Dedicated Server costs aside (you should really not do Dedi Servers if you don't need to), it's also tricky to do a Multiplayer Project that goes beyond the stuff that UE offers if you don't have the know how to add that.

real ridge
#

now I Have feeling unity is better for multiplayer than UE epic does not care about people who want make multiplayer star wars or world of warplanes? they just care about first person shooters with character 😦

#

poor devs

thin stratus
#

Epic only cares about Fortnite

real ridge
#

AND WHAT ABOUT SHIPS! ?

thin stratus
#

And Unity about Ads

#

I mean, doesn't Fortnite have flying stuff?

green fjord
#

can transform from an actor be repllicated? for example game like rocket league where the ball actor transform are replicated across all clients and server?

#

how to achieve that

thin stratus
#

If you don't want to go into too deep of a rabbit hole with Rocket League, try the Projectile Movement Component first

#

There is a handful of things you can setup with that to make the ball relatively smoother

#

Just ignore the Projectile part of the name

green fjord
#

i try using rpc run on server and called on event tick but i think that is not the most efficient way

thin stratus
#

Yeah it's not

real ridge
#

it's for kids

quasi tide
#

Fortnite actually isn't that bad....in no build mode 😈

real ridge
#

problem with capsule on character is

#

u change scale of it

#

or move

#

i mean u Can a bit

#

not a lot

#

u have limitations there with it

quasi tide
thin stratus
#
  1. Add the following Components to your Actor:
    1.1. A SphereComponent (Collision) as Root Component
    1.2. A Static or SkeletalMeshComponent as Child of that
    1.3. A Projectile Movement Component
  2. Set the Actor to Replicated and Replicate Movement
  3. If you can use C++, do it there and override PostNetReceiveVelocity.
    3.1. In here set the Projectile Movement Component's Velocity to the received one.
  4. In PostInitComponents, (or BeginPlay in BPs fwiw) set the "InterpolatedComponent" of the Projectile Movement Component to the Actor's visible Mesh.
    4.1. Make sure any other visual Component (e.g. VFX) are attach to the Mesh from now on so they are also smoothed.
#

That's what I usually do and it creates quite the smooth moving actor

#

Of course not predicted but that's a different story

fathom aspen
real ridge
#

Because when I tried for example adjust capsule for plane I could only make it bigger to the height not on the width

#

there was problem

#

but I am propably talking to much already

#

ugh

thin stratus
#

Yeah it's locked in that way

#

best you can do is make it a sphere

fathom aspen
thin stratus
#

Not sure how additional collision would work though

real ridge
#

maybe can it be somehow deactivated?

#

and then used another collision box

thin stratus
#

Na, that's a lost fight

#

You can't

#

The CMC will murder you

real ridge
#

F

#

what is cmc

#

wtf

#

gmc

thin stratus
#

The Character Movement Component

real ridge
#

Ah

thin stratus
#

I swear

#

Over the last 7 or so years, I lost MINUTES of my life typing that name

quasi tide
#

WizardCell just needs to review it already 😭

fathom aspen
#

I can affirm this statement is true because it's made by a beautiful name

thin stratus
#

Shit, now the 5 macro keys of my old keyboard would have come in handy

quasi tide
#

"Oh - I'm injured. I can't do it." - excuses excuses. So hard to find good help these days.

thin stratus
#

I gave it to my employee

#

She had the same one at home and you can#t purchase it anymore

real ridge
#

I am now thinking why I am struggling to use pawn instead character when pawn is child of character ?

thin stratus
#

So I took one for the team

#

literally

real ridge
#

it's same thing I just have to deal with one sphere

fathom aspen
real ridge
#

char is child of pawn?

#

it's same either

real ridge
#

mrs

real ridge
#

i know u are master and everything I don't want to make you angry your compendium is my bible

thin stratus
#

I have a Keychron K4 now. Smaller and the added bonus of not having my cats destroy it by biting the nonexisting cable

#

But no macro keys

#

So I gotta type Character Movement Component

#

And Ability System Component

#

And Gameplay Ability System

real ridge
thin stratus
#

I swear there is someone at Epic who invents these names

#

Just to hurt me

real ridge
#

why u mention this name on Christmas

fathom aspen
#

Only when you become purple

thin stratus
#

But not as far as I'm concerned

#

So what now

real ridge
#

911

thin stratus
#

Also, see what is happening here

#

Laura is causing offtopic

#

Someone ban her already

real ridge
fathom aspen
thin stratus
#

ANYWAY, have a nice Christmas Eve or whatever, I'm back to gaming

real ridge
#

Happy Christmas I will take a nap and then try make plane from my thirdperson character and then spam you here with my problems

#

F*CK PAWNS 🙂

fathom aspen
#

Warm Christmas, I'm back to hot-reload the house compile

quasi tide
#

Jokes aside - I think it would be really nice if there was a CMC style thing, but not as many features. Like something for just simple movements with interpolation and correction. Built-in mind you.

real ridge
#

pssst

fresh cloud
#

yeah, tbh

quasi tide
#

Eren actually made something like this. But he discontinued it.

fresh cloud
#

you can implement INetworkPrediction interfance

quasi tide
#

Not the prediction plugin

fathom aspen
fresh cloud
#

but oh my GOD it's so fucking hard

quasi tide
#

The simple movement comp that I'm talkin' about

real ridge
#

When u are newbie and read all things about Unreal engine and epic ads u think WOW THEY HAVE EVERYTHING ITS PERFECT and then u start realising what all things are missing kekcry

fresh cloud
#

like, if pawn movement component came with inetworkprediction already built in

real ridge
#

🤣

#

i didn't said I dont have experience with unity but maybe it has better support who knows

thin stratus
#

Unity is the opposite of UE. It has nothing and you need to buy everything from their Marketplace

quasi tide
#

Unity definitely does not have better multiplayer support than Unreal.

fresh cloud
thin stratus
#

Less to document

#

¯_(ツ)_/¯

fresh cloud
#

yeah oh my GOD

#

if i didn't have the CMC source code

real ridge
#

ah why I am destroying my Christmas this way

fresh cloud
#

i would have NO fucking clue

real ridge
real ridge
#

this wouldn't do anyone

fresh cloud
quasi tide
thin stratus
#

I actually did that

fresh cloud
#

that's what i'm doing RIGHT NOW

real ridge
thin stratus
#

It was

fresh cloud
#

yeah, right now i have uh

#

autonomous to server and back down

#

i'm jsut having huge troubles making simulated proxies look okay

#

oh god it's so bad, today i'm trying uh

peak sentinel
thin stratus
#

The CMC is also async now

fresh cloud
#

simulation and using FRepMovement replication as the mediator

thin stratus
#

or going to be

real ridge
#

how many hours are u working on it

thin stratus
#

Which it wasn't back when I had to deal with it

quasi tide
#

Is that song on Spotify though? @peak sentinel

fresh cloud
#

so far it's been about like, 4 days of working on it? i'm taking it as simple as i can, ONE move send at a time, basic move acknowledgement, etc.

real ridge
peak sentinel
quasi tide
#

Wack

peak sentinel
fresh cloud
# real ridge why u need it what type of game u trying to make ?

CMC and Character is overdesigned for the basic pawn type i need, if I used character i would be spending cycles calculating movement mode, acceleration that i don't need, etc., i'm making a basic tank control pawn that's moved via root motions (basically old school resident evil)

#

so, i went back to pawn, have a custom pawn movement comp, then i'm implementing inetworkproduction similar to CMC, but with a LOT of it gutted out

#

once i get everything in place, i'm planning on thinning out a little bit more (i need to focus on putting base movement BACK in because eventually i need that for the design i'm going for), then i'll probably do a write up on my experiences?

real ridge
#

me

#

or helicopter

fresh cloud
#

it depends on what you might need it for, character DOES have flying mode? you could mess with the movement stuff and set the default movement mode to flying

#

but i don't know if acceleration and velocity tracking works well in flying mode

real ridge
#

and the thing is I wanted to make own physics for it in c++

#

and this can be problem

#

idk what to do

fresh cloud
#

mhmm, remember to think about things in the abstract as much as possible? again, if you side step the "walking" and "falling" modes and just stick to flying, if it has adequate acceleration and velocity that makes it feel like a plane, it doesn't matter that it isn't a humanoid you know?

real ridge
#

that's true

#

noone know it was person

#

if u change skeleton

fresh cloud
#

but i don't know how to STAY in flying tho, i know CMC can change the default movement mode, it's just a matter of staying in it and making sure it doesn't switch movement modes when you don't want it to

real ridge
#

maybe

#

i Can just deactivate gravity somehow

#

i willl take a look on it tommorow

#

ahhh everywhere problems

#

DEV LIFE SUCKS

fresh cloud
#

mhmm, i would first start of seeing if you can create a character actor that has the default movement mode as "Flying," and then after that make sure it stays in flying mode

real ridge
#

i think it can be possible but I don't have life energy to go try it now

#

i Cant imagine hours spend on big multiplayer games when companies are developing mostly own things

#

incredible 😄

#

for example war thunder

#

so complex

peak sentinel
#

its literally a simulation

#

and runs on terrible computers

real ridge
#

i don't get u

peak sentinel
#

for example war thunder
so complex

#

war thunder is both very complex and very good game that runs well on slow computers

real ridge
#

yes

#

there have to be hours behind it

#

or 3

sweet ore
#

Hi guys.
there's games like (club penguin) using system on server side
wich give everyplayer his own room called house. with maximum of users 20
my question is how can servers handle these rooms?
millions of users = million of rooms even offline users have their own room that you can visit. if i want to make this how can i manage all of the rooms for online - offline players?

#

yes club penguin uses smartfoxserver it is perfect for this work but unreal server it self can't so this by its own

#

unreal uses sessions for multiple rooms means i need multiple ports (very limited)

#

thats what i'm searching for but didnt find solution for weeks and also i'm asking alot in playfab but no one answer me so i come here to search for the soluton

pallid mesa
#

Happy holidays 🎈

fathom aspen
#

Happy holidays! will be back at the new year

fathom aspen
pallid mesa
#

Yes

twilit radish
fresh cloud
#

yeah, this is the huge thing. the way that UE is built, there is only ONE world, and in order to have multiple instances you ahve to spin up more processes, but then i'm always concerned "does that approach bloat memory? for example, is it loading the collision of my meshes per instance and i just have that memory bloat or can my instances uses the same memory for it?" it makes it really hard, but then again that's why MMO people are paid to be MMO people and STAY in the MMO pool i guess tekkThink

twilit radish
#

In general the reasons why people use multiple worlds is to indeed prevent that issue where one instance has to load a bunch of stuff, so yes there's overhead per instance. Although I don't know exactly how much that is with default Unreal (also of course depends on how much your game loads in / processes).

#

Although this solution isn't necessarily just important for MMO games. Imagine you have a game with 1 vs 1 game mode, then you ideally don't spin up an entire instance for 2 players all the time 😛

quasi tide
#

Oh dang - GMC handles replicating montages/root motion as well. @fathom aspen. Review please 🥲

twilit radish
pallid mesa
#

Poor Wizard, always backlogging tasks on his back

fathom aspen
#

I knew that, but now I got hyped up, so trying it tonight 😍

pallid mesa
#

See what you did Duro? Now the kid won't sleep

quasi tide
#

He's the one who paid the high price tag and decided to not use it for like a month or something like that 😅

pallid mesa
#

We need him performing well on CI-Games!! 😄

twilit radish
#

CI-Games?

fathom aspen
pallid mesa
fathom aspen
quasi tide
#

Noice!

twilit radish
#

Wait for real?

#

Awesome! :o

fathom aspen
#

Am I now allowed not to try GMC tho?

pallid mesa
#

🤣

quasi tide
#

The people must know!

twilit radish
#

With "the people" you mean.. You? 🤣

fathom aspen
#

and @whole grove

pallid mesa
#

ah right, she loves pings, innit? @whole grove

fathom aspen
#

She loves my pings 🧙‍♂️

#

She was WitchCell a few hours ago 🥲

twilit radish
#

Lol

fresh cloud
#

oh man don't even get me start on cmc with root motion, it's so dense

#

i still don't know what a root motion source is really

#

like, root motion extracted from animation... that's not a rootmotionsource right?

#

root motion from animation gets extract to... the rootmotionparams structures

#

but then what the hell is a rootmotionsource?!

twilit radish
#

What Is Root Motion?
Put simply, Root Motion is the motion of a character that is based off animation from the root bone of the skeleton. Most in-game animations are handled via cycles in which the character's root remains stationary. This cannot always be the case, however, as we can see in the example above. To handle this, we need to take the motion of the root away from the character and apply it to the character's capsule instead. That is the essence of what Root Motion does in UE4.

fathom aspen
#

Is this ChatGPT?

twilit radish
#

No 🤣

fresh cloud
#

like yeah, so that style of rootmotion you use "ConsumeRootMotion()" on the skelemesh comp

twilit radish
#

It's called the Unreal docs 😛

fresh cloud
#

and that gets extracted to a rootmotionparams object

#

but what's a rootmotionsourcegroup?

#

where does THAT come from?

twilit radish
#

Now you're asking too many questions.

#

😂

fathom aspen
fresh cloud
#

i dunno right now i don't NEED to know, and i'm not being PAID to know, so i'm just turning a blind eye

#

LMAO

obsidian basin
#

Hey all, I asked about this last night but I was very tired. So lets say I have a health stat and the player takes damage from another player. Have I got this right for order of operations:

Damaging player shoots other player, tells them they took 20 damage.

The player that took damage reports the amount to the server and the server then passes it down to all clients.

Is that right? Would that not be ripe for exploitation?

fathom aspen
obsidian basin
#

I'm actually sort of shocked, it seemed that with UE5's new open world stuff including the chunks they could be easily used for MMO type stuff. Like, no one on chunk X - don't load it up.

#

Maybe they're working towards it.

twilit radish
# obsidian basin Hey all, I asked about this last night but I was very tired. So lets say I have...

If cheats matter to you then no, if a client can tell the server that they got damaged or shot someone and specify the amount of damage you are in the cheats zone. A client should tell the server it shot (ideally), or tell the server it shot someone (easier, more cheat prone) and then the server decides how much damage they should take based on what weapon used, upgrades etc. And from there the server can send it to others.

obsidian basin
twilit radish
#

The golden rule with clients is that you can never trust them if you care about cheats 😄

obsidian basin
#

Yeah, that's why I thought the way I was thinking seemed unsecure lol. I keep forgetting that as long as the server has information on health, damage, etc all the clients have to do is tell them something happened.

#

Would you normally put those sorts of functions on the gamestate blueprint?

#

Or does it matter

twilit radish
#

Depends honestly, sometimes gamestate, other times the player state or player controller, character/pawn etc. They have different purposes 🙂

#

Although sometimes it doesn’t matter too much.

fathom aspen
#

There's an already TakeDamage in AActor (And ApplyDamage in GameplayStatics)

twilit radish
#

but stupid floats

obsidian basin
fathom aspen
#

FWIW there's a BP only GAS plugin

#

I forgot its name

obsidian basin
#

Oh, really?

#

I don't know why I'm shocked

fathom aspen
#

Yes, someone help me recall what it's called

obsidian basin
#

Searching the marketplace for GAS Blueprint and it brings up gas station assets

#

Oooo

twilit radish
#

Ever since I've seen Cedric yell a million times over GAS I'm not sure I want to learn it lol.

obsidian basin
#

$34, but that's tempting. the GAS system looks fantastic, tbh - here I am storing attributes in arrays and structs like a shmuck

fathom aspen
#

You can use my creator code at the time of purchasing

dusky yarrow
twilit radish
#

Lol

obsidian basin
#

Haha, I was going that route, Iskander. Or rather was planning to.

dusky yarrow
#

lol yeah dont

#

GAS is cool for the most part

obsidian basin
#

I've been working in a proprietary engine for 20 years and there's a lot UE does way better (No surprise, it's designed for licensing and third party use), but having an actual attribute system instead of trying to hack something together was always missed.

twilit radish
#

Since when do you go near multiplayer Laura

#

👀

fathom aspen
#

Since I brought her over?

twilit radish
#

I feel personally attacked.

#

🤣

peak sentinel
fathom aspen
#

It's the light-weight version of pensive

obsidian basin
#

I mean, I'm jumping into the fire for learning multiplayer. I commited to re-make a game that was released in 1998 in UE partly because I want to see how quickly it can be made nowadays (spoiler: MUCH faster) and partly from nostalgia lol. However, it's an MMO and I hold no delusions of actually MAKING an MMO. I'll just be content if I can hop on a local server with a friend and we can do some stuff.

My overall goal is to learn more about networking and so far it's succeeding

#

lol

fathom aspen
#

So it's an MMO and it's BP-only, I like it

obsidian basin
#

MMO minus the first M

#

It will never see the light of day, but I'll get some joy out of building it.

quiet wolf
#

Can someone please explain to my idiotic self how to fix my damn health bar and widgets to actually work and not send errors. This has actually started to piss me off cause NOBODY will explain it simply step by step

obsidian basin
#

Haha, well I had looked into OWS but sadly the biggest hurdle is no seamless zone loading.

quiet wolf
#

this is for multiplayer

obsidian basin
#

You're not an idiot, friend - you're just learning.

quiet wolf
#

i play, i attack the other player, i get the last error in the line of errors and the bar doesnt update. The other widgets show up but give errors every time i exit the editor

#

no matter what ive done i cant fix it

#

if you want i can get in a call and show you my code, or something, but i've been getting this error for the past 2 hours

#

how? I dont know what the hell im really doing. I follow tutorials and learn from that. The health bar is a bit far

fathom aspen
#

If you're following tuts then itsyourproblem.jpg

quiet wolf
obsidian basin
#

The tutorial could be out of date?

#

I've run into a few that don't work anymore due to changes from 4.x to 5.x

quiet wolf
#

there was one series that was detailed and everything, but it cost 60 BUCKS for something im gonna use once

quiet wolf
#

the thing is its the only multiplayer one i can find for a health bar

#

oh yeah, i wasnt about to do that

#

well then how do i get it on multiplayer?

#

cause the one i had before that WORKED woudn't work at all

fathom aspen
quiet wolf
#

my main problem is just getting the errors to stop sending

#

cause all my widgets are giving errors

fathom aspen
#

Easy, just remove the code in question

quiet wolf
#

....

#

thats not really an option my guy

#

i need those widgets

fathom aspen
#

You could be doing something totally wrong

#

You haven't shared any piece of code

quiet wolf
#

so how do i debug

fathom aspen
#

Only proposed to get on a call and neither of us are down to help in calls

#

At least not me neither@whole grove

obsidian basin
#

I mean no offense, but debugging is a -crucial- skill in game development. Luckily, this sounds like a fantastic opportunity to learn.

quiet wolf
#

it keeps saying my add to viewport is throwing a none

#

thats what happening to most of my widgets

fathom aspen
#

That's unfortunate

fresh cloud
#

OH laura i started using breakpoints in rider with editor

quiet wolf
#

what i've been seeing is that all the return values i have, no matter what they are, are throwing none

fresh cloud
#

it turns out i was just hitting run, not debug

#

tehepero

quiet wolf
#

so whats a breakpoint, might I ask?

fathom aspen
#

That's like reverting coro to the cpp20 syntax

#

I like it

#

The one in red

quiet wolf
#

you know what i've always wished error logs did? Told you WHY IT AINT WORKING

peak sentinel
quasi tide
peak sentinel
quasi tide
#

You are doing something with "None"

quiet wolf
fathom aspen
quasi tide
#

Perhaps you're trying to add something to the viewport on a server, where there is no UI to add

peak sentinel
quasi tide
#

If they run as client, it can.

quiet wolf
#

dammit

#

i closed the editor with 3 things undaved

fathom aspen
obsidian basin
#

Ok, this GAS plugin is absolutely worth the cost, holy cow.

quasi tide
fathom aspen
#

Not before xmas is over demondevil

fathom aspen
quiet wolf
#

okay, so i figured out where the problem is, now its just a matter of fixing it

obsidian basin
fathom aspen
#

Our guesses helped, magnificent

quiet wolf
#

the problem with the health bar is that its not triggering the UpdateHealth_WidgetBluprint custom event

#

the target is invalid AKA not giving anything

#

so how can i get it to give me the right thing

#

cause it triggers it, it just aint running

quiet wolf
#

okay, got the widgets fixed, tho im using a current health bar that you might have to explain how to make multiplayer cause its for singleplayer (its a whole different system)

#

plus its the one i was using so i actually understand it

#

closest message to ping you at 🤣

fallow shadow
#

because they're designed for you not to learn jack shit and just to follow them in a pinch

quiet wolf
#

so it works fine on singleplayer, but as soon as I try to use it on multiplayer it says that it "accessed none trying to read property UI Bars" at Set Health Bar Info. Im using the play as client since i figure multiplayer is multiple clients and not a listen server, whatever that is.

sinful tree
#

That sounds like whatever code you're using to create / display widgets is also being run on the server, in which case, won't work as dedicated servers can't have widgets created on them.

quiet wolf
fresh cloud
#

UI should be done locally, but information used by the UI needs to be in a place accessible to the client

#

playercontrollers are both on the server and on the client, so if you store information there, it can be pulled by both, though clients need it replicated to them

quiet wolf
#

it seems like everything is run on the server

fresh cloud
#

mhmm, the server has master copies of everything, clients get data replicated to them

quiet wolf
#

where would i do it to run the UI locally?

fresh cloud
#

controllers can call widgets to be create, you just want to make sure you put any code that does that behind an authority check or is locally controlled check

ancient adder
#

Whats the most efficient way to add an element to a replicated array of structs?
For example if add an element to a replicated array of structs(struct contains 10 doubles) with default values it takes 80 bytes

quiet wolf
#

cause yeah, rn i have all my widgets in my controller

#

and i just used is valids on the others to get rid of errors that it gave me

fresh cloud
# quiet wolf and i just used is valids on the others to get rid of errors that it gave me

so, let's say you have health stored on the controller as an int. playercontroller exists on both the server and the client, and you need to replicate data downward from server to clients. you should rope off any code that is UI related from the server so it doesn't run it (it doesn't need to). a good base flow would be playcontroller spins up the health UI element behind an authority check and checks for remote only (this prevents the server from running it), it grabs a replicated variable from the PC as an int called health with a rep notify attached to it. it starts full health, but the server calculates a damage impact and lowers the health variable on the SERVER version of your PC. it will then replicate this new value to you. when you receive the new value, the repnotify goes up. in this repnotify, you can locally run any event that you need to update your health widget.

#

rep notifies, iirc, are only run locally on clients that receive the replication

#

you can abstract this concept to other things, bullet amounts, etc.

quiet wolf
#

I-

fresh cloud
#

SORRY yeah laura is right too lmao

quiet wolf
#

Is it possible to get that in tutorial version?

fresh cloud
#

i don't know one off the top of my head, sorry 😦

fathom aspen
#

Also unless reasons, I would store health on the PS or Pawn

quiet wolf
#

Okay well I'll try to figure it out. I can't do it rn. Heading to church

fresh cloud
#

YES wiz is also right, where you store this info is important, if you store it on the pawn, it is initialized when the pawn spawns and is only active for the life of the pawn, which is the way it should be

quiet wolf
#

PC only game

#

Oh

#

thank my asburgers

#

I don't get jokes lmfao

#

✨ disabilities ✨

fresh cloud
#

but still yeah, just keep in mind certain things only exist on the server, certain things exist only on the client that owns the object and the server, and certain things don't exist on certain clients (i.e. they can't see the PC of other clients, nor can they see the GameMode, those will both give you nullptr), and UI is driven locally through locally available data, and the server versions of things can and will desync from what happens locally, and you need replications to keep things together

fallow shadow
#

how would i test the steam subsystem

#

how do i steam inside editor

fathom aspen
#

If I would guess it wouldn't work with "run PIE under one process" is on

#

So turn that off

fallow shadow
#

i actually launched the editor through steam by launching vs through steam lmao

#

it doesnt work, big surprise

fathom aspen
#

You should be testing through standalone anyways

#

How would you seamless travel in editor

#

Turning that setting off is like launching standalone

#

So you're not saving yourself time here

fresh cloud
#

i THINK, not 100% sure, but they just figured out seemless travel in editor with 5.1

#

LMAO

#

but that DOES not matter

quasi tide
#

It's experimental

fresh cloud
#

yeye always do stuff standalone, it's the most consistent

fallow shadow
#

how do i even standalone

#

lol

#

but i figured it out

#

im deadass blind

distant vault
#

Anybody know why i cant edit this in the DataTable?

warm goblet
#

Nvm

fathom aspen
#

How about plsStandalone()?

distant vault
bronze mauve
#

Does anyone know why my host sees the client character animation jitter, while the client sees both characters smooth as butter

low helm
#

depends what you mean by animation jitter

low helm
low helm
#

Alright kids here's a doozy. Look in the bottom left of this image, here is my nightmare. Under normal conditions, I have about 400 of these little actors moving around just fine at 120FPS. However, if they begin to die (destroy actor from any source), there is a small chance that performance absolutely tanks to 30FPS within the span of 1 second. I have tested to be certain of this.

I replaced the code so they don't path at all, just move in a straight line to 0,0,0, problem remains.

These are Replicated and ReplicatesMovement, I am playing as a Client.

#

I turned off all movement, so the only code running is as shown, the problem remains

prisma snow
low helm
#

session frontend is incomprehensible, it's not even my code

#

it's just a bunch of waits

prisma snow
low helm
#

an enormous amoutn of time is being spent on "Self"

prisma snow
# low helm

It seems it is inside a "RotationFunction", does that sound familiar to you?

#

Is that the frame(s) where FPS are really low?

low helm
#

Yes it is slow there

prisma snow
#

I don't have any idea why the tick event is executing something so expensive there, since the only tick on your graph is getting random numbers.

low helm
#

I believe that clients are trying to tick an object which the server has destroyed

#

because the same overall issue happens even if this Rotation function is turned off

prisma snow
#

Ahh that makes no sense

#

If the client object is still alive, ticking it should be no problem

low helm
#

almost all the cost is in "Self"

prisma snow
#

What about using an actor manager that selects and kills one or more units each tick? It would be mostly the same logic but cheaper since a sigle one needs to do it.

low helm
#

running validity check changed nothing

#

already tried that

#

keep in mind, 95% of destroyed actors do not trigger the meltdown, only a small percentage do

#

Also, I found that running the Editor as not a Single Process fixes the problem

prisma snow
#

I'm not able to see the issue, usually when I see "self" I try to write my own scope cycle counters (in C++) to get firther information about which lines of code are exactly slow

prisma snow
#

It might be a non-issue in packaged game

#

Worth testing probably

low helm
#

even if that's true, this is a very early project I don't want to develop a whole game with this bug plagueing testing 😦

And I'm almost positive the problem has nothing to do with my code, I've stripped the code all the way down to just "destroy actor" and that alone triggers the meltdown

#

I appreciate the help though

prisma snow
#

CPU stalls are threads waiting for other threads

#

So that's not the problem

low helm
#

what about this FTcp message at 1000 ms?

#

or should I only look at the game thread

prisma snow
prisma snow
# low helm or should I only look at the game thread

Usually if the game thread is waiting, it will CPU stall too, afaik. It is not an scenario I've seen much, but it happens in my project now due to using lots of multiprocessing and Mass in other threads, which has freed the game thread a lot

low helm
prisma snow
# low helm

yep, to me it seems like nothing to worry about

#

Have you tried to remove partial parts of the kill code and see if the problem persists?

low helm
#

I'm BP only

#

I just say "Destroy Actor"

#

and the bug occurs

prisma snow
#

No, I mean

#

Have you tried to just call the random node and not killing the unit for example?

low helm
#

Yes the bug will not occur in those conditions

prisma snow
#

Ok, then it is kind of clear where the issue might be. Any logs on the debug output?

#

Also, have you tried to run the project with a debugger? Not sure how that works in blueprints

low helm
#

debugging in blueprints means "put print strings all over and forget about them for months"

prisma snow
#

nope, that won't be useful 😅 In C++, running with the debugger will trigger exceptions/checks that might only cause hitches in the game and point to what issue was the problem

low helm
#

well after like 8 days I think I fixed it, if you google bandwidth they give you all these copypastas to put in your INI files to make your bandwidth over 9000, I just deleted them

#

thanks for holding my hand through this trying time

low helm
#

Ok that was all wrong

#

I have reproduced the problem

#

and have an even better answer

#

If I open the blueprint and select a debug object, and that debug object dies, THAT is exactly what causes the bug

#

This holds true even I close the Blueprint

#

Seems like an engine bug but also seems impossible that nobody has noticed this before

fiery wadi
#

Merry Xmas Everyone, Just a quick couple of questions : )

#

1 : Does OnPostLogin fire everytime a person joins a game (Even in standalone mode?)
2 : Why does this clear the UI on the Server Screen but not the Clients?

#

I am gussing HideUI needs to be replicated from the PlayerController
Please bear in mind this is all testing and working out what is doing what so I do realise this may not be "Optimal" or "Ideal" at the moment its so I can get a clearer understanding of what is actually happening. 🙂

thin stratus
fiery wadi
#

Ahh ok that makes sense.

thin stratus
#

What you are trying to do there with the UI has a better place

fiery wadi
#

Thank you, I took the plunge and bought a Starter Multiplayer Project from the Unreal Store to see if it could shed some lightbulbs moments.

thin stratus
#

But requires some simple C++ Code

#

Also unless you have the UI referenced in your GameInstance, calling this on the CONNECTED player to clean the previous UI is wrong

#

Cause this is a new PlayerController

#

Not the one that you had when you pressed the Join Game button

fiery wadi
#

So everytime a player connects to a lobby it creates a new player controller?

#

it doesnt auto-reference the one the player was currently using when he clicks Join Game?

thin stratus
#

Yes, HardTravel (connecting/disconnecting/hosting/etc.) as well as a Seamless Server Travel to a Map with a different PlayerController class will cause the PC to be recreated.

#

That counts for almost all Classes

fiery wadi
#

never realised that.

thin stratus
#

Better to clear the UI directly when you press the Join Game button

#

But overall, exposing APlayerController::PreClientTravel from C++ to BPs would be the better solution

fiery wadi
#

im scared to touch C++ i tried to use it from course in udemy and tutorials on youtube i couldnt get it to work, I done some C# and VB.NET lol as well as web languyages before. xD

thin stratus
#

Be aware that Multiplayer without C++ is going to be a fight

fiery wadi
#

What a simple gauntlet style game?

thin stratus
#

Doesn't really matter

#

A lot that is Multiplayer related doesn't exist in BPs and often has to be hacked around or can't be achieved at all

#

Means eventually you will reach that "end" of BPs

fiery wadi
#

Ahh ok so you have to kind of mix and match with Bp and what isnt in BP you have to reate yourself in C++

thin stratus
#

Yeah or simply use C++ directly

fiery wadi
#

The documentation for multiiplayer or UE in general seems to be pretty bad and trying to find a upto-date book or something to work from is nigh impossible 😦

thin stratus
#

Tbh not much has changed in terms of basics

fiery wadi
#

So as someone who kind of understand blueprints to a degree the multiplayer is a sea infested water xD

#

Need to pop out for xmas dinner with the family, Thank you for the information. I need to research this a bit more I think. 🙂

thick jungle
rocky kestrel
#

I have mmo style game with dedicated server. I want to create guild/clan/tribe system. I have "map variable" in gamemode that contains tribes and data. What is best way to get variables from server to local widget. in this case playerlist? First 2 images in player controller. Second light blue from local widget.

#

and this calls it in local widget

thick jungle
# rocky kestrel I have mmo style game with dedicated server. I want to create guild/clan/tribe s...

GameMode exists server-side only. If you want to transfer data from the server to the client, activate an RPC call (Event -> Replication, select the correct one for this particular call. Multicast will trigger it on all clients + server) on an object that is owned by the server and the event will trigger on the networked pc. Attach your data and once it's inside the client display it on screen as you would with a non-replicated variable

option 2: set Replicated=true on the variable (again, NOT GameMode!) and it will automatically keep the value the same across all devices

#

the PlayerController is probably a good one to use for this (not 100% sure if server can send RPC on PlayerController), since each client only has its own PlayerControllers. Meaning if you Multicast from there, it'll only be executed on the server and on the owning client

rocky kestrel
#

@thick jungleThat what I did in those pictures works 100% to get data from gamemode. only problem what I see is somebody could call that (local widget) event DDOS style and crash server.

thick jungle
rocky kestrel
#

you mean that variable in Gamemode what i'm trying to get to local widget?

thick jungle
#

again, not gamemode. but yes, exactly

rocky kestrel
#

Okay thanks!

thick jungle
#

There is no such thing as a GameMode inside the client 😉 it can't replicate to something that doesn't exist

rocky kestrel
#

okay 😄

bronze mauve
# low helm one thing to check is if your framerate is just being throttled for the whole wi...

Like it seems jittery.. idk it's like the animation itself, the movement seems okay.
It's only on the server, and the simulated proxy for the client is what's jittering. The server character is smooth on the server.

On the client, both characters are smooth.

The only thing happening is basic WASD movement.

What do you mean by the framerate being throttled for the whole window?

#

I've read in some posts that it could be because the server ticks the skeleton's animations only when they receive network updates, and recommends setting bOnlyAllowAutonomousTickPose to false on the mesh, though that makes the animations tick really fast and it looks like they are played in fast motion.

#

But I've never seen this before in multiplayer, and it's literally with a new 5.1 project with just movement and an IdleWalkRun blendspace

distant vault
#

I’m doing the rotation on the client not on the server

fiery wadi
#

@thick jungle Thanks for the reply, I was looking at this multiplayer project on Epic i got for a few pounds.

#

This is inside the Character not the controller

#

As i Understand Executes on Server = Execute this code ONLY on the Server so no clients.

#

Executes on All = The Server will run this logic on all connected clients. , Run on Owning Client = Only execute on this client? , Multicast = Server send to ALL clients.

#

As you can see there is some mixup between Executes on All (How can a Client have a Execute on ALL command) when Client A cannot talk directly to Client B without it going through the GameMode(Server) ?

#

Multicast could be somethging like Player X has been killed by player Y to all connected client chatboxes i assume ?

cloud stirrup
#

hey i guess this would be best place to ask about replication issues?

cloud stirrup
fiery wadi
#

Not sure at what point you would use "Run on Owning Client" if all data has to go through the Gamemode(Server) before being accepted. (Example Server does the player have enough ammo to keep firing? Server replies No, Player cannot fire anymore so this would lead to from what i guess a scenario of

Client requests from Server (Run on Server) "PlayerAmmoCount" Server returns 0 to the Client -> Run on Owning Client (Stopfiring)

#

@cloud stirrup I recreated MSN Messenger many years ago using Socket's and TCP/IP connections and stuff but the wording of some of the replication commands are a little confusing i find.

cloud stirrup
#

run on owning i guess is a way to allow the playe to have auth over that event or whatever was spawned?

#

eg while in a cutscene maybe?

#

idk though im nowhere in depth but from how it reads as a thing i assume thats its uses.

fiery wadi
#

I guess it would depend as the player could run the cutscene without the "OK" from the server i guess

#

like for example in World of Warcraft - Did player kill final boss (Run on Server) -> Yes/No - Server replies Yes (Run on Owning Client) Cutscene

#

Im really new as well so i am guessing myself.

cloud stirrup
#

thats my thinking

fiery wadi
#

Theres a good PDF UE4 Networking Compendium I read to start

cloud stirrup
#

run on owning has no effect else where. so last night i was messing with it. if it was set owning client it didnt set player to ragdoll when shot by any client except if it shot itself. on server it did as expected except ragdolling was inconsistent accross all 4 windows. to the point for client a. it was at x1 y 1 b was at 1 0 c was at 0 1 and d was at 0 0 for example. so you couldnt say for certain to a team mate the body is anywehre XD

#

and this came from a server side "player hit" blueprint

fiery wadi
#

lol i wish i could help you with that. xD i can barely get 2 players to connect to each other atm XD

cloud stirrup
#

using 3rd person or 1st person example?

#

1st seems messed up atleast 3rd person seems to replicate properly

fiery wadi
#

3rd person I can do the Create Session, Join Session, Find Sessions and Open Level atm

cloud stirrup
#

idk if its project settings or something but its not 100% there

#

im going for a dedi setup which i know is a pain to do with src unless theres a trick in editor on epic

fiery wadi
#

So now I am looking at how do i create a custom lobby like for example in Dead By Daylight the player goes from Main Menu to Play as X to Find Game to a Lobby Area where they are with the other player to then loading the match map after all ready up

cloud stirrup
#

flow would be menue -> load local player details -> register player to lobby -> save player state to level loaded into. idk exactly how to do that myself yet but id probably be intergrating a db or json storage to do that.

#

chat gtp for all your every issue XD

fiery wadi
#

🙂

cloud stirrup
#

picture to reference my issue. all 3 in a different place 😦 i dont even know where to begin other than iv explored all various combinations of replicating. autonomous proxies and other stuff.

signal meteor
cloud stirrup
signal meteor
cloud stirrup
#

you mean turn back off physics and make server refresh the character?

#

i could try

signal meteor
#

that works too. i'm more familiar with unity though but I assumed you had control of when you can stop synchronizing the player but it seems like Unreal automatically unsynchs when physics are turned on. what you said works but it may get weird results like the ragdoll teleporting or doing a weird interpolation

cloud stirrup
#

ahh so soon as i set phys its random i see. il keep trying other things.

fallow shadow
verbal tendon
#

wrong is such a strong word 😄

lean surge
#

anyone know exactly what bIgnoreClientMovementErrorChecksAndCorrection does? As in does it stop correcting client moves on the server side, or just ignore server corrections on the client side, or something else?

fallow shadow
winter marten
cloud stirrup
fallow shadow
#

fair

cloud stirrup
#

it stole my credit card. jumped right out the screen and ran away

peak mirage
#

Hi guys, just a quick question, if a client can connect directly to a server using server address, how can the server block or close that connection? (for example, because of fail login credentials)

fathom aspen
#

PreLogin in GameMode is meant to take care of that

peak mirage
fathom aspen
#

**22 mins, and it could have been seconds if I noticed the question by the time you asked 🤧

peak mirage
#

Btw, here is a question I couldn't find the answer, how do you make 2D spatial grid node in replication graph use pawn's location instead of view location for distance calculation?

fathom aspen
#

I don't use ReplicationGraph, but it shouldn't be that different from how you would do it with the regular relevancy system.

#

I answered that a while ago

#

And well you can't override that code very easily, not if you don't have a custom source build, so you instead override that in IsNetRelevantFor for example

peak mirage
fathom aspen
#

Or w/e the corresponding function for the RG is called

#

But pretty sure it's the same, as it's called on actor

peak mirage
#

Thank you for your help 🐣

#

btw, Merry Christmas 🎉

fathom aspen
#

Glad I could help!

#

To you too!

empty ferry
#

Anyone have a moment to help with replicating a bool? I've been pounding my head for about 3 days on this one. This works exactly as intended for the server connection, but the client pretends that it isn't even though its printing true. sec for screen shots.

#

this branch will run false and use the item further down the exec, rather than selling an item as intended on client

short arrow
empty ferry
near granite
#

if a client pushs enter key to switch to next level, other clients all should go to the next level.

How can i make them?

help me~~!!

hoary spear
#

Perform a server travell

empty ferry
#

if you want to switch to another level, the host, and all clients must also switch, if you don't then you basically disconnect. This is my understanding, but i'm still experimenting with this one

torpid girder
#

Hello, I was wondering how to implement chat, do people integrate external services like xmpp servers?

pallid mesa
#

it depends on what your requirements are for a chat

#

you can pretty much have an in-game chat without third party solutions just using unreal rpc system

dry pebble
#

I noticed some convos in March between Vori, Exe, Kaos, all you multiplayer experts, all talking about handling sprinting in the CMC with a GAS stamina attribute. There were a lot of ways suggested to handle it.
I'm up to this right now (I have a sprint toggle on a custom CMC) and while sprinting, I want a GAS stamina attribute to drain.
What is the most up to date way to handle this to try avoid double RPCs with GAS and CMC?

pallid mesa
#

you dont need an ability, just a native action in this case.. you can have your stamina attribute overriding base value locally using cmc's prediction, which is what'd work the best if you want accurate stamina prediction

#

But all the attributes that have to do with movement are always going to be implemented better in tandem with the cmc

#

Can also do a GA, but you wouldn't save a single RPC

silent sinew
#

I'm trying to get this weak obj ptr captured by this lambda but it is always stale

#
TWeakObjectPtr<UFw_OverlayComp> tmpCharWeakPtr = this;
auto Lambda = [tmpCharWeakPtr, tmpDuration]()->FAsyncCoroutine
{
    co_await UE5Coro::Latent::Seconds(tmpDuration);
    {
      if (UFw_OverlayComp* tmpOverlayComp = tmpCharWeakPtr.Get()
      {                                 
      }
     }
};
Lambda();```
fathom aspen
#

Maybe after you figure out what 🤧 really means

#

A man has many faces

#

That could be one of them

#

co_await pls()

silent sinew
#

I just realized

#

sorry

#

I'm In Mp

fathom aspen
#

It's okay, it was a payback we had to take 😔

silent sinew
#

@whole grove the tmpCharWeakPtr is just not labelled right. It's an actComp but I wrote that Char instead

#

It's the terms that throw me off sometimes. Scope I assume means the new row of brackets?

#

Having tiers throws off lambdas

wheat niche
#

hey, im currently working on a steam server browser and im wondering how i can display the ping from the server in realtime. It would be great if someone could help me. I already managed it to get the ping but i want to update it in real time

pallid mesa
#

you can query the value on a timer at a frequent rate

#

or.. - sight - create a coroutine 🙄

#

I saw that, and gotta say GJ Laura

#

really appreciate the effort will actually give it a try now 😄

fathom aspen
#

By giving it a try you mean writing an article on how it's used in #multiplayer ?

pallid mesa
#

i mean, why not

#

but... there's not much to say lol X'D

fathom aspen
#

One liner articles are cool too

pallid mesa
#

haha lol "where/when to use it" is a good type of article

#

use case examples and the benefits

wheat niche
pallid mesa
#

I can't with these two xDD

fathom aspen
#

You have been co_awaited

#

Sorry

dry pebble
#

Also are there any articles written on this? Couldn't find any, I'll check pinned though

wheat niche
pallid mesa
#

No there's no article written about this... been annoying kaos for him to write about native actions but he's busy

wheat niche
#

there are multiple options

pallid mesa
#

I dont remember the syntax rn but it's there

pallid mesa
fathom aspen
wheat niche
pallid mesa
dry pebble
pallid mesa
pallid mesa
dry pebble
fathom aspen
#

And it was not me who suggested, but tranek 🤧

pallid mesa
#

Wizaaard.. you dont do that xD

daring gorge
#

what class should i use if i wanna initiate a rematch and what would be an ideal way to do so?

wheat niche
#

hey, does anyone know how to get the players current ping

daring gorge
#

player state

#

get a ref to their player state and you can get ping from there

wheat niche
#

or can you give me an example? It would be great

daring gorge
wheat niche
daring gorge
#

you can use the player controller to cast to the player state

#

and then you have it as a variable in state by default

fathom aspen
#

ResetLevel should be the most straightforward

daring gorge
#

oh

#

wow i never knew there existed a "reset level"

fathom aspen
#

Or you could seamless travel the players again to the same level if you find it a hassle to reset a lot of actors to their initial state

daring gorge
#

i was ltrly trying to kill all pawns and have their controllers spawn new ones again

#

so stupid

#

thank you so much

fathom aspen
#

Nah, no need to kill actors really

daring gorge
#

yea i didnt know sadlu

#

sadly

#

but thanks a lot

daring gorge
fathom aspen
#

ResetLevel calls Reset on all actors basically

#

It's up to you to define what Reset really means

#

So calling ResetLevel is 10% of the work is done

daring gorge
#

ah

#

okay

#

that makes more sense

#

do all the actors get destroyed?

#

or do i need to do it seperately

fathom aspen
#

Again, no actors are destroyed

#

They are just reset

#

If you want actors to get destroyed then just seamless travel to the same level again

#

Most actors will get destroyed apart some that persist

daring gorge
#

that makes more sense

#

thnx i try that

gentle mauve
#

What would be the best way to update the UI of the player (clients and listen server) via OnRep? Is it even possible, if not, what's the best approach?

void UInventoryComponent::OnRep_Inventory() 
{
    if (AMyHUD* HUD = Cast<AM>(GetWorld()->GetGameInstance()->GetFirstLocalPlayerController()->GetHUD())) 
    {
        HUD->UpdateInventory(Inventory);
    }

}

That function won't work for the listen server

woeful ferry
fathom aspen
#

The reason the OnRep not firing on server is because that's the nature of OnReps, they don't fire on server

#

You will have to fire it automatically when you change the property

#

And FYI if that property you're changing is not OwnerOnly or you don't take care of it affecting the owner only, then the HUD will update for other clients as well

gentle mauve
gentle mauve
fathom aspen
#

Delegates are not a substitute for OnReps though

#

Broadcasting a delegate on the server can only be listen to on the server

#

Same for when it's done on client

#

i.e. delegates are local

verbal tendon
#

How the networking is done... doesn't matter

#

the class that gets the data from the network will fire a delegate that the UI subsribes to

#

every class has its modular functionality, less calling and casting to different classes from other classes, those are tightly coupled dependencies that are bad

#

MyInventorySystem -> Delegate: OnInventoryChanged. UI can subscribe to that. Whether you change the data through onReps, RPCs, doesn't matter

#

Subsystems are particularily easy to work with that if you are doing a lot of things in BP, because you can easily grab the subsystem from BP without much fuss

gentle mauve
quasi tide
#

The AIController only exists on the server - does anyone know off the top of their head where I can find the engine setting this to be the case?

timid moat
#

Hi!

#

Is this how a client connect to a server?

#

Thanks!

fathom aspen
fathom aspen
timid moat
# fathom aspen Yes

It's really interested. You could pin the message unless it's already pinned.

fathom aspen
timid moat
#

This is the first time I find something talking about connection flow.

fathom aspen
#

The official ones

timid moat
#

Oh. I haven't searched enough. Sorry.

fathom aspen
#

Also the one you sent is very particular to UT which wouldn't be good enough to depend on

#

But could be an example

timid moat
peak sentinel
#

Thanks, it looks ugly yeah 😄

fathom aspen
#

Unreal Tournament

timid moat
#

Oh, I played that one.

wheat niche
#

hey, im wondering why the name contains a unique id or something . Is this the correct wy to get the current steam name?

low helm
#

ANybody remember how to get client-side-only pawns to update the server's location for the player for purposes of net culling

gentle mauve
lean surge
#

anyone found a way to just "not apply" server location corrections client side on characters?

Overriding methods like ClientAdjustPosition_Implementation and selectively calling the super version on the character movement component can nearly do it but I'm finding that velocity is still replicating and being applied to the character for some reason. Does anyone know how to either stop this velocity replication, or if there's another way to stop applying the server corrections altogether on the client, not on the server. (I know this will absolutely lead to de-sync, but for my situation that's ok).

sinful tree
lean surge
#

*on the controlling client's side

#

**on a specific client's side

young spoke
#

not sure though

lean surge
#

I did still try not allocating new moves but it didn't work unfortunately

young spoke
#

theres some correction stuff in there as well

lean surge
#

ok so

lean surge
young spoke
#

if you override PostNetReceiveLocationAndRotation, then that should take care of the base AActor movement replication from server to client

#

if you also override the ClientAdjustPosition i'm not sure where else it's updating velocity from 😂

#

overriding those 2 is basically like turning off movement replication entirely

empty ferry
#

anyone have any experience with swimming and setting movement modes from the physics volume? Any time I attempt to do this it forces all connections to swim. I've tried to call this from the actor overlap, from the character itself and calling event, and from the game mode calling event. It just forces everyone to swim

cloud stirrup
#

is it possible to nest servers? and by that i mean client send->local server send ->main server (authority)->to local servers->to clients?

graceful flame
#

What data are you sending?

low helm
#

ANybody remember how to get client-side-only pawns to update the server's location for the player for purposes of net culling

dry pebble
#

So I started draining a GAS stamina attribute on the server while sprinting in the CMC. Does anyone know how to make this GAS stamina attribute predictive? Currently just doing it on the server as I can't figure out how to make it predictive. Safe_bWantsToSprint is linked to the FLAG_Sprint custom flag.

float UMMOCharacterMovementComponent::GetMaxSpeed() const
{
    ensure(MMOCharacter && MMOCharacter->GetAttributeSet());
    
    float MaxSpeed = Super::GetMaxSpeed();
    
    const float MovementDirection = FVector::DotProduct(MMOCharacter->GetActorForwardVector(), Velocity.GetSafeNormal());
    bool EnoughStamina = MMOCharacter->GetAttributeSet()->GetStamina() > 20.f;
    bool CanSprint = EnoughStamina && (IsWalking() || IsSwimming()) && !bWantsToCrouch && MovementDirection >= 0.95f;
    
    if (Safe_bWantsToSprint && CanSprint)
    {            
        MaxSpeed *= SprintSpeedMultiplier;

        if (MMOCharacter->HasAuthority() && MMOCharacter->GetAbilitySystemComponent() && MMOCharacter->GetAttributeSet())
        {
            float StaminaDrain = 25.f;
            MMOCharacter->GetAbilitySystemComponent()->SetNumericAttributeBase(
                MMOCharacter->GetAttributeSet()->GetStaminaAttribute(),  MMOCharacter->GetAttributeSet()->GetStamina() - StaminaDrain * UGameplayStatics::GetWorldDeltaSeconds(this));            
        }                
    }
    
    return MaxSpeed;
}```
digital herald
graceful flame
#

I did something similar with blueprints. I check if they have enough energy client side to do a dash boost, then I do the dash boost client side if they can and spawn particles and add sound.

If they don’t have enough energy I show this on the UI.

Then on the same execution chain I have a RPC with server side validation to check the same amount of energy and do the same dash if allowed however if they aren’t allowed to dash I teleport them back to the last known location and set velocity to zero. This should only capture cheaters because honest players would fail the first client side check and never send the RPC in the first place.

digital herald
#

I take it back, you can do your own prediction like lawlster. But to use GAS's built in prediction based on prediction keys you apply a GE

graceful flame
#

But yea I’m not using GAS…I’ve heard good things though.

digital herald
#

I would apply an infinite duration GE and remove it when no longer sprinting

hollow sentinel
#

When i put 2 players in playable mode as Clients, After Equipping the weapon , crosshairs are getting for the 1st player and 2nd player who equips weapon their cross hairs aren't getting visible and sometimes vice versa...Can anyone help ?

dry pebble
candid gale
#

made a topic, seems like this has no solution, should I give up?

#

At this point I'm starting to think making use of that HTML5 plugin for UI was a better idea

digital herald
#

I don't forsee any real issues though

digital herald
dry pebble
dry pebble
digital herald
rose egret
#

im alreading overring PawnLeaving game to not destroy pawn when player leaves

#

but it will destroy PC anyway yes ?

#

what about PS ? I need something other than pawn to keep my data available even if player left

pallid mesa