#multiplayer

1 messages · Page 162 of 1

hoary spear
#

not a single print

#

nor breakpoint was hit

lament flax
#

okay mb i already fixed that

hoary spear
#

Hold on...

#

hah.

#

It's a "bug" if you'd like

#

it doesnt happen when you increment 🙂

lament flax
#

by doing repnotify on the time worked

hoary spear
#

but if you set w/notify, it triggers locally

sinful tree
#

Yea the increment thing doesn't trigger the OnRep, it needs to be done through Set in blueprints. In C++ land a ++ could still trigger it.

hoary spear
#

yey consistency 😄

#

already bugs me how OnRep needs to be called explicitly for server in c++ and not in bp

fossil spoke
hoary spear
#

The inconsistency is the annoying part, but I also prefer being explicit about it, yes

#

So the c++ version is superior 😛

woeful ferry
hoary spear
#

How do you deal with listenserver then?

#

Or did i misunderstamd what you ment..

woeful ferry
#

so on listen server you call that instead of onrep

#

so when you see onrep, you know its getting called from client

hoary spear
#

Ah , I see

#

I did recently struggle to differentiate between the two lol

lament flax
#

maybe there is a marketplace plugin that allows BP to do multiplayer c++ stuff ?

lament flax
#

i dont know all the stuff than cpp can and BP doesnt in multiplayer
but for example the onrepnotify

lament flax
#

also, i got another question:

why does the clients know about other player states ?

sick sphinx
#

I think all player states are replicated to all clients also?

dark parcel
sick sphinx
#

yeah

dark parcel
lament flax
#

you got a point

solar stirrup
#

I'd place HP on the player's pawn, but yeah GameState/PlayerState are available to everyone

#

Useful for stuff like the game's current state (round number, time left, stuff like that) or a player's global state (score, kills, deaths, etc)

hoary spear
#

Some extra indirection if hp were to livenin playerstate

sick sphinx
#

with GAS all attributes anyways lives in player state, as the ASC is on the player state and the pawn just holds a pointer to that.

lament flax
#

@dark parcel that was what i did

upbeat basin
#

Is there a way to have a delegate for when a character has set it's player state on server?

#

Oh okay there is APawn::OnPlayerStateChanged() for this

rich dune
#

Hey,

in my Player Blueprint I toggle Aim Down Sight. As this also has impact on the weapon calculation this needs to replicate. However if I play on P2P Sessions and the Client is toggeling ADS, it's also happening on the Servers Player Blueprint.

why?

woeful ferry
#

Hello,

We're trying to replicate the scaling of an Actor. If I scale it to 10, all the attached children remains its scale on the server. But when the transform is replicated, client side the root is scaled to 10, and the attached children are now set to 0.1.

How do we make the attached children keep its relative scale when their parent is transform is updated by replication?

native tapir
#

Is Replicate or Send RPC using UObject is stupid idea?

lost inlet
#

Replicated subobjects are pretty common so I wouldn't say it's stupid by any means, but actor components do provide most of the setup you need

native tapir
#

I'm making UInventory : public UObject for holding UGameItems : UObject (TArray<UGameItem>)
And UInventoryComponent is have Inventory.

In this circumstance, replicate Inventory and GameItem is possible?
(I'm trying to achieve this system but It's not really going well...)

lost inlet
#

yes, this is what I was referring to as replicated subobjects

#

and for that some setup is required

native tapir
umbral grove
#

Hi all. I'm running into some trouble with persisting information about players between level loads in the Lyra project (using it to test a plugin I'm developing). Once a player logs in to the game server, I run a function to verify the player, and if they are verified they get a session ID. I need to store this session ID somewhere that enables me to know that a player has already been verified when transitioning between levels. I've tried storing this on player state, but as far as I can tell, at least in Lyra, player state is destroyed between level loads. What should I do? I can't re-verify the player when they reconnect because the token used to verify them will have expired.

maiden flame
#

@umbral grove Try using the Game Instance? It persists between levels.

umbral grove
maiden flame
#

They're also destroyed I believe.

near tree
umbral grove
near tree
#

Ah, using an options string might work to pass the session IDs mapped to a client ID of some sort and reassociate them with the players controllers.

vestal shale
#

Hey guys.
Has anyone used Nakama with Unreal Engine ?

umbral grove
brisk swift
#

i've been able to replicate uobjects from client to server but i'm now stuck on what I have to do to get the clients to see what the server sees for uobjects

gloomy tiger
#

Pretty naive question - is it more stressful to send 3 floats in an RPC or 1 FVector3D? Is there any difference?

solar stirrup
#

Other than the fact FVector3d is 3 doubles, no real change

#

It's micro-optimization, if even

hoary spear
#

Gotta save those bytes where we can !

solar stirrup
#

won't be a difference between 3 floats and FVector3f

umbral grove
native tapir
#

In the client, OnRep_AccessoryItem is triggered, and a single element of AccessoryItem is replicated from the server. But right after one tick, the data disappears. Does anyone know why this is happening?

native tapir
umbral grove
#

If you have any UObjects that are not marked as a UPROPERTY, that is one way they will be garbage collected (at some point)

solar stirrup
#

If it's replicated, it's UPROPERTY

native tapir
#

I want to upload screenshot here but I can't upload image right now i think discord bug?

solar stirrup
#

yeah discord is dying

#

as always

hazy scroll
#

I still have this issue. Event when I call the event addInventar directly from the character and pass the ref, its still not working

#

The server cant destroy the actor and the client cant send the code to the server with Run On Server RPC

thin stratus
#

With Discord not shwoing images properly atm, it's hard to help

hazy scroll
native tapir
#

This is my situation video

thin stratus
#

The video uses a codec I don't have. Can't seem to play that

native tapir
#

sorry let me change the codec

thin stratus
hazy scroll
native tapir
#

Well, Changed codec doesn't allow to upload here.. I think it's bug too

hazy scroll
# thin stratus No, Discord is broken
native tapir
thin stratus
#

You can't run RPCs on Actors that the Client doesn't own

#

Your FirearmsPickup is probably not owned by the Client

#

The RPC has to happen earlier, in the Character for example

#

@hazy scroll

hazy scroll
#

So I cant use interface logic and make the events in the pickup item?

thin stratus
#

You can, but you have to RPC first

#

Interact-InputKey -> ServerRPC -> Somehow Get Actor Reference -> Interface Interact function

#

I would also suggest not mixing your language so much while coding

native tapir
#

Is there any way to debugging where that data is Garbage collected??

hazy scroll
#

but still the issue

hazy scroll
umbral grove
#

Inventory_0 may very well still exist in memory. You might be able to verify this by dumping the memory at its memory address then seeing what's at that same memory address some ticks later.

native tapir
umbral grove
native tapir
umbral grove
native tapir
# umbral grove Happy to help 🙂

In InventoryComponent BeginPlay, I created inventoryObject client and server both side. So that issue is happened.

The problem is solved after change like that

You are genius Thank you!!

umbral grove
hazy scroll
native tapir
maiden flame
umbral grove
empty briar
#

Is there a good plugin or something for multiplayer voice chat I can look into?

lament flax
#

whats the difference between
is local controller
and
is locally controlled

sinful tree
lament flax
#

okay ty

indigo brook
#

Question: If you were to set up a character customization system (swap skel meshes) and need other players to see your changes, how would you do it?

#

I have mixed results, I can't seem to save or load the proper items

#

As in, what's the call stack for this type of thing?

sinful tree
indigo brook
#

@sinful tree Thank you so much for answering. I'll give that a shot

#

Example like this?

sinful tree
#

Yep.

indigo brook
#

Cool, do I need my components to be replciated too?

sinful tree
#

No

indigo brook
#

Awesome. So the rep notify, what exactly do I hook up there to change parts?

#

My current setup, that sucks haha

sinful tree
#

That's basically it.

#

You're replicating a structure that contains those integer values. The integers are then used to read the value of the appropriate mesh from your array and setting the mesh to the associated component.

indigo brook
#

Like this? Per body part mind you

sinful tree
#

Why would you replicate an array of meshes though?

indigo brook
#

Lol you said replicate it haha

sinful tree
#

No I didn't.

indigo brook
#

I reviewed. Perhaps I'm just confused

sinful tree
#

This bit here is the "value"

indigo brook
#

Gotcha

sinful tree
#

that value can drive changes locally without requiring additional stuff to be replicated.

#

So if you have an array that already contains all your meshes, you just need to know which mesh in the array to use

#

Which is what the value from your structure can do.

indigo brook
#

My oringinal system was working off that one CharCustomization struct though

sinful tree
#

Yep, and that is one way of doing it. If you don't want it contained in a structure, then you can use separate replicated integers for each part and stop using your structure.

indigo brook
#

Third person character, how that gets called

#

Okay so take off the rep notifies on the skel meshes, but keep it on the struct, got it

#

I think more so the problem I'm having is that when I load my character, it's not properly loading up the struct

#

When I go from my menu to my game, the parts don't transition in as well, even when called to do so

sinful tree
indigo brook
#

@sinful tree The Game Mode for the lobby calls it

#

When the character spawns

outer moth
#

does anyone have any idea? issue only occurs after enabling steam sockets

config is done and im trying to achieve a p2p multiplayer system

sinful tree
indigo brook
#

It worked! Just in reverse haha

#

I'm sooo clooose

#

@sinful tree Thanks for the help man, we're almost there! Something about the order is off

#

So I need to figure out why it's reversed now and try to make sure both the menu loads in the right clothes on character spawn and then we level transitioning, to show the right parts on the right characters

#

I'm like soooo close

#

lol

lament flax
#

does this mean that this BP is own by server and client ?

sinful tree
lament flax
#

okay

#

the thing is, from a input (so client) i want to change variable values on server

sinful tree
#

Input > Run On Server > Set Values on Server

lament flax
#

but rn it wont fire on server because the client isnt "owning"

lament flax
#

after the call its not fired

#

its on client (as expected)

sinful tree
#

PS_Core is a playerstate?

lament flax
#

yes

sinful tree
#

Check your message log.

#

That should be working ok unless there's some other problem.

#

Only thing I can think of off the top of my head is that the data in the structure may be too large?

#

Can test that too by just trying a run on server event with no inputs and having it print a string.

lament flax
#

well nevermind

#

when going to next frame it doesnt switch bp instances

#

it IS called on server

#

sorry

loud lynx
#

I have a strange issue with Multicast and I hope someone can help. So, I call a multicast function from server (when I press J, it'll call the server function) to create an actor for all clients. If I call this function from a client, then it'll spawn the actor for everyone but with a twist... The net owner has 1, but all clients have duplicate, like it spawns twice for clients. What am I doing wrong on this one? It seems that the first actor spawn happens twice on clients, and the for loop happens twice as well (the for loop spawns the apples).

indigo brook
#

@sinful tree Just wanted to say thank you for answering my questions earlier btw!

loud lynx
sinful tree
loud lynx
#

Yes, both

sinful tree
#

Don't multicast the spawn. It's unnecessary.

#

Multicasts execute on both the server and client.
So then, you're having the server spawn a replicated actor, which then causes the actor to appear on clients, and then you're having the clients also spawn their own copies on their own instances.

loud lynx
#

I'll check it, thank you! 🙂

loud lynx
#

Alright, it works now. Although, if I turn off Replicates, I won't be able to Replicate Movement and causes physics desync.

dark parcel
#

If u do, read what datura says again

loud lynx
#

I get it now, thanks 🙂

plush shoal
#

So quick question

#

Do any of ya know why I may be having some issues on my game when it comes to sessions

#

I've done the code completely normally

#

(I'm using advanced sessions though FYI)

#

and for some odd reason

#

the sessions only work like 3% of the time

#

you'll join a session and it'll either just work, or what happens like 97% of the time is it'll connect to the session, however no player controller is created, and the level is not loaded on the client

#

and there's no actual changes

obtuse field
#

Or what do you mean by "level is not loaded"? Black screen?

plush shoal
#

However you see the slight hitch from it connecting to the server on both the client and server

#

And I know it IS actively connected since upon the server shutting down the client times out and goes back to the default level

obtuse field
plush shoal
#

it is IN the server

#

without being in the server

#

its so weird

#

I'll send a video

obtuse field
plush shoal
#

despite it looking like nothing has happened

#

I'm actually IN the session

#

meaning if the host left

#

I'd be booted back to the default level

#

even though I'm on them enu

#

*the menu

obtuse field
plush shoal
#

Difference is that I'm not the one hosting it

#

its literally on Steam

#

its this mf right here

#

this mf

#

its fine though

#

anyway

#

do you have any ideas here?

#

since its such a weird bug

obtuse field
plush shoal
#

and I have to use the version I've already gotten onto Steam since it uses Steam networking

#

(Standalone game is uh.. cursed)

obtuse field
#

huh

#

Ok then

#

Are you sure its not related to displayed UI?

#

Like, you said player is actually on the server

plush shoal
#

like

#

it doesn't show it there

#

but I'll explain how I know its connected

#

you know how when you join a session, there's a very slight "hitch" if you will

#

very drastic but quick freeze

#

well that happens for the server and client firstly

#

secondly when the server actually shuts down

#

the client is then booted back to the default level

#

meaning they were connected

#

and just lost connection

#

so it is actually connecting

#

but something is going wrong still

#

and part of why its so weird is since its only a "sometimes" issue

#

like its an issue 90% of the time, then randomly it decides "I'm gonna join"

obtuse field
# plush shoal and part of why its so weird is since its only a "sometimes" issue

My "sometimes" experience with joining, is that it has problem to join when something is blocking the spawn point, e.g. another player. But this should be resolved automatically, if you are using character instead of pawn - Are you using pawn?

Another thing - can you see another's player pawn/character on host machine/session or, its interactions, e.g. if you press to move on the remote, does it move on the host?

plush shoal
#

And no the player does not spawn

#

there is no player controller either

#

since I have a notification for player join (using a player controller being spawned to detect it)

#

and that doesn't popup when this bug happens

#

Currently I'm trying to make something of a brute force method if you will

#

basically retry to connect like 50 times by detecting what level you're in after joining

#

if its not the level its meant to destroys the session and rejoins

obtuse field
plush shoal
#

but I'm still trying to see if I can brute force it

obtuse field
plush shoal
#

also I've just created this monstrosity to see if I can brute force it RealMood

obtuse field
plush shoal
obtuse field
plush shoal
#

it uses steams networking though btw

#

hence why I have to use the Steam version or standalone to test

obtuse field
#

Check if there is a difference

plush shoal
#

lmfaooo

#

Brute force worked

orchid eagle
#

hey guys
so im trying to make a 30k map for my game i tried using world partition but the performance was so bad
also have issue with the streaming sometimes the terrain would just disappear
so anyone knows a better solution for that and what can i do to gain more performance
i have a 13700kf
96g ram
and a 4070ti
so i should expect at least 60fps but i get around 40fps and i didn't even spawn any vegetation

orchid eagle
#

30 km

obtuse field
#

Do you have actors mark as "always relevant"?

gloomy tiger
#

but the performance was so bad

what do you mean by this?

obtuse field
#

And nanites enabled?

orchid eagle
orchid eagle
orchid eagle
obtuse field
orchid eagle
#

kind of idk tbh

plush shoal
#

its no longer working again

#

Even after trying 20 fucking times it still doesn't work

#

this literally retries 20 times

#

disconects from it then reconects

obtuse field
plush shoal
#

How would the host know their lobby is broken

#

imagine how annoying that'd be

#

having to re-host like 10 times

#

even when your lobby literally shows on the server list

orchid eagle
#

as you can see in the 2k map its work so fine and i can see the details of the objects and the player but in the 30k map i can't and looks pixeled

obtuse field
orchid eagle
#

i found that the performance issue was that im playing with 2 clients at the time it looks better with one now i get like 120 fps

wispy heron
#

anyone have recommendations of plugins for networking?

hollow eagle
#

define "plugins for networking"

wispy heron
#

handling multiplayer

#

i'm not sure what's out there, so curious what people use for what?

hollow eagle
#

unreal does that out of the box.

wispy heron
#

yes i am familiar with replication and networking in unreal. i've never looked at plugins at all.

hollow eagle
#

because they largely aren't necessary

#

unless you have some specific requirement that unreal's networking doesn't meet (which is pretty unlikely, unless your target is a super scalable mobile game that isn't running full game instances for servers, or you're building an MMO and have a budget to back it up in which case you wouldn't be here) it's a question that doesn't really have a useful answer.

wispy heron
#

target is a super scalable game

hollow eagle
#

again, what requirements does unreal's networking not meet

wispy heron
#

do you happen to know if online services plugin is something that's commonly used?

hollow eagle
#

Online services is not the same as "multiplayer networking"

#

And yes, it is.

wispy heron
#

also, any experience with aws integration? gamelyft is that something useful?

hollow eagle
#

it's a server hosting solution

obtuse field
wispy heron
#

okay well like i said, i've never looked at plugins at all, so i'm hoping that someone with some experience can fill me in a bit. but it seems you want me to know exactly what i'm trying to ask when i'm trying to figure out what to ask

#

i really hate this aspect of dealing with people

hollow eagle
#

You've asked something so incredibly vague with no context, this is the only kind of answer you're going to get.

obtuse field
wispy heron
#

i can afford to run a server that scales if need be if that's your question

hollow eagle
#

That's not the question.

#

You've just conflated about 3 different unrelated things.

wispy heron
#

lol

#

you're useless dude

hollow eagle
#

Multiplayer networking (game servers) is not the same as online services (platform, auth, achievements, data storage) is not the same as server hosting.

wispy heron
#

im trying to ask question and you're arguing about what i'm asking... totally helpful

hollow eagle
#

If you don't have any requirements to list then you're not going to get useful asnwers.

wispy heron
#

not from you 😄

hollow eagle
#

Because you're not providing anything useful in your question that can be answered.

wispy heron
#

quiet, i'm trying to figure out how to block you 😄

hollow eagle
#

Fine, you want an answer with the information you've provided? Look at the built in plugin list.

#

It has tons of online services providers.

wispy heron
#

much better

hollow eagle
#

You haven't specified what you want so I assume that's good enough.

obtuse field
# wispy heron you're useless dude

Lol, he is not. Trying to figure out what do you want is not being useless. I've learnt a lot from him, and if you want to make your development life a little easier, you should show a little humility

wispy heron
#

it goes both ways

hollow eagle
#

It really doesn't.

#

I'm not asking for you to do something for me.

wispy heron
#

communities are terrible for helping people trying to get help

hollow eagle
#

I'm not even asking for you to be humble - I wouldn't phrase it that way.

#

I'm asking for you to be specific about what you want.

wispy heron
#

anyways, i'll get my information elsewheres. have a good night folks 🙂

obtuse field
#

lol

gloomy tiger
#

what did i just read

#

lol

warped oxide
#

someone who didn't know what they wanted to ask and got upset when people couldn't decypher what they wanted to know

gloomy tiger
#

oh well

#

¯_(ツ)_/¯

orchid eagle
obtuse field
#

It seemed like he just wanted a plugins for the sake of plugins

#

Because using a lot of dependencies is "proffesional"

#

Node.js syndrome

plush shoal
#

nice plugin

plush shoal
#

Because I genuinely have no clue what's going on

#

even when it does connect it sometimes just goes to a black void of nothing under the map and no player spawns

plush shoal
#

server-side it spawns the player

#

but it isn't possessed

obtuse field
#

Me neither. You can try to connect via different network, e.g. via phone tethering - I had such case when I've built 3d printer, it didn't want to connect to my home network, but had no problem with phone, because phone has only 2.4Ghz, and home WiFi both 2.4 and 5.0.

Apart from that, only logs could be helpful. Package client for development and try to connect, then send logs here

thin stratus
#

@plush shoal idk if this was mentioned but joining a Session doesn't mean that your are connected to the Server. JoinSession does that as an extra step, but it can totally be that you successfully join the session but fail to join the server.

#

Logs would be very needed here to further help

plush shoal
#

very important distinction

plush shoal
thin stratus
#

If it's a shipping build then you will need a source engine to enable logs. Otherwise I would suggest having a dev build, maybe on another branch or so

plush shoal
#

since that uses the same APPID

#

so I have logs from that

#

I'll check them

thin stratus
#

You need logs from the one that fails

#

And the server logs too fwiw

plush shoal
#

Ughhh I'll build the game as dev for now

#

since its still unreleased

#

Steam page is public but yknow, I have it set as coming soon

#

so I can afford it to be dev by default

mental pendant
#

is it just me or every function in my pawn ends up triplicated because I need to call it on the server and from there multicast it to every client? like except the functions for Moving and Turning most of the others end up having to be multiplied by 3

obtuse field
#

Turns out, I think I will need to send separate chunk data via rpc anyway

lament flax
#

i got a question regarding rep notifies

when the server sets a var, it will :

  • try to replicate the variable value change to the clients
  • call the repnotify function on server and all clients

yes ?

dark parcel
#

in blueprint the repnotify function will call on both server and clients

lament flax
#

so my 2 staements are correct ?

dark parcel
#

if the variable is marked as repnotify the following will happend

#

Server set the variable -> then it will call on Rep Function (In blueprint)
It will then tell the clients to set their variable to the new value. <- This will take some time to arrive, depending on ping

#

when it comes, the value will be set and OnRep Function will be called on the receiving client

#

So if all clients have 200 ms.
And you want one of the client to change the the value, it will call server rpc. Takes 200 ms to reach the server.
Server set the variable then takes another 200 ms to replicate it to clients

obtuse field
#

Btw. Will iris deal with over maximum amount of data, e.g. by chunking it down, or do it still require manual chunking via rpcs?
(Just tested, and iris didn't help)

jade ibex
#

I'm doing session settings for create server function and for some reason only 2 players can join the session before it locks out and blocks everyone else from joining

#

despite me doing NumPublicConnections or private to be above 2

#

is there something I'm missing? (this is with steam subsystem)

tardy fossil
#

There is an option to allow players to join a game in progress. Maybe you need to enable that? It’s with the max public connections and other server settings

jade ibex
#

I also do not want players joining midway

#

but I guess i will design around it

tardy fossil
#

Though I wonder if that’s actually the issue since I don’t think lobbies auto start when a player joins

jade ibex
#

they shouldnt...

#

I have a function that triggers the start specifically

lament flax
jade ibex
#

Also the repnotify will not trigger on listen client

#

so you will need to call the function

lament flax
#

wdym by that ?

static lava
#

hey, so I'm trying to create a leap ability, using VInterp

#

it works technically
but its very jittery cause of the server replication tick/frequency which I really don't want to change
is there a way to move the character using it's movement comp or something so it moves in a predicted way like when the character moves or jumps?
It is a target lock ability not a blind jump so launch wouldn't be sufficient

#

basically what it does is mover the caster to the target as such following an arc

which works but it is very jittery, which is something I anticipated as it is caused by the replication, but I couldn't find a way to reliably interpolate locally to avoid the jitter

#

tried using these

#

these also jitter

thin stratus
#

@static lava If it has to be done in the Movement Component, then you need C++ and we have some basic examples pinned to get started on that.

#

For the RootMotionSources, they technically work, but are very picky

#

You gotta make sure that all parameters are the exact same for server and client.

#

If you do "CurrentLocation + X" to get a TargetLocation, that could already be wrong

static lava
#

I'm basically trying to create a leap and a "Get over here" scorpion pull ability

#

but any solution I tried causes this jitter

thin stratus
#

And you might need to expose FlushServerMoves from the CMC and call that before calling the RMSource

static lava
#

So ue5 is unable to move characters with prediction without me getting into c++?

thin stratus
#

In almost all cases, yes

static lava
#

I mean its a pretty basic thing to do, as 99% of multiplayer games need this functionality for things like Deathgrip/Scorpion grip

thin stratus
#

Sure, but those 99% of multiplayer games don't limit themselves to Blueprints, which is not meant to code a full Multiplayer game in

#

And Multiplayer Movement is never "basic"

#

It's pretty complex even for the simplest of movements

jade ibex
lament flax
#

BP for basic stuff, then c++ later on

#

so rn im in bp

jade ibex
#

I'm unsure about BP

#

I believe it does it for listen client automatically

thin stratus
#

RepNotify in Blueprints is a "Property Changed Notifier". It's not 100% the same as it is in C++.

#

In theory, OnRep should call on Clients only, and is triggered by the data being received by the client.

#

In Blueprints it acts more like a "Property Changed Notifier", that is it will call when the Variable is changed, rather than only when the Client receives the data.

#

That causes it to also call on the Server when it sets the variable

#

And even on the Client when that one locally modifies the variable

#

Client changing it won't cause replication of course

static lava
lament flax
#

so when server sets a var with rep notify, the rep notify function will call on server and all clients

thin stratus
thin stratus
#

In C++ it will only call on the Clients

lament flax
#

okay

#

ty

static lava
#

so what should I create in c++ for this to work? Where could I find some things for it as I'm trying to move the character itself that is already replicated

thin stratus
#

If you move a locally controlled character, you will have to extend the CMC

#

Or at least expose the FlushServerMove stuff and get the RMSources to work

static lava
#

are you familiar with abilities like Heroic Leap or the set ultimate in lol?

#

I'm trying to recreate that effect for GAS

thin stratus
#

Somewhat, but the Grab of Set is something I would not try in UE

#

I tried it before for a MOBA customer and we scapped it

#

UE fights this too much

static lava
#

I'm not really attached to root motion, no grab just the movement of the leap

thin stratus
#

I would do this with a RootMotionSource, yes

static lava
#

so basically I just tried the rootmotion, because I was recommended it in GAS first I tried to use VInterp

stable grotto
#

any info on how to do hotfix dedicated server side?
for example if I wanted to change a blueprint actor function to fix a bug and apply a hotfix without restarting the server

thin stratus
#

Which means ensuring there is:

  1. A valid PredictionWindow in my Ability before calling the RMS
  2. Ensure the values I feed into the RMS are 100% the same for Server and Client
  3. Flush Server moves before calling the RMS
#

I think that was all, or at least close to all being needed.

thin stratus
#

You gotta repackage usually

lament flax
#

regarding ownership, can i use the debug object dropdown to see who own the actor ?

#

or is it not linked to ownership

stable grotto
static lava
#

I'll look into it then ty. Is there any vid or tutorial I can look into to get started as my replication knowledge is around inventory management currently didn't try movement yet

thin stratus
thin stratus
stable grotto
lament flax
#

situation:

  • on begin play of a actor, i set a variable (repnotify type) <- on server

when the client version of this actor will be created, will the rep notify function be called ?

thin stratus
thin stratus
lament flax
#

okay ty

lament flax
gloomy tiger
#
USTRUCT()
struct UMyStruct {
  GENERATED_BODY()

  TArray<FGuid> Guids;
}

...

UPROPERTY(Replicated)
UMyStruct MyStruct;

Ignoring FFastArray for now, and given the delta serialization nature of USTRUCTs, when I add a guid into Guids inside MyStruct, only this guid will be sent over the network or the entire array goes through?

lament flax
#

client is creating a widget, i want to save this widget in a variable (on server)
for some reason the value isnt passed to teh server event, why ?

prisma belfry
#

how can I keep two replicated variables in "sync"?

Say I have two variables, TotalDebt and TotalAssets
If the player takes out a mortgage, i dont want the server to replicate one before the other such that their net worth suddenly spike massively in positive or negative direction until the other value is also replicated

I initially thought i could just put them in a struct which would ensure they are both updated together but that doesn't seem to be how unreal handles it

EDIT: Found this article: https://vorixo.github.io/devtricks/atomicity/

hazy scroll
solar stirrup
#

delta serialization of structs is per-property

gloomy tiger
#

But I believe FFastArray could do the trick?

solar stirrup
#

If you're gonna have lots and lots of elements yes

gloomy tiger
#

Just checking - properties inside a USTRUCT without UPROPERTY() won't get replicated if the struct is marked as UPROPERTY(Replicated) - am I right?

solar stirrup
#

Yes

#

Unless you write custom net serialization of course

#

But otherwise no

static lava
lament flax
#

is on rep notify called when doing add item to array ? Or is it called only when using "set"

lament flax
#

its been 1h and i still can't figure out why the variable contains null references on the client after i set it on server

the only thing i can think of, is that the server instance exist before the client one, but repnotify should sets the same values.

warm lintel
lament flax
#

oh

#

well thats annoying

warm lintel
#

I'd still wait for someone else to confirm, but in the meantime try replicating a regular struct or another replicate-able object and see if that works

#

Well they're not meant to be used in that manner, you generally don't want to replicate DAs even if you could

lament flax
#

i am currently converting my system to DAs

#

i was using UDS before

warm lintel
#

Back them by structs, and replicate the structs you extract out of them instead

#

Use them as a "source" of data, as opposed to "the" data

lament flax
#

okay

#

same issue

#

weird

#

server - client

#

found this

lament flax
#

i found a plugin that allows to replicate uobject (special BP class), the issue is that i dont know how to create data assets from it

warm lintel
# lament flax server - client

You're still replicating the data assets themselves, not the data in them. I'd take a step back and re-think as opposed to try and brute force it if I were you

quick thicket
#

pls helpž

warm lintel
#

Data assets are generally intended to be used as a way of defining data at design time, not as actual data instances to use. For all intents and purposes, I personally try to keep them immutable

lament flax
#

the point was to have an array of DAs as the inventory
the DAs arent changed

warm lintel
#

You can use them as instances, but you'd be shooting yourself in the foot most of the time I'd say

lament flax
#

before i had an array of names (the item ID), but each time i wanted to show some data (like display name), i had to go though a DT
the issue of that is that for stuff like items it can get slow

#

well ig i'll go back to UDS

#

and just use the DA once as the creator

jade ibex
#

Looking at OnlineSessionInterface at the moment- where is LeaveSession?

#

I am having trouble when player leaves server, and tries to rejoin, they cannot.

#

was it removed? (this is 5.2 documentation?!)

#

i only see findsessions

#

JoinSession is also in there too

#

only LeaveSession function call is missing

#

??

#

I guess i need to unregister players?

maiden flame
#

I only know for blueprints, but try Destroy Session @jade ibex

jade ibex
#

I've done that

#

been there the whole time so Im not sure what I'm missing

jade ibex
maiden flame
#

Yep, and the player can rejoin.

jade ibex
#

😮‍💨

#

more testing ig

#

destroy session is not exclusive to advanced session

maiden flame
#

Yeah, that's right I think.

lament flax
#

if i change the material of an mesh, i should call it with a multicast from server right ?

dark edge
#

material is state

lament flax
#

Thats what i finally did

bronze glade
#

Does anyone know the console command to simulate a client rejoining the game?

#

I saw it in a youtube video a long time back but can't find it online anywhere

amber vale
#

Hey y'all, in a multiplayer game, how should a main menu be handled? Can you just treat a main menu game mode like a singleplayer game, and give the player access to things like the game mode?

dark edge
amber vale
dark edge
#

Yes you typically are in standalone mode at that point

#

Some people launch as listen server but that's effectively the same as standalone

amber vale
#

If you do that, can you still make API calls like getting the player's profile picture, or allowing them to join parties with friends before entering a game?

dark edge
amber vale
#

Got it; I wasn't sure if there was something that tied Unreal's game framework to the networking subsystems. Thanks!

obtuse field
#

Is there a way to make unreal automatically chunk data for fast array replication, so when it exceeds buffer size, then it sends it in several packets?

plush shoal
#

however this is for simply just hosting a server

glad robin
#

Pretty confident but I just want to check, away from computer trying to figure out problem. Listen server game. GameMode's BeginPlay() will call, then the host's character will be created/run RestartPlayer() and be created in that order correct?

Edit: Figured out my problem. I believe I was correct above issue was completely unrelated haha.

torpid whale
#

Hello, a question, does anyone know why this include gives me an error?

obtuse field
#

So I have chunks with very large arrays to replicate, and have 2 design patterns to choose:

  1. Replicate them via rpcs, like shown here: https://vorixo.github.io/devtricks/data-stream/
  2. Replicate via splitting array into chunks, and adding these chunks into fast array replication

For 2nd, I don't know how can I get replication buffer in order to know when to add another chunk. Is is the same as Reliable Buffer?

obtuse field
torpid whale
#

Thanks!!

brazen nexus
#

Hey everyone, I was wondering about maps and UE's client/server system. I noticed that when you play a game, it's usually on a specific map that you connect to, through a "URL". But I was wondering, how does it work to move to a different map during gameplay while playing on the server. I tried the naive "Open Level by Reference" in a blueprint in the Lyra project sample and it was a crash, so I'm pretty sure that's not the right way 😛 And also, is it possible for 2 player on the same server to be in 2 different maps. Thank you. Any reference is welcome. I'm pretty fluent in C++.

obtuse field
#

If so, its impossible. What you can do is:

  1. Make 2 different servers
  2. Make player a host on different map, and allow other players to connect to it, e.g. warframe does that
  3. Use this plugin: https://www.unrealengine.com/marketplace/en-US/product/multiworld - in this case you still need to replicate actors trough main level, as other levels are not replicated
Unreal Engine

Manage multiple UWorld instances simultaneously, running different worlds in parallel with isolated actors and components. Transfer players and actors between worlds.

gloomy tiger
#

Does anybody has a good resource on how to create custom NetSerializer?

fossil spoke
gloomy tiger
#

Oh, alright. That works.

#

Thank you. 😄

#

By the way, Matt - FFastArraySerializer went super smooth here.

gloomy tiger
#

I mean, in the abstract way - in our game, hehe

fossil spoke
#

Oh right

#

Nice

gloomy tiger
#

Implementing it I mean

fossil spoke
#

Awesome.

gloomy tiger
#

This is my reference - wish it was possible to 'favorite' a message (is it?)

fossil spoke
#

Ahh right.

#

Its certainly a useful container.

gloomy tiger
#

You know if push model will be the default for Iris? 🤔

fossil spoke
#

Push Model is opt in per property.

#

It is already enabled by default. But its your responsibility as a programmer to use it per property.

obtuse field
#

So I have chunks with very large arrays to replicate, and have 2 design patterns to choose:

  1. Replicate them via rpcs, like shown here: https://vorixo.github.io/devtricks/data-stream/
  2. Replicate via splitting array into chunks, and adding these chunks into fast array replication

For 2nd, I don't know how can I get replication buffer in order to know when to add another chunk. Is is the same as Reliable Buffer? Also, the 1st design would take much less memory, as 2nd needs to make mirror of the instance data(its location and rotation)

Without chunking data happens what is presented on the screenshot. Can someone more experienced give me direction, what to do about it?

jade ibex
#

should NumPublicConnections be updating automatically as players join the lobby?

#

in my testing it did not seem to change at all

#

Oh there is:

OnlineResult.Session.NumOpenPublicConnections

#

difference being "Open"

hollow eagle
#

why would the server have to be "sent" the length of the animation

#

the server is running the same code, and the server has access to the montage.

vagrant grail
#

Question : Should I Enable / Disable Input of players who are in opening a Menu on the server (and it will replicate itself) or that's OK to do it on the client directly ?

jade ibex
#

UI related things can be client only

vagrant grail
#

and inputs related to attacking, interacting, etc...

jade ibex
#

well is it important that the server knows that a player is in a menu?

vagrant grail
jade ibex
#

Yes I know.

#

Why are you disabling inputs in the first place?

vagrant grail
#

Because I don't want the player to be able to move around, attack, interact, etc... while being in a menu (in this case it's a menu to configure the settings of a game)

jade ibex
#

two options:

#

disable inputs locally, when a menu is open on the client

#

communicate via RPC to the server that the local player is in a menu, server replies to the client and disables the input, then when the client leaves the menu, again communicate to the server via RPC, server replies and reenables movement

vagrant grail
jade ibex
#

safety? for what?

#

cheating?

vagrant grail
#

yeah

jade ibex
#

anything concerning cheating should be server authoritative

hollow eagle
#

again, the server is running the same code

#

what do you think the play montage node does on the server

#

that changing a static mesh is not replicated is a completely unrelated situation to this

#

and no, animations are not in the same vein as widgets

#

animation data is incredibly important to many if not most games on servers. rendering an animation might not be, but bone positions, timing, and notifies absolutely are.

#

there's no replication of animation data going on here

#

the server runs the play montage node just like the client does, and the montage is an input to that node. Not an input replicated from the client, it's just part of the blueprint.

obtuse field
#

How can I write my own custom array replication? The goal is to create an array that can automatically chunk data during replication if array is too large

gloomy tiger
#

.

#

cc @obtuse field

obtuse field
#

unless I do something wrong with them

gloomy tiger
#

So create your own NetSerializer then

#

Or

obtuse field
fossil spoke
#

@obtuse field If you are running into packet size issues you may need to just spin up a traditional Socket connection to Clients for streaming the data

#

Though its entirely on you to manage synchronization and interpretation of the data

obtuse field
#

Or do something like this:

void AMyPlayerController::TickActor(float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction)
{
    Super::TickActor(DeltaTime, TickType, ThisTickFunction);
    if (HasAuthority())
    {
        TArray<FMyData> ChunkBuffer;
        auto* Channel = NetConnection->FindActorChannelRef(this);

        while (ChunksSent < ChunksToSend && Channel->NumOutRec < (RELIABLE_BUFFER / 2))
        {
            ChunkBuffer.Reset();
            const int32 StartIndex = ChunksSent * MAXCHUNKSIZE;
            const int32 NumElements = FMath::Min(MAXCHUNKSIZE, Data.Num() - StartIndex);

            check(NumElements > 0 && (StartIndex + NumElements - 1) < DataToStream.Num());
            ChunkBuffer.Append(DataToStream.GetData() + StartIndex, NumElements);

            // Send a reliable Client RPC with the subarray data here
            ClientReceiveData(ChunkBuffer);
            ChunksSent++;
        }

        if (ChunksSent >= ChunksToSend)
        {
            ClientNotifyAllDataReceived();
            DataToStream.Empty();
            ChunksToSend = 0;
        }
    }
}
fossil spoke
#

If you are comfortable with Sockets and data transformation it would be better to go the separate Socket route

#

As you wont choke the network for normal replication.

#

Chunking like you proposed can still end up saturating the network causing issues to other replicated data

#

Setting up Sockets is pretty easy. There is a good API for it.

obtuse field
fossil spoke
#

Im on my phone at the moment so its not easy to do that

#

Just search around the engine source

#

Or google it

obtuse field
#

Btw. Reliable RPCs are also working on the TCP socket from what I know. If I use custom TCP socket, wouldnt it choke it anyway?

fossil spoke
#

Making a traditional Socket opens a brand new separate connection.

obtuse field
#

Then, isn't there a way to use RPC on the different connection?

fossil spoke
#

No because its a barebones socket.

#

You lose all the fun stuff from UE networking

#

Dont have any illusion that using a barebones Socket will be easy lol

obtuse field
#

Oh, I love seeing these "A new, community hosted unreal engine wiki"

fossil spoke
#

Search the engine source for how its used

#

There should be helper APIs that utilize that to make interfacing with Sockets easier

#

I just forget what they are called.

obtuse field
fossil spoke
#

Yeah. Have a search around the engine source dude. Im on my phone so limited in how much I can help you

obtuse field
#

Searching rn, just wanted to ensure

obtuse field
#

There is very large amount of libraries and structs that use FSocket

#

Not sure what to look for

static lava
#

I'm currently experiencing this jitter but after it a while it is fixed, I'm sure it is caused by the fact that the client and server has a delay os 240ms

#

so the ability is activated at 2 different times

#

It is bp as it is a proof of concept before creating it in c++

#

flush is just the get movement comp-> flushservermoves()

obtuse field
thin stratus
#

You'd need to tell the client that it has to move, and that tells the server

#

Not sure it works other way round without corrections

static lava
#

I see, so Server tells you can do the ability->calls client to respond-> client starts animating and tells server to start?

#

but if the client starts moving before server won't the server jank it back?

#

also when you mentioned "prediction window" do you mean the same Tranek talks about in the GASDocumentation or is it a separate concept?

obtuse field
#
  • FTcpListener
#

^

thin stratus
heady nacelle
#

Hi! anyone here who's used the Smooth sync plugin alot? I've just started trying it out to hopefully fix my jitter-issues on the client but I get this behaviour on the client when using the plugin and I'm not really sure what I'm doing wrong so I thought I'd try and see if anyone here has a clue? I've tried playing around with the smooth sync component settings but can only see small differences

tardy fossil
#

super noob question (c++): do OnRep functions get called if i replicated actor loads into the client with that variable set? like if the server sets that OnRep variable before a client joins.. OnRep wont get called and i'd have to get BeginPlay to check on the client?

#

which means i cant rely on just OnRep_AttachmentReplication for a client to keep track of everything the server has attached to an actor

silent valley
tardy fossil
#

excellent

lament flax
#

is there a way to make an array call OnRep when using add,remove,.. ?

obtuse field
#

This feeling when due to lack of sources you are subconciously learning chinese

real pilot
#

Hey I have a game that works perfectly fine in Editor and Android but on iOS, Apple is blocking wss communication with our Backend Server. I authorize a lot of stuff in the plist and authorized Custom Networks profile on Apple console but nothing works. Ofc paying for Apple Dev Program is not enough to get support by email from them 🙃
If anyone here has any idea I'll be glad

hoary spear
#

So if myvar is default 0, server sets it to 1, then back to 0, and now enters a new player - is it gonna trigger OnRep or not?

silent valley
#

It will not

#

Why would it? The value is 0 which the client already has.

hoary spear
#

Strange that it would know, to me, thats all

#

Id expect it to trigger regardless, as long as the server ever changed it

serene furnace
#

well I try to take my system to another level.

I made a system that is first setting ownership of an actor to be the host of my game.

Then any client / player interacting with the actor has a menu open, the thing is, only the last player that interacted with the actor can trigger a server event,

The other clients that interacted before the last guy just magically lost there reference to the owner (host of the game) that owns the actor.
And even on doing some extra work, the ownership is still the server on there clientside, but they still cannot trigger a server event ?

Is that a common thing that only one player can start a server event trough an actor ?

indigo brook
#

Quesiton: Using your combined experience, what are some required multiplayer nodes. Are there any you'd add to the list and if so, what function does it serve? Explain like I'm 5

serene furnace
#

I would say the term of "dont use in mutlplayer" is totally wrong

And should be replaced by something like " can be used only in Owning client event" ?

indigo brook
#

Yeah, I was thinking if it's running off a ForEachLoop it's fine right?

#

I changed it to Owning Client Event 🙂

serene furnace
#

no it's just that if you do that on owning client event, player controller 0 is a good way to get a reference to the owning client

indigo brook
#

Agreed

serene furnace
indigo brook
#

I'm trying to nail down the common interactions. Every tutorial I watch seem to skip over this or that and I'm making some notes so I could understand it easier

serene furnace
#

for this kind of simple stuff like opening widgets and such

gloomy tiger
indigo brook
#

Yeah, some docmentation say if it's an owning client, then IsLocallyControlled is solid to use

gloomy tiger
indigo brook
#

I'm trying to wrap my brain around things.

Another quesiton is when a skel mesh has a RepNotify on it, if that local player changes their jacket, would the other players see that jacked change on that specific player?

obtuse field
#

I came up with something like this for TCP, now, how can I receive data? Should server constantly on the EventTick Recv?

if(IsRunningDedicatedServer())
    {
        FIPv4Address IpAdresses;
        FIPv4Address::Parse(FString("10.0.0.148"), IpAdresses);
        FIPv4Endpoint Endpoint(IpAdresses, (uint16)7787);
    
        TCPChunkDistributor = FTcpSocketBuilder(TEXT("ChunksTCP")).AsReusable();

        ISocketSubsystem* SocketSubsystem = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM);
        TSharedRef<FInternetAddr> Address = SocketSubsystem->CreateInternetAddr();
        Address->SetIp(Endpoint.Address.Value);
        Address->SetPort(Endpoint.Port);
        TCPChunkDistributor->Bind(Address.Get());
        TCPChunkDistributor->Listen(64);
        
    }
    else
    {
        FIPv4Address IpAdresses;
        FIPv4Address::Parse(FString("10.0.0.148"), IpAdresses);
        FIPv4Endpoint Endpoint(IpAdresses, (uint16)7787);
    
        TCPChunkDistributor = FTcpSocketBuilder(TEXT("ChunksTCP")).AsReusable();
        ISocketSubsystem* SocketSubsystem = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM);
        
        
        TSharedPtr<FInternetAddr> Address = SocketSubsystem->CreateInternetAddr();
        Address->SetIp(Endpoint.Address.Value);
        Address->SetPort(Endpoint.Port);
        
        TCPChunkDistributor->Connect(*Address);
    }
gloomy tiger
#

Unless the local player is the server

serene furnace
#

has authority can be used to "check if it's not the host of a game doing the action"
If not, then you need to start a server event to get the right result, as well

gloomy tiger
#

The only way to transmit data from remote client to the server is via RPC, and the server then multicasts to the other connections

indigo brook
gloomy tiger
#

This doesn't have to be an RPC, it can be a regular event

indigo brook
#

Aye, it does but I need to clean things up

#

Roger

gloomy tiger
# indigo brook

This seems perfectly clean to me. Client asks server to change a variable for them. Solid.

#

It seems however it is not predicted, so the client instigating the change wouldn't have a smooth feedback.

indigo brook
#

Yeah, things have been working good, I need to clean it up though. I'm using Int's to switch my body parts and I want to clean up my struct to use Skel Meshes instead, then link ever body part (head, torso) to a RepNotify

gloomy tiger
#

Make sure to test with Network Lag

indigo brook
gloomy tiger
# indigo brook That's where I struggle haha. I understand single player game making well enough...

It's pretty simple, actually: when you call a Server RPC, there's a 'delay' until the information hits the other machine, and there's yet another delay from server doing its stuff and communicating it to the rest of the connections (pretty standard networking stuff)

When you change your skin/body parts, you want your local player to have immediate feedback, so you change it locally and the server can correct later if needed.

#

So for example

#

You can also set this variable

indigo brook
#

That makes sense

gloomy tiger
#

After this node

indigo brook
#

And that's because the RepNotify is replicated by default in the Character class right?

#

So I can add it after that node

gloomy tiger
#

No, that's the thing - RepNotify is only called upon receiving remote data from the server. But the trick is inside your RepNotify implementation: that's where you actually make the cosmetic change. So you can set this variable and immediately call whatever RepNotify is calling.

indigo brook
#

Right now the RepNotify has this mess in it (which I'll clean up/change)

gloomy tiger
#

And then make your RepNotify call ChangeSkin();

gloomy tiger
# gloomy tiger Here

And after this node, you could set the CharCustomization variable and call ChangeSkin as well

#

And then, you could also put an if to check if has authority, if true, you don't do anything else; otherwise, you forward the message to the server so it can broadcast it to the world

indigo brook
#

Trying to peice this together ahaha

gloomy tiger
#

(Is this a listen server or dedicated?)

indigo brook
#

Listen

gloomy tiger
#

1 sec

indigo brook
#

Bah! haha I did that but with the Authority true haha. I'll change it!

#

Still works

gloomy tiger
# indigo brook

You only need to forward it to the server if it's the client, otherwise if it's the server calling LoadCustChar_CL it is already setting the variable hehe

indigo brook
#

I appreciate you answering questions man, I don't want to be that guy that crosses the server barrier and asks if you could at times (not all the time and not spam you) get your wisdom?

#

Aka, can we be friends? haha

gloomy tiger
#

Sure thing!

unkempt tiger
#

does easy anticheat actually work? 🤔 I see most games using it

gloomy tiger
serene furnace
#

I think it prevents things like packet injection and scans files but thats it

unkempt tiger
#

as in prevent all cheats all around

gloomy tiger
serene furnace
#

not at all lol
and no anti cheat even does that

unkempt tiger
#

:(

serene furnace
#

it's pretty much a data base and things that exists into it bans players if the code is fund running on there game files

#

easy anti cheat would ask cheaters to never modify there game files and keep things external to the game files from what i've heard but thats pretty much it

unkempt tiger
#

so do we have something to try and spot for wallhacks etc?

#

i know that wallhacks are inherently near impossible to find

gloomy tiger
unkempt tiger
#

that sucks so hard

gloomy tiger
#

¯_(ツ)_/¯

#

You can make cheaters life harder, but you cannot stop them.

serene furnace
#

until someone makes a "VIP" feature or something on steam that you can access only by scanning a finger or something, and if you get banned one day, then you can never play on those servers again x)

#

AI anti cheat is analyzing your movements to identify players as well, like players as an individual

unkempt tiger
#

at what scope do anti cheats usually run

#

could it be my responsibility to attach it to the game code in some way

serene furnace
#

looks like the only future to nice gaming experience is to be able to identify each players one by one, and block those who ever cheated

unkempt tiger
#

i mean game code is already in charge of doing some validation, so the context is already there

maiden flame
#

doesnt unreal engine's movement component netcode have pretty good anti-cheating built-in?
im thinking in regards to wallhacking. as long as the server doesnt permit the client to change their collision and move somewhere other than predicted, wont it be corrected?
i guess there's some cheaters who are able to work around the built-in correction system, but yeah just curious

serene furnace
#

yeah, but then packet injection can simulate a player location and validate things like "is the player next to the object he is looting"

Then your blocking packet injection, so they start making ESP, to find object, so you creat ESP Fog to load no data into things players cant see

and they start making Sound radar to identify anysound location, like it's endless xD

maiden flame
#

o_o

unkempt tiger
#

o_o

maiden flame
#

oh, right, thats harder to predict yeah

serene furnace
#

it's called an ESP

#

not an actual wallhack

They are getting collisions on the players to display it on there screen usually

#

then they get data like "level" "KDA" "Gear" from the data base somehow xD

unkempt tiger
#

how do they even recognize the player character class?

#

what do they have to 'tap into'?

#

at what scope do cheats run? what context do they have available?

serene furnace
#

no idea TBH, look at tarkov cheats on youtube, you will see pretty much any cheat system used on any game

#

some are running into 3rd party programms and got there own luncher and shit, some are into the game
Some are getting skeleton location, some are getting collision, most times they manage to get data about players, gears and level / name
They can even see if a GM is connecting to the game

unkempt tiger
#

GM?

serene furnace
#

those guys are proper developper hating the game or making money for renting there anti cheat 200$/month

serene furnace
#

game master

maiden flame
#

doesnt server-side validation prevent things like packet injection?

unkempt tiger
#

whats a game master? some admin to ban cheaters?

unkempt tiger
gloomy tiger
serene furnace
serene furnace
serene furnace
#

all poor countrys are having legit groups of cheaters / hackers for those reasons

gloomy tiger
#

What kind of game we talking about?

serene furnace
#

Items takes time to farm, farming time is money, they sell to other players the ability to dont spend the time to farm, and thats working for any game

(Valorant Rank)
(Tarkov level and items)
(Apex rank)
(Wow Items and money)

pretty much can apply to any game

#

cheaters are in most cases people making money more than kids, kids with bad cheats gets spotted quick

Proper cheaters are playing for months, knowing exactly the game and how the game works in terms of spotting people

#

then if they get spotted they Buy another account and here we go again

#

thats why identifying players as an individual is the key to block cheaters

unkempt tiger
#

yeah but how expressive is the signature space

#

as in, how accurately can you identify players by their play style?

serene furnace
#

not accuratly enough lol
Thats why AI anti cheat is not a thing yet

gloomy tiger
#

Aight, this is a reality beyond me lol

serene furnace
#

yeah sure
But then here we are again "how to make a difference from a guy that gives an item to his friend, and a guy who baught the item out of the game"

xD

gloomy tiger
#

But that's not the case for ranks, right?

#

If I buy a top level account, it would be fairly easy to identify my gameplay doesn't match my rank

serene furnace
#

how do you know the guy did not just moved out of his country ? x)
And how do you know the guy is not just trying to get a lower rank to play with his friend ?
and even worst, how do you know his little brother is not simply playing on his account ? 😄

unkempt tiger
#

so in short we're limited to identifying cheaters through sus software detection and statistical analysis

gloomy tiger
#

and the other way around would be true as well - what if my big, badass brother was playing in my account? 😂

serene furnace
#

exactly xD

lament flax
#

im having a hard time finding a reason why my onrep notify doesnt always call on clients

#

when using breakpoint i see that the actor is replicated and exists for the clients

but when calling onrep from server it only calls on server

unkempt tiger
#

net dormancy?

lament flax
#

its awake

unkempt tiger
#

sus

lament flax
#

the weird part is that its random

unkempt tiger
#

replication condition?

lament flax
#

none

unkempt tiger
#

do u have any custom net serializers in the project

lament flax
#

nope, im in bp only

unkempt tiger
#

very sus

#

maybe its not triggering because its value is at default value already?

lament flax
#

now it works

#

weird

unkempt tiger
#

there, all you had to do was ask about it on the discord

lament flax
#

🦐

unkempt tiger
#

agreed

lament flax
#

will im here, i got another question

#

regarding widget components, what is the correct way to use them on network ?

im talking about widgets that are visible for anyone

unkempt tiger
#

idk but what immediately comes to mind is to check if u can onrep some var on them or get an RPC working

#

then have them show the networked data with an observer pattern

#

if not, then u can always treat them as local rather than networked, and they'll just show data that's networked elsewhere

maiden flame
#

What do you mean by "widgets that are visible for anyone" @lament flax?

A widget/widget component only exists for the client locally, but they can retrieve identical information from the server.

hoary spear
#

Not directly tho, or?

#

Do they, as components, exist on the server ?

#

So you can replicate props as normal?

maiden flame
#

The server has to send the information, yeah.

hoary spear
#

Havnt tried, just know we did it differently

#

We rep data to the owning actor, and push that to the widget

lament flax
#

but now i still got my repnotfiy on the actor not firing on clients

lament flax
maiden flame
lament flax
#

so this is not possible since the widget "dont exist" on server ?

its weird because on the server i can retreive and cast the ref

#

and on rep notify it will execute only on server

hollow eagle
#

it's not weird, the widget is not replicated.

#

nor should it be.

maiden flame
#

^

hollow eagle
#

For some reason you've marked your widget component as being replicated, which is also wrong.

#

UI is intended to be client-only. You should not be trying to replicate data through it.

#

UI should read from something else that does have proper replication.

lament flax
#

so its not the same instance for the server and clients ?

hollow eagle
#

no.

lament flax
#

each of them has its own ?

hollow eagle
#

yes.

#

there is no point in making the widget component replicated, all you've done is waste some resources.

lament flax
#

i changed the setup and the widget isnt changing

both breakpoint where called

hoary spear
#

Not the widget part of it, thats sorta separate?

hollow eagle
#

Yes, it does. There is no reason to replicate the component.

lament flax
#

yeah thats what i am wondering

hollow eagle
#

The component can replicate but it won't do anything useful.

hoary spear
#

Fair

hollow eagle
#

So as I said: all you'd be doing is wasting resources.

lament flax
#

even setting the widget data from client didnt do anything

maiden flame
#

Is BeginPlay called from an actor that is only spawned on the server?

lament flax
#

its not begin play

lament flax
maiden flame
#

Ah

#

But your clients get the notify function or no? I understood it like you had problems with this earlier.

lament flax
#

rn this works

lament flax
obtuse field
#

I have server and a client, but its not connecting ConnectionState is set to Error after a short while

if(IsRunningDedicatedServer())
    {
        FIPv4Address IpAdresses;
        FIPv4Address::Parse(FString("10.0.0.148"), IpAdresses);
        FIPv4Endpoint Endpoint(IpAdresses, (uint16)7787);
    
        TCPChunkDistributor = FTcpSocketBuilder(TEXT("ChunksTCP")).AsReusable();

        ISocketSubsystem* SocketSubsystem = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM);
        TSharedRef<FInternetAddr> Address = SocketSubsystem->CreateInternetAddr();
        Address->SetIp(Endpoint.Address.Value);
        Address->SetPort(Endpoint.Port);
        TCPChunkDistributor->Bind(Address.Get());
        TCPChunkDistributor->Listen(64);
    }
    else
    {
        FIPv4Address IpAdresses;
        FIPv4Address::Parse(FString("10.0.0.148"), IpAdresses);
        FIPv4Endpoint Endpoint(IpAdresses, (uint16)7787);
    
        TCPChunkDistributor = FTcpSocketBuilder(TEXT("ChunksTCP")).AsReusable();
        ISocketSubsystem* SocketSubsystem = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM);
        
        
        TSharedPtr<FInternetAddr> Address = SocketSubsystem->CreateInternetAddr();
        Address->SetIp(Endpoint.Address.Value);
        Address->SetPort(Endpoint.Port);
        
        TCPChunkDistributor->Connect(*Address);
        
    }
#

Nvm. Changing ip to 127.0.0.1 worked

lament flax
#

looks like the widget only update when using "set widget" on the widget component before each change

hoary spear
#

If you have the correct reference to the widget, it'll update when you update the widget

lament flax
#

the ref is valid

#

not changing

hoary spear
#

then you got it mixed up

lament flax
#

wdym

hoary spear
#

somewhere along the way, you got it mixed up

lament flax
#

well i cant find a thing

#

all breakpoint are hit

#

on client

hoary spear
#

Not quite sure

#

all i know is that im updating my widgets directly and it's working like a charm

#

like it always has

lament flax
#

WC > get widget > do stuff ?

hoary spear
#

Create widget - > Let widget bind to updates

lament flax
#

well im doing the same

hoary spear
#

this doesnt look like a binding to a broadcast

lament flax
#

on begin play i create a widget (for each client) and assign it to the widget component

lament flax
hoary spear
#

how could i know... 🐬

lament flax
#

you couldnt, nw

#

(the create widget bool is used to trigger stuff when client is created)

#

the "update data" is always called on the widget, but it only update in the world when i do "set widget" before

hoary spear
#

Im sure your issue

#

is using the improper method

lament flax
#

what is the rpoper one ?

hoary spear
#

you're directly setting the variable of the text block

#

instead of the function

#

function likely calls Redraw() or similar

hoary spear
#

you've changed more

lament flax
hoary spear
#

this yes

#

^

#

SetText

#

is a function

#

but..

#

nah, try that

lament flax
#

what is incorect i the stuff i show you ?

hoary spear
#

just try swapping Set Text (var) to SetText function call

#

the variable should be private

#
void UTextBlock::SetText(FText InText)
{
    Text = InText;
    TextDelegate.Unbind();
    if ( MyTextBlock.IsValid() )
    {
        MyTextBlock->SetText(GetDisplayText());
    }
    OnTextChanged();
}
lament flax
hoary spear
#

whats your comp settings

lament flax
#

even just that isnt updating the text

#

oh wait

#

"manually redraw"

hoary spear
#

rip

lament flax
#

yeah i want to kill myself

hoary spear
#

avoid that 🙂

#

Stay sharp and focused

#

push forward

lament flax
#

yes

#

ty again for helping

restive geyser
#

Hello, I want to create such an attack for a multiplayer game, and this attack should be implemented on the server.
I can currently create a Circle trace, which can either be standalone or within a specific large range.
But all of these events happen within a single frame.

#

How can I implement something like this to ensure it's not very performance heavy when running on the server?

rich crag
#

why does a door that replicates properly as a standalone actor not replicate properly as a child actor of another blueprint? Specifically, creating 2 instances, opening one and leaving the other closed. I have figured out the one that stays closed is the local copy, as i can walk through it when the server says the door is open. I can also run a concurrent event to open the door locally, but it literally is opening and closing two doors, doubling the sounds, etc. What am I missing about replication

warped berry
#

I want to replicate/RPC a really long JSON string but I'm getting an error that the bunch to replicate is too large

#

any work-arounds?

lost inlet
rain shadow
#

Hello, I am trying to make something similar to the Lyra turn in-place system and I have run into a bit of trouble when replicating it over the network. Currently I allow the actor to rotate with the camera's yaw. I then counter rotate the mesh with a calculated Root Yaw Offset which is applied to the root bone in the AnimBP. This works fine locally, however there appears to be some jittering when played over the network. The server seems to able to see everything fine (left view in video) but the clients see some jittering when other clients rotate (right view in video). From what I can tell in the Lyra demo it doesn't have this issue, but I am unsure what they do differently if so. If anyone has any advice I would greatly appreciate it, thank you!

serene furnace
#

Hi

I'm trying something to see exactly how ownership and ability to start a Server event can be handled trough actors.

To achive that i'm doing something super simple.

1- When my player host begin plays, then "switch on has authority triggers an server event that sets the ownership of all actors to have the server as there owner"

2- Players that are interacting with the Rock are starting a client side event to open there widget and sets the rock actor as the interacted rock"

3- From the opened widget, I'm trying to start a server event that fires from the actor, the actor ref is fine, and the ownership is supposed to be the player host.

And yet, no server events are firing on any clients, only the player host can start a server event.

Here is the code. Can someone help me understanding how this works and why is it not starting a server event if it's owner is the player host ?

hollow eagle
#

What you've said is somewhat confusing, but it's likely you're misunderstanding one of these things:

  1. Server RPCs can only be called by clients that own an actor. A client trying to call a server RPC on an actor they don't own will have that call ignored by the server.
  2. The server does not need ownership of everything, it can already do whatever it wants.
  3. Widgets are not replicated, an RPC on a widget will go nowhere (or at best execute on the client itself - depends on the type of RPC)
serene furnace
# hollow eagle What you've said is somewhat confusing, but it's likely you're misunderstanding ...

I managed to make that work on another actor

What I did was "when interacting set ownership of the interacted actor to be the server"

And when doing that, I was able to start a server event from a widget, cause the widget was asking the actor to do the Server event.

My problem was that when I had another player interacting, then only the last player that interacted could start a server side event, so 2-3 player could not mine the same rock x)

hollow eagle
#

So #1.
This is still not a good way to go about things - what happens if two players interact with something at the same time? It is better to route your interactions through something the player always owns (like the character, controller, player state, or a component on any of the above) and pass the targeted interactable through the RPC. The server can validate that the player is allowed to interact with the object and call whatever it needs to from there.

serene furnace
#

the thing is that the widget is a mini game, so the mini game is checking if it was done properly or not, I cannot do that into any other thing, So I was like "then lets start a server event from there since I can get a ref to the Rock they interacted with anyway"

Cause I dont really want the player controller to have 10-20 mini games handling into there controller

hollow eagle
#

That... doesn't change what I said.

#

RPCs must be routed through something the client owns, and each thing can only be owned by a single client.

#

The solution is not to swap ownership constantly - that is just asking for buggy behavior and race conditions.

serene furnace
#

it's never swapping ownership since it's ALWAYS the server that owns the actor ? I dont understand

hollow eagle
#

What?

#

I'm talking about clients sending server RPCs

#

Clients can't call a server rpc if they don't own the actor the RPC is on.

serene furnace
#

yeah then here it's always clients sending request to replicate since it happens from Widget and widgets cant be replicated 😄

hollow eagle
#

I genuinely have no clue what you're talking about

#

I'm talking about what you said here

What I did was "when interacting set ownership of the interacted actor to be the server"

#

which is generally a bad idea

serene furnace
#

Bad Idea why ?

it's a required step to allow this actor to start a server event

serene furnace
#

yes, it's changing it to be the server @sinful tree (player hosted project)

sinful tree
serene furnace
#

(the code is starting from the pawn class begin play)

sinful tree
#

Other than only the authority can change the ownership

serene furnace
sinful tree
#

No it isn't.

#

If I spawn an actor locally on my client, I am then the authority of that actor, even though I'm not the host.

serene furnace
#

those actors are placed into the map, they are never spawned, if they are spawned, they are from the server

#

so that its replicated (those actors replicates movement and replicates)

sinful tree
#

When spawning a pawn, and possessing it with a player controller, ownership of that pawn is assigned to the player controller. This is what allows the client to make RPC requests on that actor.

#

If you're changing the ownership of an actor based on the owner of another actor then you're assigning it whatever the owner is of that actor, regardless if it is the host or the client.

serene furnace
#

so what is the safest way to make sure that the owner of those types of actors is the server ?

sinful tree
#

Don't change the ownership at all on that actor.

serene furnace
#

if even has authority + get controller does not return me the controller of the host, then how the hell I'm I suposed to make this actor able to start a server event ?

sinful tree
#

That's what Siliex was saying - you're not supposed to run the RPC on that actor. You run it on something that the client owns.

warped berry
serene furnace
#

I saw that yeah,
I'm trying to understand what exactly is giving the ability to replicate ^^

That means I should make that code so that "if mini game success into the widget"

Then get player controller to start a server event that interacts with the minned rock ?

I just dont wanted to have this player controller to handle all the mini games I planed lol

warped berry
hollow eagle
#

I just dont wanted to have this player controller to handle all the mini games I planed lol
You don't have to. There are tons of ways to break up your code - you could create a replicated component to handle things, you could have a more generic "minigame did thing" function on the controller, you could even spawn a new actor that exists purely to be a go-between for the minigame.

serene furnace
#

my main goal was to be able to have any amount of clients able to mine a same rock, and when any of those clients sucessed there mini game then the rock is sapwning a rock for the client and moveing into the ground to get smaller x)

dark edge
#

lol

#

Whenever they succeed does the rock reward get a bit smaller?

serene furnace
#

I guess a ref to the interacted rock passed trough the widget should give me a way to start a server event on there controller that changes the location of the given rock for everyone

serene furnace
# dark edge What is the minigame?

something simple

There is a pick axe Icon that spawn, you need to place your mouse on it, then press a given arrow selected randomly, after 1 sec it check if you pressed the right direction

Then the duration of checks becomes smaller and smaller so that you can mine faster and then dont pay enough attention and fail, and the check duration goes back to 1 second on fail x)

dark edge
serene furnace
#

But I wanted multiple people to be able to mine the same rock properly, cause ressources will be kinda rare

serene furnace
#

cheaters will be packet injecting actions as hard as possible lol

#

I at least made the Icon location random. And colors random so that they cant use a basic Bot to just clic always at the same spot, or recognize colors

dark edge
#

In that case, just have the game state live in the widget and on completion, it does a call into the local version of the Pawn or Playercontroller (I'd prefer pawn)

serene furnace
#

yeah but the local version wont let me spawn a proper item and add it to inventory, those are only handled trough server

#

if you try to loot a not replicated item, it break the inventory instantly lol