#multiplayer

1 messages Β· Page 453 of 1

grizzled stirrup
#

It can be hard to say without knowing more honestly

#

The general premise is that if you own the actor and call a server RPC, it should go through

main spindle
#

how do i make it so that it doesn't auto posses pawns when entering a level

grizzled stirrup
#

If the pawn is in the world already there's an option to disable auto possession, otherwise there are options in the pawn BP

#

OR you can just not spawn a pawn by default (have the pawn to spawn in the GM as null)

#

Then manually spawn and possess one

main spindle
#

ah ok

grizzled stirrup
#

Question: it seems that bug that makes client movement appear choppy when being viewed from the perspective of the server on a listen server is still quite prevalent. The only way I was able to get it to run smoothly from all perspectives is send an RPC with a single location vector and rotator 100 times a second.

#

For a 2 player co-op game with not a whole lot more going on, is this in any way a reasonable thing to do? When I send an RPC say 10 times a second and smoothly interp, it is still choppy from the perspective of the server (even though in a dedicated server it's not)

#

Is it still a trivial amount of data being sent compared to games with hundreds of bullets, rockets and projectiles with larger player counts?

main spindle
#

Can't you just get the frame rate and only send it that often? And cap it at 100 if it's higher?

#

that could reduce lag of already laggy players, and if you have 100+ fram rate it shouldn't be a problem

grizzled stirrup
#

Yeah that is possible it's just frustrating that it works fine at lower update rates on dedicated server

#

Is it common to increase the bandwidth limits in general for a listen server game?

balmy gazelle
#

@grizzled stirrup still broken and was reported by others Epic didn't moved a finger

#

as they don't use Listen servers

grizzled stirrup
#

That sucks 😦

#

The only way I can get it smooth is 100 RPCs a second lol

balmy gazelle
#

is a problem related only with the pawns but nobody found a solution I think

#

with the character movement component

grizzled stirrup
#

That reddit post has an interesting bool in the character that can be set to false

fleet raven
#

it might be difficult to properly fix the issue with the default char movement chopping on listen servers

grizzled stirrup
#

I'm going to check it ot

#

out*

#

I'm not even using the CMC to replicate though

#

Just to move locally

fleet raven
#

then it's an unrelated issue

grizzled stirrup
#

So only when Replicate Movement = true is it an issue?

#

It's strange though because when playing dedicated server it's smooth

balmy gazelle
#

tell me if you find a solition then

fleet raven
#

replication doesn't affect what the listen server sees

grizzled stirrup
#

I will!

#

@fleet raven It appears to limit the anim update rate as well as position

#

Even though I'm setting position on tick

#

Interpolating between updates

#

It's percieved to a player that the other players are lagging or running at a low fps

#

Even though they see the server silky smooth

fleet raven
#

wait so are you using a character at all or is it something entirely custom

grizzled stirrup
#

Yeah character

#

I'm just having the client be authorative over movement and therefore sending his own movement upadates

#

So I want others to smoothly blend his position

fleet raven
#

makes sense

grizzled stirrup
#

Instead, they see a very choppy update unless it's a dedicated server

#

So something to do with the listen server is causing some kind of lag / jitter

fleet raven
#

what exactly is the setup here, how are you sending the movement from the client to the server and then to other clients?

#

are you seeing choppy movement when playing as the listen server or when observing another client as a client

grizzled stirrup
#

The clients are sending an RPC (what should be only 10 times a second) that contains position and rotation. The server then sets its proxy of each client to interpolate towards that position / rotation on tick

#

And I'm only seeing choppy movement when a client looks at another client or a server looks at a client

#

Clients see server smooth as butter

#

If I increase the RPC amount (location update rate) then it's smooth all around

#

But I really don't think 100 rpcs as second is a good idea

#

Though it might just work since it's only 2 player co - op

#

And I'm sure there's bandwidth to spare compared to other games that have 1000x more going on

fleet raven
#

I'm not sure what causes your issue but sending 100 (unreliable) rpcs is no issue at all with 2 players

grizzled stirrup
#

Oh phew

#

Yeah definitely unreliable

#

It just needs to appear not laggy

#

It's very distracting to see players glitch around

#

I think even 50 RPCs a second can still look smooth

#

Thank you very much, I feel a bit more reassured that it's ok in this specific case to go a bit wild with RPCs

fleet raven
#

though

#

if you have 2 players and are using a listen server

#

a "client looking at another client" situation is not even a thing

grizzled stirrup
#

Well I'm testing for 4, but yeah just wanted to include that detail when troubleshooting

#

I might move to 4 if the 100 RPC thing isn't an issue

#

Will profile bandwidth and learn some good limits

fleet raven
#

there isn't really a general "good limit", it depends on the connections your players have

grizzled stirrup
#

Yeah which means I'd have to target the lower end to ensure everyone can play- basically a number that most connections would support

fleet raven
#

some will have absolute garbage 0.1mbit/s, while some will have no problem barraging the server with 1gbit/s upload

grizzled stirrup
#

I just have to profile how much exactly my 100 RPCs a second are adding in terms of bandwidth and scale appropriately

#

Just out of curiosity, how many RPCs a second would a game like Fortnite or Unreal Tournament typically send per player to the server?

#

Very ballpark but those games position actually matters (and of course it's dedicated)

fleet raven
#

don't know, but UT is available on github, so you could look at what bandwidth limits they have set

grizzled stirrup
#

Thanks I'll check it

#

Appreciate the help, feeling confident that at least I can sidestep the choppy movement issue

#

2 rules: does the player feel it's smooth and does it work without oversaturation? If so then it's fine (bad practices allowed in this case) πŸ˜„

spark wadi
#

Can someone please explain why this logic is not working? Steam overlay appears but I can't join session on the other PC with different steam account.

main spindle
#

when opening the level

#

use the Run command node

#

and do open levelName?listen

#

see if that makes any difference

#

I've had problems with the open level node in the past

#

or that's actually probably not your problem

#

so what error do you get?

spark wadi
#

the screen on the joining PC just gets black and nothing happens

main spindle
#

try what I said

spark wadi
#

ok thx

tardy cosmos
#

Good monring! I was wondering, how a client can leave a session to play in local?

thin stratus
#

Go back to the MainMenu and Destroy your session.

tardy cosmos
#

so in the same level is not possible?

#

like from now on, each player plays locally

thin stratus
#

Pretty sure not without modifying the engine

#

I mean

#

Technically you could just cut off the connection

#

But the game usually kicks you back into the main menu then

fleet raven
#

yeah that's not a thing by default

#

you'd be missing a lot of things like the game mode required to continue playing by yourself

tardy cosmos
#

make sense

#

thanks !

#

what is weird, is that when I move the client to the main menu, it carries all the stuff from the lobby, like characters, controllers, etc...

#

nd the server does not destroy de placyer controler

#

no no, my error I think, sorry

spark wadi
#

I tried, nothing happened

#

still black screen

spark wadi
#

I checked with β€œget server name” it finds the right session, however nothing happens afterwards

main spindle
#

do you get the session succes message you set up?

#

also, what OnlineSubsystem default platform are you set to? It needs to be set to steam

spark wadi
#

It is

#

The message on successfully joining session is set but does not appear on screen

slender yarrow
#

im trying to change the material on a mesh of a character blueprint from the GameMode on the server. Im doing it through a multicast event in the GameMode but it is not changing the visible material. The characters are registering that they have that material on but it cannot be seen.

#

how would you do this? Change a character's mesh material from GameMode

exotic salmon
#

You'll want the call the material changing function on the client, not on the server

slender yarrow
#

so call a run on client event from the gamemode?

exotic salmon
#

should work

#

You need a reference to the actor and call a function on the actor that is rep to all clients.

chrome bay
#

Won't work - gamemode doesn't exist on clients

#

And the client doesn't own it either

#

You can call it on the character however, from said gamemode

exotic salmon
#

see last comment

slender yarrow
#

i tried calling a multicast function on the character and that didnt work

chrome bay
#

Why would you not just set a rep'd var on the character BTW

#

And change the material via that?

exotic salmon
#

Good call

chrome bay
#

Multicast / RPC is all well and good until somebody joins late, or until an actor isn't relevant anymore

#

Setting a characters material is stateful, so should really be driven by a rep'd var

#

RPC's are for one-time things

slender yarrow
#

what kind of variable, a material interface?

chrome bay
#

I assume there's a fixed list of materials they can use, so just an int/byte would be enough to identify one

slender yarrow
#

oh yeah i just did a rep notify and it worked!

#

thanks ✌

chrome bay
#

yep that's the way!

twin juniper
#

I have a problem where client 2 doesnt call a function on the server at all and only calls it when it is client 1. Anyone sure why?

winged badger
#

best guess, because you're using GetPlayerController[0] in combination with a dedicated server

gleaming vector
#

for what it's worth, I almost never use RPCs

#

especially multicast RPCs

#

only for things I am comfortable if they are lost (like one off vfx events)

winged badger
#

i just never use reliable multicasts

karmic briar
#

Hi so anyone here have develop mmo style server architecture

#

I wanna know more bout it i already no bout tcp and udp

#

Is there more for it

winged badger
#

it you're thinking something large

#

look into SpatialOS

karmic briar
#

I wont use spatialos since it havent been updated yet since fwbruary

winged badger
#

its not a system you can patch every week

#

needs tons of testing

karmic briar
#

I know its a good tools but many people that i know doesnt recommend it

winged badger
#

but in general, MMO recommendations around here go like: if you're not a large studio - just don't

karmic briar
#

I have a team on 10 people atm and we use mmo starter kit

#

We already done the environment (60%) in just 5 months

#

And currently we doesnt have networking programmer/engineer

winged badger
#

that is more then very problematic

#

basically, doing networking after the fact is awful

#

and if you start improvising network, at one point when you hire a network engineer he/she will have to rewrite everything you did

karmic briar
#

Hmm we just in early dev

#

Hmm this is gonna be a major problem tho

#

But do anyone know how the server achitecture build

winged badger
#

I did both of those things in the past - networking a non-networked game and networking a game that was networked by BP programmers with only casual familiarity with unreal networking

karmic briar
#

Currently we only do gameplay stuff

winged badger
#

and neither was pretty

karmic briar
#

I wanna ask if this approach is okay

#

Can i use ue4 for the graphical fedelity of it and hire a networking progranmer for the networking

#

Or i for now use the ue4 now

winged badger
#

unreal replication system is pretty solid

#

so what you need imo is a network engineer familiar with unreal networking

#

i did not work on projects with MMO scope though

karmic briar
#

Ouh so far we havent done any networking stuff and only gameplay for now

winged badger
#

it is a multiplayer game, you won't get far with gameplay without networking it ^^

karmic briar
#

Yeah i know and wendo some replicated stuff here and there but things getting hard recently since we dont have any networking programmer

#

That's why i asked here how the mmo server architecture developed to maybe solve some of the problem and get better understanding of it

winged badger
#

iirc SpatialOS is pretty solid for something of that scope, but i have no personal experience with SpatialOS

karmic briar
#

Same

#

I asked people in spatialos #unreal section and no one helped me

winged badger
#

its major feature is using unreal networking across multiple dedicated servers

karmic briar
#

I did know that

winged badger
#

unfortunately, i don't recall anyone talking about a serious MMO project here

#

in last... 2 years

karmic briar
#

Unfortunately if anyone asked questions bout mmo they always immediately shot down

#

Thats why we see less and less questions of it

winged badger
#

To be fair, most of those were "Hi i started learning Unreal in my spare time 2 months ago and i want to make a MMO for my first game"

karmic briar
#

Yeah that usually the case but i saw a few people/studio that have experience and wanna know the tools and tips for making mmo but what i always saw they always grt laugh at and only a few that willing to help them

#

My team currently have 4 people that actually worked on an mmo before

#

And a few days ago they asked me if we gonna hire networking guy soon since from here on out they gonna be a crucial people

winged badger
#

People who know networking well and hang around here are also more likely to get involved when asked a specific question by someone who at least sounds like a programmer

#

But for something as general as what you just asked...

#

If i were you i'd find out what MMOs were made on Unreal recently, then hunt down the network programmers that worked on them, and hire a couple of them for a few hour consult

#

After you hire a network engineer of your own, since you do need him/her to listen in on those conversations at very least

karmic briar
#

As for recently what i know is bless tera

#

And i probably asked people in planetside2

winged badger
#

You won't find enough people doing MMOs here to get more then 1-2 perspectives, and even that only if you're lucky

#

And compared to the project cost for a MMO, hiring a few programmers for 2-3 hour consult to tell you what general approach they used in the past, how that turned out, what would they had done better in retrospect and such... the cost of that is insignificant

#

and potential savings from not walking into a dead end are huge

karmic briar
#

Currently im willing to put my own money on this genre and wanna make it better again with non of this p2w stuff

#

Also for the last question what kind of networking programmer/engineer should i loof for?

winged badger
#

Someone who knows unreal networking well and is comfortable doing it in c++

karmic briar
#

Okay and is there nore

#

More*

winged badger
#

While you can network a game with BP only, c++ has access to a lot of options that are just not exposed to BP

karmic briar
#

And there more?sorry if i asked too many questions

winged badger
#

im just chilling before bed, so i don't mind

karmic briar
#

Ouh

worthy perch
#

How do you guys handle montage/ability-animation replication?

#

I haven't done much on it, but I've just been multicasting it. And inside of the multicast, I play the montage locally.

winged badger
#

we play out montages locally, but we often have a hook in client side simulation we can trigger it from

#

basically if an action that triggers the montage happens on clients already, there is no point in doing the multicast

worthy perch
#

Just found this guy's set up. It sounds pretty good.
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/95543-what-s-the-best-way-to-implement-smooth-lagless-animation-replication?123134-What-s-the-Best-Way-to-Implement-Smooth-Lagless-Animation-Replication=

 Create a Blueprint struct to hold a montage and its relevant info (Play rate, section etc).
    Add this as a variable to your character that replicates via a rep notify.
    On the client, make sure the rep notifier for the variable plays the montage using the replicated information.
    On the server, ensure you fill in this replicated montage variable when you play an animation and call ForceNetUpdate.
winged badger
#

it has one drawback

#

if you log in or run into netrelevancy range

#

the other players characters will play the montages you were not relevant for

#

so you need to account for that as well

worthy perch
#

Shouldn't that be pretty easy to check for? Just if montage section == currently playing montage section.

winged badger
#

lets say i am out of net relevancy when your montage plays

#

i run towards you

#

and suddenly you become relevant

#

i get your replicated variable update

#

and OnRep triggers that montage

#

i have no other information, as a client

worthy perch
#

You could replicate the position of the montage.

winged badger
#

you can replicate a timestamp

#

and if current time is greater then the timestamp + length not play it at all

worthy perch
#

Yeah, that would be better.

winged badger
#

and if its not play it from whatever offset for elapsed time is appropriate

worthy perch
#

Really sounds pretty good.

mental flint
plain flume
#

Anybody done painting system that works in multiplayer? My current system is that we create static mesh instance with every Tick when drawing. There might be few hundred instsnces in one drawing.. I dont know how to replicate the datastream to others

#

And if somebody comes joining the game later on, how would I replicate array that big in once

slim holly
#

@plain flume you can't replicate it that way

north swan
#

Hi guys, I was already talking about this with @summer nova in #gameplay-ai .
Are there any benchmarks as to how many AActors/ACharacters can be replicated in a non-AAA setting? reading stuff like this:
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/95495-network-replication-cost-and-relevancy
makes me pretty hopeful that replicating a maximum of 60 AActors/ACharacters in an RTS game is pretty feasible. what about characters that have an AIController?

summer nova
#

not relevant benchmark becvouse stuff isnt getting modified

north swan
#

I don't think I'll ever reach the point of making a game public, though. But would that amount of replication require huge budgets?

#

oh yeah I forgot about that.

#

I also think physics is not necessary in my game

north swan
#

do AActors have client side prediction for making movement smooth?
is that even necessary in an rts?

tropic fjord
#

Only Characters do @north swan

#

With the CharacterMovementComponent

#

NavMovementComponent & PawnMovementComponent don't

#

As for whether it's necessary... If you're building a multiplayer game, you probably want the movement to feel responsive, right?

#

i.e. not feeling a delay whenever trying to move units around the map

north swan
#

yeah I surely do.
what number of replicated ACharacters is feasible? is 30-50 too high? with most of them having not many replicated variables.

#

i know the answer is relative to my budget, let's just assume I'm not rich πŸ˜„

tropic fjord
#

I mean, Fortnite has 100 of 'em

north swan
#

I guess I'll just try. another quick thing: I don't need an AIController to move ACharacters on a NavMesh, or do I?

tropic fjord
#

I honestly don't know what's the smartest way to control units in an RTS... Mmmh

#

If you want hundreds of Units like in Starcraft

#

then I can't imagine it working well with hundreds of Characters

north swan
#

I think it'll be around 50 units max at a time, which would happen rarely

tropic fjord
#

Total on the map? Or per player

north swan
#

total

tropic fjord
#

Then should be fine. As for how to control them... Not sure. Imagining a lot of custom client-side prediction needed built-in.

north swan
#

okay then I'll just go for it and try with ACharacters!

#

thanks for your input

unique basalt
#

Hello guys! I am brand new to the unreal and a have a problem when trying to create a hud via the GameState class, engine is crashing on start if i start project with dedicated server, and works fine otherwise. I believe that this is due to the unreal trying to create a hud on the dedicated server, when there is no player controller, but i cant understand how to fix it. I tried to make the ApplyHUD function executed on the client via UFUNCTION, but this did not help. Can someone help me to figure this out?

winged badger
#

the GameMode calls GenericPlayerInitialization() from both PostLogin() and HandleSeamlessTravel(), which calls ClientInitializeHUD(), which in turn creates a HUD

graceful cave
#

@unique basalt#123 theres lots of ways to check for dedicated server but try adding if (UKistmetSystemLibrary::IsDedicatedServer(GetWorld()) { return; } to the start of the function

winged badger
#

HUD as in AHUD derived class, local only, which is usually used to manage widgets that can be also called HUD

#

so you are recreating something that works out of the box, pretty much

unique basalt
#

Okay, i did it that way because i thought that there is some deep meaning behind using the GameState instead of a HUD class, but i guess that the guide was simply outdated : )

winged badger
#

HUD class can by default access its controller, the controller's possessed pawn and the playerstate associated with that controller

unique basalt
#

@graceful cave And thank you too, that did fix the problem

#

So is there any difference between using a HUD class or a GameState, since i already recreated the thing that is already exists in the HUD class?

winged badger
#

HUD is convenient, you don't have to worry about replication, as its created locally, one per PC, and is not replicated, same as widgets themselves

unique basalt
#

Okay, then i'll transfer that to the hud, better now than when there will be a web of code

#

Thanks again!

winged badger
#

you don't have to create it either, just need to set HUD class variable on the GameMode

unique basalt
#

Even better then

winged badger
#

you do need to create your custom HUD class ofc, but you don't have to worry about instantiating it

unique basalt
#

Yeah, i see that

winged badger
#

its convenient for 2 more reasons - it can access your controller and pawn and its good for encapsulating the UI related logic, instead of cluttering somewhere else

unique basalt
#

Well, i dodged a bullet then, thanks to you : )

unique basalt
#

I thought about something according to your advise about using a HUD class. If there is any HUD parameters that should be shown only if some requirements are met, wouldnt it be much easier to cheat, since HUD class existing only on client and you cant properly check anything about it using server?

#

Take a radiation as an example - character class should always know if there is one, but you should not be able to know this as a player without the device

tropic fjord
#

My brain is stuck on this. Do Client functions not work on the PlayerController? My parameter is there on the server function, but gone on the Client function. Parameter input became null.

#

I don't understand.

fossil sentinel
#

I have a bit of a noob question - for Replication (and thus Multiplayer) to work, do I need to have the action I want replicated on the player character or pawn itself, or is it ok to have the action I want replicated be in a separate item blueprint?

What I'm trying to do is get a door to be opened and closed by the client and the server. However, the blueprint that lets the door swing either way 90 degrees is the door itself (OnOverlap > Enabled Input > Interact with door function > swing 90 degrees)

tropic fjord
#

The door is its own object, so you'd want to replicate that to all the clients. The action for the door to open or close would be a server function. @fossil sentinel

fossil sentinel
#

Hi @tropic fjord , thanks for responding!

The thing is I have the door itself set to replicate, and the functions (they are actually events) set to multicast. The problem is, the server can open, go through, and close the door - the client can open the door (the mesh and door moves), but cannot go through the door unless it's open on the server side.

So what I think is happening is that the client is not sending the message to the server to open the door. Not sure how to do that if multicast is not working. Any ideas - anyone? πŸ˜„

crisp vortex
#

i have a problem. when i use the advanced session plugin plus the steam subplugin. and i try to create a new session, and join, it wont work. if i create a new lobby, it shows me both strings, when it should failed and suecess. im using the version 4.22

tropic fjord
#

Perhaps you can show the function you're using to Open the door? @fossil sentinel Multicast should work, but just a Server function would make more sense in this case.

#

And Events are all (Delegate) Functions. Just a funny name Epic gave them for some reason.

crisp vortex
#

who do you mean?

tropic fjord
#

Can't help you with your question @crisp vortex, sorry, know close to zero about the Steam Plugin..

#

Maybe someone else can, tho πŸ˜„

crisp vortex
#

it's okay. πŸ˜…

fossil sentinel
#

Thanks @tropic fjord - This is what I have. Like I said the server can't see the client opening the doors, but the client can see the server opening the doors.

I hope it's ok to post pics here

tropic fjord
#

Not seeing any pic 😦

fossil sentinel
#

Sorry there it is πŸ˜›

dusky willow
#

hello, maybe someone knows how to do a dedicated server with c ++, I’m interested in creating a session and connecting to it, I can’t figure it out in what place I need to create it and how I already have a dedicated server, but when you connect to it, it gives an error (LogOnline: Warning: OSS: No game present to join for session (GameSession))

fossil sentinel
dusky willow
#

@fossil sentinel I can not open
This link is probably due to firewall in my country.

tropic fjord
#

You can dl directly ^

fossil sentinel
#

lol thanks Narendur πŸ˜„

tropic fjord
#

@fossil sentinel Have you tried simply making DoorInteract a Server function (not Multicast) and calling it on Interact?

fossil sentinel
dusky willow
#

Thanks for the file, but the problem is that I still do not understand where to create all this, where and at what point you need to create a session - for example

tardy cosmos
#

Hi, quick question. It is possible to not destroy the pawn of a controller when the player disconnects from the session?

crisp vortex
#

is there a tutorial for network sync?

limber mortar
#

I have a level blueprint that is supposed to start 2 fires at certain locations, but for some reason it is creating 4. Can anyone help? This is dedicated server environment.

#

This should only be called once due to the above and the start locations are picked:

#

and that is super simple

#

So it gets a random number, assigns to start locations like it should, but when I play my game it is picking the start locations and spawning an invisible fire on the server

#

and then on the client the visible fire appears at a different set of start locations picked

#

Adding switch has authority might have done it, though I thought I remember someone telling me level blueprints run on the server anyways

fringe dove
#

What does UGameplayStatics::GetRealTimeSeconds do during a demo replay that is rewound backwards?

#

I know it says it doesn't include time dilation, but does it go backwards during a replay rewind or ever onwards?

fossil sentinel
#

Can anyone help me out here with a multiplayer door?

What I'm trying to do is get a door to be opened and closed by the client and the server. However, the blueprint that lets the door swing either way 90 degrees is the door itself (OnOverlap > Enabled Input > Interact with door function > swing 90 degrees)

The thing is I have the door itself set to replicate, and the events set to multicast. The problem is, the server can open, go through, and close the door, while the client can open the door (the mesh and door moves), but cannot go through the door unless it's open on the server side.

So what I think is happening is that the client is not sending the message to the server to open the door. Not sure how to do that if multicast is not working. Any ideas - anyone? πŸ˜„

I really think I'm missing something so simple

raven holly
#

Use rep notify function instead

#

Client door interact needs to be run on server not multicast

#

And the server never takes actions so remove that switch auth

#

And use client door interact

fossil sentinel
#

Hey @raven holly - thank you so much for your pointers!

I implemented what you said (I hope I did a good job) and now the client can at least see what is closed and what is open - however now the client can't open or close doors himself!

raven holly
#

Ok change door open to a repnotify varaible

#

Inside the repnotify function put in the if and rotation stuff

#

Then change your multicast door interact to none

#

And remove the rotation stuff from that event, but leave the setting of variable

fossil sentinel
#

... uhhh ok hang on you've lost me a little (sorry I'm new at this!) - let me know if I've understood this correctly...

  1. So you'd like me to set Open Door Rotation and Close Door Rotation as RepNotify Variables
  2. Which RepNotify function are you talking about here? Should I create a function for OpenDoor and CloseDoor, and then set them to RepNotify?
  3. Change the DoorInteract function to replicate to none?
    4.Remove the rotation stuff from this function, because they'll be in the new function of OpenDoor?

Did I understand that correctly, @raven holly ?

raven holly
#

So change isclosed to a repnotify instead of just replicated

#

It will then create a function which you can see in the function list

#

Turn off replication on your closed and open rotations

#

You dont need it

#

Unless you change those rotations preset values at runtime

fossil sentinel
#

Ok, got it - so inside the new On Rep Is Closed? function you want me to put in the rotation stuff and the branch?

solemn glacier
#

Having trouble getting my game to work on a dedicated server, everything works fine when testing in the editor, but when when I package it the player spawns at a random playerstart and can't move.

#

The player is meant to possess a pawn and a menu should show up, but none of that seems to be happening.

#

Also it works fine when a player hosts the server

slender yarrow
#

would you want to execute a node like Disable Input on the server, or does it matter? Im still trying to figure what should be server ran vs. letting client do it

thin stratus
#

I still wonder how I can get an Invisibility Ability working on Splitscreen.

#

The other 3 Players don't see a copy of you but the exact same mesh. So changing a Material will also hide it for the Player itself.
OwnerOnlySee doesn't seem to work (probably same reason?) even though I read that others made it work with that.

#

Every Pawn has an owner properly set (spawned through UE4 itself), but it still doesn't do anything toggling that boolean.

thin stratus
#

So apparently, the OwnerOnlySee thing works for Splitscreen too, at least in a new project (same Engine version).
Now to find out how 2(!) nodes can not work mine

winged badger
#

isn't that mesh the very same instance in splitscreen?

thin stratus
#

Yeah

#

But it seems to work

#

Test project

#

Without the boolean

#

Hm, however in the actual project they both go invisbile

#

Means some third person is the owner.

#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

winged badger
#

its good to catch failed ownership chains early

thin stratus
#

That's all I do though

#

These are also the only Owner calls

#

So I'm not undoing that somewhere

winged badger
#

yeah, there is no scenario in which that can fail

#

the mesh is in the CDO?

#

oh, is the camera owned by the controller as well?

thin stratus
#

Ehm should be

#

Actually no

#

The Camera isn't even replicated

#

It's an additional actor

#

Which for splitscreen should not matter I guess

winged badger
#

it has to update render state per camera, not per controller

thin stratus
#

I set the Owner on the Camera now too, but didn't change much

winged badger
#

:/

thin stratus
#

But you might be right

#

With a camera on the pawn (not extra actor) it works

#

Now to find out why

#

The extra camera actor is a ChildActor

#

Or actually

#

It's not

#

Making it a child actor is also not working

thin stratus
#

I can't find how bOnlyOwnerSee is used

#

All it does it setting the Render Start to Dirty

#

but I can't find where exactly the check it when deciding if it should render the component

gleaming niche
#

primitivesceneproxy

#

is where it checks

#

by checking the owners list and the viewactor

thin stratus
#

Then I see the problem

#

The ViewActor is the CameraActor

#

Which is not an owner

#

It is owned by the PC, but that doesn't matter then

#

Stupid actually

#

They should check the ViewActor owner

#

And see if that is in there too

gleaming niche
#

you can add it !

thin stratus
#

As long as that doesn't require engine changes that is

gleaming niche
#

that it does.

thin stratus
#

Cause I don't want to introduce a custom engine to this project as of right now

gleaming niche
#

i think you can add the camera's owner as an owner to the owners list though

#

i vaguely remember doing something like this before in the past

tulip ferry
#

I have a weird networking problem. Would be glad if someone could help out: If I spawn an AI Character on the listen server (using SpawnActorFromClass), I get choppy/jittery movement on the client when it moves.
I don't get this problem if I'm playing on a dedicated server.
However, if I just place them in the scene and play, the movement on the client is smooth and I'm not facing any issues. Could someone help me understand where I could be going wrong? Thanks

thin stratus
#

Yeah, I guess this only works for Splitscreen then

#

Which is fine

#

For network I would most likely use IsNetRelevant anyway

#

I guess the only other thing I can do is set the viewTarget to the Pawn or PC

#

And modify the view via the CameraManger

#

To show what I want

floral hill
#

How to show the connected clients via console command in listen server?

#

Anyone knows?

real yacht
#

what is difference between calling event from Authority and calling RPC same event?

#

how i understand, that's the same? or im mistaking?

fossil sentinel
#

Calling from Authority is when the server calls the action. Calling RPC is the client telling the server to call the action (if I understand it correctly)

viscid veldt
#

Anyone ever experience the editor locking after about 1 minute when testing at least two players/clients on one machine?

meager spade
#

no

twin juniper
#

support for steam dedicated servers from blueprints is a thing in 4.22 or not?

grizzled stirrup
#

When sending a vector via an RPC very frequently to the server, to greatly reduce the amount of bytes sent, is all you have to do in order to achieve that use an FVector_NetQuantize instead of a regular FVector?

fleet raven
#

yes

grizzled stirrup
#

Thanks!

bitter oriole
#

@twin juniper Sessions still require either C++ or the advanced sessions plugin

#

Dedicated servers still require a source build of the engine

#

Dunno about the rest

twin juniper
#

i have steam dedicated servers from blueprints using Uworks plugin

#

so i'll stick to that

grizzled stirrup
#

Are steam dedicated servers free or do they just handle the connection from the party?

#

Probably not free, you'd have to rent instances right?

bitter oriole
#

"steam dedicated" means dedicated server that uses Steam for sessions

#

Valve does not host

grizzled stirrup
#

Ah

#

I'll stick to listen in my case I think

#

Since it's literally free regardless of the players

twin juniper
#

yes, it's basically just a list of ip addresses

bitter oriole
#

Listen is 100% the way to go if you're an indie

grizzled stirrup
#

Yep it's fantastic

bitter oriole
#

Dedi is too costly and complex

twin juniper
#

not really

grizzled stirrup
#

No need to do any extra work to maintain anything

#

Make a game once and it can support 2 or 2590812759 players

bitter oriole
#

Yup

twin juniper
#

you can easily host them on google cloud, really easy to setup

#

and its trail is free, so no costs involved

bitter oriole
#

Still way more involved than a simple listen server

twin juniper
#

ok, i agree

#

but still doable and even if you don't know c++

grizzled stirrup
#

Yeah if you think about how convenient it is for an indie to ship on steam- they just need to make sure the party and session works and then it's infinitely scalable

#

No extra server binaries, setup, maintenance etc

twin juniper
#

i was hoping i could move Uworks out of the picture

#

with the new release

#

but i guess not yet

fleet raven
#

what is it that keeps convincing people they need dedicated servers

twin juniper
#

persistent characters?

grizzled stirrup
#

Well for PvP it's definitely the standard now but you just can't compete with the big dawgs in terms of that

bitter oriole
#

Dedi is doable but adds a huge lot of setup, security, maintenance, running custom builds, not to mention running costs in the long term ; and you only benefit from dedicated if you're doing a competitive game, or a MMO, both of them terrible ideas for indies.

grizzled stirrup
#

Fully agreed Stranger

#

It probably takes 50% of your time and budget JUST to get dedis working correctly if you have a small team

#

That time could be spent making your game better and on listen servers for free

twin juniper
#

i'm a single developer with no c++ knowledge

#

and i didn't have that much problems with setting up dedicated servers

#

on google cloud + uworks

#

TBH

grizzled stirrup
#

All steam has to do with listen is say hey you host and these people are clients right? It just is the middle man for the initial setup? It's so damn efficient that everyone hosts their own games πŸ˜„

#

@twin juniper It's easy enough to set up one or two dedis, but try managing them for a live game

#

And handling problems, updates etc

#

It gets very complicated

bitter oriole
#

Yeah, problems come later on. How and when do you update ? How do you prevent cheating ? How do you handle backups of your world ? Etc

#

Anyway, not here to diss on dedicated

grizzled stirrup
#

What happens if 500 servers in a region start giving bad performance

#

And yeah definitely not

twin juniper
#

agree

grizzled stirrup
#

IT's just out of the hands of a small indie

#

For someone like Epic it's perfect

#

And of course in the perfect world every game would have dedis for max quality

#

But listen is definitely good enough in many cases

bitter oriole
#

That's not even true - if you're doing a coop game with no matchmaking that you play with Steam friends, dedis are 100% a waste of time

grizzled stirrup
#

Yeah you are definitely right

#

Co op is a great example of where listen shines

#

Super efficient and infinitely scalable

twin juniper
#

i just needed a persistent character aspect of it... no way around it but dedicated servers

grizzled stirrup
#

Yeah for stuff like that you can't really do much

#

Listen is great for session based games that don't need to stick around when you shut them down

#

One question about listen server bandwidth. Doing some tests with a friend, we hit the 10,000 byte limit very quickly

#

With a few actors running around

#

Is this common and is it common to lift the .ini limits to something more lenient in general?

#

When lifted we got a great experience again with nothing being dropped

#

Is that 10,000 bytes the amount of data sent per SECOND?

bitter oriole
#

That would be a very small amount

grizzled stirrup
#

Yeah it seems to be- which seems very tiny for modern connections

#

That's the default in UE4

#

I'll assume that it's fine to bump it up (while testing of course), but I'd imagine many connections can support more than 10KB /s

fleet raven
#

just change the limit

#

I set it so high it's effectively disabled - there is no point artificially limiting the bandwidth with player hosted servers

grizzled stirrup
#

@fleet raven Great thank you

#

So in the case of a listen server host, if he or the client hits their connection limit, they'll just send less packets naturally?

#

and it won't matter that there isn't a limit from UE4's side?

fleet raven
#

I don't actually know whether it will block or drop packets when you saturate your bandwidth, but it seems to have the same effect as hitting the limit in unreal (unreliable rpcs not delivered)

grizzled stirrup
#

That's perfectly fine

#

As long as the reliable ones still come through first even when saturated

#

Thanks a lot

crisp vortex
#

is there a tutorial how to sync multiplayer?

thin stratus
#

Sync?

plain flume
#

@slim holly Hello

#

Previously I asked here this question, but needed to leave computer. Anybody could point me to right direction how to replicate a painting system? Here is the last message:

#

"Anybody done painting system that works in multiplayer? My current system is that we create static mesh instance with every Tick when drawing. There might be few hundred instsnces in one drawing.. I dont know how to replicate the datastream to others
And if somebody comes joining the game later on, how would I replicate array that big in once"

rose spear
#

Hey guys. is this tutorial series for a multiplayer game, a good start to learn multiplayer coding for UE4.21 or 4.22?
https://www.youtube.com/watch?v=abmzWUWxy1U&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ

I was thinking of doing a dedicated server with gameplay abilities. but more i look into the multiplayer aspect of the engine more i'm begining to feel lost and don't know where to start. I've checked some dedicated server tutorials but they all have a working game already made. Here i'm not sure if i need server calls programmed into my game or not.
TL;DR: I'd like to know what would be the best way to start making a MP game? I could really use some pointers.

In this video we take a look at the finished project and step through each of the features that will be covered in this series. We show our functional Main M...

β–Ά Play video
winged badger
#

@rose spear find the networking compendium, link is pinned on this channel

rose spear
#

@winged badger looked trough it but i don't understand, if i want to have a dedicated server: do i need to code it myself? or does unreal create it for me if i just untick the checkbox when pressing play (not a temporary one)? If i have to make it. do i just make the .cs file (like in most tutorials) ? if so where does the logic for the server come from (making a map, char select etc...) its a bit all over the place for me atm. i think i'll just focus on creating a normal netowked (listen server) kind of game and then maybe transfer it to dedicated server.

#

@winged badger ty for the reply

winged badger
#

well, starting to make a game at a point where you are as lost as you are now will almost certainly result in starting over once you gain more insight

#

so i wouldn't even worry about dedicated servers or not, just experiment and get some grasp of networking first

hallow turtle
#

That's the right approach - make something you like - then worry about dedicated.

rose spear
#

i think i'll just try to recreate the whole Unreal networking tutorial with as much c++ mixed in as possible and then try to get dedicated servers

#

@hallow turtle thanks

main sentinel
#

How should I set these new macros when working on version 4.22?

Is there any example of it? I really can't find it

main sentinel
#

I believe this is the easiest thing ever. And yet I have been trying to find an answer for this for the past 5 days or so

warped island
#

I'm not on 4.22... but it sounds like you would just add GlobalDefinitions.Add("UE4_PROJECT_STEAMSHIPPINGID=1234567"); to your Target.cs file like it suggests?

main sentinel
#

Thanks @warped island! I did not know that was the right way to do it. Do you know if I also need to add any of these definitions do my Game ...Server.Target.cs file?

warped island
#

Hmm, I'm afraid I don't... But I doubt it would hurt to define all of those for all of your targets. You could look through the source to see where those defines are used to verify, I bet it's only once or twice for each of them.

main sentinel
#

I'll try that! thanks again!

frank plover
#

im having troubles doing replication for the flight animation blueprint from the marketplace i thought it would work the way i did my replication but its weird all the animations replicate but the client doesnt fly higher then waist level and flys very slow while the server does everything normal?

oak pond
#

I just wanted to ask since I don't know loads about mp but from what I do know it seems very intimidating; is it even worth trying? is it just guaranteed to be super complicated and stressful every time?

#

do you generally have to be like really skilled to set it up

limber mortar
#

I have this code which spawns a fire actor at a location on level start, which then spreads as the game progresses.

#

The fire appears invisible to the clients even though I have the actor replicating

#

From what I remember being told as long as I have the root actor replicating the particle components should replicate

limber mortar
#

if I take out the switch has authority the fire appears in an area visible to the client (it got a new start location)

#

but in a separate location you still see that blank area of trees clearing out. So I know the server side fire is there

fierce birch
#
jolly siren
grand kestrel
#

@fierce birch Networking Scripted Weapons and Abilities in 'Overwatch' sounds like GAS made properly πŸ€”

safe marsh
#

does anyone know or use a custom console to display the server output log

#

I have a custom console installed, but it seems to launch with the windows cmd.exe regardless (even when its set to override)

sick edge
#

Hi!
Is there a way to connect to a server without travelling to its map? I just need to exchange sporadic data with the server, and I don't wan't to lose my current level as my game is mainly a local one (server is only used for few data)

sharp pagoda
#

@sick edge use beacons

sick edge
#

What is this (i'm searching on google at the same time)

ivory portal
#

Why is the score var in player state also read only and how to access it through blueprints? Not a lot fof ionformation πŸ˜•

rain coral
#

Let's say I have a case where:

  • I spawn an actor in BeginPlay (GetWorld()->SpawnActor<...>) on both server and clients, from an object.
  • Somewhere I do an authority check, and if false, I invoke a function on the spawned actor.
  • The function that is called on the spawned object only ever returns true for HasAuthority(), even though it was called by someone who did not have authority. This is confusing to me.

Any ideas?

worthy perch
#

If the client spawns it, he has authority. I'm pretty sure.

rain coral
#

@worthy perch But doesn't HasAuthority always indicate that the object is owned by the server?

thin stratus
#

Authority just checks if(Role == ROLE_Authority)

#

And ROLE_Authority is /** Authoritative control over the actor. */

#

An Authority check on a non-replicated Actor is most likely pointless.

#

You should rather check if you are the Server or not.

#
if(GetWorld()->GetNetMode() != NM_Client)
{
    // Server
}
else
{
    // Client
}
#

@rain coral

rain coral
#

Aha! Thanks =]

keen thorn
#

hi guys, do u have the issue that level actor references are gone after servertravel

winged badger
#

its not the same level actor after travel

keen thorn
#

ye but in my level blueprint i use the level reference, i thought these will be auto set again on server travel

winged badger
#

after server travel only valid references in level BP will be the ones loaded from the package

keen thorn
#

u know the ref when u right click, basically my level bp no longer works after server travel

#

:/

winged badger
#

and ones you set "manually" afterwards

keen thorn
#

cus now i dont know how to refer to level actors from level bp anymore

past gate
#

Hey guys, I need help on understanding the proper way to replicate NPCs in Blueprint. I'm adding it to an existing project. Should I let the events happen on Server and replicate the Animation only?

keen thorn
#

since they get messed up after server travel

winged badger
#

@past gate replicated actor will be spawned on all clients as well, and it will run independently, for the most part

winged badger
#

its BeginPlay, Tick, Collisions, etc...all run locally

keen thorn
#

basically this issue, some say 4.20 still has it

winged badger
#

it just receives updates from the server here and there

#

is this Seamless travel?

keen thorn
#

yes this is seamless travel

winged badger
#

i don't use a level blueprint for anything other then holding some information about the level, so its easily accessible from anywhere

#

you BP only @keen thorn ?

keen thorn
#

i use C++ with BP, i need to interact with trigger boxes in my level

#

but once servertravel the ref to trigger box in level bp no longer works

past gate
#

My problem is, in the ABP, there are a few random choices to vary the animations of the NPC via a random Integers picking from animation arrays. Should replicating the integers be enough?

keen thorn
#

im trying to fetch them by tags... but doesnt seem to work well

winged badger
#
AMyCustomLevelActor* UStaticLibrary::GetLevelActor(const UObject* WorldContextObject)
{
    UWorld* world = WorldContextObject ? WorldContextObject->GetWorld() : nullptr;

    return world ? Cast<AMyCustomLevelActor>(world->GetLevelScriptActor()) : nullptr;
}
//static BPCallable function
#

can just add that to your c++, put a breakpoint in it and call it

#

see whats going on in Locals

#

provided your references are in c++

keen thorn
#

im quite sure it is null

#

let me try something else

winged badger
#

as far as i know, the level, along with all its packaged references should be loaded from scratch when you ServerTravel, Seamless or not

#

@past gate do you even care if cosmetic animations are perfectly synced?

past gate
#

yes I do

winged badger
#

ok

#

it would be enough, proobably best to trigger then from OnRep functions

#

but you can't replicate then inside the animation blueprint

past gate
#

oh yeah? because the ABP itself isn't set to replicate?

winged badger
#

UAnimInstance isn't supported for networking, and it would take some c++ work to force it to replicate, which i strongly reocmmend against

keen thorn
#

@winged badger yes me 2, this is why i think its bug. seems like others have same issue as well following my link

past gate
#

okay, I'm gonna try to go through the actor graph then

winged badger
#

@rough hollyios, are the object names the same ones as when you first load the level?

keen thorn
#

yes all are same, its a very simple level bp

winged badger
#

sorry Mad, made typo and it pinged you

keen thorn
#

aha ok

winged badger
#

i mean

#

is it TriggerVolume_BP-C_1 on the first load and TriggerVolume_BP_C_2 on the second?

keen thorn
#

hm

#

how do i get that name

winged badger
#

you can just printstring it from BP

#

from object reference

#

GetDisplayName node gets added automatically

keen thorn
#

this is the ref

#

it becomes null

#

:/

#

how can i printste it

winged badger
#

print the name from the object itself

keen thorn
#

print

winged badger
#

on BeginPlay

keen thorn
#

oh its just a trigger box, so i have to make new bp..

#

in order to add custom logic..

winged badger
#

with seamless travel you don't have the outliner and the editor, so yeah

keen thorn
#

meh

#

i will do a hack to quick fix this for now

#

gotta deliver today

#

its just weird the ref dont auto work

#

:/

winged badger
#
ATriggerVolume* GetTriggerVolume(UWorld* World)
{
    for (TActorIterator<ATriggerVolume> It(World); It; ++It)
    {
        if (It->ActorHasTag(TEXT("MyTriggerTag"))
        {
            return *It;
        }
    }
    return nullptr;
}
#

fallback option

keen thorn
#

im doing this now actually :D

#

hate it but gotta use it now -.-

#

thanks man

rain coral
#

Any tips for things to check for why the server function doesn't get called? The code in the screenshot runs, but the breakpoint in the actual implementation never runs.

worthy perch
#

I'm just guessing, but maybe int can't be sent?

#

Like it has to be one of the UE versions of int.

rain coral
#

I've sent int plenty times in other cases, that's no problem

#

In this case the object is spawned on server only and replicated to clients. Clients call a function on it which then calls a server function, and it doesn't get to the server version.

worthy perch
#

Clients have to have ownership of the actor, doesn't it?

gleaming niche
#

yes

#

to send to server you need a player controller

#

afaik.

rain coral
#

Ah, huh

#

This is getting harder :P

gleaming niche
#

either from a playercontrroller, or from a possessed pawn

thin stratus
#

Or any other actor that is owned by the client

#

You specify the owner when you spawn the actor

#

That owner needs to be chained somewhere with the PC

#

So you can have PC->Actor1->Actor2->..->ActorN->NewActor

#

And it would work.

rain coral
#

@thin stratus Is the SetOwner function the one to use for this?
So in the case where a server spawns the object and replicates it, it should set the owner to be the server version of the PlayerController?

thin stratus
#

In BPs there is an Owner Pin on the SpawnActor node

#

In C++ the same thing is hidden in the ActorSpawnParameters

#

You can, afterwards, change/set the Owner via the SetOwner function

#

Everything has to happen on the Server

#

And yes you need to use the Server version of the Clients Actor

rain coral
#

Alright, thanks, will try.
EDIT: Yes this works =)

flint plaza
#

Hi guys. I have a server set up using steam onlinesubsystem in cpp.
I am able to get to the same map.
Problem is, when I connect at the client end, 2 vehicles spawn simultaneously (presuming the client and the server) whereas I can see the client joining from where I hosted

#

why is that and how can I fix this?

worthy perch
#

How do you use ActorSpawnParameters if you use SpawnActorDeferred?

median elbow
#

does anyone know off the top of their head a good resource for the replication graph stuff?

#

I would like to write my own replication graph in place of the spacial partitioning graph

#

basically, the game i'm working on has "groups" of people that need to get all events related to that group, but they are not grouped by their positions in the world

flint plaza
#

I don't spawn the actor. I have a default pawn class in the game mode I set @worthy perch

worthy perch
#

Sorry, wasn't talking about your thing.

flint plaza
#

oops. My bad

thin stratus
#

@worthy perch I think SpawnActorDeferred uses them under the hood.

worthy perch
#

Oh, yeah, it does.

celest geyser
#

Hey guys, I'm completely new to multiplayer and struggling to understand what goes where. For example if my game has a pool of resources that is shared between players, is that something I create, store, update and distribute to clients from GameState or GameMode? My current understanding would tell me that's something for the GameState to handle.

Another scenario would be something like rounds or phases of a round - seems like something that the GameMode should govern (since it would classify as the 'rules' of the game) but at the same time something that the GameState tracks (since at the end of the day it's an int that needs to be available to clients)?

thin stratus
#

GameMode only exists on the Server

#

See the GameMode as the primary class to handle game logic in that is server authoritive

#

And the GameState as a primary class to pass information about the game logic around.

#

E.g. the GameMode has a Timer to end the match (as well as the logic to do so).
The GameState would only get the Timer Length and replicate this very time to the player

#

Sometimes the line between GameMode and GameState gets a bit blurry though

#

If you just want to store resources between players (e.g. a shared $€ value or wood, gold, stone, etc.) you can place it into the GameState and let the Server adjust it. (keeping in mind that the clients can't call RPCs on the GameState).

#

@celest geyser

celest geyser
#

OK, so in my concrete case, I have a deck of cards that all players draw from. If I understand you correctly, I create the deck in the GameMode, shuffle it there, then pass the shuffled deck as a 'ShuffledDeck' variable to the GameState. Clients are then able to access the 'ShuffledDeck' variable on the GameState to draw a card from it.

But simultaneously, they would have to tell the GameMode that they are drawing a card (removing it from the 'DeckArray'), and then the GameMode would have to update the 'ShuffledDeck' var on the GameState. Does that sound correct?

thin stratus
#

Yeah that's one way you can do it.

#

You'll probably find yourself refactoring that quite a bit again and again.

#

Also please be aware that any interaction with the GameMode has to go through an RPC-able class first.

#

Well from Clients to GameMode at least

#

E.g. Client calls ServerRPC on PlayerController and then can tell the GameMode something

#

Also depends if the Player needs to know the deck

#

Or if their own hand is enough

#

Cause the Server will place the card from Deck into Hand

fossil sentinel
#

Hey all, does anyone know of any common reason a client to server function won't fire off?

I've set up this blueprint to run very similarly to a more simpler blueprint that works, but this one won't even fire off the function that tells the server to multicast for some reason, despite the "remote pin" from Switch Has Authority firing off to order the 'executes on server' function.

I'm pretty new at this, so I'm expecting to see something very simple that I'm missing. The blueprint default is set to replicate tho πŸ˜„

thin stratus
#

Main reason a ServerRPC isn't firing: Client isn't owning the Actor.

celest geyser
#

@thin stratus
You're referring to the dropdown which determines where a function is executed, correct? As in Run on Owning Client, Run on Server?

Players only need to know their hand, which would then be stored in PlayerPawn (?)

Like I said, completely new to this, so apologies for the noob questions, just trying to figure out how I need to think about these problems πŸ˜„

thin stratus
#

And by the name of your Actor "Fortify Window", this is just spawned into the world and the Client is probably really not owning it. @fossil sentinel

#

@celest geyser PlayerState

#

Did you actually see my Compendium pinned to the channel?

#

Cause i kinda think you didn't :D

fossil sentinel
#

@thin stratus I'll check that out thanks! BTW OH WOW - you're the guy who wrote that! Thanks for the amazing resource!

celest geyser
#

@thin stratus I've been reading through it, but I don't have a programming background so it takes some time to understand πŸ˜› Thanks for taking the time to answer though, it really helps my understanding with concrete example πŸ‘

grizzled stirrup
#

For a replicated emote that other players would see, would that be done by a rep notify int that'd switch on int in the repnotify function to play an anim montage corresponding with the emote index?

ivory portal
#

That's one way

grizzled stirrup
#

@ivory portal Would you do it in a cleaner / more elegant way?

#

Very curious about how it'd be setup

jolly siren
meager spade
#

i think in UT4 they had different states

#

or a state on top of a state?

jolly siren
#

In my case I am trying to send a pointer to the character being meleed from the client to server so they stay in sync

void nest
#

Can someone tell me how to use the "update session" node from the AdvancedSessionsPlugin? Using the add or modify extra settings node doesn't seem to work.

#

Does the node only work from a dedicated host? That is the only reason I can think of why it doesn't work when playing with a listen host

worthy wasp
#

I have a bowling game i'm trying to create - its comprised of an alley that has child actors (the pins - set to bReplicates = true in their own blueprint). They simulate physics - and the simulation seems to be replicating fine when a ball strikes them and knocks them over.

My problem however is resetting the pins back to their spots when a frame is done..... I cant seem to do this unless i set the static mesh (inside the pin script) to replicated - which opens up a whole other bag of problems - IE: Pins arent in their respective locations that they are when i place them in the parent (alley) script....

ALLEY SETUP (Actor set to replicate - CHildActors are NOT) :
https://puu.sh/DcgiN/09a48ac525.png

PIN SETUP (Actor set to replicate - SMesh is NOT at this point):
https://puu.sh/Dcgju/5c02338e3c.png

RESET CODE (Piggy backed off of a RepNotify variable setting):
https://puu.sh/Dcgk4/0f5df65c18.png

pallid mesa
#

Now it is not required to recompile the engine to set the Steam Product Name and similars, you just have to add the following lines on the target.cs files
[Unreal Engine 5]

if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
{
    GlobalDefinitions.Add("UE_PROJECT_STEAMPRODUCTNAME=\"My Product Name\"");
    GlobalDefinitions.Add("UE_PROJECT_STEAMGAMEDIR=\"My Game Dir\"");
    GlobalDefinitions.Add("UE_PROJECT_STEAMGAMEDESC=\"My Game Desc\"");
    GlobalDefinitions.Add("UE_PROJECT_STEAMSHIPPINGID=480");
}

In Unreal Engine 4, you have to rename UE_PROJECT_ to UE4_PROJECT_.

keen thorn
#

hi all, im trying to understand why actor references from within level bp becomes null once a server travel occurs

#

the refs refer directly to placed actors in the level

#

im currently using workaround to get all actors of certain tag or name due to the issue :/

fleet raven
#

has anyone found a fix for the bug where servers stop working after a few days?

thin stratus
#

@pallid mesa Awesome. Let's pin it for the future.

pallid mesa
#

Fantastic, just edited a bit the message so it's in context

limber mortar
#

Can anyone help me figure out why my level blueprint is spawning 2 sets of actors instead of 1 here?

#

so it creates a fire at those 2 locations, but then the code executes again client side. I thought level blueprints were not replicated

#

with 2 new start locations

#

and the trees remove properly from the invisible fire, but not the visible fire. Which tree removal is done server side

limber mortar
#

This gets me down to 1 spawned, invisible fire deleting trees: Which is 95% there.

#

I have the fire actor set to replicate, but I can not see it

limber mortar
#

oh snap

#

it is replicating

#

maybe the actor doesn't keep the particle's bounds and I need to adjust those within the actor

#

well I don't know what is causing it yet

#

fixed it!

slender yarrow
#

for TDM where would one typically have the Scoreboard and how do you update it? Im trying to cast to the scoreboard UI from the GameState but it wont let me run an event on the client. Its like forcing everything to run on the server and obviously the server and UI's dont like each other. What is the location structure for a scoreboard and updating it on all the clients?

meager spade
#

score board should be a local widget

#

pulling info from gamestate

#

you should not be sending stuff from the game state to the widget

#

widget should only ever pull stuff out

#

gamestate will be replicated

#

so everytime someone gets a kill, the gamestate gets told, and that replicates the new values. the widget just pulls from the gamestate, i prefer event driven, ie the gamestate fires a delegate via a onrep which updates the UI or you just update the UI when its loaded, and bind, as long as your collapse the widget after to save performance

slender yarrow
#

ok the on rep makes sense. But for example. The only way to know a player logged in is from the game mode OnPostLogin. Im trying to figure out how to use that event to add a new line for that player on the scoreboard UI. The wierd thing is. Even setting events in the gamestate to run on client get overriden and are still being ran on the server

slender yarrow
#

anyone know? Been working on this literally all day with basically 0 progress 😞

exotic salmon
#

@slender yarrow What do you mean "settings events in the gamestate..gets overriden"?

slender yarrow
#

like any event i set to run on client in the gamestate or gamemode will not run on the client. I literally have an event set to run on client in the gamestate and its only outputting on the server

exotic salmon
#

So your events that are set to RunOnOwningClient are not being called on the client?

#

Or multicast is not running?

slender yarrow
#

RunOnOwning client isnt working in gamestate

exotic salmon
#

I've not tried that but it makes sense. I don't think a single client owns the gamestate

#

Isn't this something all clients need?

slender yarrow
#

well im just having a hell of a time trying to get a scoreboard on the clients to be updated when i new player logs in

#

which can only be initiated from the gamemode

#

and im getting lost between all the different states/modes and the client and server

exotic salmon
#

I don't have it open to know the best way but using a multicast event should work instead

#

This should push to every client

slender yarrow
#

youre right. been over thinking it maybe. ill try

exotic salmon
#

Are you replicating info other than just the event firing?

slender yarrow
#

well realistically i need to send a struct as well

#

the player info for the line being added

exotic salmon
#

If you need info to make it down AND be accessible from newly joining clients you should use a repNotify variable

slender yarrow
#

i did. and it was semi working. I just have 2 players joining the server and only 1 was being added to the scoreboard

#

was trying to debug it

slender yarrow
#

so i have the on rep going. But the variable im using to trigger it is only reporting the last number on the clients. But the server number are correct. What could cause this?

gleaming niche
#

@limber mortar Bogadu: Can anyone help me figure out why my level blueprint is spawning 2 sets of actors instead of 1 here?

add an authority check, so clients aren't also making fires.

limber mortar
#

I did, but then I had a replication problem

#

which I fixed

#

So that was 50% of the solution

#

Thanks for the reply, I actually worked on it a few days and that was the first

#

At one point I was told by a mod to take out a lot of the switch has authority and networking (Run on Server, Multicast, etc Functions) because the level blueprint isn't replicated

#

being a new UE4 dev I might've took the advice too far

#

I'm so close to launching my alpha testing I can smell it πŸ˜ƒ

#

got vehicle and character skins applying

#

mm

#

I'l put something in the released area within a couple weeks

night topaz
#

I'm kind of amazed there is no easy way to do real time multiplayer for iOS. And if there is there is very little documentation, tutorials, or answers on the internet.

gusty lily
#

heyas. having issues with sounds. the problem is things like jump. you want it to be instant for the character (fps), but replicated for everyone else. i'm trying things like this, using audio components on the character, but haven't hit the right solution. still struggling with replication. the rules seem to change all over the place.

limber mortar
#

Hopefully my last question of the night. I have this actor that works and replicates, and I can see it on the clients when it is spawned on the server

#

I tried to create a decal in the process but it wasn't visible. I put the decal node in the remote branch, attempted a multicast function, and other things, but I don't see a decal no matter which material I use

#

am I missing something silly?

#

it is on a dedicated server environment

#

Man the googles says what I found earlier, try multi cast

#

this decal works for another actor but not here

#

I just want a black spot on the ground 😭

distant talon
#

the decal isnt replicated so multicast is the right direction

#

have you tested to see if the multicast is firing at all on all clients

#

just setup a print node

limber mortar
#

I'll put one before the spawn

#

I see the print string

#

but not the decal

#

here is me flying towards it

#

does a spawned decal have a default cull distance?

distant talon
#

if the print works then there must be some issue with the actual placing of the decal on the clients. If your actors move, the location might not match on client and server

limber mortar
#

OH

distant talon
#

try making the decal huge or something to see if it's just placing in the wrong spot on clients maybe?

limber mortar
#

I SEE IT

#

I just needed to make it reliable

#

you rock

#

I want it to be a burnt ground, so now that I can see them I just need bigger decals and black ones

#

but all those red circlers are where a fire burnt

gusty lily
#

small victories! A custm event to handle sound replication that gives the clients an instant sound without repeating it when the after sending it to the server for multicasting. PHEW

#

for sounds initated from character

flint plaza
#

I have a unorthodox vehicle floating using my hover component and moving using forces applied to the static mesh after calculation based on a few parameters. How can I convert this behaviour to a synchronized multiplayer? I already have steam subsystem set up

bitter oriole
#

@flint plaza You'll need to implement a classic prediction./rollback/replay multiplayer code

#

Your hover movement needs to be deterministic (no engine physics)

flint plaza
#

I am 3/4 into this course. So far so good. Not yet understood how to do what I'm trying to do though

bitter oriole
#

Which part don't you understand yet ?

flint plaza
#

How can I synchronize movement of all clients and the server of my custom vehicle

bitter oriole
#

The "Krazy Karts" part of the course covers a multiplayer movement component

flint plaza
#

Okay. I am almost at the point of starting that section. Thanks

rain coral
#

Good morning!
I'm using a .sav savegame object to store some character customization data (mostly colors and integers within). Is it possible to replicate this object from server to client? It doesn't seem to arrive at the client. I'm wondering if it's overkill and if I should rather keep a struct with those properties separate and refactor some of the code to copy data into the struct and use that for replication instead?

bitter oriole
#

@rain coral Load the save into a struct, replicate / RPC the struct πŸ˜ƒ

rain coral
#

πŸ‘

bitter oriole
#

Simplest way to go here, and you can easily optimize with netquantize vectors etc

rain coral
#

I guess a relevant question would be generally the cost of replicating 'objects' like actors? I have some cases here and there where actor references are passed from server to client, and wondering a bit how that works. Does it take a huge lump and churn it through the pipe or is it able to send only the crucial info in order to have the client reconstruct the object on their own..?

cinder quartz
#

Whats the proper way to replicate root motion? Currently I'm using root motion with Play montage when player dodges(just a short dash). Works fine on hosting client but others get rubberbanded and dont move. Is there a built in way like character movement works for root motion or should I just ask for server to let me dodge?

bitter oriole
#

@rain coral Basically references are replicated as pointers

#

@cinder quartz Your movement component needs to be disabled while you do root motion, I guess

#

Look into the CMC code to check for something like that

cinder quartz
#

Thanks, ill check it out

rain coral
#

@bitter oriole But the pointers wouldn't point to the same memory on server and client though?

bitter oriole
#

No, it will point to the replicated object

#

If it's not replicated, I guess it will be nullptr

rain coral
#

Hmm ok I think I understand

vital thunder
#

hey guys, do you know a good (up to date) place where I could learn a lot about unreal multiplayer please (not just the basics) ?

bitter oriole
#

Scroll up a bit where I linked a very nice course

vital thunder
#

ok thanks

wet tangle
#

just asking is it normal for the packaged project not having the steam interface after setting up the subsystem

faint dock
#

hello guys i have a question
how do i get 2 different version of an actor on the server side and client side
i have an actor where is stuff saved that the server realy doesnt need how like 2d textures
whats the best approche?

thin stratus
#

StaticData shouldn't be saved in an Actor though.

#

A DataTable for example makes a lot more sense.

#

Either way, if you spawn an non-replicated actor on the client, you got your solution.

#

@wet tangle Depends.

#

Did you package for Shipping or Dev?

faint dock
#

so i use the construct script to get the data from the datatable in the actor ?

#

i try to avoid using the construct script im gonna spawn alot of these actors looking up all this data is probably performance costly

ebon bramble
#

Hey all I'm doing something weird in my multiplayer architecture ... Is this normal?? Basically I have an actor blueprint called 'unit' and it's the base of any unit in the game, NPC or player. I realized that giving each unit an Owner that's a Player Controller (that's built in natively to actors) IS NOT sufficient to keep track of which 'player' controls that unit. Why ??? Well...

#

Because the engine uses that native Owner variable to control how data replicates and so if I want a unit to belong to a player but actually be 'network-owned' by the server for rep purposes, I need an extra variable of course. One called 'player instance' or something, like an alternative player owner variable on each unit. My own custom struct.

#

Adding fuel to thr fire, I need there to be a 'neutral player' and it seems impossible to create a new player controller that isn't actually connected to a client. Further reinforcing the idea that I need a second variable for tracking unit Ownership by a player

#

So now my units have an Owner (only for network and possession purposes basically) and a PlayerOwner which is literally just a custom struct, used for all the game logic (to tell who is allied or enemy , what the player name is, etc)

#

This approach seems messy so I wonder if I'm doing this right

winged badger
#

whats preventing you from using only OwnerPrivate, why would you try to use a PlayerController to possess a "neutral pawn" ?

#

and the "team ID" falls fairly naturally inside a PlayerState derived class

ebon bramble
#

Well I'm not using a player controller to Possess a neutral pawn, only to 'own' it . So that the PC has a team ID in it and I can use it to compare to for AI realising if something is Ally or enemy

#

I tried to make a neutral PC though with Create Player and it returned null 😐

#

Fundamentally my two big issues are 1) How can I create a PlayerController for the 'neutral' player so it can own certain actors, NPCs for my custom logic purposes (have a teamID etc) and 2) If i have an actor that is 'owned' by a client player, how can I make the server have absolute authority of it in terms of the network replication? (some sort of ROLE setting, ..? )

thin stratus
#

create a PlayerController
You don't create PlayerControllers by hand.

#

I don't get this part:

I realized that giving each unit an Owner that's a Player Controller (that's built in natively to actors) IS NOT sufficient to keep track of which 'player' controls that unit.  Why ??? Well...
Because the engine uses that native Owner variable to control how data replicates and so if I want a unit to belong to a player but actually be 'network-owned' by the server for rep purposes,```
#

Why would having the PlayerController as Owner stop you from the normal replication process?

#

Also what is a "Neutral" player?

#

An AI?

#

@ebon bramble

#

Also CreatePlayer is for Splitscreen Players

ebon bramble
#

Oh it is? Okay here's the deeper dilemma. It seems like a common thing .. I'm spawning NPC units and they need to each get a TeamID

#

And they need a player-owner-name of 'Neuteal Hostile' somehow so that when they kill a player, the chat log will show 'X killed by neutral hostile'.

#

So in my personal opinion, since my PC class already has a name variable and a team ID variable, it makes the most sense to spin up a new PC for 'neutral hostile' and make that own the NPC actors. However I am indeed seeing that it's not really possible based on how the engine wants each PC to have a network-related client

#

So what do I do 😐

#

(in my mind I'm thinking about starcraft/warcraft games where you can have 'players' that are NPCs like neutral passive and neutral hostile'. )

thin stratus
#

The problem is you storing PlayerRelated data in the PC

#

It belongs into the PlayerState

#

AIControllers would own Neutral AI pawns

ebon bramble
#

Also having the PC owner of an actor be a client means the client is the authority of it's location and rotation... Not good

#

Ooo

thin stratus
#

Also not true

ebon bramble
#

In the player state, hm

#

Oh really ?

thin stratus
#

PC owner doesn't have anything to do with Location and Rotation authority

#

In UE4, the Server has the Authority at all times.

#

At least over replicated actors that is

ebon bramble
#

Oh. Interesting okay hmm I think I just had something wrong with a role then because here's how I came to that false conclusion lol:

thin stratus
#

PlayerController, as well as AIController, represent one single player.

#

Either Bot or not.

#

PlayerState holds information, such as Name, TeamID

#

Or even "bIsABot"

#

TeamID is the only one of the three you have to add yourself.

#

Having a PlayerController as Owner if a Spawned Actor is very much wanted, to be able to call RPCs over it.

#

AI Controllers only exist on the Server, so they don't matter anyway.

#

The only thing you need is setting "bWantsPlayerState" in a C++ Parent of your AIController

ebon bramble
#

Ooohh that's super helpful

thin stratus
#

Cause that is, afaik, not exposed to bps

marble depot
#

hi, quick question. when a player joins the server, for a fraction of a second the camera is at 0, 0, 0 and then it teleports to where it should be. how do we fix this? it’s not a pleasant sight

thin stratus
#

With hiding it behind a loading screen

ebon bramble
#

You are a godsend

marble depot
#

a proper fix would be cool as our setup isn’t a normal 2d interface

#

and that time isn’t constant. it sometimes is longer and sometimes it’s shorter

thin stratus
#

You can try to hide it via the CameraManager

#

But in general, the 0,0,0 is the PlayerController

#

Sitting there

marble depot
#

yeah

thin stratus
#

And the time that it takes to snap to your pawn

#

is the time it takes for the Pawn to spawn and replicate

#

So the time between that, you can't have the camera at the pawn

#

You can force it to look at the moon, stars, floor, wall, middle of your map etc.

#

But you will have a different location

#

Than when you possess

#

The only way to more or less fake it, is knowing where the pawn will spawn

#

And hardcode that location

#
  • camera offset
marble depot
#

we know where the pawn will teleport

#

we teleport it to that location as fast as possible

thin stratus
#

Then make a custom PlayerCameraManager

#

Set that in your PlayerController

#

(it's a dropdown in the settings of it)

#

And override teh BlueprintUpdateCamera function

#

Check if the Controller has a pawn

#

and if not, set it to that wanted location

#

Otherwise don't do anything

marble depot
#

alright thank you so much for this info. i’ll pass it to the guy responsible with this stuff

ruby meteor
#

How do I correctly set ownership to a possessed pawn? The pawn is the default character, everything works fine before possessing this actor here, but if I possess the inital pawn again, things like "replicate to owner only" or "create widget" don't work anymore, it appears as if the players controller isn't the owner of the inital pawn anymore

jolly siren
#

Does anyone know why spectator rotation updates would be a few frames behind location updates?

thin stratus
#

@ruby meteor Just calling SetOwner is fine

#

But you can't call RPCs on a non-client owned actor

#

Maybe that's your problem :P

gusty lily
#

Is there a way to isolate for instance a sound made by server player in a listen server game? I’m trying to get a sound replication system happening which includes instant local sounds for clients alongside multicasted sounds that exclude the calling client. That all works, but the jump sound called by client seems to be sneaking past β€œis server - true, so I can’t avoid doubling up on jump sounds for the client player. Thanks!

thin stratus
#

IsLocallyControlled

#

Or IsLocalPlayerController

#

To filter the local players @gusty lily

#

Is "IsDedicatedServer -> False" then "SwitchHasAuthority" where only Remote should play the sound.
And then further filter via the stuff I just posted.

gusty lily
#

thanks eXi. I'll have a play with those

scenic raven
#

This must be a common question but I can't find anything: why do I get warning like this when running standalone server in the editor? LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)

#

I'm wondering if it might be related to other problems I'm having πŸ˜ƒ

gusty lily
#

i thought the editor was not capable of anything more than a lan connection? not too sure tho. it can't use subsystems? not exactly sure but that might be a place to start

bitter oriole
#

Editor does not have OSS, yes.

#

The warning is harmless

#

Well, it tells you there is no online support

jolly siren
#

What network conditions do you guys use to simulate an average connection?
We have pktlagvariance but that is for continuously unsteady connections. Most real connections are steady with rare large spikes

bitter oriole
#

I'm not there yet but people use clumsy for that.

jolly siren
#

Yeah, I have that too. But it seems to be lacking an option for spikes too

#

Unless it is throttle

#

I guess it could be that

#

Throttle, block traffic for a given time frame, then send them in a single batch.

bitter oriole
#

I just test with 200ms ping myself (round time trip, so PktLag 100) with lots of variability and I figure things should still always work fine, with movement rollbacks of course

#

TBH, even running local netplay on two machines result in many interesting cases

jolly siren
#

Right, we always end up with different real world results tho

#

Because it is hard to simulate a realistic network with the options we have

bitter oriole
#

I actually develop with a fixed 100 ping that's hardcoded in my project settings so when it works, I know it's not a complete joke

#

But yeah I haven't been into real-world testing yet.

jolly siren
#

Right, yeah that is a good way to develop

bitter oriole
#

I figure when I get playable builds, I will get some friends to actually play, once a week or something

#

Just to confirm all works well in real-life

winged badger
#

i have an slightly defective wireless network card, its awesome for testing hostile conditions πŸ˜„

bitter oriole
#

I also keep an old Surface tablet that can run games at 10fps over Wi-Fi as a listen server, great for worst-case.

winged badger
#

it downloads just fine, but its upload is about 20% effective, packet loss for everyone

fleet raven
#

a spike thing would be a nice addition to the latency simulation we already have in unreal

#

you can actually manually simulate a spike since 4.22 (?)

#

net.pktlossburst or something like this

#

New: Added new "net pktlossburst=x" debug console command. It will drop incoming and outgoing packets for the next x milliseconds and is particularly useful with the "setbind" command to debug issues that only occur under packet loss.

bitter oriole
#

Nice

fleet raven
#

also helps to set PIE to always use 200ms latency with some variance and loss

chrome bay
#

ooh. Nice find

#

Apparently that's in 4.21 already according to sauces

ebon bramble
#

Yo @thin stratus thanks for the help you are right I'm refactoring my code so I use PlayerState for all my player data and they can either be linked to an CustomAiController or a CustomPlayerController . Perfect! I realized something tho, the bWantsPlayerState bool is actually exposed in blueprints in 4.20 and higher πŸ€—

#

So it's even easier

tawny haven
#

What do you think about a php master server?

pallid token
#

Is there a way to check whether a game exists and an IP address?

fleet viper
#

and everytime the char crouches it should get launch forward

median elbow
#

where can i find more resources on replication drivers and graphs? i'd like to make a custom replication graph that is not based on spatial partitioning

#

it would be nice to have some more details around maybe the driver or something. the video talked a lot about the grid based graph and fortnite, and that documentation is too high level

marble depot
#

hey does anyone here know how to run multiple steam dedicated servers on the same linux machine at once? i've tried changing the server port and queryport, as suggested by the last reply on this thread: https://answers.unrealengine.com/questions/787258/how-can-i-run-multiple-instances-of-steam-dedicate.html, but it's not working nevermind. seems the order of the flags matters. -port -queryport doesn't work, where as -queryport -port works. nevermind 2. now it works both ways. probably was just a network fuckup.

fleet viper
#

@rare gyro how did you fix it?

#

but when im thinking of it i didnt set a custom movement velocity im just setting the max walk speed variable and when crouched im launching my character forward (Current velocity * LaunchForce)

fleet viper
#

ah thanks a lot!

candid inlet
#

I have an issue with replication on a Character BP. All players that are clients can see eachothers name, gender and gear slots. However, the problems lies with the clients not being able to see the server's name, gender and gear slots. I can't really see what I'm doing wrong here

wet tangle
#

I tried both and both of them dont have any overlays and it doesnt seem that it can find the steam subsystem

#

it only works for standalone

potent prairie
#

@fleet viper I just upgraded to 4.22 and suddenly I'm getting that movement lag issue, didnt happen in 4.21.2 so it might be a bug

#

let me know if you fix it

potent prairie
#

I'm actually getting massive desync issues since I upgraded to 4.22. Ping is low like 7-10, but insane skipping/hitching for clients

#

I have no idea how to figure out why, since my 4.21 version is identical but not having this issue. Where do I start for tracking this down?

thin stratus
#

First thing: Try to recreate the issue in an empty project.

#

Cause that rules out two things: Is it your code, did it happen through upgrading OR is it an engine bug?

#

If you can't reproduce it, chances are high you have a bug and it only now visualized.

potent prairie
#

okay, ill work on that for a bit. might take awhile since im pretty far in development though but maybe something broke in the conversion to the new engine

upper raptor
#

For a multimap game where the host can choose the game to create, is it possible to use blueprint to search and find what is the map used in games that are currently being hosted so that you can choose which type of game to join?

tardy cosmos
#

As far as I know, you need a plugin to achieve that. With the current engine bp is not possible (not sure anyway)

bitter oriole
#

You should be able to use the online subsystem to advertise which map is hosted

#

SessionSettings->Set(SETTING_MAPNAME, FString("NewMap"), EOnlineDataAdvertisementType::ViaOnlineService);

#

NewMap here would be GetWorld()->LevelName or something

#

Advanced Sessions plugin probably does it

#

@upper raptor This might even work in BP right now πŸ˜ƒ

upper raptor
#

Alright I will check it out!

tardy cosmos
#

I was wondering, with the Advance Session plugin, the OnSessionAccepted event it is fired if I use the steam overlay to Invite a friend? (right now I think it has not fired but it could be because I do not have the game in the steam workshop, so maybe cannot recognize it ?)

graceful cave
#

@potent prairie did you ever change any of the client rate settings under Engine/Config?

#

that caused that same issue for me when upgrading before

#

easy to skip over those folders when upgrading since its not under source

potent prairie
#

@graceful cave Okay Ill check that out because I get the same problem with default thirdpersonchar and basic controller i setup in a default project

#

which is a relief knowing its not my char/controller scripts

#

the client rate settings are the same from what I see.

#

its like the server updates clients every 1500ms is what it feels like

#

feels like the client has insane ping

#

all im doing is pressing left, right, left, right

#

im not actually running off the screen at all

#

its just updating so slowly to the clients

clear copper
#

I want to do a UI that shows the health of the other players. Whats the best way of doing this? I was thinking of getting the players array from the gamemode

#

but then how do i tell each player's ui bindings which icon is for which player

#

because gamemode is only on the server

#

@thin stratus im reading your guide and i know that GameMode is not replicated to the clients, its server only. But it has the Players array ofall connected players that is replicated. So how do you access that replicated variable from the client if the gamemode doesn't exist?

#

exist on the client*

thin stratus
#

@clear copper The GameState has that array

#

Not the GameMode

clear copper
#

oh shit

#

you're right, i'm dumb

#

its an array of player states

#

not player controllers

scenic raven
#

It's related to replication of something

#

as you can see halfway through I click the play menu (it doesn't show sorry) and when I de-select dedicated server the bug disappears

#

what should I look into to solve this?

#

maybe I am executing some code just serverwise while it should be executed on both client and server?

clear copper
#

the length of the PlayerState's PlayerArray is always 1 no matter how many players i connect

scenic raven
#

@clear copper do you mean GameState?

clear copper
#

ugh

#

yes

#

lol

#

So i want to add a UMG element for each player connected

#

which works fine if i use a variable for the number of players and change it

#

so its not a umg problem

#

but when i get the gamestate

#

then get the player array

#

the length of it is always 1