#multiplayer

1 messages · Page 434 of 1

lean river
#

if not im sure state wasnt replicated when owner replicated

#

like a weird workaround but works

twin juniper
#

Anyone here have experience using the Steam Inventory system?

rancid current
#

Yo guys! Does anyone know why when I play my level (with clients) first 3 seconds my inputs are like blocked, replication not working well? (if you look at the video, i'm moving my mouse in all direction but most of the time it works only in 1 direction or non at all, and if I move my character, if i can, i get moved back to inital start point, this happens only in the first few seconds after pressing play) is the server taking so long to start up or whats the issue? thanks https://gyazo.com/95c14c37a874da467ad2a12223b4403a

thin stratus
#

Gettting moved back means that you get corrected by the server

#

Does this also happen for the Server player?

#

Seems like your Movement is simply only turned off on server side

#

@rancid current

rancid current
#

@thin stratus when I play as server I don't get corrected but the movement doesn't replicate for the client for the first 3 seconds or so, after that it works fine

trail dragon
#

Probably too much stuff being replicated at the start and the player doesn't have a high enough priority to get through?

thin stratus
#

Can also be

#

Do you replicate a lot at the start?

slate portal
#

Does anyone know any resources on where i can start making my game multiplayer?
I was tasked to create a multiplayer game with the server hosted on a cloud platform (so i'm thinking of using AWS), however i have almost zero knowledge on networking. Where should i start and end?

thin stratus
#

Can you create Singleplayer Games with UE4 already?

slate portal
#

Yep, i just don't know how networking works

rancid current
#

@thin stratus I dont have much code yet so no i don't replicate much, this has been happening ever since the start i think

thin stratus
#

Two things are important for multiplayer:

  • UE4 Framework
  • Multiplayer terms, such as Replication, Ownership, etc.
slate portal
#

Alright, where do i read about these terms?

thin stratus
#

If you are already familiar with the concept of GameModes, PlayerControllers and Pawns/Characters, then just grab my Compendium

#

It's pinned to the channel

rancid current
#

an amazing Compendium ♥

#

xd

slate portal
#

Oh my god thanks for pointing that out

thin stratus
#

@rancid current Does this happen if you create a fresh GameMode

slate portal
#

Thanks a lot ❤

thin stratus
#

No biggie

rancid current
thin stratus
#

Just trying to see what part of your code could cause that

#

If the GameMode class is basically empty, then that is fine

#

The other part would then be your Character

rancid current
#

yep didn't get to any spawning part so its all basic

thin stratus
#

If you use an empty, fresh Character, does this also happen?

rancid current
thin stratus
#

That ChargingPush logic seems weird

#

Where is that coming from?

#

Can you make sure that this is not causing any issues?

rancid current
#

ay let me disable it but i think i had the issue way before i added that

thin stratus
#

Well if you have an empty GameMode and the only custom class is an empty character, then I don't know atm.
Next thing would be testing a new nearly empty level

#

If that also fails, a new empty project :D

rancid current
#

it'd be funny if its an engine bug as I just updated to 21.1 for this project xD

#

okeh tested without the charging push code, still the same results, let me make a new project and i will see how that goes, gonna go have lunch first, thank you @thin stratus !

naive stump
#

Guys,
do I need to configure my router for dedicated server to work over steam?
Adding inbound and outbound rules doesn't helps

knotty frost
#

Who else has had the pleasure of encountering CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?) in shipping?

#

It started with 4.20, we are currently on 4.20.3, and after the client is dropped by the server for this issue, a UMG widget in the main menu fails to load correctly and leads to a PackagesWithNodes crash

#

It could just be that we only started encountering the warning in 4.20, it seems to be a fairly old warning

trail dragon
#

I think that's been around forever. It means that communication between the client and the server isn't happening properly

#

For player movement each frame your movement input is totaled. This is sent to the server, and also executed locally. The server looks at your movement input and applies it to the server copy of the actor as well. Then it sends back your new position - if the position is too far from what the server sent then you're teleported to the new position and any moves you've made locally since then are replayed from that new position

#

So there's a maximum size for the buffer (96 apparently) before one side decides that something's wrong and that messages aren't going through and back.

knotty frost
#

yep that seems to be it, it must be indicative of something failing somewhere else that we are only now noticing, like the connection being flooded with RPCs

#

still not sure why the upgrade to 4.20 has lead to a widget getting stuck in async load when being thrown back to the main menu

jolly siren
#

Yeah it's a red herring

jade gazelle
#

I see that error occasionally when I’m testing locally (non-shipping). Never been booted by the server or anything though. It seems to just pop up occasionally... I thought it was fairly normal haha but now I’ll have to look into what’s causing it

halcyon abyss
#

Hey guys, very quick question

#

does APlayerState persist across seamless travel?

jolly siren
#

They are destroyed and recreated

#

Values are copied

halcyon abyss
#

@jolly siren Thank you so much

#

so even in singleplayer context

#

... when i use open Level

#

would I have the playerstate values copied over ?

trail dragon
#

Try it and find out ^.^

#

It calls ClientTravel internally but that might still invoke a Browse (which is a hard load)

rose egret
#

how do I get the port that UE4 server listened on successfully?
what happens if the port specified by command line (-port=N) is already taken. will UE4 fin a port herself? or fails?

versed socket
#

@rose egret Think it will fail. You can define the default port in your DefaultEngine.ini file:

[URL]
Port=7777
glossy moth
#

for fire rate, would it be better to do set timer by event/reset loop or do once/delay loop?

#

for efficiency

grand kestrel
#

Ours is a bit more complex than this but ultimately we use a timer

#

As in GetWorldTimerManager.SetTimer(FTimerHandle...

#

Don't really know what the deal is with delay, I only use it when prototyping

#

Any code that warrants that kind of functionality I do in C++ anyway

glossy moth
#

yeah i do it in blueprint

#

but youd say event timer and event reset?

thin stratus
#

@grand kestrel Delay is strong if you enter a 0 :P

#

@glossy moth You want to use Timers, yes

glossy moth
#

cheers @thin stratus

jade gazelle
#

Other than adding an arbitrary delay of 5, 10, whatever seconds, is there any way to know the moment all values have been set up and are currently replicating to a client on login?

#

I have so many different things being applied and replicated on initial launch that it’s difficult to try and implement checks for every single one before allowing gameplay / removing the loading screen

#

Probably wishful thinking and I’ll just have to figure it out manually, but hoping I’m missing some magic button haha

thin stratus
#

@jade gazelle In C++ you can easily just map the same OnRep to all these values

#

You can then, in that OnRep, check if all values are what you expect them to be

#

Otherway would be making sure you send everything at once

#

Via a replicated Struct for example

jade gazelle
#

Hmm. I don’t think sending everything as once is a viable option as there is just so much. Full inventory retrieval, player location, player stats and attributes, player equipment models, player known abilities, etc.

glass inlet
#

Hello I have an question I'm starting to lean multiplayer

#

I' making an interface for interactable object

jade gazelle
#

Right now I have actor components for each “Section” ie inventory, abilities, but each sort of does their own thing on begin play

glass inlet
#

with an interface and the fps template so my event is working correctly but destroy picked up actor not on client and it's working using different trigering method like overlapping or fps projectile

#

My actor is set replicated, movement and net load on client too

jade gazelle
#

I think I’m just going to have to implement a final check for each major component and then once all checks pass, enable gameplay

calm plaza
#

Yo, friends. Whats your preferred file sharing method for testing? My directory has gotten to over 50G and I'm trying to find the best/easiest method of getting updated builds to testers. Thoughts?

thin stratus
#

Well, if you plan on using steam, pay the 100$ and use steam for sharing

severe nymph
#

@rancid current did u figure it out

#

It looks like in that screenshot your panels are actors

#

With a static mesh component

#

You aren’t using the add static mesh component node in construction script or by cpp constructor by chance

rancid current
#

Nop not yet ;-;

#

Nop

severe nymph
#

Just an actor with a component in it then

rancid current
#

Yep peepo_cry

severe nymph
#

Are you logging warnings or errors like this?

#

Something is definitely wrong with 4.21.1 net load on client actor meshes

rancid current
#

I tried empty pawn, diff game modes, New Controllers but no sht still sane ussue but only on that project, i made a new one and had no issue

#

Yeah i havent checked the warnings actually

severe nymph
#

4.19.2 doesn’t have any issues as far as I can tell

#

But a fresh 4.21.1 project is warning all over the place

#

I’m not using dedicated server im doing listen server but still

rancid current
#

But yeah could be just something engine wise

grand kestrel
#

@thin stratus is it plausible to do that even if you don't use steam simply to have a way to distribute test builds

#

$100 is nothing compared to the cost of developing a solution

worthy wasp
#

for widgets in a LISTEN SERVER mode - this is failing for me in PLAYTEST (NO single process testing)...... How am I to successfully cast to the pawn of the SERVER client in Listen Server model?

https://puu.sh/CoU8B/74bac4a6ec.png

#

funny thing is - i draw this same widget just fine from the same class....

thin stratus
#

@grand kestrel Well, you gotta take into account the 30%

#

Just for the dev phase, where you don't earn money it's okay I guess

grand kestrel
#

Will look into it, thanks

trail dragon
#

If I want to communicate a cosmetic event from my client ("hey I'm interacting with this object") , it should be:
Client -> Server function on Owned Player Controller -> Call multicast function on object, yeah?

#

That should safely execute the function on that instance of the object on all connected clients?

#

@worthy wasp that should be fine

worthy wasp
#

@trail dragon - the problem turned out to be latency with networked games & framework timelines..... adding Mike Allar's DELAY SPAM underneath the cast fixed this... its a safe way to ensure the cast goes through...... this is when doing things on CONSTRUCT however..... I've grown accustomed to running a custom constructor that i call after CreateWidget() has been fired. which circumvents the need for this DELAY SPAM as shown below:

https://puu.sh/CoW3o/5e12413612.png

#

i didnt think of this until a co-worker brought up the idea of the pawn not being possessed at the time of this creation... which triggered the idea 😃

#

FYI - this should ONLY be used on classes you KNOW FOR SURE are going to be valid casts... otherwise this is a deathtrap for crashes/infinite-loops

trail dragon
#

Oh

#

Yeah you're right

#

I was thinking you were casting the owning Player Controller

#

Not the controlled pawn.

#

iirc the owning player controller is always valid in a widget (at runtime)

worthy wasp
#

word - thanks 😃

trail dragon
#

If your UI relies on the pawn being valid, you can catch the OnPossessed event iirc

worthy wasp
#

i stand corrected in a sense too.... at the time of Pawn::Possessed() - i ran a custom init funct on my widget that was casting to OwningPlayerPawn - which failed.....

#

i still had to do the 'Allar trick'

drifting plank
#

Official doc and cedric exi's compendium ;)

keen thorn
#

@twin juniper take a tutorial lesson

#

@twin juniper multiplay in ue4 is rather easy, fun to make

naive kite
queen bay
#

Guys, is it possible via BP to get some infos about a dedicated server with static ip?
Find (advanced) Sessions finds a session, but doesn't return any session info :/

thin stratus
#

Not via StaticIP

#

Find Session would need you to register a session first

jade gazelle
#

Is there any plug-in or fix for tmap replication? Just noticed I’m getting a bunch of errors during gameplay when passing structs that contain tmaps between client/server. Hoping I don’t have to go through and redo everything

meager spade
#

tmaps are not safe for replication

#

we had to make it a struct with TArrays inside

#

you can use FFastArraySerializer aswell

queen bay
#

Thx, Cedric

jade gazelle
#

@meager spade I guess I’ll just start replacing the maps with nested structs. Oh well, better I caught it now rather than later I guess

gloomy sedge
#

Hey, I'm using Advanced Sessions to create a server for players to join. Within this game i want the ability to use a Slot Based Inventory. I have both of theses things working, but just not working together. At the moment i have it so one player is the server and one is a client which works for just walking around etc. But when i try and use the inventory system, the UI pops up, but i cannot interact with it on either Server or client. Can anyone help me out?

jolly siren
#

UI and multiplayer aren't really directly related. I would try #umg depending on how your ui is setup. Did you change your input mode to either GameAndUI or UIOnly when you popup your ui?

gloomy sedge
#

I set the input to Game Only when i close the UI but do not set it to UI only, I just Disable movement when the Ui i opened

jolly siren
#

Okay, yeah you need to either change it to UIOnly or GameAndUI when you show the ui; depending on the behavior you want

#

This isn't multiplayer related tho, so if you have followups please use #umg or #slate

twin juniper
#

players can join host lobby but only the host can get into the game, players are knocked back to the home lobby screen. it works with multiple clients on standalone editor but not after packaging and uploading to steam. Anyone know what I might need to do?

meager spade
#

im getting some weird issue with my character animations

#

when running listen server, its all fine, dedicated server the animations seem off like its not updating the variables properly

keen thorn
#

@meager spade u gotta set the Update Bone Transform to always update

meager spade
#

yeah thats set

keen thorn
#

@meager spade then its weird, got video?

meager spade
#

something else is wonky but it works fine in listen server

#

sure

#

dedicated server

#

i mean listen server

#

and thats dedicated server

#

@keen thorn

#

i wonder if its the multicast not working properly for dedicated server

#

or its not being replicated properly

#

whoops i never set the component to Replicate

#

so its replicated vars were never being replicated out

#

do have another issue tho

#

remote it looks fine, local its jittering

formal willow
#

Why is it that all multiplayer games use separate servers? instead of having all of the players* on the exact same map/server? And obviously the map would be big enough for the game not to be overpopulated. Is there a limit to how many players can be on the same server? If you can have millions of players playing a game on separate servers, you should probably be able to have 500K on the same server. No ?

fossil spoke
#

Think about the cost of 1 player on a single server, then multiply that cost by the number of players you think you want. You will quickly find that Server performance and network performance will degrade rapidly

sharp pagoda
#

Uh no, not at all.
1. Not every game is a mmo?
2. The shear amount of bandwidth that the server would need is literally insane to support that many connections. (Impossible with modern tech)
3. If you somehow solved the bandwidth issue, you're still going to run out of sockets on the hardware.

grand kestrel
#

Its because servers are now high core quantity / low core frequency and UE4 is poorly threaded so runs on this single low powered core for the most part

sharp pagoda
#

Meant to include the compute resources needed too but hit enter too early

fossil spoke
#

If your asking this kind of question you certainly need to do more research into performance costs and overhead.

#

There are so many factors that govern the limitations of a Server and a Game trying to run on it.

formal willow
#

i mean why cant you just just more server power? whats the issue? either way.. whats a safe amount of players as well as AIs on the same server?

sharp pagoda
#

Did you even read what I wrote?

formal willow
#

yeah dude.. i dont get it

sharp pagoda
#

Do you know what bandwidth is?

trail dragon
#

You can juggle one ball with two hands right?

knotty sequoia
#

TL;DR we dont have limitless resources for single units

trail dragon
#

So why not juggle 500 balls with two hands

sharp pagoda
#

That's a good analogy ^

knotty sequoia
#

^

grand kestrel
#

I like that one

#

I bet you though, somewhere, there is someone who can do it

#

😛

sharp pagoda
#

500k concurrent connections? Impossible

grand kestrel
#

500 balls!

sharp pagoda
#

Not with a single server computer

formal willow
#

i've seen what server rooms look like.. just use more of them.. why cant that work?

trail dragon
#

That's... that's literally what they do.

fossil spoke
#

Juggling 500 balls with more hands isnt as easy as you think

grand kestrel
#

Yeah, I mean, do octopi even juggle

trail dragon
#

Each one of those boxes in that room is a separate server

grand kestrel
#

I guess we can throw out "SpatialOS" here but

sharp pagoda
#

That's what server rooms are for. They have more than one computer

#

You're talking about a single computer

formal willow
#

yeah.. when i said "servers" i meant the entire room not just one unit

#

one server = the entire room

#

obviously

grand kestrel
#

OK well, UE4 has no ability to run a single world across servers out of the box

#

And no, one server is 1 computer

fossil spoke
#

No thats not obvious

grand kestrel
#

You should be more specific

knotty sequoia
#

1 Server = 1 Physical Machine

sharp pagoda
#

"Why is it that all multiplayer games use separate servers? instead of having all of the players* on the exact same map/server?" Totally implying one computer

#

Yes a server == a machine

formal willow
#

yeah i know that but obviously its impossible to run 500K players on a single computer

knotty sequoia
#

a server rack will hold multiple, and there being many racks in a room

fossil spoke
#

Then why didnt you say a Server Room or something.

#

Or "Multiple" servers

formal willow
#

i didn't know how to say it lol

#

i hopped you'd get it

fossil spoke
#

...

sharp pagoda
#

So the new answer to your question is latency coverage and just not having big enough server farms.

fossil spoke
#

Monetary cost is also a major factor to consider.

formal willow
#

if you do have big enough server rooms.. cant fix the latency issue?

sharp pagoda
#

No

fossil spoke
#

Electrons can only travel so fast my friend

sharp pagoda
#

Do you know how packets are routed?

formal willow
#

why not make a custom server that has all of the CPU/GPU power on one motherboard then?

grand kestrel
#

We are talking in terms of UE4 right? Not in general?

formal willow
#

i dunno

grand kestrel
#

Because it is a complex issue sharing information between multiple servers running the same world

knotty sequoia
#

A truck can carry so many apples in 1 day from point A to B. you can make the truck 20x bigger but it still takes as long to travel to and from the points

grand kestrel
#

That's effectively what SpatialOS does

#

Wont be cheap, though

formal willow
#

i said 500K but not really needed that many.. what about 10K players against 10K AIs.. could that work?

grand kestrel
#

I think someone asking this question should be more concerned about people even playing their game, let alone player counts high enough to utilize it, to be very blunt

sharp pagoda
#

Ok what are you talking about now? One machine or a server farm?

formal willow
#

just wanted to make a game guys..

fossil spoke
#

You need to be more specific about what your asking exactly

#

Making games isnt easy mate.

knotty sequoia
#

getting players of that scale is even harder

grand kestrel
#

On one computer, your limit is going to be ~80-100 if you're very good at optimization

formal willow
#

yeah but what about servers?

grand kestrel
#

And when you talk about multiple servers, how are you going to deal with the tech that these servers use

sharp pagoda
#

Don't try and make a game suited for 10k players. You will be very disappointed. You need an entire engineering staff for that scale

fossil spoke
#

Why do you think Fortnite struggled so hard to support 100 Players on their BR mode.

trail dragon
#

You realize it is a challenge to put 100 people in a single level right

#

With no AI

fossil spoke
#

Epic, the makers of UE4 did major networking changes in order to support just 100 players

trail dragon
#

If 100 people are in a server, if I push a button, my action has to be sent to 99 other people.

#

So if 100 people are in the server and they all push 1 button each that's 100*100 (10,000) updates that have to be sent.

fossil spoke
#

It takes teams of hundreds of people to maintain a game with that number of players, look at WoW for example.

#

It took them over 10 years to make that game.

trail dragon
#

Now you want... 100k people? 100k people all pushing one button at once means 100k * 100k = 10,000,000,000 updates.

#

Does that sound at all reasonable :p

formal willow
#

and you cant have 10K AIs all on one computer (if you made the game single-player) :/

#

pff

#

forced to make specific kinds of games that are just no good

sharp pagoda
#

Judging from what you've said here, you are way under prepared knowledge wise to take on a task like that

fossil spoke
#

Adapt and overcome mate.

formal willow
#

i just have no exp with servers

#

i mean.. minecraft can handle 1000+ players on one server

knotty sequoia
#

no

trail dragon
#

....what

knotty sequoia
#

it cant

formal willow
#

or no.. actually was it 100+ ?

#

pff

knotty sequoia
#

most MC servers die at the 50 mark

sharp pagoda
#

Just because one game can do this and that doesn't mean you single handedly can realistically achieve the same feat.

formal willow
#

yeah now i remember

knotty sequoia
#

and what Xenonic said

sharp pagoda
#

WoW can support how ever many players? Why can't I do the same?

knotty sequoia
#

that was MC, a well optimised game by a respected and profitable studio

#

tbh best example would be Planetside 2

#

look at the freaking power they need for that

fossil spoke
#

SupCom?

knotty sequoia
#

or that

#

but if we talk playercount, PS2

trail dragon
#

Uhh SupCom absolutely falls apart in multiplayer

fossil spoke
#

Exactly

#

Thousands of AI units, not easy to network that shit.

#

His expectations are completely unrealistic due to his lack of knowledge in the field.

formal willow
#

is the 100 player limit getting any better tho? There just shouldn't be a limit pf.

naive kite
#

@meager spade Having the same problem its so fucking annoying

trail dragon
#

@formal willow Why can you not juggle 200 balls

#

If you can juggle 1 ball

sharp pagoda
#

"There just shouldn't be a limit" I don't think you took away anything from this conversation

trail dragon
#

There's no hard limit on how many balls a human being can juggle right

naive kite
#

like i have a steady workflow with gOOD MECHANICS

#

but

#

it jitters

formal willow
#

so servers are getting better only when cpus, gpus etc. get better?

sharp pagoda
#

Don't expect to have 10k+ player servers in the next 10 years

formal willow
#

you never know 😃

grand kestrel
#

I mean, we probably do

#

Its common when you're starting out to think you know what makes a fun game

#

Lots of gamers think the same

#

I think we'd all make better games if we could simply conjure the ideas that pop into our heads, too

naive kite
sharp pagoda
#

@naive kite The movement speed on the client is probably != the server side movement speed and you're getting tons of corrections.

#

Increase the packet simulated lag. If you're able to walk for longer periods of time without jitter then that's why

naive kite
#

@sharp pagoda that is our issue do you know any specific fix to do this

sharp pagoda
#

Uh yea make sure they are the set to the same walk speed in the cmc?

naive kite
#

we are working with blueprints

sharp pagoda
naive kite
sharp pagoda
#

Remove those IsLocallyControlled checks, they do nothing

#

Yea no that's not how the cmc works

#

Read the articles I linked and you'll see how to properly do it.

naive kite
#

@sharp pagoda you are talking about a Cpp perspective

#

we are using blueprints only

#

awesome info though

sharp pagoda
#

Well you'll have to make your own character movement component in bp then 🤷

naive kite
#

@sharp pagoda what do you mean by that?

sharp pagoda
#

The cmc uses prediction heavily, which you can only modify by writing c++. So you'll have to make your own movement component in bp to properly do what you want.

opaque forge
#

Is it possible to send an FArchive (serialized object) over the network in a multicast function?

meager spade
#

if a function is Server only

#

and i want to update variables locally only

#

do i do a client call?

sharp pagoda
#

@meager spade Are these variables replicated? Can you also give a little more info about your specific use case?

meager spade
#

so it comes from an AbilitySystem call

#

when a tag gets applied

#

this call is Server only

#

but i only want to update the variables on the locally controlled version

#

its for WalkSpeed etc

#

in the CMC

meager spade
#

or apply them on the local client only, or would it not hurt multicasting the speeds?

umbral adder
#

Yo anyone know how to use the ue4 SDK and make a DLL injection hack? Pm pls

meager spade
#

wow you are really asking how to hack the engine in here?

#

im pretty sure the UE4 SDK is not allowed to be spoken about in here

umbral adder
#

For multiplayer

#

Games

meager spade
#

but your asking how to use software which gets information from pre-compiled binaries

umbral adder
#

Eg, ut only for educational purposes

fleet raven
#

the thing comes with a guide, if you can't figure it out, you're not worthy br_thinking

trail dragon
#

Multiplayer games like...

grand kestrel
#

I'm sure there's a sewer somewhere on the internet that answers questions like that

#

UT is already open source go ahead and use it for your educational purposes

#

It's actually an amazing resource even if the code is a mess

trail dragon
#

@grand kestrel I don't know of any software that isn't a mess to be honest

grand kestrel
#

Well .. a lot of ours isn't 😆

#

Some is but we're going to rewrite it properly

trail dragon
#

Can someone explain authority, I'm a little unclear on it based on the compendium.

#

I know it's separate from ownership and I know it changes based on your local role vs the remote role

#

But... where do the roles come from? If I use the SwitchHasAuthority node in the context of say, a Player Controller, if I'm the listenserver client am I the Authority or the Remote when I tie it to a keyboard button press? What if it's a client machine are you Remote?

#

To answer my question, in the context of a Player Controller;
Keyboard Event E -> Switch Has Authority leads to;
From Client: Remote Role. Only executes on the client's copy of the PC. Calling a Server function only runs it on the server.
From Server Client: Authority Role. Will have to test it in more contexts before I fully get it I think.

naive stump
#

Guys, how do I make a dedicated server using steam?

trail dragon
#

What does that even mean

naive stump
#

Or how do I make a session available on the internet on steam?

thin stratus
#

Enable SteamSubsystem in your Project and for a ListenServer Session just call CreateSession

#

For DedicatedServer you need either the Advanced session plugin or cpp

#

Cause you need to set bPresence to false when hosting. The BP nodes have that true by default

#

@naive stump

jade orbit
#

@trail dragon your question about authority, i haven't reached using ue4's networking yet but the way authority generally works on unity is the computer that creates the object has authority for it. when Network.Instantiate is used on a client connected to the server the object is made instantly on the client and eventually everywhere else

#

Unity also has this thing wher ethe server can generate an id owned by the client and then send it to said client and everyone else, to know that that client is in charge of sending the data to the server

#

but yea i dunno if that answers your question completely, and again i haven't ran into any ue4 networking at all

naive stump
#

The problem is I can;t get it to work over the internet

#

I skipped the parts regarding creating sessions and registering server (assuming on that advanced sessions already manages that)

#

It does works for the LAN though

thin stratus
#

Did you check the common issues part of the wiki?

#

What does your log say about the session being created?

#

Does your dedi server start steam properly?

#

You gotta put some more effort into debugging this :P

naive kite
#

lol i am having this same error

#

not able to start a match

#

over the internet

#

Lan is fine

fleet viper
#

hey there! I did a flash grenade for a fps multiplayer project and i cant get it replicate properly any help? All works for the server fine (I'm using listen server) but as the client he doesnt get flashed and the flashed sound gets played on the server but it should obviusly play on the flashed client. Here is some of my code:

#

sorry for the quality

naive stump
#

@thin stratus Yeah I did check the common issues part did it as it was supposed to do

#

the logs are clean, session is hosted

#

*created

thin stratus
#

If you still can't find it, are you using a custom AppiD?

naive stump
#

I do have that as well

thin stratus
#

Can you find the Server through the Steam Server Browser?

naive stump
#

tested it on 480 and my steam app id

#

If you are asking it about under Internet tab in Steam Servers, No

#

@thin stratus

thin stratus
#

Not sure if this was a problem

#

The line 18 to 20

#
/** @TODO ONLINE Server values needed to advertise with Steam (NOTE: Steam expects UTF8) */
#define STEAMPRODUCTNAME "unrealdk"
#define STEAMGAMEDIR "unrealtest"
#define STEAMGAMEDESC "Unreal Test!"
#

Updating these to the custom values for your game might solve part of the issue

#

But I'm not 100% sure if you can easily override #defines

#

One way would be something like this (not tested)

#ifdef STEAMPRODUCTNAME
#undef STEAMPRODUCTNAME 
#define STEAMPRODUCTNAME "customproduct"
#endif 
#

For each of them

#

@naive stump

naive stump
#

#define SPNAME "Operation Overlord"
#define SGD "operationoverlord"
#define SGDESC "FPSMOBA"

#

I have them like his

#

this*

#

They work pretty fine and its not supposed to crash the server just throw a warning

#

@thin stratus

thin stratus
#

I just got told that this probably won't work

#

as the Server file I linked will keep using the old values

#

.>

#

So to modify them correctly, you most likely have to download the source engine

#

modify it, and recompile the engine

#

Steam + Dedicated Servers is still a sh'thole

naive stump
#

I have the Source code

#

Haha

thin stratus
#

Then it's not a big problem for you :P

#

Well you need source for the dedi Server anyway I guess

#

But modifying and recompiling is annoying

#

For 3 variables that could be exposed...

naive stump
#

Like I have been stuck for past 4 weeks

#

Ain't moved a single step forward

thin stratus
#

You can easily create settings for the project settings stuff.
They could just expose shit like that

naive stump
#

Yeah

thin stratus
#

Well try changing that and making sure it fits your settings from the steamworks page

#

That might help

naive stump
#

Went through this aswell

#

everything is configured properly

#

I am using Advanced Steam Session

#

where as the links have there own custom session classes

#

Tried port forwarding as well

#

no use

thin stratus
#

You still need to change these defines

#

The AdvancedSession stuff just extends the stuff you can set in the CreateSession node

#

The defines are from the subsystem itself. AdvancedSession Plugin doesn't modify that for you

#

@naive stump

naive stump
#

they are changed

#

And were supposed to match the steamworks appname and etc

thin stratus
#

Then I'm not sure what else could be wrong. Do you get 0 results when searching?

#

Can't quite recall right now what the exact issue was, sorry

naive stump
#

searching where?

thin stratus
#

@naive stump As said, what was the exact issue again?

sly kernel
#

is there an artist-friendly Blueprint-only multiplayer manual ?

calm plaza
#

Hey, friends. General question: how big of a pain are beacons for Steam Party and Matchmaking? Is this process terribly difficult? How do you guys handle these situations?

calm plaza
#

Also, are beacons fully implantable from Blueprint only?

jolly siren
#

No, there isn't blueprint support for beacons

calm plaza
#

Well thats bad news.

#

is there a way to implement a steam party system without them that isn't funky?

jolly siren
edgy galleon
#

I'm using advanced sessions, if I package the game and open it twice on my pc I can create,find, and join sessions just fine..but cannot find any sessions on a different pc. Is that the normal behavior when not using Steam?

jolly siren
#

over lan?

edgy galleon
#

Trying to find a session outside of lan

jolly siren
#

That doesn't work with the null subsystem

edgy galleon
#

Ah, that's what I figured but wasn't sure 😦

#

so switching to the steam subsystem should find the session if i'm using the test AppID?

jolly siren
#

yeah if you forward the right ports

fluid moon
#

Hey guys, I have a listen server multiplayer shooter, and my Character pawn has a jetpack. Clients who are not the server experience janky jetpack movement, as the AddImpulse is called serverside. Any ideas how to smooth it out for clients?

sharp pagoda
#

Use client side prediction

fluid moon
#

Thanks.

naive stump
#

@thin stratus dedicated server runs only over LAN, not over internet

drifting plank
#

Maybe change the boolean "isLan" in the BP node ?

thin stratus
#

@naive stump That's not really a lot of info

#

What isn't working?

#

It doesn't show up in the server list?

#

Or you don't get results at all?

#

Or you can't connect?

severe nymph
#

This is the video I sent. The editor doesn’t show but linear velocity is no longer sent from server to client when the errors log in packaged game. Also movement base can’t be obtained

#

It’s obviously a regression

#

The second part of the video is how previous engines (4.19.2 in this example) worked

fringe dove
#

what does the PIE dedicated server checkbox actually do, it doesn't launch a separate process right?

#

does it just run a headless server as a new world within the same editor process?

#

and doesn't that mean everything using the UE_SERVER C++ define will get messed up?

normal hatch
#

Hey there community! First of all happy new year! Second. I have packaged a dedicated server from unreal engine and was wondering it what I need and how to upload a build to Amazon GameLift! Thanks!

fossil spoke
#

@normal hatch You should probably read the Gamelift documentation.

#

AWS has a complete YT tutorial Series on working with GameLift and the AWS platform services.

#

Mind you that it is using a Lumberyard game, but the process should be identical.

normal hatch
#

I watched their tutorials but I was using it with unreal engine. What should I do from there because I know I have to get an install.bat file and a vs file but how @fossil spoke

fossil spoke
#

What do you mean install.bat and vs file?

#

For what part?

#

Have you watched this.

#

Its pretty simple and explains the process.

#

install.bat is only used for any Redistributables that need to be installed along with the build product you supply to AWS

normal hatch
#

@fossil spoke so what is the bare minimum files I need to upload my build. I already have the dedicated server exe

fossil spoke
#

Did you package the game as well?

#

You need the packaged game along with the Server executable

normal hatch
#

Ya I did. What should I do from there

#

@fossil spoke

fossil spoke
#

Upload the packaged build as per the Tutorial

#

Seems pretty straightforward mate.

normal hatch
#

Aight @fossil spoke I’ll try that later after the new year! Have a great new year and I’ll let you know what happens. Happy new year!

fossil spoke
#

👍

keen thorn
#

anyone tried spatialOs?

naive stump
#

@thin stratus it doesn't show up in the internet servers list

#

I can connect it in a LAN though

queen bay
#

Guys, I'm testing mechanics on Dedicated Server and my HUD class turned into a rebel.
It suddenly doesn't execute any event (tick or beginplay) at all, it is not valid and it just acts like it wouldn't exist in the game mode at all.
I created another HUD for testing and it acts like the same.

thin stratus
#

Well, where do you create it?

#

And since you say it acts out, in what setup does it work normal?

queen bay
#

Its just added to the Game Mode.

I can not describe the setup in what it worked normally, because I didn't really changed something.

I tried to communicate to the HUD over an actor, executed by an event from the game mode -> pc -> actor
Then it happened 😄

#

This is so weird.

thin stratus
#

GameMode only exists on the Server

#

Creating UI in it is wrong

queen bay
#

I don't create UI in the Game Mode.

I send it to the PC (just an event to owning client) and the PC sends it to the actor.

Actually now the PC tries to execute an event in the HUD which creates Widgets, but the HUD is just lost. Like it wouldn't be added in the game mode 😦

thin stratus
#

Might be a simple timing issue

#

Instead of going GameMode->PC->HUD

#

Just start in the HUD

queen bay
#

Yes, thats how it works. The HUD creates widgets at beginplay and the Event from the Game Mode should initialise actions in these widgets (over the pc -> Hud -> widgets)

But the HUD doesn't even execute a beginplay and cast / validation always fail :/

#

I try to create a new game mode 😦 really weird.

thin stratus
#

The HUD might not exist

#

At the point yo uare trying to access it

#

You can't rely on that

#

If you need something to execute in the HUD you gotta do it from there

unique thunder
#

Why are clients unaware that this variable has changed? Server RPC > RepNotify set should replicate to everyone, no?

thin stratus
#

Given the ServerRPC got called in a Client-Owned Actor and the Actor is existing everywhere, yes.

unique thunder
#

What if at some point a client does not own the actor and the event is called?

thin stratus
#

It's dropped

unique thunder
#

Currently, it is client-owned when it's called but the client's bool doesn't update

thin stratus
#

Calling client has to own the actor

queen bay
#

Okay, thank you very much @thin stratus I'll continue experimenting.
And a happy new year.

thin stratus
#

Happy new year to you too

unique thunder
#

The set-up is like this:

CarHandle_BP is an actor that the player interacts with. When used, this actor (with a reference to the vehicle) triggers the server RPC which sets the bool.

#

Should the CarHandle_BP be owned by a client when it calls the server RPC then?

thin stratus
#

Yes

unique thunder
#

Ah that would be it, thanks so much

thin stratus
#

So you gotta RPC earlier already in the playerController or Character etc.

unique thunder
#

Not sure what you mean. What happens is:
Player grips the carhandle BP, I get a ref to the player and set him as the owner of that actor, I run the logic that eventually calls the server RPC inside the vehicle actor itself which sets the bool. When this completes, the carhandle BP's owner goes back to null.

This doesn't work though so I may have misunderstood 🤔

thin stratus
#

set him as the owner of that actor

#

That already has to happen on the Server

#

So "SetOwner" and then "ServerRPC" won't work, as "SetOwner" has to be called on the Server.

#

You have to ServerRPC before the player graps the handle

queen bay
#

@thin stratus After creating a new game mode, it instantly worked again (The HUD is back again). But it's still mysterious...

#

Okay I filtered it out

#

If it is just there in the graph, it doesn't initialize the hud in the GM Settings. Deleting it brought me back my HUD

fleet viper
#

hey there! Im trying to make a flash bang and it works fine for the server however it doesnt work for the client! As shown in the screenshot im calculating if the player is facing the grenade in range between 90 and 0. When i look roughly at the grenade as the listen server im getting 3 or less as degrees but when i look at the grenade as the client then im getting values like 144. Any idea why unreal does this??

brittle sinew
#

The output of your math only depends on the inputs, so check those and find the discrepancy 😃

icy nacelle
#

I'm having an issue with my train object not rendering past 100 meters.
I'm pretty sure this is a multiplayer related issue as its not happening when I dont play as a client.
I've checked through the compendium and cannot find anything render distance related. The actor is moving along a spline.

#

-draw distance settings on the skeletal mesh of the actor that is spawned along the spline.

neon violet
#

I don't understand the multiplayer capabilities of ue4. I'm making my multiplayer game using the integrated system but what does it actually do? Is one of the players given host control and then the host migrates between players when the host disconnects? Or is there a way to run a dedicated server?

neon violet
#

112 pages!

icy nacelle
#

Yep, you'll understand networking in ue4.

neon violet
#

Aight im gonna get reading then

opaque forge
#

New to networking here: How do I store information on the client that's independent from the server like a user's current avatar?

#

And have the client retain that info when changing server

ocean geyser
#

im having an issue trying to use steam. so far everything works just fine without any issues when i host a game from the pc im on right now and for when i join from another pc in my house and vise versa(this is with steam enabled). i can see my created lobbies and everything is going as intended, the problem is when i try to have my friend who lives somewhere else try to either host or join(i have tested with 2 different friends). i cannot see their hosted lobby and they cannot see mine. ive tested with spacewars just to narrow one more thing down and that works just fine as my friends can join me and we can play together.

in my packaging settings i have this
https://gyazo.com/a11aeec9a84e6243256797eb650e883b

in my DefaultEngine.ini i have added this

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

im just at a loss as to what the issue could be here. Im not sure if it makes a difference, but when packaging the game i get this message in the logs
https://gyazo.com/e48453b311f381524adf664a77dc55a1

fossil spoke
#

@ocean geyser Make sure your friends have the correct ports open and that the process is being allowed through firewall.

ocean geyser
#

im assuming it would be using the usual 7777 port since i havent changed it anywhere?

ocean geyser
#

raised up the max sessions and such and used a specific port and it worked like a dream

heavy marlin
#

Wait a minute

#

Epic acquired easy anti cheat

#

Does that mean we might get it with UE4?

fleet raven
#

very unlikely

naive stump
#

@thin stratus

edgy galleon
#

@ocean geyser what port did you use? still can't get people to find my match online

fleet viper
#

hey there me again with the flashbang. Did further research and found something very odd on the client the grenade location is 0 but not on the server any idea?

jade gazelle
#

For a replicated day night cycle, do you guys think it would significantly more efficient to just replicate the in-game time from server to clients and then adjust the sun positioning and intensity fully client side

#

Or relocate the whole dynamic sun system from the server to clients

#

Err replicate, not relocate

#

Seems like the first option would be less bandwidth but I’m not sure if it’s significant enough to warrant the separation as opposed to just doing it all on the server

meager spade
#

you would do it client side

#

send the command from server to clients to update locally

jade gazelle
#

Well right now it just updates perpetually in the tick on the client, but it is using replicated sun intensity / angle / etc. floats from the server

#

So I guess that's basically what you are saying in a way? I didn't want to send an RPC from the server to client every single frame telling it what to do

meager spade
#

you dont need to send it every frame

knotty sequoia
#

just send every second or so an update that states the time and let the client transfer that to actual stats

meager spade
#

the client can predict it

#

and the server just keeps it in check

jade gazelle
#

Ahhh, that makes much more sense

#

Thanks guys

severe nymph
#

This is the video I shared with them. The funny thing is that in thirdperson template the animation blueprint still calculates speed but in my project I guess cause i'm using linear velocity it doesn't and the guy just slides.

grand kestrel
#

@meager spade @jade gazelle Our game date/time system stems from UtcNow() and condenses unix seconds to change the time scale, no need for replication and it persists even if the server state is lost, and seeding based on it is always consistent (generates weather forecast, events, etc). The only concern is that people could 'hack' the time to change night to day for visibility, etc

jade gazelle
#

@grand kestrel Thanks for the tip. I'm actually doing the exact same thing currently that I think you are, hah. My time of day in-game is calculated from UTC Now and basically just converts that time into a format where one real hour = one in-game day

#

I think the reason I set it up the way it currently is is due to the second half of your comment -- concern that somehow the client would be able to alter/hack the time on their end

#

I guess it wouldn't really matter much since any events that depended on time-of-day would still be calculated on the server

grand kestrel
#

Will replicating it really stop them, though?

#

I'm sure they can just prevent the replicated value being applied locally / constantly overwrite it

jade gazelle
#

I don't know, I know basically nothing about how systems are hacked or accessed so I am taking the approach of being as cautious as possible in every single action in the game as possible

grand kestrel
#

Seems like a waste of bandwidth

#

But yes events should be server-side only

#

I built an event system based off it, actually exposing it to players in a similar manner as google calendar

#

Honestly, it might be worth looking into (at least in this specific case), its going to be replicating almost constantly

#

Unless you have a separated value that is replicated and you only update it every x seconds and apply it with OnRep

jade gazelle
#

I think that's the approach I

#

'm going to try and take

#

Take what I have now and alter it so that the server basically checks in/syncs the client every 10 seconds, 30 seconds, whatever

grand kestrel
#

Or you could.. maybe

#

Send RPC from server to owning client -> Hey give me your current time -> Server RPC back, if time is out of a threshold, maybe they're hacking

#

@thin stratus Do you think a hacker could prevent sending the server back from a client RPC? I figure you'd know more about this than most people, any thoughts on the topic?

#

Speaking of cheat detection, still haven't thought of a good way for adding authority with recoil since its essentially just adding camera rotation locally -__-

thin stratus
#

You don't have to prevent that

grand kestrel
#

Is it more of an EAC thing?

thin stratus
#

If you perform the shots based on the Server rotation

grand kestrel
#

Ah

#

Hmm good point

thin stratus
#

If the Client removes the recoil, he will aim at a wrong spot

grand kestrel
#

We already do that actually

#

I just need to make sure I'm updating it through the correct method, not the camera itself

meager spade
#

That's why server should do the same calculation snd not trust the client

grand kestrel
#

I think we already are actually

#

Pretty sure it uses control rotation to add recoil

#

Which will also occur on server

#

I'll need to revisit it and make sure

#

Because the firing is all server-side, the client fires immediately but if they modify anything it wont make a difference except visually on their end

severe nymph
#

@thin stratus your probably the most experienced with ue4 active in here right now. I’m having an issue in 4.21.1 where the add static mesh component created with contractors (or construction scripts) aren’t behaving properly in 4.21.1 vs previous engine versions

meager spade
#

My weapon spread is controlled by a seed generated on server which clients have a bank off

grand kestrel
#

Probably similar for ours

#

We definitely have a synced seed

severe nymph
#

Basically it’s treating the static mesh like a dynamic object vs how it previously treated

meager spade
#

And we pick a seed and use that to generate same values i have 5 seeds that get updated after x amount of weapon fire

#

So the seeds change

severe nymph
#

Construction scripts aren’t supposed to be spawning during play .... the actor is built before init yet is doing this in 4.21.1

grand kestrel
#

Ah we do it differently from that, nothing gets sent from server like that

#

Basically do it how UT does

meager spade
#

Yeah i figured generating seeds keeps the patterns different

grand kestrel
#

Oh, the patterns are different with this way

#

Anyway gotta run

thin stratus
#

@severe nymph This happens if bBaseRelativePosition is true and the Client RPC to adjust the location can't find the new base

#

As far as I can see, this code has not changed from 4.19 to 4.20

#

Iirc this gets called by SendClientAdjustment

#

Which is called by the NetDriver

#

SendClientAdjustment will grab the pendingMove, which might have a new base, and send that via ClientAdjustPosition

#

bHasBase is true if the ServerData says that the NewBase of the pending move is != NULL

#

Further more the "newBase" that gets send is a PrimitiveComponent

#

Now it seems a bit strange to me that it would send that with it, cause the Components are most likely not replicated

#

But I think the main issue here comes from the bBaseRelativePosition

#

Cause if you don't have a replicated base, you can't really move based on a relative position of a base

#

If that boolean would be false, it would still post a message, but verbose

#

Now what you could test in 4.19 is to add this to the DefaultEngine.ini

[Core.Log]
LogNetPlayerMovement=VeryVerbose
#

And see if that will spam the ClientAdjustPosition_Implementation could not resolve the new absolute movement base actor, but WILL use the position! message

#

Cause then it's most likely just that between 4.19 and 4.21, the boolean got set to true

ocean geyser
#

@edgy galleon port 27015. the problem never ended up being the ports or the firewall, if your using 480(spacewars) as your app id for testing, you need to scan for a heck of alot more sessions than whatever you have right now. for testing i just put my max search results to 10000 and that fixed it. it seems when it was at a lower number it wouldnt find my or my friends session when scanning for results due to it also including servers from other people using 480 as their app id(ive even had one of some other guys's server show up in my list). give that a try and if needed just add me on here and ill be more than happy to be your test dummy

edgy galleon
#

Awesome thanks. The information for using sessions is awesome until you have a standalone game

fleet viper
severe nymph
#

@thin stratus the issue isn’t really the warnings it’s that linear velocity no longer passes through to clients and guys just slide around

#

4.19 didn’t seem to have that problem

#

It just worked

#

Unless something changed about the get movement base node between 19.2 and 21.1 over multiplayer

fleet raven
#

why is WithValidation required for Server?

#

it's totally unnecessary and you just put return true in 99% of rpcs

thin stratus
#

Cause they require you to validate the RPC

#

It's not unnecessary only because you don't use it

#

Based on that we can probably trash 80% of the engine ;)

fleet raven
#

they aren't using it in UT either br_thinking

#

I'm exploring some of that code for fun and seeing hundreds of _Validate things that do nothing

#

you can't really use it to validate user input either since it just disconnects the player with no message if you return false

#

besides, I'm not saying to remove WithValidation, but to make it not required

fringe dove
#

Hmm it always seems to fail to start, and it isn't getting a 0 appid, some people say they had to add steam_appid.txt on the server to make it work

#

I tried and that is still logging a 0 app id:

#
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[2019.01.03-01.20.27:984][  0]LogOnline: STEAM: [AppId: 0] Game Server API initialized 0```
#

ahh got it to work, I had tried putting it in Binaries but forgot to do Binaries/Linux

severe nymph
#

@thin stratus for whatever reason get root linear velocity and subtracting it from the movement base velocity works in 4.19 but doesn’t in 4.21.1 when walking on the add static component node created with construction script. If I put the component in the actor outside of a construction script (constructor) then it’s fine. I don’t understand why the difference. It’s like it’s treating the static mesh component node like a different instance.

#

This difference in behavior is what’s keeping me from being able to migrate. If I rep the component node it clears the warnings even with actor rep set to false but still doesn’t pass the info for my animation bp to the clients from the server

jolly siren
#

Why don't I see a DOREPLIFETIME or bReplicated = true anywhere in the engine for PlayerController?

#

i.e. where is the PC replicated to the owning client?

meager spade
#

hmm

#

the PC is the owning client ?

#

i assume its auto replicated?

jolly siren
#

auto replicated? what is that?

meager spade
#

no idea i havent looked but the PlayerController probably replicates by default and can't be turned off/on as its the owning connection

ripe folio
#

Does anyone know how to replicate raw data? Like sending something pointed to by void* or char*. I was going to memcpy into a TArray<char> and send that, but seems to not be a supported UPROPERTY

#

Ahh can just use TArray<uint8>, so be it

fringe dove
#

I'm trying to get a dedicated server to work with steam, it seems to bind the 27015 port but not 7777 or 7778

#

I'm based on shootergame, and I can see the server in the server list, but I get a timeout when I try to connect

fleet sluice
#

@fringe dove It needs to bind on both. 27015 is used internally by Steam for advertising and 7777 is used by UE4 for connections. Ideally, it would only need one port, but that can't be done with Steam reliably. And both need to be forwarded.

thin stratus
#

@severe nymph It's not really something I had to tackle, so all I can do is look into the Source Code.

#

And that's something you could do too

#

Check where the message comes from and check what changed

fleet viper
#

Can somebody tell me how the get actor location can return exactly 0 even when the actor is somewhere else btw this only happens on client side

hasty adder
#

Local location would always be 0

#

Depends what context might me where you need world location vs location etc

#

Also I f it's even a valid use of getting the actor locations because zero would be a default value if it doesn't know the location ever changed

fleet viper
#

i wanna get the location of my grenade actor on the server its the correct location but on the client it returns 0@hasty adder

twin juniper
#

i have a question about multiplayer performance and actor components

#

is it true having multiple components/interfaces on things is slower in multiplayer vs having none of them at all ?

severe nymph
#

@thin stratus

(Name=0x00000112655a4bd0 "NODE_AddStaticMeshComponent-0")
This what's failing the NetGUIDLookup in PackageMapClient.cpp

but its very strange because at first this value comes across
+ NetGUID {Value=23 } FNetworkGUID

it breaks here

    if ( NetGUID.IsValid() )
    {
        return true;
    }```
result
```[16] = {0x00000112298a8800 (Name=0x0000011266e192d8 "StaticMeshComponent0"),{Value=23 }}```
twin juniper
#

for example im going to create an interface+actor component system to deal with damage and what not. pulling away from an actor godclass that everything is under currently. and my game has close to 500 actors at a given time. with this change the amount of actors will double due to these items having an additional component.

does that matter for multiplayer performance?
or performance in general rather

severe nymph
#

So yeah server and client is seeing two different instances of the component

#

@thin stratus
I haven’t checked to see if this happens on 4.19 but I want to say it just bakes out into the map

severe nymph
#

I don’t have a copy of source 19 installed so ill have to build out a debug editor to check

magic river
#

got what I believe is a pretty simple question: How can I get a serverside actor (game state) to tell player clients to update their HUD? I'm just not sure of the blueprint chain I need for it. (EDIT): Managed to find a fix!

#

If this is the wrong channel and I should use blueprint instead, feel free to redirect me, cheers!

fleet viper
#

and how can a location of an actor be 0 if he is somewhere else?

fringe dove
#

@fleet sluice thanks.. I finally figured out the root cause of what was going wrong after many hours

#

/etc/network/interfaces there has an entry like:

#
# The primary network interface
auto eth0
iface eth0 inet static
        address [my-ip]
        netmask 255.255.255.0
        gateway [my-gateway]
        up ip addr add 10.10.0.6/16 dev eth0
        dns-nameservers 8.8.8.8 8.8.4.4
#

that up ip addr add 10.10.0.6/16 dev eth0 line caused the issues

#

apparently something to do with a floating IP feature on digital ocean that isn't even on by default

#

and made the server report 10.10.0.6 as its ip to connecting clients

#

I just removed that line and rebooted and now everythign connects fine..

#

I don't know if there is a way to keep it but tell steamworks to ignore it

unique thunder
#

Should a child actor component be set to replicate if the actor it is assigned is already replicating?

#

(assuming I assign the actor in-game and not by default)

winged badger
#

where is it created?

#

default subobject?

unique thunder
#

My weapon blueprint has a child actor component in its hierarchy and on beginplay, the weapon BP 'sets' it to something. No matter what it sets it to, that actor will, itself, be set to replicate.

#

By default

winged badger
#

doesn't seem it needs to replicate

unique thunder
#

That's what I thought

#

Thanks!

winged badger
#

it will get created server and client both

#

and BeginPlay logic will also run on both

#

you can even reference it over network without it being replicated in this case

jagged garden
#

I cant remember exactly but I think I had some issues when the actor component wasnt set to replicate

winged badger
#

default subobjects don't need to replicate, unless they have replicated variables or are using RPCs

bleak lily
#

hey I have a question about doors and replication

#

I tried doing an rpc but it didnt make the door open at all

fossil spoke
#

Condense that into a function. Create a RPC and call the RPC from the Interact Input. The RPC will call the door open function.

bleak lily
#

alright

fossil spoke
#

If your Actor is set to Replicate and ReplicateMovement, it should work.

bleak lily
#

when I tried to put the timeline in the function it said conflicting

#

or something

#

oh wait I think I got it

knotty sequoia
#

3 Questions... simply Youtube links or one word answers would be nice pls ty:

  1. Which tutorial should i look at for VR Multiplayer?
  2. How would i go about not using Steam for MP?
  3. What is the chances of me (a relative newbie) combining them both?
tall knot
#

hey! this may sound a little bit stupid but I'm kinda new to blueprint so bear with me please.
I'm making a multiplayer game. I'm doing the menus now, and in the ServerMenu where the player choose the different available games, I can't seem to display the name of all the hosting players. I successfully got the names but I just can't figure out how to show them. Basically I have an array called ServerNames now where I put all the hosting players available.

primal solstice
#

Can player contollers call replicating Actors client->server function calls, or can they only do it to owning pawns?

grand kestrel
#

@primal solstice Client-server RPCs and vice-versa are owning client only. They do work with the player controller because there is one on the server as well as local client

primal solstice
#

its very simple, but does this look correct?

#

only changes local client

grand kestrel
#

When I PIE the PlayerState->ExactPing is significantly higher than the actual latency when simulating latency

primal solstice
#

?

grand kestrel
#

Not talking to you

primal solstice
#

oh

grand kestrel
#

Was asking a question of my own lol sorry

#

And no thats not right

#

You can't use a multicast in a player controller

#

Because you don't have copies of player controllers for non-local players

primal solstice
#

MMMMMMMMMMM make sense

#

Snap. it worked. @grand kestrel. Thanks!

versed socket
#

@primal solstice Yes, this is how I do that stuff all the time

humble zealot
#

It doesnt allow me to open the door on client

#

Server can see it

edgy galleon
#

why does your Server Open take in a door on the left, but doesn't on the right?

hasty adder
#

anyone know if there is a ini variable you can use for onlinesubsystemnull to define port? per a partner its easier for them to roll out servers if its not commandline based I was hoping something like

[Onlinesubsystem]
Port=7779``` etc
bitter oriole
#

Port shouldn't be useful if you use OSS

#

The subsystem will properly advertise the session

#

You mean for starting server instances ?

hasty adder
#

Well i know it will auto increment but i beleive the host will need to define different ranges as there are other ue games

bitter oriole
#

Right. Sorry dont know about that

hasty adder
#

k thanks anyway - i'm digging through mounds of googletrash

thin stratus
#

@hasty adder You can always override the port with -port=XXXXX

#

Not sure if the ini allows that

hasty adder
#

i'm gonna try with old UT format

#

un [URL] you could define port

thin stratus
#

That sounds like a way, yes

hasty adder
#

Yup looks like that works

humble zealot
#

Could anyone help me with this error ```Blueprint Runtime Error: "Accessed None trying to read property DoorBP". Blueprint: SecurityPanel Function: Execute Ubergraph Security Panel Graph: EventGraph Node: Server Open

winged badger
#

all that tells me is your DoorBP is null

humble zealot
winged badger
#

it says property DoorBP

#

in blueprint SecurityPanel

#

this is neither of those

humble zealot
winged badger
#

are you multicasting from a multicast there?

humble zealot
#

Correct password would need to be multicast right?

#

Server Open is also multicast

winged badger
#

there is only few things you can get by chaining multicasts

humble zealot
#

im fairly new to replication sorry

winged badger
#

wasted bandwidth and bugs

humble zealot
#

What should I change server open to?

winged badger
#

CorrectPassword already executes on every machine

#

provided it was called from server

#

this setup you have will cause ServerOpen to run twice on clients

humble zealot
#

hmm

#

im not sure

winged badger
#

also, pushing a replicated variable thru a RPC is a little bit pointless

humble zealot
#

i dunno what im doing in this field tbh

humble zealot
#

At the top left when I open the door on client

#

It shoes Client -2: Hello

severe nymph
#

@thin stratus they changed the base replication with a Fortnite merge in 4.20
that being said, what was being sent didn't change, it was always a primitive component they just made it able to not send a base at all if it was null
and bBaseRelativePosition is supposed to be dynamically set, its not a constant, it depends on if the movement base is mobile or not if it is static then it is false. It looks like the add static mesh component node isn't referencing its parent correctly as 'static' vs 'mobile' has no affect on 'bBaseRelativePosition'

humble zealot
#

@thin stratus Basically I get the message when I go upto the door, enter the password, the password box closes then the error.

thin stratus
#

@severe nymph Alright, that's def nothing I usually deal with, sorry

#

Right, but what exact event calls this

#

Can you show the nodes?

humble zealot
#

Yeah getting that up for you now

summer rivet
#

I know it's a stupid question but the actual door itself, is it set to replicate? not the variable on the scripts that reference it but the actual object in the world is it set to replicate so the clients know about it?

humble zealot
#

When I set it to replicate it disappears

#

Server can open it client cant

thin stratus
#

Yeah I know what the issue is, but I can't help without seeing how you set it up

humble zealot
#

This is on my character

thin stratus
#
  1. Why Server RPC and then Client RPC?
humble zealot
#

i dunno i was told to do that

thin stratus
#

That's just going back and forth

#

On Pressed, Switch Has Authority

humble zealot
#

This is on my door

thin stratus
#

Authority is the Server, they can call the Interact stuff directly

#

Remote calls the ServerRPC then

humble zealot
thin stratus
#

You also don't want to call a Multicast to open the door

#

But rather a RepNotify variable

#

(boolean for example, true open, false close)

humble zealot
#

I have a IsClosed boolean

thin stratus
#

Security Panel is a Widget created in the Character?

#

Ah no, it's an Actor

humble zealot
#

Yeah actor

thin stratus
#

How do you fill that variable?

#

I don't see any LineTrace or so

#

Overlaps?

humble zealot
#

overlaps

thin stratus
#

Okay, let's see

#

Gimme a minute

humble zealot
thin stratus
#

The class check is not needed

#

Generally at least

#

The Cast is basically the same

#

It fails for classes that aren't Survival Character

#

You should def work with Interfaces for this

humble zealot
#

🤷 back to drawing board then i guess

thin stratus
#

This is a basic thing you can do, the variable is of type Actor

#

So it doesn't matter if door or future different actor

#

A simple UseInterface

#

Which your door can and should implement

humble zealot
#

ah

thin stratus
#

Door can then react to whoever interacts with it

#

You can use this also to filter what actors you want to save after overlapping them

#

Further, you can use this overlapped actor. Server can use it directly, client wants to RPC first.

#

If you need something to happen on the client at the same time, like open UI, you might want to do something like this:

#

In case you have a ListenServer, you might want to do this too:

#

So basically allow the Server ot also show the UI

#

But that's a bit trickier

#

You need to also check that the Character is locally controlled, otherwise the Server will see a UI if the Client calls the ServerRPC

#

Once that is sorted out, you can actually "Use" the actor via the message

#

You can of course also call this on the client

#

In case the used actor should do something

#

It depends on how you actually want the door to work

#

So this is also totally valid

#

You also might want to pass over who is using the Door (via the Controller or Character)

#

Getting a Door to properly open is tricky, but if you got that right, you usually understand A LOT more about UE4's Ownership system

#

Door can use that stuff then

#

@humble zealot That should give you enough info to play around with

humble zealot
#

Thank you

tall knot
#

hey! this may sound a little bit stupid but I'm kinda new to blueprint so bear with me please.
I'm making a multiplayer game. I'm doing the menus now, and in the ServerMenu where the player choose the different available games, I can't seem to display the name of all the hosting players. I successfully got the names but I just can't figure out how to show them. Basically I have an array called ServerNames now where I put all the hosting players available.

#

I figured how to display the first server name that I got but never the second, any thoughts on why?

#

Althought when I use the print string I can clearly see that my ServerName array holds al the values

winged badger
#

Not really multiplayer, try #umg

tall knot
#

@winged badger Ok thanks

tall knot
#

Ok I have another question, is it possible to isolate each server name?

severe nymph
#

you would build an array and for each the list

#

are you using advancedsessions?

#

@tall knot

tall knot
#

@severe nymph no i don't believe so, i'm not using steam connections, the game is purely designed for lan (hope that answers your question)

severe nymph
#

blueprint only?

#

i'm not sure UE4 blueprints have that ability without advanced sessions

#

steamadvanced sessions and advanced sessions are two different plugins

#

advanced sessions basically exposes the blueprints you need to get servernames and create sessions even without steam

#

it has some pretty good nodes for doing what it is your looking for even using the nullsubsystem

#

@tall knot

#

Honestly I've kind of just jumped to it because its easy to implement but I can look around and see if there is some blueprints exposed within the engine alone that will get servernames

#

pretty simple stuff with it

#

@tall knot this is what your looking for

#

create a blueprint session result array var to store the results

#

then create a foreach to load the info

#

here is a copy of the function

tall knot
#

@severe nymph this part is blueprint only yes, but if I can't figure out how to do it in full blueprint I'll gladly do it in c++, although you seem to have giving me exactly what I'm searching for so I'll go and download the plugin and try it out right now. Thanks a bunch for your help

severe nymph
#

you don't need the plugin

tall knot
#

?

severe nymph
#

just use the find sessions node I posted

#

the second one in place of my advanced find sessions node

#

for a lan only session

#

then create the loop and call the function I shared

#

all of those things should be in default engine

tall knot
severe nymph
#

that's it

#

use that node

#

pull from it and create your var

#

for results

#

then loop through that calling the function

tall knot
#

@severe nymph oh right got it!

severe nymph
#

cool

tall knot
#

thanks again

severe nymph
#

yea the advanced sessions node is essentially the same thing other than a few more bool options and the ability to set a join limit

#

it just exposes a few more c++ only options

tall knot
#

Yeah I don't really need that much options, so this method is best suited for my needs

severe nymph
#

awesome 😄

#

glad I could help

tall knot
#

@severe nymph you've been really helpful thanks !

jade gazelle
#

Is there a reason why if I add an actor component to my player controller on the server, set it to replicate,and pass a reference to the new component through a client RPC, the client is saying I’m trying to access a null value?

severe nymph
#

@jade gazelle a child actor component?

#

or just a static mesh or object component

jade gazelle
#

@severe nymph just an object component I think

severe nymph
#

can you screenshot the component list?

#

will help me determine what type it is

#

is it a mesh or collision within the actor?

#

keep in mind that playercontroller is replicated by default and rpc calls are called from the owning character actor

#

so if your the owner you would get owner --> get component ---> rpc to server

#

probably don't need to replicate if your rpc calling the object

jade gazelle
#

I’ll try and take a screenshot shortly, stepped away from my pc for a second

severe nymph
#

but again it really depends on what your trying to do I guess

jade gazelle
#

I think I gave wrong info since this isn’t a mesh or physical thing

#

It’s an actor component BP being added to the controller

severe nymph
#

ewww why would you need an entire actor replicated through the player controller?

#

couldn't the actor handle replication for itself?

jade gazelle
#

I posted in BP too and was I told I may be trying to access it too quickly on the client so I am getting a null value before it has been created

severe nymph
#

yes because player controller will exist before any spawned actors

#

I guess that's why im not sure why you would need to do it that way

#

if its a world object an overlap or line trace could handle it

#

it could rep its location and be done

jade gazelle
#

It’s not a world object or anything physical. It’s basically just data

severe nymph
#

oh

jade gazelle
#

That is specific to the controller

severe nymph
#

like a struct

jade gazelle
#

I just have a lot of things to manage so rather than overloading the controller itself I have things distributed across components

#

As children of the controller

#

More for organization than anything else

severe nymph
#

yea

#

so in this case id do an is valid check loop

#

if not valid loop if valid exec

jade gazelle
#

Didn’t even think about that, probably the best way

#

I’ll test shortly and let you know, thanks

severe nymph
#

Something like this

#

@jade gazelle

jade gazelle
#

Right

thin stratus
#

cough Delay with a 0 is a Frame skip. cough

#

Not 100% sure if that helps here, but checking if something is valid one frame later is a thing you can do with that.

severe nymph
#

wait really?

thin stratus
#

Yop, cool little thing to know.

severe nymph
#

wouldn't you need to retrigger

#

?

#

it may not be ready in the first or second frame

thin stratus
#

haven't tested it with a Retrigger yet, but not sure why that is needed.

#

A Retrigger in the image above is not needed

severe nymph
#

because in networking the server can take some time to rep

#

its not always there in the first or second frame and calling it again will retrigger until valid passes

thin stratus
#

Yes, but a Retrigger is this:

InputExec->StartDelay...
InputExec during Delay->RestartDelay...

#

While a normal Delay continues to count down

#

Not sure why a Retrigger would be needed above

severe nymph
#

because retrigger actually doesn't ignore the time

#

a normal delay does

#

it will ignore all subsequent calls

thin stratus
#

A Retrigger delay will reset the remaining time on the delay if it gets hit again

severe nymph
#

exactly

thin stratus
#

Why is that needed above? Even if you hit the delay again, just let it run out?

#

Using Delays for Valid stuff is a bad solution either way :D

severe nymph
#

ah … yea I guess I see what you mean

thin stratus
#

You are polling the state, there are always better ways.

severe nymph
#

your right but under this circumstance its not a huge cost

thin stratus
#

Let's take that example

#

You are checking if the VivePawnCharacter is valid, to init the teleport controllers, or?

#

(or whoever posted that)

#

And that's on the Client I assume.
You want to simply set a RepNotify variable with the reference. And call the Init Stuff in the RepNotify function

#

Not polling and 100% sure the stuff is replicated.

severe nymph
#

that's actually on authority

#

not client

#

remote checks player state

#

is valid then init controllers

#

binds on event onplayerstaterepliced_bind for new playerstate

#

that is valid on authority is just there to make sure the playerstate for authority exist

#

not the character

#

@thin stratus

tall knot
#

@severe nymph sorry to bother you again but those functions I highlighted I can't find them :/ not quiet sure why

severe nymph
#

@thin stratus the listen server still has to valid check player state on sessions its just a way that was simple and wasn't too costly

#

I'm very familiar with rep-notify and client side bound events for polling

#

@tall knot you will need to create that function

#

I posted the screenshot of it so you can use it to create your own

#

you create it and then call it for the list

#

LoadServerInfo is called for the results to be displayed in the widget

#

it builds the text

#

that screenshot of the function is how you build it

thin stratus
#

Ah well, BP only Multiplayer

#

What a shame :P

#

Things like "OnRep_PlayerState" already exist

#

But obviously not exposed to BPs

severe nymph
#

correct

#

it is a shame

#

but i'm getting better with c++ and creating custom exposed functions every day

#

to add stuff like that

#

I'm sure eventually I will rely less and less on bp

thin stratus
#

hehe

severe nymph
#

cross over to the dark side 🤣