#multiplayer

1 messages Β· Page 17 of 1

rapid bronze
#

you should never

cold moat
#

I'll be honest, I'm currently storing player equipment on it, and also some information about progression

#

but it feels like it is the wrong place for this kind of thing, maybe creating a component and keep it on the player character is better?

#

progression maybe makes sense on the instance, but equipment probably should be on the player?

plucky prawn
latent heart
cold moat
latent heart
#

Is the data related to the character or the player ?

cold moat
#

that's a good question, it is about the character, its equipments that changes movement and combat variables, but every player has their different equipments

latent heart
#

That can be different for different containers. E.g. a player's inventory might be account-wide, but their character's inventory might be just what they're currently wearing, etc.

#

And there might be overlap.

#

A character's items are still in the player inventory, for example.

fierce oriole
#

Hey everyone! Could I get a critique/sanity check of this Design to "Delegate" events from Game State to all Player States, I'm trying to eliminate Hard refs:
Game Mode and Game State communicate via Interface
Game State has an ActorComponent, lets call it "EventDelegatorComponent", and an interface to access it
Player States Add themselves to an Array of PlayerStates in the EventDelegatorComponent to "Subscribe" to those events. When Game Mode messages via interface to Game State, EventDelegatorComponent will loop through all "Subscribed" PlayerStates, calling the appropriate Interface call on the PlayerState which can call the interfaces on the Character or Player Controller

latent heart
#

Either way, store the data on what the data relates to. If it's cahracter specific, store it on the character somewhere. Player ,you could put it on the player state - you can specify whether each variable replicates to all players or just the owning player, too, so it's safe to put private player information there.

cold moat
#

I see, I'll try to do that then! Thank you Daekesh. :)

latent heart
#

Why do you subscribe to events on the game state when the game state already has a list of player states?

#

Do you want hte ability to opt out?

cold moat
#

seizing the matter, about where to keep things, is it okay to create components to separate parts of the player system? I'm a very OCD person, so for example I created a component to focus on the player combat system, leaving the player controller only for movement, is that a bad thing?

latent heart
#

Not necessarily.

#

It's your game design, do it how you like.

cold moat
marble narwhal
#

Hey sorry to bug you guys. I can't find any info online. How do I get my game able to be hosted by a 3rd party like g portal, and how do I allow other people to host servers on my game through g portal

latent heart
#

Putting the component on the game state and the combat controls in the game mode would be a serious issue, but separating stuff out into components on the player chvaracter or controller isn't really an issue.

cold moat
#

yeah I'm separating everything inside the player itself, not outside, but tbh for now I only separated Movement and Combat

#

these two can have a lot of variables and functions, so everything together was killing me

latent heart
#

You might find some overlap with movement and combat, so make sure they're accessible.

cold moat
#

that is a very good point, I'll be cautious

past totem
#

I have successfully fixed this issue. I would like to congratulate Unreal Engine for giving me a fucking headache

I would also like to continue and detail my issue
My child actors had 'Replicates' OFF (the actors I was spawning) [I do not mean child actor components]
But for some reason, they worked in the editor, even when simulating a dedicated server, but not in packaged on a dedicated server. For this reason, I kept trying out different things and packaging every time to test it, forcing me to wait so long between tests, because there was no other way I could figure out if my fix worked.

I don't know if I want to cry or laugh but it's finally fixed congratulations me and fuck unreal at least for today

latent heart
#

Did you have "run in one process" checked?

#

If you don't, it will actually spin up multiple game instances and you will get better results.

sinful tree
#

Alternatively, if you distribute your dedicated server build, then players can just host their own wherever and however they want.

past totem
#

couldnt you have mentioned that earlier

latent heart
#

Lol

past totem
#

also pretty sure it just didn't work when I tried, or maybe it worked and the issue wasn't there, I don't know. and I don't really care anymore

latent heart
#

Btw, by "child actors", do you mean with child actor components?

past totem
#

no

marble narwhal
past totem
#

just regular child actors

#

the parent had 'replicates' on

#

mightve been something to do with the bug IDFK

sinful tree
#

ie. Let players download it.

marble narwhal
#

Oh okay, I'm sorry I don't know anything about the online stuff. But if they just download it then they can't host through 3rd party websites like g portal right? Since I have to ask g portal if I can host my game

latent heart
#

Generally you would have to set that up for them and then pay for it. There are companies that sell dedicated servers to end users to run games on, but, yeah, I think that business model isn't so great any more.

marble narwhal
#

So I have to pay for other people to host servers of my game??

latent heart
#

On something like g-portal, I suppose?

#

Not on insert random hosting company.

marble narwhal
#

I plan on having 3 official servers, that I pay for, then people can host servers that anyone can join

latent heart
#

Just release the server files and let them figure it out.

#

They can use their own machines or rent an internet based one.

marble narwhal
#

So I'd just have to go to each 3rd party I want them to use, and contact them about allowing my game, then boom they can host to any of the ones I have permission from?

latent heart
#

If you give them the server files, you don't have to do anything.

#

If you want to pre-arrange hosting which player's can rent (without giving them server files) then that's down to you.

marble narwhal
#

My point is though, they can't just host from a file, if I have to contact the service to even put my game on there to be hosted. They just have a file

latent heart
#

Sure they can host from a file. Why wouldn't they be able to?

#

You give them the files needed to run the dedicated servers and off they go.

#

The point is, the players tehmselves will arrange where to put stuff if you give them the ability to do it (by giving them the server files).

past totem
latent heart
#

Dedicated servers don't even need to be on dedicated game hosting servers. They can go on anything. Random Amazon server or whatever.

#

A tool?

past totem
#

it's just a type of steam application

#

before contacting these companies, make sure u have some following or something to show that they should care about putting their time into adding ur game (and include info about that) , or they will straight up ignore u

latent heart
#

That too. If your game has 5 players, it doesn't matter who you contact.

fathom aspen
past totem
#

hello sometimes after I update only the server and the client needs to update it kicks me out right after I try to login, is there a way to get this as a blueprint event somewhere so I can tell the player to update the client?

#

I checked this but it has no reason variable

latent heart
#

I find it unlikely bp has that level of depth.

past totem
#

well if it's not too complex, I'd accept a c++ solution πŸ˜…

latent heart
#

Look at UNetConnection - the class is right there πŸ˜›

past totem
#

I'm like really clueless on c++ tho, what am I supposed to do with that? πŸ˜…

rapid bronze
#

There's a PreLogin event too where you can check the versioning between Server and Client and reject the connection if different, so give a message in return which would be the error message

#

Not sure if it's exposed to BP tho

ancient adder
#

I have a widget that calls a function in my engine subsystem when its created, that function takes in Widget pointer and calls a delegate which also takes in widget pointer, the thing is, i create the widget on client, bind an event to the delegate both on server and client on my character but only server side delegate fires when i create the widget and the weird thing to me is the event returns a valid pointer to the widget on the server

#

Is engine subsystem only on the server or something? and shouldnt the pointer to the widget be null on server side even if the widget is created on the server?

low helm
#

Are you using HASAUTHORITY or ISDEDICATEDSERVER

#

because a non-dedicated server can have widgets

ancient adder
#

Im using HASAUTHORITY

#

I now understand i can create the widget on server if its not dedicated, my other remaining issue is im creating the widget on client and the delegate is only firing on server side with a valid pointer to the widget, im creating the widget after "Remote" pin on "Has Authority" node

dark edge
#

@ancient adderWhat exactly are you trying to do?

ancient adder
#

Atm im trying to store widget data in engine subsystem with events/delegates such as on widget creation and destruction

dark edge
#

What actor is the client to server RPC routing through?

#

widgets aren't replicated

ancient adder
#

There is no rpc, The widget just calls a function in the subsystem when its created

#

That function has Widget pointer input paramater, when the widget is created it executes that function and connects "self" to the input paramater

#

That function calls a delegate with Widget pointer as an input

#

I bind an event to that delegate in the character, both on server and client for testing purposes, but the delegate only executes on server side

#

even tho i created the widget on client side

tulip fjord
#

hi, can anyone help me understand what kind of technology stack does UE use for multiplayer games?

#

by technology, I mean webRTC, gRPC or any other api along with the protocols used like TCP/UDP

ancient adder
#

afaik the delegate should only execute on client side because the widget is created on the client, there is no replicated properties/rpcs involved

dark edge
#

So you're saying you do widget input on client and something happens on server with no RPC?

ancient adder
#

I create the widget on client side, and the delegate is executed on server for some reason

#

it even returns a valid pointer to the widget from the delegate

#

Here is the widget creation

#

Add process where the widget executes the function from the subsystem happens in c++ at NativeOnInitialized, i do not use authority check or anything because im working in a widget

#

Or should i use authority check in the widget?

#

Or atleast "Is dedicated server"

dark edge
#

Listen server or dedicated?

ancient adder
#

I run the game with NetMode "Play as client"

#

I suppose it runs a dedicated server in the background

dark edge
#

If you're using single process there's fucky stuff there

ancient adder
dark edge
#

I doubt it's actually happening unless it's some fuckery with the shared process PIE

ancient adder
#

I'll try to run in "Standalone Game" mode

#

Delegate is not executing at all in Standalone game mode

#

i'll go do some checks

#

I went back to play in viewport and added 1 sec delay before widget creation, the delegate on client now executes

#

But still no idea why it executes on server

#

In Standalone it doesnt execute in both server or client

#

Got to execute on client too in viewport mode, i was creating the widget first before binding to the deledate, but it still executes on the server aswell for some reason

#

Okay its working now in standalone, only executes on client as it should, in viewport it executes on both, i guess using single process is fked up as u said

dark edge
#

might NOT be, just the log is visible on both

#

if you're just printing a string

ancient adder
#

Yea im using print string, it prints 2 times, one with Server and one with Client

#

The function also stores the widget in an array inside the subsystem, in viewport mode the array has elements on server side, none in standalone mode as it should be

hazy snow
#

does anyone have experience setting up a dedicated server in a docker container?

grave lynx
#

Hey, is there a way to 'set owner no see' a light component?

past totem
grave lynx
past totem
grave lynx
#

Ok I see yes,

#

thank you

olive crow
#

So I have set my player character bp to replicate, it has an inventory component which also replicates, the component has an array of objects of a bp that inherits from object (uobject) that is also set to replicate (the array not the objects), but when the client joins the server the array of the client is empty, even though I am initializing it with items. It still has the same length as it should, but instead of having objects it has none on all indexes. Also this is an error I'm receiving

past totem
#

inventory systems should use structs

olive crow
#

That might be a problem cause I need to call events/functions on each item

past totem
#

and then when u need to call a function get the object

#

u can also use get default object class instead of creating an object then (c++ only)

olive crow
#

hmm, that sounds promising

swift pulsar
#

Hello, is it still required to include UnrealNetwork.h in classes with replicated variables/RPCs? I've just noticed that it compiles regardless. (4.27)

fossil spoke
stoic lake
#

Is it good practice to store all the usernames on the server's game instance?

#

And if not, where would I store them to have them persist throughout levels?

swift pulsar
fathom aspen
stoic lake
#

does such a node exist in the playerstate?

fathom aspen
#

You can if you have an OSS implemented which is the case in any real world application

#

Otherwise it's null subsystem and you get that effing long pc name

stoic lake
#

and have people implement their own preferred oss

fathom aspen
#

Then you would have to either play your way through the null subsystem source code and change it to your liking.

#

Or make your own UniqueId which seems to me like a pain in the arse as it's used in a bunch of different places in the engine

#

So you have to take care of that functionalities

stoic lake
#

hmm, that goes beyond my knowledge sadly

#

I think I have managed to find a way by storing the values on the server's gameinstance with a map variable containing the playercontroller and its corresponding username. However I'm not sure if this is the right way to go about it

fathom aspen
#

Well you said it's a marketplace product.

#

I don't think you need to mess with the UniqueId at all

#

Not by the sounds of it at least

#

Let games implement their oss

#

PlayerState will know to fetch that UniqueId from the implemented oss

stoic lake
#

So if I get the username from the playerstate right now, when someone implements steam's subsystem for example, it will automatically fetch their steam username?

fathom aspen
#

I'm in ✈ so will lose internet access in any second πŸ˜ͺ

#

Correct

stoic lake
#

No problem, thanks for the help!

stoic lake
twilit radish
#

Wizard flying over to Vori to make sure it's all fine πŸ‘€

pallid mesa
#

eye is good

#

haha

twilit radish
#

πŸ‘

past totem
past totem
#
  1. package a development build
  2. use visual studio attach debugger
#

it's like

#

in the VS menu there is an option to do that

#

try to find it my VS is closed rn

#

not that

#

it's like in the higher menu

#

press debug

#

then look for 'attach'

#

or somtehing

#

mayb4e windows section ?

#

oh

#

it's there

#

attach to process

#

yes

past totem
#

LUL I was suggested this by someone else here

#

in the Project Launcher, is there a way to package for both Windows and WindowsServer in one run?
When I select both, it just does one of them..

twin juniper
#

You maybe does not have the Target Server config installed for your engine (if it's a source build)

past totem
#

oh I forget about that channel, let's move there

oak prawn
#

The server can create a host and enter the game, but when I click the client host button, the game engine crashes?

past totem
#

don't u need to add

#

?listen

#

at the end of the map name

#

also go to Saved/Logs

#

and show us the crash error

oak prawn
past totem
#

I guess that's fine maybe

#

ye check logs

oak prawn
past totem
#

@oak prawn can u post the last part that's useful pls instead of the whole file

#

just checked, r u sure this is the logs from the crash?

#

or did u run it again after it crashed without crashing?

#

I don't see a crash here

oak prawn
#

Which one should I throw at you?

#

Game didn't crash when I ran it with standalone game @past totem

strong apex
oak prawn
#

the first time I did it it was showing the whole session list but now it doesn't

strong apex
#

how you create multiple sessions to show up there

#

@oak prawn your max results is set to 0

#

make it 10

oak prawn
#

I did but it still didn't work 😦

#

@strong apex .

strong apex
#

blueprint is fine

oak prawn
#

It worked fine the first time I did it.

#

the session list stopped showing when i did it the second time

strong apex
#

you are using any source control?

oak prawn
#

no

strong apex
#

you really should

if any time you mess up
its good to have a
go back in time button πŸ˜…

oak prawn
#

:d

#

I added it the second time I ran this, maybe that's what happened? then i deleted it but it didn't fix it.

strong apex
#

well if you are clearing before find session then it should work

oak prawn
#

really hard to understand πŸ˜„

strong apex
#

cant argue with that πŸ˜‚ sure it is

EOS subsystem is even more buggier in UE4

oak prawn
#

I'm in the last part of my game now and it's annoying that I can't write the right code and get results πŸ˜„

oak prawn
#

Where is the problem, why can't the lobby that was set up be found?

#

Host button

#

Find button

dim trail
#

why cant i pass an object reference to a server RPC?

#

skilltreeskillwidget is null when it runs on the server

#

everything else is fine

past totem
#

use structs or something instead

sinful tree
dim trail
#

i have a replicated property on the widget itself but i need a reference to the widget to update the respective property

#

i dont think structs will work

#

nvm, i got it

sinful tree
#

Replicated properties on widgets don't do anything. Replication of properties only happens one way Server->Client and even if you mark those properties as replicated, the widget itself would need to be replicated which even if you did, widgets don't actually support. There is no connectivity available within widgets at all.

oak prawn
#

sometimes it doesn't show the established lobby, what do you think is the reason?

acoustic thunder
#

does the Attach actor to component node have special rules?
I have the location set to snap
and on the server side the actor snaps to the component perfectly
but on the client side
the actor snaps then seems to be released right afterward

stoic lake
#

I have this blueprint which spawns a player when a players joins the game, however when I package the game, it doesnt seem to work

#

only in editor

#

bottom 2 pictures are the Spawn Player function from the first picture

sinful tree
#

You shouldn't need your player controller to tell the server to spawn the character. There's OnPostLogin that can handle that directly on the server itself without the client needing to tell the server to do it.
The rest of it seems like it should be ok. The only questionable thing is the "Find Available Player Start" function and the Collision Handling Override which you may want to change so the player always spawns.

stoic lake
#

the bp itself seems to work just fine atm however. As long as I test in editor

#

any idea why it breaks when I package the game?

plucky prawn
sinful tree
# stoic lake any idea why it breaks when I package the game?

I gave you three.
The RPC on begin play may not be going through on the server due to the player controller not being net addressable when you're calling it - move the logic to the game mode's OnPostLogin.
Find Available Player Start you haven't shown, so I can't directly comment on it, but it's a place where something could fail depending on what it contains.
The collision setting being set to "default" means that you're not really controlling the spawning behavior and on the server the location may be getting registered as blocked somehow. Set to one of the "Always Spawn" options.

My instinct tells me it's the RPC that's the problem as everything else seems like a stretch that it would cause a problem.

cold moat
#

I remember reading about this but I can't remember too well, events can be replicated, functions are not, but what if my event runs a function, will that be replicated? Can I call a replicated event that runs through various functions?

cold moat
#

Also, things from BeginPlay apply on the server?

limber cloak
#

how do I make a client side movement replication in C++? in UE5?

#

i tried this:

bServerAcceptClientAuthoritativePosition
``` but it doesnt work
latent heart
#

To replicate FROM the client to the the/other clients?

limber cloak
#

to make client set the position

#

it allows people to cheat in game

#

they can set the movement and it will replicate to the server

latent heart
#

Where is that variable?

sinful tree
limber cloak
latent heart
#

Oh the CMC. Runs far away.

cold moat
sinful tree
#

Also use unreliable for something that is happening constantly (like on tick), otherwise you'll flood the network.

cold moat
#

Okay! Thank you so much again, you guys here on the server are always saving me with things I forget, I appreciate it

#

I wish I had more time to play with networking

limber cloak
#

is the player movement by default server sided?

#

from the 3rd person package etc.

sinful tree
#

Yes

#

the CMC has client side prediction built into it for basic movement stuff.

#

So when you use "Add Movement Input" the client proceeds with moving the character and sends the move to the server with a timestamp. The server "rewinds" the game to the timestamp provided to verify if the client could move to the desired position. If it can, it allows it, if it cannot, it corrects it.

limber cloak
wooden cypress
#

Can paperZD be used in multiplayer games?

clear island
#

does UE have any sort of query protocol that allows querying dedicated servers for server info? really wanted to avoid setting up a another udp server just for that

fossil spoke
#

Take a look at Online Beacons.

#

Beacons allow you to perform a connection to a Server without actually connecting as a Player.

#

So you can do things like make queries or to make a slot reservation in the case of Party Beacons.

clear island
#

yea exactly, before connecting

#

looking to report some basic stuff like, number of players inside the server, ping, etc...

fossil spoke
#

Yeah you want Online Beacons

clear island
#

thanks, gonna look into it

fossil spoke
#

Alternatively you could setup some sort of master server that aggregates all that information, then use some sort of API Gateway to do a query of the master server for a list of that type of info.

#

The dedi servers would just regularly make updates to the master server with their new info

clear island
#

yea I thought about that too, but it might get a bit expensive when scaling for many servers

#

I'm hoping to report a full player list (nicknames) too of players inside the server

#

so it might be alot of data to store, which would be temporary anyway

fossil spoke
#

It would actually be better than having potentially thousands of players making beacon connections to every server.

#

Are you using Steam?

clear island
fossil spoke
#

Thats literally what a gateway is for

#

High scalability

clear island
#

yea but thats my point about it possibly getting expensive

#

not using steam

#

using a standalone dedicated server

#

planning to distribute the server binary and allow players to self host, like minecraft for example

past totem
clear island
past totem
clear island
#
#

doesn't seem to be related with my needs but thanks for the suggestion anyway

grizzled pelican
#

when is OnPostLogin raised? I wanted to raise it manually after I have logged in using my login panel so I can process server-side blueprint

sinful tree
clear island
#

yea that is probably a better channel for my questions

#

was just talking about that plugin itself

sinful tree
barren surge
#

Anyone know of any seamless join in progress examples or talks? Mainly looking to JIP into a world hosted on a DS. Form the client's perspective they should not notice a server travel occurred and they are now "match-make'd" with 8-16 other players into this shared world. ATM, I'm hitting some major hitches and client pawn is teleported to a player start.

bitter oriole
barren surge
bitter oriole
#

Not that I know of

#

Loading screens are not usually considered a big issue

barren surge
bitter oriole
#

Destiny literally does have loading screens all the time

#

It's just that the UI is still responsive

sinful tree
#

And in some instances, its really noticable when it loads.

barren surge
bitter oriole
#

Your ship is a loading screen

sinful tree
#

(and a really annoying one!)

barren surge
#

that isn't a fixed set of players.

bitter oriole
barren surge
#

fuck me, thats not what i'm saying.

#

Destiny, is an example of where a ton of seamless jip occurs,

bitter oriole
#

It's not seamless at all

barren surge
#

Ok thanks for your input

sinful tree
#

For when you're on a planet almost all "transitions" to new servers occur in crooked parts of the map where you can't really see what is going on in another part of the level, and they're fairly spread out so it gives the game time to actually load the stuff it needs to and make the connection.

grizzled pelican
bitter oriole
#

Destiny has a microservice architecture where you're routinely talking to 50 servers

#

So trying to talk in Unreal terms about that is just not gonna work

fossil spoke
#

Sounds like he wants to keep the world loaded while joining into a new server

#

So that it appears seamless

#

Even though there would be different players etc

barren surge
#

Yep, thats it. totaly understand atm ue makes this a blocking travel. trying to understand why.

bitter oriole
#

Well the "why" is "because no one cares about the initial loading screen and it makes for way simpler code"

sinful tree
fossil spoke
#

The initial connection would always be a hard travel

#

But because you are making a new connection to a new server

#

For a new area

#

They would always be hard travels

#

This is just how UE is out of the box

bitter oriole
sinful tree
#

I know there was a talk about how destiny did it, but obviously they didn't really give specific programming details, just the matter in which they did it.

fossil spoke
#

I know

bitter oriole
sinful tree
#

Yep

barren surge
pallid mesa
#

seamless server streaming is such a topic x'D you will need to write your own stuff

bitter oriole
barren surge
#

yes, very well understood

bitter oriole
#

The server also controls level streaming, which level is currently loaded, etc

#

And since Unreal is level-based, it gets messy real quick

barren surge
#

"messy real quick" is what I'm trying to udnerstand. if you dont want to explain, why do you keep participating?

bitter oriole
#

One Unreal exemple that's close is how Sea of Thieves does loading screens like everyone but can host migrate between servers to merge players

barren surge
hollow eagle
#

SoT still uses hard travels afaik.

split siren
#

If I have a client-side component, for which it is unnecessary to tick on the server, it this ok or too dirty solution?

hollow eagle
#

"migration" is only fancy from a services point of view. Clients are doing normal travels to a new server, that new server just spawns you, your shop, and items on it in the same place as the old one.

#

So SoT is not doing "seamless" server travel. It's just saving your data to some backend service and then restoring it on a new server.

pallid mesa
#

you can make it seamlessler

#

by preloading your inventory and data

#

so you skip some loading

#

you can do that with a : πŸ₯“

barren surge
#

client side tho, I dont notice a hitch or anything of the sort

hollow eagle
#

You do though

barren surge
#

on the sea?

hollow eagle
#

Yes

barren surge
#

i gotta play it again then...

hollow eagle
#

You get a Fullscreen message about the migration as it happens. It's a poem or something to make it pirate themed

#

It's connecting to a new server when it does that. It's not actually seamless.

#

It isn't possible to do true destiny-style seamless server travel in unreal without a custom networking solution or major engine changes that amount to a custom networking solution.

barren surge
#

you are telling me the 4-8 other ships I'm going to encounter are fixed when i load into the map then?

hollow eagle
#

Huh?

#

SoT isn't a seamless grid of servers of that's what you're asking

#

You're connected to a single server and so are a bunch of other people

#

Migration is the only time you connect to a new server, and that only happens when the current server shuts down

#

The entire world is a single server with 8ish ships allowed in it.

barren surge
#

know of any other games on UE that pulled off seamless server migration?

hollow eagle
#

None

pallid mesa
#

if you want to transfer data about players to your old server without actually connect to it you can do it through beacons right before u load into the server

hollow eagle
#

Again, unreal doesn't support it

pallid mesa
#

so you can have proxy ships before joining the new server

#

its some trickery

hollow eagle
#

That won't make it seamless

pallid mesa
#

it wont

#

but it will overlap

barren surge
#

yea not built in. But hearing about what teams have to do at least gives what whats the major issue.

hollow eagle
#

Not really

#

Anyone doing it is using custom networking or has made massive mods to the engine

#

Or has given up and faked it like vori says, but that still involves a hard load

barren surge
#

yep, no question. I did that for astroneer. will do it again.

hollow eagle
#

tbh I can't think of many games that even have that sort of requirement... Basically just MMOs

barren surge
#

engine mods that is.

pallid mesa
#

yes its a mmo thing

#

native vanilla and seeing players from other servers before loading... beacons it is and a little hitch u eat

#

xD

#

thats the best i can think of vanilla

hollow eagle
#

Destiny is the obvious example but their networking model is beyond ridiculous. Hybrid P2P/dedicated server "bubbles" with a quick matchmaker that gives you a brand new instance if you move too fast.

pallid mesa
#

i wonder if epic would offer any vanilla solution to seamless server streaming in the future

barren surge
#

Has Division talked about their approach?

hollow eagle
#

There's always the spatialos approach

#

But I've heard mixed things about them

barren surge
#

Improbable is the other "off the shelf" solution (have not heard great things about their middleware tho).

#

yea!

hollow eagle
#

Yeah

#

Their tech is certainly cool though

pallid mesa
#

how does these work?

#

do they scale?

barren surge
#

I dont have too many details on how it works, but the idea is a mesh of servers where authority of objects are migrated as you move from cell to cell

hollow eagle
#

It basically spins up servers on demand where each manages a section of the world. Their stuff also handles communication between servers, and I believe it's all custom networking which is how it's seamless.

#

It's seriously impressive to build something like that as a generic system, though I don't know how well it actually works.

barren surge
#

From the client prespective, i assume they would mark objects as autonomous_proxy as another server takes over it.

pallid mesa
#

thanks I'll look em up ^^

sinful tree
#

Like really, one could make a client that doesn't use any of unreal's networking but it connects to a server through UDP or TCP and then it just streams whatever data it needs to through those connections. Then you have something that's seamless πŸ˜›

barren surge
#

Well I dont see any titles on the market and its been 6+ years, so that may be an indication of their approach.

hollow eagle
#

Heh

pallid mesa
#

the answer is likely no, (only low level connection stuff)

hollow eagle
#

I think you'd have to dig pretty deep. And have a set of middleman services to deal with the handoff.

barren surge
#

yea, for context, i worked for epic for ~5 years, we made arbitrary decisions all the time and many times a feature was just a bit of work away but if FN didnt need it we didn't do it.

nova wasp
#

Fortnite being a forever game is a blessing and a curse

hollow eagle
#

I've looked at some of the level loading code. I don't think this is one of the simple ones.

barren surge
#

Once i understand the requirements of hard travel, it may be impossible task or simple few weeks of work... doing the investigation now.

hollow eagle
#

Good luck, you'll need it digging into that part of the engine

barren surge
#

yea level load is lots of old code for sure that assumed single threaded blocking loads.

hollow eagle
#

It's a lot of spaghetti too

barren surge
#

"attempts at refactor" πŸ™‚

hollow eagle
#

So many different functions involved across multiple frames so you can't even easily follow the path it takes

barren surge
#

i added to the chaos for XB loading 😦

hollow eagle
#

I just wanted to know how to preload a sublevel when doing a hard load to a new level and spent like 2 hours trying to figure out how tf level loading even worked ;_;

nova wasp
#

I'm still beating my head against level editor loading gc issues lol

#

The world info is a partial culprit

#

World info tab that is

pallid mesa
#

in theory...

#

if the level you are loading is the same one you are on

#

it should be possible to do some divergence onto another code path

#

XD

#

lol

barren surge
#

The Day Before trailer implies there is some Division style shared world going on, but that game may be all vaporware.

pallid mesa
#

it can

#

however as you say

#

streaming in players in overlapping server areas

#

will be something you'll need to do regardless

#

so look onto proxying aswell

#

in my head you are remaking sea of thieves but with this set of requirements so correct me if in your use case this wouldn't be the case

barren surge
#

well I thought SoT, but as siliex was saying, it may not actually be seamless server travel. So closer to Division/Destiney where players are matchmade onto different servers and world feels continous.

pallid mesa
#

ye i mention sot cause boats are big

#

x'D

#

having a boat traverse between servers sounds exciting

barren surge
#

e.g. the hard traveling requirement of first join may simply arise from the fact UE does not have a way to stably name dynamically spawned objects.

#

a hard travel allows a consistent point at which to start naming objects, thus subsequent travels can be seamless travels.

pallid mesa
#

do you know this for sure? or you are pure guessing? I mean, it makes sense

barren surge
#

so then in order to get seamless travels between servers working it may be simple as :

  1. Use beacons (or something else) to inform to be joined server what the client world expects
  2. Server to be joined spawns/collects those names and sends down to to be joined client the names.
  3. Client renames said objects.
  4. Joining server now works as usual since name stability has been established.
#

guessing

pallid mesa
#

I see

barren surge
#

This is based on the client side prediction system we just wrapped up. Normally you must spawn actor on server and replicate down to clients is cause built in you cannot gurantee how server and client generate Name/NetGUID. So we built a stable/predictable naming mechanism, so now client can spawn and when server replicates down, it finds the already spawned object.

#

movement for the object is interpolated to the auth data from the server, but until server replicates its client simulated.

pallid mesa
#

yes stably named in a deterministically manner

#

but

#

im not sure if... the object names are implied at all in the travelling flow

#

if they are not then its likely what you are saying

barren surge
#

well its the only reason I can think of why connecting to a new server has to be a hard travel. shrug but thats the investigation atm.

chrome bay
#

The only real difference between seamless and non-seamless is that seamless means you already have a connection. In both cases, a new world is spooled up

pallid mesa
#

yes we are speaking about making seamless the travel, not the concept of seamless traveling haha

barren surge
chrome bay
#

The transition level exists so you can dump the old level, switch to a low-memory transition level, then load the next large level in the background

nova wasp
#

What if I loaded both at the same time 😈

chrome bay
pallid mesa
#

so e.g. being in the same map and travel to the same map without any hitch at all

chrome bay
#

What it sounds like is that you just want a non-blocking load of the level you're transitioning to?

pallid mesa
#

yes

#

correct + net travelling implications

#

hard or seamless... the requirement is to make it "seamless" omg the word is not convenient

nova wasp
#

Not seamed πŸ™‚

pallid mesa
#

seamless as in seamless travel
and...
"seamless" as smooth as butter

#

πŸ˜…

barren surge
#
// if we're already in the default map, skip loading it and just go to the destination
            if (DefaultMapFinalName == CurrentMapName ||
                DefaultMapFinalName == DestinationMapName)
            {
                UE_LOG(LogWorld, Log, TEXT("Already in default map or the default map is the destination, continuing to destination"));
                // ...
                else
                {
                    StartLoadingDestination();
                }
            }

Yea loading to the same level world currently is is well handled.

#

Thats the UE travel, right at entry.

pallid mesa
#

so this is hitchless already?

chrome bay
#

I guess you'd just have to load it in the background in the same way "seamless" works. But in fairness, even seamless isn't hitch-free.

barren surge
#

not sure about hitchless. I am likely not doing everything right atm, so we are still hitching.

chrome bay
#

You can fool people into thinking it's seamless by having an animated loading screen and continuing music. That's what Paragon did

barren surge
#

@chrome bay my goal is to allow for server migration while in game world. Ideally client should not know any sort of server migration occured.

chrome bay
#

GL;HF πŸ˜„

pallid mesa
#

yep thats why we speaking about making the hard travel "seamless"

chrome bay
#

I don't see that being remotely possible

barren surge
#

Everything seems that way until you do it.

chrome bay
#

Apart from anything, object GUID's etc. are per-connection not per-server, so you would have real trouble syncing that up

barren surge
#

Granted I was not the only one working on it, but literally everyone told us Nanite was impossible, and then we did it.

chrome bay
#

I'm also not sure how platforms handle this. You can't for example on Steam, connect to a different server while you're already authenticated with another

pallid mesa
#

no you wouldn't, you would do a hard travel

#

but "seamlessly"

#

so... occluding the fact you are travelling

#

avoiding hitches doing non blocking loads

#
  • some proxying with beacons
#

not speaking about making hard travels seamless... which by definition might require loads of low level work

#

just speaking about making it seem seamless

#

so you can move

#

dance and stuff

#

while server travelling

barren surge
#

so, lets say we can gurantee or prime the server/client with stable names, what prevents traveling to a new server and server just replicates to that connection as it always does?

pallid mesa
#

but ZabirH I think that's just one issue

barren surge
#

yep, likely. what else are you thinking?

chrome bay
#

Stables names isn't the issue - it's the actual GUID's of objects. The server contains a lot of information about what state client objects are in etc. How would you even begin to transition that to another machine

pallid mesa
#

which by default can be sorted by having one sync-ed point... the research i think should be oriented towards exploring everything that can cause a blocking travel, because maybe that's not even the bottleneck

#

yes

chrome bay
#

Out of interest, what's the requirement for this? Is it just a desire to have a seamless server migration or something more?

barren surge
#

yes, correct, I just refer to the NetID and Name as stable name, per UE API "IsStablyNamed()"

pallid mesa
#

yess seamless server streaming

barren surge
#

Want to be able to migrate servers without hitch/loading screen.

pallid mesa
#

imagine sea of thieves, a ship traversing through a grid of servers

chrome bay
#

Something like what SpatialOS does then I guess. I have no idea how that works tbh

#

But it took an entire company and many many $$$ to make that work πŸ˜„

#

Presumably they have some of their own infrastructure

pallid mesa
barren surge
#

Yea, I would break it down to levels of "success" actually having a spatial grid of servers maybe being a very high tier goal

chrome bay
#

I think the real trouble here is transitioning the complete state of one server to another. Concepts like relevancy really means that just creating objects with the same name is not enough, servers presumably need to be able to talk to other servers and transitions the complete client state from one place to another

nova wasp
#

And now it's just a vehicle for web3 nonsense πŸ˜”

chrome bay
#

Does Improbable even do that? I thought it was more of a planetside style system where switching server meant a "travel" of some kind

nova wasp
#

They tried to lean into that recently

barren surge
pallid mesa
#

thats the theory, you dont need to transition the full state to one server to another

nova wasp
#

In fairness they do push the number of players running around pretty far. A lot more of a real actually interesting thing than most web3 efforts

chrome bay
#

But that new server needs to know that clients' object state too

pallid mesa
#

for overlapping areas beacons are fine

barren surge
#

A super simple first step, 4 clients load into single player maps, run to differnt positions, then match makin into a shared world owned by a DS. Clients were interactive whole time and visual pop is acceptable at first.

nova wasp
#

Destiny 2 has an intermediate period where players reappear

pallid mesa
#

yes visual popping all good!

#

for now ~

#

visual popping is fine

#

a hitch: bad

nova wasp
#

The transition generally happens in a cleverly hidden corridor

pallid mesa
#

visual popping can be mitigated with beacons in a smart way

nova wasp
#

With no enemies etc

chrome bay
#

tbh even level streaming isn't hitch-free

#

I don't think it's just the networking layer that's a barrier

pallid mesa
#

thats true

kindred widget
#

Someone in Blueprint was having that problem with level streaming just the other day, no networking involved.

pallid mesa
#

but what are the possible blockers when doing a hard travel to the same map? what can possibly create hitches? thats i guess the research line

nova wasp
#

Level streaming in BP is too simplified, it should be a bit fancier imo

chrome bay
#

Even hard-travelling to the same map in UE has problems πŸ˜„

#

Engine gets very confused

#

Caused us endless headaches in HLL for a while

pallid mesa
#

I've suffered that 🀣

chrome bay
#

Or was that seamless.. I forget

thin stratus
#

Probably Seamless

nova wasp
#

Memeless server travel

chrome bay
#

Memeless travel would be nice

#

But the engine creates lots of memes

barren surge
#

well ignoring all the loading hitches. Looks like with hard travel:

  1. Server & Client resets all state via map load (server could execute save file load code to get into some kind of specific state)
  2. Clients loads via map load and everything replicates down.
  3. I dont see a way to persist actors between maps/levels.

this goes back to my theory why new server connections are hard blocking is so server can establish consistent net name/guids.

Seamless travel allows persisting actors since they have already been stably named.

#

Am i mistaken that hard travel does not allow persisting actors?

chrome bay
#

Well Seamless travel doesn't technically allow persisting actors, apart from one or two very specially handled cases, all actors are new

#

And there's a very tightly handled hand-off process between old and new

barren surge
#

APlayerController:GetSeamlessTravelActorList can be overriden and all kinds of actors can be added. in fact I seem to be able to add anything to that list so long as that object was server spawned and "bReplicates" is enabled...

thin stratus
#

That call exists twice

#

And yes, you can persist other actors with that

#

I usually persist ATeamState : AInfo actors with it

#

Just have to find them afterwards

#

Cause the GameState (where we hold an array of them) is recreated, so the pointers are wiped

barren surge
#

Yea, so I'm now 90% confident that hard travel requirement for new connection to new server is solely to enforce the stable name/GUID for net addressing.

thin stratus
#

Am i mistaken that hard travel does not allow persisting actors?
Hard Travel does NOT allow persisting actors.

Seamless Travel does.

#

Just so you are clear on that end

#

Seamless Travel, as a concept, makes no sense for Connecting/Disconnecting

#

No matter what the fineprint actually says

barren surge
chrome bay
#

Also, seamless travel isn't seamless πŸ˜„

#

There's a very noticeable hitch when you do finally transition to the loaded level

#

Depending on how large and populated that level is

thin stratus
#

Yeah sure, but they call it seamless :D

chrome bay
#

But yeah, networking aside - I don't think that's the first barrier to the end goal here

thin stratus
#

It's probably also coming from BeginPlay being overloaded in larger levels

barren surge
#

Network team's test level I bet are very seamless πŸ˜›

thin stratus
# barren surge Not sure I follow what you mean

Seamless Travel is meant to keep the connection with the Client alive, parking them on a Transition Level while loading the Main Level on the Server etc.
While Hard Travel actively disconnects the Clients and causes them to reconnect, which for example Steam really doesn't like.

But that concept makes no sense for Connecting. The Client is not connected, there is no Transition Level, no Connection to be kept alive. No Actors that might persist. So Connecting and Disconnecting only really makes sense with a Hard Travel.

barren surge
thin stratus
#

Yeah your main deal breaker is that it's entirely unsupported to do this without loading with UE's servers

barren surge
#

Yea we can have multiple DS up and running read for clients to join.

thin stratus
#

Seamless requires the same Host to be present, so it's not gonna give you much info I guess

#

Yeah but moving from DS to DS is Disconnect -> Connect

barren surge
#

yep

thin stratus
#

As long as you stick with UE's network layer

barren surge
#

we will likely need to build something (maybe using Beacons) for a server to prime another server with world/client state. And a bunch of async loading to keep client view responsive.

split siren
#

When I modify replicated ustruct, do I need to mark it as dirty somehow or will it replicate automagically?

bitter oriole
#

It'll replicate based on changes

#

Same as UObjects

split siren
#

Thanks

split siren
split siren
#

Damn, ustruct are smart

bitter oriole
#

Same as UObject, only changes will be sent

split siren
chrome bay
#

If you change them in different frames yes

bitter oriole
#

Yes

#

Not even sure that a same-frame change guarantees same packet

#

That should be what Atomic is for

chrome bay
#

yeah I'm not sure at least in highly strained situations

#

I've never found a definitive answer for whether actor updates can be split into different packets or not

bitter oriole
#

My strategy has been slapping Atomic on structs I really want this for

#

Probably FHitResult would be interesting reading

#

IIRC it has partial replication support

chrome bay
#

yeah they use NetSerialize for a lot of atomic structs so the per-property changes become moot

#

FHitResult uses that also IIRC

#

(NetSerialize that is)

split siren
#

Thanks guys for the clarification, it is hard to work around these edge cases. Atomic it is then πŸ™‚

chrome bay
#

Just bear in mind Atomic does IIRC mean that the entire struct will be sent, but worth checking

#

But any struct with 100 floats is pretty absurd to replicate anyway πŸ˜„

split siren
split siren
#

I got slightly lost in Serializing ustruct variable.
Basically I need to serialize the PropData only if the bIsProp is true, othewise PropData should be the default values.
Since FPH_PropData doesn't have custom NetSerializer and I cannot use <<, what is the correct way to include PropData struct in an FArchive?

latent heart
#

The first thing you do is change your font πŸ˜‚

split siren
#

Default settings gang rise!

latent heart
#

You could serialise each member individually.

#

I guess changing the struct isn't possible?

split siren
#

Which struct?

latent heart
#

The propdata one.

split siren
#

It is definitely possible

latent heart
#

You can add your own struct serialisers

#

Like you're already doing, it seems?!

split siren
#

That is true, but that is a lot of boilerplate for enabling a default functionality.
I want to avoid using custom NetSerialize for FPH_PropData because there are no bits I can save in clever serialization, all data is needed from there.

#

I just want to serialize it as it would be serialised by the engine if I just wanted to replicate it by itself

split siren
# latent heart You can add your own struct serialisers

The reason why I use custom serialization in the FPH_ClientPropData (wrapper around FPH_PropData) is because I don't need to package PropData if bIsProp is false, thus saving 99% of serialised size in that specific case.

latent heart
#

I figured that. πŸ™‚

#

I'm not sure if ustructs get their own default serialisation like that, though.

rigid acorn
#

Hey guys, shouting for help with bp instanced static mesh per instance custom data replication. Thr instanced static mesh component is dynamically created, the actor owning it is spawned on server, both are replicated. I'm trying to change custom data and these changes must be replicated to everyone, but they're not. Only the owning client can see these changes. I tired everything I guess. I'm trying to create building construction system for RTS, and thr building upgrades are designed to be visually represented by per instance custom data. I'm taking the hit results under cursor and trying to pass the hit component, but it's not working. I tried to print string the display name for instanced static mesh component and this name is different for server and clients.

split siren
split siren
rigid acorn
split siren
rigid acorn
#

Just recalled that

still owl
#

Hello!

I haven't attempted this yet but I'm wondering if it's possible to NOT return clients to the default map if a ListenServer closes?

At the end of a match I want to display the results etc with a button to return the player to the menu. However if the ListenServer returns to the menu at this stage, all clients will most likely also get booted due to network error when they may not have finished looking at the results. Ideally each player, Including the listen server can return to the menu freely without disrupting others.

Is there anyway around this or advice on how to solve this problem?

livid holly
#

hey all

#

is there a way I can tell an autonomous client to stop trying to predict it's rotation and just accept whatever the server sends? And turn this behavior on-off at runtime?

#

like I have a gameplay ability during which, I want to tell the client "stop trying to predict your rotation and just follow along with whatever the server tells you"

barren surge
livid holly
#

I'm confused. I thought autonomous proxy did prediciton?

#

as in

#

if I tell the player to move forward, my player will move forward locally, send the move packet to the server, which then validates. And if the server tells "no, you shouldn't move forward", it sends back to client to it can "revert" the move forward, isn't that how it happens?

barren surge
#

I miss understood the terminology.

#

so you are wanting to prevent the local movement and just wait for the server ack?

livid holly
#

yep

#

turning this behavior on/off at runtime

barren surge
livid holly
#

driven via "Set Actor Rotation"

#

in a GameplayAbility that rotates the pawn

barren surge
#

if no user input is involved then I'd consider turning the autonomous proxy into a simulated proxy while you want this behavior and turning it back to auto proxy when done.
If user input is involved, then would look into deriving the movement component and implementing a custom movement mode. see EMovementMode::MOVE_Custom

#

What triggers the SetActorRotation?

livid holly
#

no user input is involved

#

I can just manually change an actors role like that? Didn't know that

#

but I'm afraid there might be so many unintended consequences doing that

barren surge
#

well you have to coordinate with the server

trim plume
#

Hi. In a racing game, I have an actor with a spline that keeps track of where players are. It works fine on server, but how can I send the map result to the clients widget?
I've been struggling with this all day.. Any help is greatly appreciated.

barren surge
pallid mesa
#

maps won't replicate

pallid mesa
#

rather than messing with the role system πŸ˜„

latent heart
#

That's just how he roles.

trim plume
pallid mesa
#

mh... not sure if this udemy course covers it

#

take a look

wooden cypress
#

is LaunchCharacter jsut disabled in multiplayer?

#

it doesnt work at all

#

I cannot set velocity, launch character, how do I make the character dash?

pallid mesa
#

launch character works

#

but, you gotta do it predictively on the client and then on the server

#

for these style of tasks GAS is recommended

#
  • root motion tasks - how lyra does the dashing
trim plume
pallid mesa
#

no it is, but

#

array replication is a topic by itself

#

so... let me explain you

#

how much do you know about unreal's replication system?

#

and their differences between C++ and BPs?

#

@trim plume

trim plume
#

I've been trying to understand replication for some months now, and honestly feel like smashing something hard against the wall..

pallid mesa
#

okay, I can give you an introduction if you'd like

trim plume
#

Single player is no problem, I can easily make it work server side, but I have no idea how to parse the data to the clients.

#

I'm familiar with has authority check, then call server, then call multicast and such.

#

And recently learned about repnotify

pallid mesa
#

that's just tools for your toolset nothing you must rely on all of the time

#

so far, you know RPCs, and replicated variables, right?

trim plume
#

How would you go about making a players positions in a racing game?

#

Yea, kinda

pallid mesa
#

so the concept of this starts by... let's have our data in a class that is replicated down to our clients

#

like the gamestate

trim plume
#

It's all very confusing. Without doubt the most confusing I've ever tried to understand

pallid mesa
#

yes the thing is that you need to not pretend to solve problems at a go

#

with replication you need to understand its implications

#

and why we do things in a certain way

#

so as I said, player positions is something we can have in an actor is replicated down to our clients, like the gamestate

#

or in your case a replicated actor that contains a spline in which u do ur logic

trim plume
#

Yea ok

pallid mesa
#

so in the server, we do the position tracking under a has authority check, possibly on tick

#

and we populate an array

#

that's just a heuristic that will give you a resulting array given the "game state"

trim plume
#

The spline actor is placed in the world in editor, and it's already there from begin play, so all clients and the server can find it.
On spawning the pawn for players in the player controller, I then add the newly spawned pawn in a pawn-to-float map in the spline actor

pallid mesa
#

your actor with the spline

#

should be replicated

#

because we want the position array to be replicated down to our clients right when it updates

trim plume
#

I have an auth check on the tick in the spline actor

pallid mesa
#

that's not enough

#

an auth check will simply ensure that you are executing logic on authority -> the server

#

what you need is ensuring this actor is marked for replication

#

bReplicates to true in its defaults

trim plume
#

I didn't have the replicates checkbox checked, so I checked it now will try see it that does something

pallid mesa
#

no

#

that won't do anything unless

#

you replicate the positions array

#

so remember, replication goes from server to client

#

in this case we are updating the array in the server

#

and we are relying on replication to give us a mirror on our client

#

for that you have to tell unreal that you want to replicate said array

#

if you are using blueprints, its a boolean in the property

trim plume
#

Ok, so if I understand correctly, and please correct me if I'm wrong. In the spline actor, I check Replicates, and then make 2 arrays, one for the pawns, and the second one for distance in float. Then I choose Replicated in both arrays property details?

#

And from there I should be able to get the arrays from the widgets that is created by the clients?

pallid mesa
#

why two arrays?

#

just one no need for two, right?

#

just an array of structs might be enough

trim plume
#

I need the distance so I can place their player icons on a line, similar to mario kart and such

#

I can make an array of struct with vehicle pawn and a float for the distance, and then replicate that?

pallid mesa
#

mhm πŸ˜„

trim plume
#

Is that a yes?

pallid mesa
#

yup

trim plume
#

Ok.

#

Thank you very much for your time

#

Very appreciated

pallid mesa
#

no probs, ^^ we here if shit hits the fan

trim plume
#

I will try it out later when I've gotten something to eat

#

It might well be.. All day I've been pulling my hair..

#

πŸ™ˆ

pallid mesa
#

it's hard, so.... welp

queen mortar
#

Hey Im working on replicated movement with blueprints but I have a problem. I made it so sprinting is replicated and I also made that player cant sprint backwards and sideways but client Can sprint even back and sideways. Anyone know how to make it so client wouldnt be able to sprint sideways and backwards?

bronze summit
#

I'm working on a replicated chunk loader system. My chunks are currently actors with a mesh. Now I actually want to spawn the actors only on the clients in a specific cull distance (and thus limit the updates as for example players not in distance should not get mesh updates). Would NetCulling be sufficient enough or is the preferred method a custom replicationgraph?

latent heart
#

UE already has distance culling built in. You should probably use that?

bronze summit
#

Yeah I'll give that a shot and perhaps in the future depending on scalability I might change it

harsh ice
#

I spawned my weapon but when player level it's still visible

visual urchin
#

I'm using the replicated movement that comes with Unreal but it has a lot of stuttering. First gif is the server.

#

Second gif is the client.

#

I'm not sure if it's visible on the gifs though.

#

Here are my settings. Any idea of what could be causing this problem?

past totem
#

I can't tell what's the issue from the client gif

#

seems fine

trim plume
# pallid mesa it's hard, so.... welp

Thank you so much! I did what you said, and now I got player track position, laps and checkpoints working. Thanks again, really appreciated ☺️
Also, had to increase cull distance with a lot as well.

pallid mesa
#

you can make this tracking actor always relevant πŸ˜„

#

just look for bAlwaysRelevant in the class defaults @trim plume

#

Also, congrats! πŸ₯³

past totem
#

what does bAlwaysRelevant even do

pallid mesa
#

makes the actor always relevant

#

meaning that it will matter for replication to all its connections always

past totem
#

no shit

#

lol

#

but for real what does it really do?

#

does it make the replication distance not matter or something?

#

I don't get it

#

I always just enable it for important actors that I want it to always replicate

pallid mesa
past totem
#

but I don't get what it does LUL

#

ahh, okay, thanks

pseudo schooner
#

Hey so...I have something I haven't seen before. Anyone know where to start looking? I have Actor A and Actor B. Both have working collision. Actor B has a Begin Overlap event that fires. If I am on the client, the overlap ONLY works on the client. If I am on the server, the overlap happens on both client and server. Both Actors are set to replicate, and I know collision is working because well...it works fine. It just seems that whenever a client starts this process (the server handles all actor spawning) the server's BeginOverlap function doesn't even attempt to fire

twin juniper
#

anyone know a different way i can do this? im not so good at networking but i swear there was another way to replicate this simple movement instead of having a client and server event (btw all of these are in an actor component)

past totem
#

why is pitch and roll multicast

#

but yaw is server only

#

when they should all be server only

#

or atcually I mean

#

this is just so weird

twin juniper
#

oh i forgot to change it

#

honestly i just kept changing the replication until smth worked

past totem
#

show everything u r trying to do and only 1 part of it not 3 duplicated parts

twin juniper
#

I have a c++ function to rotate an actor, so I can have 6 DOF movement, I want this to be server replicated, all the code you see is in an actor component. The Roll Pitch and Yaw are called when the player presses down the keys, server roll, pitch, and yaw have the same code as client pitch, roll, and yaw, as seen in the image. The only difference between the two is the replication on the event. The replication works fine, I just thought there was a simpler way to do it.

past totem
#

this is one image

#

I'm missing more imgs for more context

twin juniper
#

all events have the same code except the inital Yaw, Roll, and Pitch event

trim plume
# pallid mesa Also, congrats! πŸ₯³

Thanks! Yea, I set it to always relevant when it was acting weird, but it turned out cull distance did the trick. The issue was that it worked a little while, but then it didn't. The map is huge, so makes sense πŸ™‚
However, I just left the always relevant checked.

pallid mesa
#

if its always relevant it ignores the distance culling

past totem
# twin juniper

is this on the player controller? why not use 1 multicast event instead of 2 events

pallid mesa
#

anyways Zzz time

past totem
#

oh wait this is dfferent code

#

I'm so confused

past totem
#

literally no clue what u r trying to do

twin juniper
#

rotate the player

past totem
#

but where is the input to this?

#

where does it start

#

I'm missing more screenshots

trim plume
trim plume
twin juniper
past totem
#

wtf is this ??

twin juniper
#

the player pawn blueprint

past totem
#

you're killing me

twin juniper
#

i dont understand whats wrong

past totem
#

does this actually work?

twin juniper
#

yes

#

it replicates

past totem
#

that doesn't even make any sense

#

is this a dedicated srever or a listen server

twin juniper
#

or at least on a listen server

past totem
#

Multicast events only work when called from a server, and you are calling it from a client here (client input event)

past totem
twin juniper
#

ohhhh thats what they do

past totem
#

and the other issue is, u can't just call these events every frame

twin juniper
#

how should i do it then?

past totem
#

it will kill the network

pallid mesa
past totem
#

I literally have no clue what u want to do

trim plume
twin juniper
twin juniper
past totem
#

why not use the movement component for that?

#

why do u need a custom solution?

twin juniper
#

because movement component doesnt allow for 6 DOF movement

past totem
#

what's 6 dof movement

twin juniper
#

this is a floating pawn character, I am using 6 dof to bypass the gimball lock

twin juniper
past totem
#

I'm pretty sure it does supportit

#

yea it does support it

#

I have it in my game a flying bird

#

u just have to enable something

twin juniper
#

no if you try to rotate pitch 360 degrees it will get stuck looking up

#

this is what the pawn actor looks like

#

i used the flying pawn template to start

past totem
#

what is this component based on?

latent heart
#

UActorComponent something something

past totem
twin juniper
#

based on? it has no parent, I made an empty actor component

past totem
#

and where is the movement component ?

twin juniper
#

my component

past totem
#

yea, what's that based on

latent heart
#

Movement components don't need to be scene components.

twin juniper
#

it has no parent

twin juniper
past totem
#

so u made a custom movement component

#

why ?

#

flying works iwth the regular movement component

twin juniper
#

because 6 DOF wasnt working for me

past totem
#

it works

#

just delete everything

twin juniper
#

not in my experience

#

im good

past totem
#

and try again with the regular component

#

it will be too much effort to create ur own custom repliacted movement component as far as I know

#

and it works so just try harder to get it to work lol , it works for me

twin juniper
past totem
#

and now enable network emulation in the play in editor project preferences

#

u r going about this all wrong

#

overcompliacted it and u will run into so many issues

#

u just have to use the eregular movement component cuz it works

#

gtg to eat

past totem
twin juniper
#

doesnt seem to

past totem
#

well then Idk what u r doing

twin juniper
#

neither do i

#

what does a multicast do?

#

i thought it meant that it cast to both server and client

latent heart
#

Sends an RPC from the server to every net relevant client.

twin juniper
#

and why does it anyways

twilit radish
#

If you’re referring to the screenshot from earlier, input comes from clients. A multicast can’t be directly called from a client, you RPC from the client to the server and then the server can do a multicast.

twin juniper
twilit radish
#

I’m still extremely confused about this entire discussion so not sure honestly. What is it you’re trying to achieve?

latent heart
#

A multicast from a client will just execute locally.

#

If you want to broadcast to evreyone, single-rpc to the server and have the server rpc broadcast it.

#

Bearing in mind that that will send the broadcast back to the original client.

twin juniper
past totem
#

u can't run this on tick 3 times

twin juniper
past totem
#

try to make the movement component work

#

show me why it won't work for u

#

I will help u

#

not with the other thing that's a lost cause

twin juniper
past totem
#

wait I will record it

twin juniper
#

ok

past totem
#

it's upaoding

twin juniper
#

yes see you cant rotate 360 degrees along the pitch

past totem
#

I literally have no idea what u mean

#

Idk how it can be more 360 degrees than that

#

lol

twin juniper
#

do a loop in the air

past totem
#

I did it in the vid

twin juniper
#

here i upload video

latent heart
#

You mean he's gimbal locked, MAN?

past totem
#

finally something useful

twin juniper
#

i remove gimbal lock

past totem
#

ah

twin juniper
#

thats the point of the c++

latent heart
#

Quaternions ftw.

twin juniper
#

i said that earlier

past totem
#

Idk if this is possible with the movement compone then

twin juniper
#

its not

#

thats why i had to make this

twin juniper
# twin juniper exactly

also im glad the video caught another issue, sometimes it doesnt spawn the second client, i dont understand why

#

at first i thought it was collision issue, but both player starts are set to ignore collisions and spawn anyways

latent heart
#

Are you looking at it from the server PoV?

twin juniper
latent heart
#

Ah.

#

Are you using "single instance" ? (turn it off for better testing)

twin juniper
latent heart
#

It's in the PIE menu in the 3 dot thing.

past totem
#

run as a single process?

#

or something like that

latent heart
#

That might be it. Turn it off.

twin juniper
#

btw the replication still works in this mode as well

#

well actually not exactly the same as before, i changed the input events to server

#

though, do i need the 2 events, one to replicate on client and one on the server?

past totem
#

the real question is if u can actually run this on tick

#

I don't think so

latent heart
#

Sure you can.

twin juniper
#

seems to be working fine

#

should i add a branch to make sure the input isnt 0 just in case?

latent heart
#

Yes

#

It definitely will fire if it's 0 and it's a waste of bw

past totem
#

like the normal mveoemnt component works in a better way somehow I think maybe

latent heart
#

If they're unreliable it really doesn't matter.

twin juniper
#

i havent set any of them to reliable

#

i dont know what that means, and it seems to work fine without it

#

should I?

past totem
#

mm ok interesting

#

unreliable means that it';s ok to skip it if the network lags or something

twin juniper
#

is that a good thing?

#

or should I change it to reliable

past totem
#

well he said to keep it off

#

Idk in this case I never spam it

twin juniper
#

also i noticed that when the two actors collide, and then move away, the server location of the actor is different than how the client sees it

#

why does this happen?

past totem
#

u need to add movement correction

#

like in the normal movement component

#

I guess

#

where if the client is not at the position of the server, it corrects it

twin juniper
#

how do i do that

past totem
#

well u could just setup another server event to tell the server the location of the client

#

but Idk, these things need to be performant

#

this whole idea to make a cpp replicated movement component sounds too much

twin juniper
#

i just want 6 DOF movement thats network replicated

#

is there any tutorial anywhere?

past totem
#

usually for MP games I would just not take on ideas that require complicated stuff like that that arent supported already

#

I'm guessing no tutorials on this, too niche

#

maybe search the discord server

twin juniper
#

i searched for correction and wasnt able to find any results

#

do you think there is anyone on this server with an in depth knowledge of networking I could ask about this?

plucky prawn
twin juniper
#

so what you mean is ill finish this by next year at best

past totem
#

and u also are just being weird about it like, I told u what u need to add next, client correction, but just asked who can tell u how to do the whole thing which is too generic and won't get u anywhere

#

but just this whole thing is too complicated

#

can't u come up with different gameplay

plucky prawn
twin juniper
#

yeah i get it, thanks anyways

thin stratus
#

The only Code Class that gives you this is the CMC.

#

Forget about custom Network Movement of that degree if you can't either extend or write your own CMC.

#

Also iirc CMC is very much in love with Z-UP. When I wrote the Hoverdrone Movement Code with 6DOF, "driving" on walls and what not, I basically wrote my own CMC.

#

This is the precisely the stuff where Blueprints are just a small shitty tool that can't do what you want, where you gotta realize that it was never meant to become this big and can't replace C++.

coral wing
#

I'm trying to change the material of meshes on my clients. I've tried repnotify and and multicasts and they are being executed on clients but they aren't changing the material.

#

Also checked the material name on the mesh and it is changing but it's not displaying

past totem
coral wing
#

Yes

past totem
#

weird

coral wing
#

Actually I was wrong. Apperently that print was from the server

#

So the server is going off and setting the rep notify. But rep notify isn't triggering on clients

plucky prawn
past totem
#

and wdym being executed on the client and not changing the material

#

that doesn't make sense

#

if it is executing the set material with the material u provided then it should work no reason it won't

coral wing
#

I was wrong about that part. It's just printing on the server but it's not triggering the repnotify for the clients. mb.

Trying to figure out why it's not notifying the clients now

past totem
#

repnotify is dumb ( half joklking) try a multicast event and see if that wokrs

coral wing
past totem
coral wing
#

LOL

oak prawn
#

How can I lower the ping?

plucky prawn
#

be closer to the server

#

or just make it show less ping