#multiplayer

1 messages ยท Page 627 of 1

vivid seal
#

im having a hard enough time getting through CMC even with all the docs on that

#

yeah reading up on GAS and prediction keys and such is a good way to get the general idea of how things should work

#

but there's still a gap between reading it and understanding the concept, and actually implementing it in another system

hollow eagle
#

also interesting is it looks like physics might be something it handles out of the box. That'd be awesome

drowsy arch
#

its so weird that one of the richest companies has so little documentation on the subject.

#

and compared to other engines it has way more features.

hollow eagle
#

well, they aren't really "one of the richest companies" and it's not that weird if you've ever worked at a large company

#

and having way more features is one of the reasons ๐Ÿ˜›

vivid seal
#

GAS supports some kinds of replicated movement out of the box with root motion ability tasks, but if you want something besides that you probably want to go with inheriting from CMC and adding custom movement modes

drowsy arch
#

wait what is custom movement nodes?

hollow eagle
#

character movement component stuff

vivid seal
#

character movement component comes with movement modes like Walking, Flying, Falling, etc., and also a mode called Custom that you can define however you want, and within that you can have different custom sub-modes

#

so for something like wallrunning, you'd likely be looking at making a custom Wallrunning mode and coding how you want the movement to work there

#

the replication aspect of it is kind of complicated and you will need to either read the docs on CMC or watch some videos on it

drowsy arch
#

yeah but isn't it a unit_8 so there can only be 4 extra or am i misguided?

vivid seal
#

do you mean the flags?

#

or the custom movement modes

#

i think as far as movement modes you can have 255 if i am thinking about it correctly

#

if you mean the saved move flags, yes you only get 4 i think, but you can send other parameters in saved moves besides just the flags

drowsy arch
#

do you have any video recommendations? i feel way in over my head. i started unreal with the basic single player stuff but as soon as it became that it was so much more. i can usually figure out stuff pretty good but i am having a hard time finding information

vivid seal
#

i dont blame you. give me a min ill find a few videos

drowsy arch
#

thank you

vivid seal
#

i had basically the same experience, everything was good and made sense til i started working on client prediction and multiplayer

#

https://www.youtube.com/watch?v=4w8vSss4YiI
so this one isn't really a tutorial, but he goes through an overview of how replicated movement works in the CMC, its a really good overview
https://www.youtube.com/watch?v=Of8SGBa3WvU&t=99s
this one is an actual tutorial that implements a sprint and dash

In this video I show the proper way to make movement abilities for your characters. This is done by creating a Custom CharacterMovementComponent.

We start from scratch with a third person BP project, but here is the completed project you can copy code from: https://drive.google.com/open?id=1w9mMlKlcFhTrr8wsf1_76h_4v_k2ysei

โ–ถ Play video
drowsy arch
#

can you give me a description of your game concept?

vivid seal
#

mine?

drowsy arch
#

yeah

vivid seal
#

im making a 4-player co-op game that emulates the Challenge Mode system from World of Warcraft, except as a third person shooter. Basically its a pve multiplayer shooter in which you try to speedrun dungeons. The main thing I'm aiming for is a lot of build customization through class/talent selection, and a lot of freedom in how to go about executing a dungeon run.

#

also i know i threw WoW in there as my example, it has nothing to do with MMO scale, just that particular part of running dungeons that I really enjoyed before blizzard removed it

drowsy arch
#

nice

#

sounds really cool

summer tide
#

So Iโ€™ve a bullet BP, when it hits something I want to spawn some BP_ cube. In bullet bp I have the player ref. To replicate can I just create a server event in player event graph and then spawn ?

empty axle
gusty raptor
#

Hi, anyone knows a alternative for DrawDebugLine? (its to heavy with lots of them)

bitter oriole
#

Depends on the goal

gusty raptor
#

Need to display paths, lots like a thousand or two

bitter oriole
#

Is it for the actual game or as a debug tool ?

#

Is it 3D or can it be done in 2D on the screen ?

gusty raptor
#

3D, and and for ingame

meager fable
#

Is there any difference in network efficiency between C++ and Blueprints?

meager fable
gusty raptor
#

hhhm, right.. a particle sounds indeed as a good idea

#

I think a spline mesh is to heavy to, as a average path contains like a average of 100 segments

meager fable
#

Depending on how long your path will be but you can set draw distance on the segments but I`d still go with a particle system because they look way cooler ๐Ÿ˜„

bitter oriole
#

Except C++allows for optimisations of course

bitter oriole
#

Like using Slate splines

#

Spline meshes could also work though, especially if you need 3D occlusion

#

And then yeah, you could also use particle lines

meager fable
bitter oriole
#

Yeah, I meant that and other stuff like fast arrays

#

And yes, it works

meager fable
#

Great, thanks

summer tide
gusty raptor
#

@meager fable | @bitter oriole So any idea how a ribbon particle could be spawned persistent and not following a actor? Thats even possible?

bitter oriole
#

Sure it is

#

Well, maybe not a ribbon

#

I was thinking more of the beam one

ember zenith
#

hello folks, I just had a question if anyone used Golang for their netcode with Unreal engine?

chrome bay
#

That is indeed the question

bitter oriole
#

People have been trying to use different network layers than Unreal's because they had particular constraints before, but using an entire different language just for networking and then plug it into Unreal is definitely not something I've seen before

haughty kernel
#

I tried this, when clients are joining the server the a new PlayerState is getting created which resets all the data. My PlayerState data from local map is not carried over to the Multiplayer Map.

bitter oriole
#

Which is why after connecting, the player controller should " load the data on the client and RPC the server to write it on PlayerState"

#

Obviously you cannot RPC the server until you are on the server

haughty kernel
#

If I am understanding correctly, On Post Login run RPC in that player controller locally to fetch the data from the Player State. Right ?

bitter oriole
#

Fetch the local data from whatever it is stored, save file, idk, and copy it to the remote PC so that it can write it in the player state

haughty kernel
#

there is no save file. I am saving the data into a struct variable and I want to take this struct variable to the multiplayer map.

manic agate
#

Hey guys, got a question. Is the overhead of having a 'server' RPC that I know will always be called by the server worth considering?

Use case: I've got a 'server' RPC in a Blueprint which fires another event function, and I'd like to also mark that event as 'server', in order to make it clearer where it's executed. Stupid move, or it's not a big deal?

bitter oriole
#

It would make more sense to keep it a normal function and simply ensure in the function that it runs on server

manic agate
#

So just add a condition in the bluprint then (I'm referring to a case involving only blueprints, no C++)

#

So in that case, having the function marked as 'server' RPC would be a bigger cost than adding an 'if' node at the start of the BP function?

bitter oriole
#

I don't know if there's a cost involved, but erroneously calling this from the client would turn this into an RPC

#

While asserting that you're on server actually serves your purpose of ensuring it

manic agate
#

True that, you've convinced me ๐Ÿ˜„ but generally speaking, out of curiosity, does it much overhead having it marked as 'server' and always calling on the server? I mean, I know that it would be fired right away, but I'm curious to understand how long is the 'trip' befaure it's actually fired

haughty kernel
#

@bitter oriole can we have quick call ?

bitter oriole
#

Like I said, I don't know about that.

manic agate
#

Sorry Stranger, I misread ๐Ÿ˜„ thanks for the clarification

frank birch
#

What's the difference between FindPlayerStart and ChoosePlayerStart? thonk

frank birch
#

okay, reading cpp and:
FindPlayerStart

  • first tries to match the player name to a start
  • else checks if the player already had an start before
  • else calls ChoosePlayerStart
  • else just returns one spot, never fails.

ChoosePlayerStart

  • A whole lot of checking if a spot is free, nearby, PIE and more
brave wagon
#

hello, I just want to know if the crossplatform is basically activated or we have something to do to activate it?

bitter oriole
#

Cross-platform isn't really an engine issue

#

It's an online service issue

summer rivet
#

for steam support in UE4, most people refer to the advanced sessions plugin. Is there no out of the box solution for steam?

bitter oriole
#

Depends what you want from Steam

#

And what you want in UE4 for it

summer rivet
#

ah so the built in stuff is very minimal?

bitter oriole
#

That's not what I said

#

I just asked what you wanted

#

Advanced sessions is basically just a Blueprint layer for the built-in OSS system

summer rivet
#

dont have a need, looking into steam support in UE4 and noticed that most of the time people recommend the 3rd party plugin

golden nest
#

Hi, does someone know how to user ClientTravel?

bitter oriole
#

Advanced sessions adds few features other than Blueprint

#

The AdvancedSteamSessions part of it does add some new Steam features

#

Like getting more data on a friend, including the avatar, and some workshop stuff

summer rivet
#

gotcha

sick creek
#

does anyone know how to view what is taking up the most resources in a level

#

im getting random fps drops in some points in my level and im trying to figure out why

bitter oriole
#

Sure, just profile it

#

Start the game without editor, hit stat unit, see if Game or GPU is higher, if GPU is use profilegpu, if Game is use stat startfile and stat stopfile with the profiler in the Session frontend window

sick creek
#

gotcha

ember zenith
#

@empty axle why? Cuz I am learning go?

bitter oriole
ember zenith
#

Lol

merry pebble
#

Anyone know of any free or cheap Server OS's? I'm super familiar with VMware but I am currently using VirtualBox since it is free. I just need a server ISO. Anyone able to help?

nocturne iron
merry pebble
#

Well, Domain controllers, some game servers, and maybe a web svr

#

At this point, im just more curious to see what is out there and what the options are ๐Ÿ˜„

#

Ive been looking at Microsoft, and Gamelift

nocturne iron
#

Do you want to self-host?

merry pebble
#

Yeah, I want to eventually have it all hosted on my own physical servers

nocturne iron
#

I just use stock Ubuntu for all my dedicated servers and Ubuntu server for databases and hole punching.

merry pebble
#

Oh?

nocturne iron
#

I haven't been able to get my dedicated servers running on Ubuntu server, but i know of many who run everything on there.

merry pebble
#

Wow, it looks hella interesting. Thanks for sharing ๐Ÿ˜„

#

But its more of a storage if anything ๐Ÿ˜„

nocturne iron
#

Yeah, NAS (Network-attached storage) servers are for files only.

merry pebble
#

Yeah lol. It was one of the things a friend showed me that he found

kindred widget
#

@ember zenith To iterate on what Stranger said, I know nothing of Golang, but from a rudimentary search, the key fundamentals of why you would use that are already built into Unreal using C++ as long as you use things correctly. The engine is complicated enough without needing to add another layer between Unreal and an unsupported language. If you're planning on using Unreal, it's extremely advised to stick with C++, networking or not.

ember zenith
kindred widget
#

That's fair. Just glancing over it, it is pretty similar to C++. Few syntax differences, but I doubt you'd have trouble converting stuff over. That being said. If the game is fairly simple, blueprint can handle a lot in that regard. C++ is only really necessary once you start getting past a certain scope.

elfin citrus
#

Hello, I would like to have a 2-player network setup where the hosting player and joining player would each possess a different Pawn class. Where would be the best place to make this kind of distinction? I'm trying it in the playerController but I can't seem to be able to find which one belongs to the host / client ๐Ÿคทโ€โ™‚๏ธ

ember zenith
kindred widget
#

@elfin citrus Most Likely GameMode. It usually determines character spawning through some of it's overrides.

terse prawn
#

The player character has a Scene capture 2d for a mini map will this cause issues in multiplayer with overwriting?

vague fractal
#

Is there any chance that i can change these values only for the client which calls the method ?

void AGenericPickup::SetHighlight(bool NewState)
{
  if(!M_PickupMesh) return;

  M_PickupMesh->SetRenderCustomDepth( NewState );
  M_PickupMesh->SetCustomDepthStencilValue( NewState ? 2 : 0 );
}

(M_PickupMesh is a simple UStaticMeshComponent)
I'm highlighting them with PP and i want it to only highlight for the player which looks at it, but currently it would get highlighted for all players

faint pawn
#

while using listen servers, can player get the IP address of other players connected somehow?

#

for hosting sessions to anyone, what happens if you dont port forward UDP/TCP 7777? say i want to send out a early version of a multiplayer game to testers, do i have to specify to open the port forwarding?

thin stratus
#

Are you using steam or just direct ip connections?

sterile aurora
#

I am having some trouble with an RPC I am trying to run. I am making a ping pong game and when a player goes to serve, I create one ball for the local client that is not replicated and create a "server ball" with a run on server command that is replicated to all clients. When the player hits the ball, it tells the server ball to run a multicast event which passes in the player controller that hit the ball and other transform/velocity data from the hit. This multicast event then goes runs on all remote clients to create a client ball (the first person serving doesn't need one).

#

this ball is created correctly--but then when this 2nd player tries to hit that ball, the hit event is not passed back to the first player. The function doesn't run on the 'server ball', but when I check "get local role" on the server ball on both clients..both of them say it is a simulated proxy. Setting ownership of the server ball to "get player controller 0" on the client ball hit event didn't seem to matter either

sullen kernel
#

can you override GetLifetimeReplicatedProps in a child class for a member of the parent class. if you wanted different child classes to replicate the variable in different ways

sick creek
#

anyone know why this is happening im running this on a dedicated server and this is what it tells me even though i have resized my inventory array to the correct index

terse prawn
#

How can I get a scene capture 2d to not replicate?

nimble sinew
#

"Warning: OSS: No game present to join for session (GameSession)"

twin juniper
#

hey i have an issue with widgets but its also replication kinda? so on begin play if locally controlled they spawn the hud. when you shoot someone i want to call an event on hud to show hit marker but it only works server side, i hit a key to show all players huds via print string but only the server shows a hud widget. the clients show no references. im confused why this isnt working.

nimble sinew
#

anyone know what this error is and if its a problem? client starts up fine

meager spade
#

@twin juniper HUD is client only, server nor other clients can see or access a clients HUD

#

so you need to do a client rpc or some other way to get the info from Server to client to update the HUD. Check the network compendium in the pinned messages

twin juniper
#

i called an event to run on owning client

meager spade
#

that event has to be on an actor owned by the client

#

like PlayerController

twin juniper
#

im confused

meager spade
#

where is the event?

twin juniper
#

so when hit, the server calls a function to do damage, inside that function it calls a BPinterface event to send a message to the player who shot the bullet to play a sound and show hit marker

meager spade
#

yes but where is the run on owning client event?

twin juniper
#

well it was being called instead of the bp interface event but then even that didnt work so i tried bp interface, which also didnt work so its kinda still the bp interface right now

meager spade
#

๐Ÿ˜ฆ

#

where is the event.

#

what actor?

twin juniper
#

oh in the player character

meager spade
#

can you show me relevant stuff?

#

so i can see what you are doing

twin juniper
#

one sec ill take screens

meager spade
#

either that or we can jump in support voice and you can stream?

twin juniper
#

ill stream

lean hornet
#

Im currently Thinking for a better solution for replicating my actors look at direction for a coop top down game and would like to get some input.

kindred widget
#

@lean hornet That's likely fine for blueprint. Shorts would be a better representation of a single axis like that but that's C++ only. One personal quip is the timer though. Not everyone runs a game at 100 fps and it's also likely that network stuff isn't going to run that fast. That'd be better set at like 10-30 times a second. You'll end up with someone running the game at 50 FPS, and running two RPCs every tick more or less, which would make that half as efficient as just running it on tick.

lean hornet
#

aaaah allright technicallly i could get the delta time and use that as the input for the timer @kindred widget right ?

#

Well get delta time and multiply it by 2 it wont need updateing every frame.

kindred widget
#

I think it highly depends on what you need this for. If it's gameplay related, I'd try to make it as fair as possible by limiting it to like 30 times a second. That way someone on bad hardware running at 30fps, doesn't have a severe disadvantage over someone at 120fps who would have a four times more responsive cursor. Also depends on game. Like ProjectZomboid for instance, player uses mouse in a similar manner as you for facing, but the character rotates slowly, which means that super fast updating is fairly pointless.

#

If it's something like a simple visual pointer to show facing, Who knows. I'd still limit it, but running it more often would only have network traffic consequences.

lean hornet
#

aaah i see yeah that helps alot @kindred widget

kindred widget
#

There's a little vector math you can do also that will avoid weirdness with cursor hitting objects from the trace.

#

Like.. Say there's a rock under the cursor. It'd end the trace a little sooner than if it hit the ground behind the rock which leads to the character looking in a slightly different direction. If you line plane it and set the plane normal facing 0,0,1, with the plane origin at the character location, you can get where the cursor is in game space relative to the character itself rather than working around potential trace issues.

lean hornet
#

What did is make a different trace channel which is the floor and use that for player faceing. Only giving that object the trace channel.

faint parcel
#

Replication question: should replicated actors have the same name on the server and client for things to replicate correctly? I have some issues with GameplayAttributeSets not replicating correctly and thus, an actor dying to early on the clients but living (as expected) on the server, since it has remaining health.
I noticed that the Hit actor (the one being damaged) is called CHR_Footcoil_C_0 on Client 1 but CHR_Footcoil_C_4 on Server. Is this a symptom of an issue?

kindred widget
#

@lean hornet If you're ever curious about the math version. Just lets you not have to upkeep the level design of worrying about collision channels.

dark edge
lean hornet
#

Will definitly write that down @kindred widget Thank you for all this information!

#

Only thing would be to keep a ref of the pc otherwise there would be alot of casts which create overhead

kindred widget
#

@lean hornet Not entirely true. Casts don't really cost anything. There is a validity check in the cast that costs a bit, but it takes literally a half a million of them before you'll even seen a small framerate dip in a single frame. Non validity check casting is the same as using the pointer without it, you can use them a million times in the same function and there won't be any performance difference. Casting only ever costs really on memory. Casting to something, or even just having a pointer to it as a variable will make sure that the class being pointed to or being cast to is loaded before the class with the cast or pointer in it is loaded. In this specific case, PlayerController already always is loaded. So nearzero performance cost in the end.

lean hornet
#

I seee~ Thank you. I got that part thaught wrong then. Like many things i think xD. Thank you for clearing things up.

kindred widget
#

It's a common mistake from a lot of general learning with Unreal. You'll see people complaining about casting a lot because it's just a repeated issue. In smaller projects, you won't see an issue with casting to everything. Won't matter if everything in the game is currently loaded. With larger projects, you have to make sure you only ever have what you currently need loaded. You don't want to have a game with 20 levels, and half of level 17 loaded while playing level 1 because something in level 1 casts to something that eventually casts to half of level 17, sort of situation.

real nimbus
#

hi! so i have question, i have this event running on server, but when i play , Get hold gun is returning null on clients

#

in offline mode its working properly

#

on listen server mode, only server can see gun

dense citrus
#

Hope someone can help me , is there a easy way to check is the given Controller a local created Controller? In case of using spitscreen etc

#

or should i use my custom boolean ?

modern swift
#

what's the good solution for AI movement prediction over the network including pathfinding?

terse prawn
# dark edge It already doesn't.

So if two players join each other (seperate clients) and both of their characters have scene capture 2d components they wont overwrite each other's capture?
(Both using the same render target)

thin stratus
#

SceneCaptures are assets

#

Or rather the RenderTargets

#

Each is local and only usable once

#

You can't render two different things onto one.

#

If you test in the Editor, you might be using one single process and so your two clients use the same asset

#

If you actually start the game twice, it should work

terse prawn
#

So if two characters in the level gave the scene capture component it wont the character that isnt the client's wont mess with the render target?

#

So long as they are seperate instances of the game?

thin stratus
#

They don't replicate. Local Coop you'd need multiple RenderTargets. Online they won't override.

terse prawn
#

Okay I think i understand now.
Thank you! I really appreciate it

vague fractal
#

I'm having here a problem with outlining via PP.
Currently i wanna make all interactable objects highlightable if a player looks at it, but when i do it with this code here

void AGenericPickup::SetHighlight(bool NewState)
{
  if(!M_PickupMesh) return;

  M_PickupMesh->SetRenderCustomDepth( NewState );
  M_PickupMesh->SetCustomDepthStencilValue( NewState ? 2 : 0 );
}

It will get highlighted for everyone, and not only for the player who actual looks at it, any idea ? ๐Ÿ˜…

#

I've tried already some stuff with the LocalRole, and it seems like all connected players will call this method too with this role ROLE_SimulatedProxy + 1x the server with ROLE_Authority as i think

terse prawn
thin stratus
#

Can't comment on this. I've done this before without problems. Could be a coding bug.

terse prawn
#

I dont know what it could be. The player characters are spawned in. all have the scene capture 2d component all set to the "minimap" rendertarget but for some reason all client's see the last spawned character's scene capture

meager spade
#

We also don't have that issue

twin vault
#

all have the scene capture 2d component [...] character's scene capture
i think thats your problem, if you have multiple render captures, they are overriding each other, its not that they are replicated, its that you have multiple on the same local game

#

@terse prawn

terse prawn
#

How would I approach removing the unnecessary render targets? I tried telling the client to check if it was their character and currently controlled pawn and if not remove the scene capture but that dosnt seem to work

tender kernel
#

I am trying to make a simple multiplayer game with a listen server. Each player has one light they can turn on or off, but when playing only the hosts light is replicated for some reason. Every other players light is always off. The light is replicated but I am new to multiplayer and this is my first multiplayer game.

#

That is in the character blueprint

terse prawn
vague fractal
#

Kinda wonder how this is meant

#

Like i'd assume it would also be identical on client and server, or can you dynamically add new tags from client/server ?

meager spade
#

well it says as the name says

#

without that, it replicates the tag by FName (12 bits), by using index, its only uint16 (4bits)

#

so you get 3 tags per 1 tag in replication

#

typedef uint16 FGameplayTagNetIndex;

#

check FGameplayTag::NetSerialize_Packed

#

and you will see

vague fractal
#

Ye, i got that, but i'm not quite sure about the identical part.

#

I can't really imagine a case where it wouldn't be identical

dark edge
#

If I have an actor with replicate movement related properties checked, and I attach it to another actor that is replicated, is the attached actor constantly sending its world location or is only its location relative to parent replicated?

#

Like if I attach actor B to actor a, and move after a around, is after B constantly replicating its location or is the system smart enough to realize that it's location is always constant relative to its attached parent?

worldly raft
#

Hi all, I am trying to setup players sitting on a throne. I have a TP project and have a throne my players can interact with. Currently when they interact with it I have a โ€œsimpleMoveToโ€ node replicated so they walk up to the front of the throne, I just canโ€™t work out how to make them turn around and sit down. I have all anims for it, just not sure where to go from here. If anyone has the time to walk me through the process, or give me a rough guide that would be amazing!!! Feel free to DM me if you would like to help me and thanks! I love being part of such an awesome community!!! ๐Ÿ˜

strong vapor
#

[Help] Im trying to host a listen server on steam.. I've forwarded the port 27015 like the steam docs say to.. and then my game loads up as a standalone and then uses advanced sessions and then open level

#

when i open level.. do i need to put other stuff than just ?listen

meager spade
#

@worldly raft how is that a Multiplayer issue?

strong vapor
#

i can connect on my local network but when anyone outside tries to connect the games dont show up.. im assuming its a port forwarding issue but i set that up.. so maybe im not doing something right in the open level function?

worldly raft
#

@meager spade sorry, thought multiplayer channel would be a place to discuss replication code... what would be a better channel to ask my question?

meager spade
#

you never asked about replication i mean you kinda did

strong vapor
#

movement component sorta takes care of that for ya

meager spade
#

but the basic thing like turning them around etc, seems like it's not really multiplayer

strong vapor
#

is it working in a standalone?

#

are the characters turning when you use single player?

worldly raft
#

@strong vapor havenโ€™t gotten that far yet ๐Ÿคฆโ€โ™‚๏ธ not sure where to start hence asking for help ๐Ÿ˜ฉ but if Iโ€™m in the wrong channel I can move question to diff channel

strong vapor
#

@worldly raft do they turn around and sit down in single player? you can change back and forth in the Play dropdown

#

if you dont nkow how to even make it work in single player then ya its probably the wrong channel.. go to blueprint maybe.. or animation even

#

you wanna give some kinda MoveTo command in the Ai behavior tree.. and then a RotateTowards.. and then multicast an anim montage being played in the character script.. if you dont know what that means.. look into blueprint RPC's (remove procedure calls)

#

(Remote Procedure Calls)****

worldly raft
#

@strong vapor thank you for the info. I will se where this takes me ๐Ÿ˜Š

glad minnow
#

Hello there, is there a way I can make the movements happen on the clients themselves (and actually WORK) instead of the physics being done on the server and then the client viewing that? Thanks

pliant kernel
#

Hey i've a weird problem . i try to give the ability to open a menu when the player is in the trigger box it work when the host is alone. but if someone join the game the host have to be in the box and then the client can open the menu (the host can't) and vice versa if the client enter in the area the host can open the menu

strong vapor
#

@pliant kernel i dont think you're gonna be able to create a widget from that actor

#

i think thats your problem im not sure... the client doesnt have ownership over the actor it just overlapped on

meager spade
#

overlaps should run on client and server

#

you need to gate IsLocallyControlled

#

and only create and show widget locally

#

but we use the AHUD class to manager these types of widgets

pliant kernel
#

Okay i will try that

fallow quail
#

Hi everyone! Does the Steam Voice Chat has some kind of event that can be accessed when another player's voice is received?

modern swift
#

does replicate notify and replicate variable replicated to simulate proxy client? if not, how can I replicate variable to simulated proxy client?

#

I mean in C++

pliant kernel
#

@meager spade Just tried and nothing append anymore with isLocallyControlled, i have trouble to understand why is behaving like this. It seem to think i'm the other player

#

Maybe something is wrong with the way how i try i get my player controller ? i still a beginner i use ue4 for like 1 week and i don't understand everything correctly

native vector
#

someone how how to fix this play rate is to fast but is never set to play fast ? on client(18ms) and i still have no idea why is doing this and i had this in dev build

neat sky
#

Hey guys

#

Im new to unreal and working on a multiplayer game, but I have some control related issues

#

๐Ÿ‘† this is my exact problem

ancient bramble
rich ridge
#

@ancient bramble this is something your OSS should facilitate to achieve.

#

Whenever a player or listen server creates session, he creates the invite code and adds the invite code as an attribute for that session... So client searches for session via means of attribute..

#

So you need to choose the right OSS which supports custom attributes for a session

#

And search session for a attribute

ancient bramble
#

im currently using Advanced Session plugin to create and join sessions to

#

so using that is it possible to achieve this?

rich ridge
#

With advanced session plugin, it's not possible.

#

Advanced session is only the client side implementation, it doesn't have any backend.

#

EOS will do the trick for you.

bitter oriole
rich ridge
#

Yes agree

midnight karma
#

Does somebody know how to block opportunity to connect for session which has been already started?

rich ridge
#

@midnight karma there is OSS function called start session, so its common usecase is that match has started and joining is now prohibited.

#

This start session might be subject to OSS provider support.

ancient bramble
bitter oriole
#

A plugin cannot do matchmaking, for matchmaking requires online servers accessible from anywhere that process requests from clients

#

Steam has such servers, so do other game stores

#

EOS is one such store backend

#

If your store doesn't offer one, you can either implement your own service, which is rather easy but needs your own servers, or you can try using EOS

#

EOS is free too, though it's an external service from Epic that you will now depend on

rich ridge
#

^

bitter oriole
#

Personally I would strongly suggest your own service, you basically need a simple server in Python that stores HTTP requests from client saying "hi, need a match" every 5s when they are in matchmaking

#

Every time a client hasn't ping in 10s you remove it from the list

#

And then when you reach N players in the list, you tell all of them the server IP

#

It's quite simple

#

You just need your own server for that

thin stratus
#

I feel like you should always add that it's only simple if you have the programming knowledge.

#

Because it's not quite simple for everyone :D

rich ridge
#

Or else spin Nakama@ancient bramble

#

It's a full package, you can add code in javascript and extend features

#

Atleast javascript is easy I assume

ancient bramble
#

yeah the thing is, we have a simple system using vaREST to do stuff like login and signup, within the game and we are stuck on the matchmaking part, ie after the players login, they join a lobby, which shows thier friends and everthing. when he hits play, it should check if he has entered a lobby code and if he has, he should join that lobby of players(or something of that sort), or he should matchmake with only him in the lobby

rich ridge
#

Ohhh why not fork Nakama , it has auth system and everything else which you might need

ancient bramble
#

ok thanks for the help!

charred wren
#

Are GameMode assets not able to be touched by clients? I am making an intro scene, but noticed that the dedicated server is the only one able to call BeginPlay in my blueprint.

bitter oriole
winged badger
#

= use GameState

charred wren
#

Ah, kk

charred wren
#

Hmmm, despite migrating everything to a Gamestate

#

It seems that only the dedicated server calls BeginPlay

young yoke
#

Not sure if this is meant for #plugin-dev or here.

How is it possible to get multiple unique Oculus users logged in at the same time, using a single machine and in PIE? I have test users setup but there can only be on Oculus App opened at a time, and surely UE isn't tracking which one is opened, either. PIE with multiple players results in OSS thinking that they are the same player (the admin of the Oculus app manager)

dire tusk
#

Hi peeps,
is it possible to replicate a UGameInstanceSubsystem

rich ridge
#

@dire tusk theoritically possible as UGameInstanceSubsystem is an UObject but you should not do that.

dire tusk
#

I have an event dispatcher system.
It contains a collection and whomever is listening processes the event.
I wasn't sure how to queue an event and EVERYONE collect it in their event dispatcher system.

#

I saw some people create multicast functions but also see people stating avoid using it since there's better options to do similar things but I'm still studying on UE4 networking so still looking

lost inlet
#

a GI subsystem? nah. a world subsystem maybe

#

at least with a world subsystem you could create a proxy actor or something at runtime

brazen sluice
#

Why do my non replicated actors count toward the "network actors" count in stat net ?

#

is that normal or a symptom

lost inlet
#

need a bit more information than that, because I wouldn't consider it normal

brazen sluice
#

I have a few hundreds actors in my scene with this code

#

I attach an RMC componenent to them

lost inlet
#

RMC?

brazen sluice
#

There isnt much else in the scene aside from main character, and even then, the number of replicated actors is few hundreds

#

RuntimeMeshComponent

#

Is there a way to list the name of replicated actors btw?

lost inlet
#

and where is that code?

#

ctor?

brazen sluice
#

Code to initialise it is just this

#

I never set anything to replicate, this is client authoritative

#

As you can see for yourself there's nothing in my scene (except the 200 actors that are the terrain) and yet the number of replicated actors is 200

bitter oriole
#

You said actor, is there a Blueprint for it ?

brazen sluice
#

It's C++ based

bitter oriole
#

Okay but does it have a Blueprint

#

Or is it the straight C++ class

brazen sluice
#

straight C++

winged badger
#

@brazen sluice its the number of net addressable actors

#

which is all actors from the level included

#

NumActorChannels is how many replicated actors you have

brazen sluice
#

okay makes sense thanks you

vague fractal
#

I'm having here a hard time again on how to destroy actors properly.
I have the class AGenericPickup : public APickup_Base
Where APickup_Base provides this here

UFUNCTION(Server, Reliable)
void Server_DestroyActor();
void Server_DestroyActor_Implementation(){ Destroy(); }

The class AGenericPickup has a method TakeItem(T* Player)
Where it will call Server_DestroyActor();
But the Server_DestroyActor() wont get called at all if a player(client side) tries to take the item.
It will be called if the player(server side) tries to take the item.

The AGenericPickup instance was spawned from the server.
So i really don't get it to work so that clients are able to pick it up and destroy the actor

bitter oriole
#

So this is a classic case of "non-owning clients cannot RPC to server"

#

You need the picking-up process to go through an RPC of the pawn/character or playercontroller

vague fractal
#

In that case i think i know what i should try

tough pumice
#

Is there anything special you need to do in order to replicate the Owner of an actor?

#

I'm spawning a projectile and none of the clients are getting the owner and instigator from the spawn params

bitter oriole
#

(The actor, not the variable)

tough pumice
bitter oriole
#

If both the object in question and its owner actor replicate, then the owner will be replicated

#

Unless maybe the owner is not relevant - though I'm unsure of that

winged badger
#

if the owner is not relevant or static (loaded from package)

#

the owner won't exist on client

#

which means you can't resolve the valid NetGUID that you have

#

same goes for the instiagator

#

both the owner and instigator as members are replicated under the hood

tough pumice
#

I set the owner of the "projectile" to be the character it was spawning from before it was the item. Still no juice

bitter oriole
#

Sounds like the character is not relevant on client

tough pumice
#

Is there a way to determine that - I can see the character running around on the client

normal violet
#

Could someone explain to me why my listen server is rotating faster than the clients? Got this issue with all the movement (but it's implemented in the same way so that's not surprising). I'm working with a base Pawn class. I'm starting to understand how replication works, but not quite there yet ;). Tried some other things as well (MC instead of repNotify, using the component replication).

rain sandal
#

Can anyone point me to a concise reference on advanced replication optimization? Covering subjects like NetSerialize, FFast?

#

@normal violet Is the tick rate the same?

normal violet
#

can i check that? I currently still testing on new editor windows so I assume they all have the same tickrate

karmic briar
low helm
#

You have two different nodes , one replicated, one not, where the rotation goes up by adding hull rotation to the new change

#

So the second node is changing an already-changed value

#

Variabalize the value from the add node so youโ€™re only running that calculation once

bitter oriole
#

Is UWorld::GetFirstPlayerController() guaranteed to return the actual first one - hosting player in a listen server context ?

low vessel
bitter oriole
#

Cool, thanks

tough pumice
#

Btw - I ended up fixing it by not relying on the owner at all on the clients

normal violet
normal violet
limber gyro
#

The tick function is suposed to run both on the server and the client right?

low helm
#

it can be on or off for either one independently

limber gyro
#

but by default they should both be on right?

low helm
#

probably yeah

#

use the HasAuthority node, then GetActorTickEnabled

limber gyro
#

ye , im gonna do that see if i can figure this out

dire tusk
#

so my event queue is living in a UGameInstanceSubsystem.
Since calling GetGameInstance()->GetSubsystem<>
Is returning the same game instance sub system to either player.
I assumed the broadcasted message would reach both players but seems thats not the case?

kindred widget
#

@dire tusk There is only two ways to make sure that all players receive something, and that is to replicate it or RPC it.

limber gyro
#

is there a more elegant way to call an rpc with a client vector without having to pass it in the param every time u call the RPC?

kindred widget
#

What's wrong with passing it through? What is the RPC for? If you need the vector when the RPC reaches the other machine, it has to be sent through.

limber gyro
#

theres nothign wrong with it, the code is just gonna look a bit ugly thats all

#

i have a function "shoot" that then calls a server version of "shoot"(RPC), the first one handles client stuff like sound and animations and the second spawns the actual bullet in the server

#

and i do that for quite a few abilities diferent characters have

#

now i am adding a bit of code to improve game feel and i requires the server to know where the player is looking at the time of spawning the bullet

#

so if im gonna pass that info for like 10 or so rpc's its gonna be a bit ugly

#

thats all

#

and i was wondering if theres a better way to do it

vague fractal
#

Is it possible to create virtual RPC's in c++?

winged badger
#

it is possible to create a virtual _Implementation function for an RPC

#

@limber gyro i have weapons that shoot multiple projectiles and weapons that can penetrate their targets

#

i just pack all the hits from one shot, along with all relevant info into 1 RPC

limber gyro
#

ye but i cant do that because its multiple character with multiple abilities that run whenever the player feels like

#

so i am stuck with writing a bunch of repeated code

#

i guess

#

for shotguns n stuff im doing all the bullets in the same rpc too

winged badger
#

depending on accuracy you need and what type of camera you're using btw

#

server might have a fair idea where you are looking at

#

as that is updated under the hood via ServerUpdateCamera

#

and accessible via APlayerController::GetPlayerViewPoint (not 100% on function name)

limber gyro
#

ive tested that, server is off by quit ea lot unfortunately and that isnt even taking into account latency the player 100% has to pass that info or the game feel is gonna be off

#

i am doing a raycast from the player camera so if the server is off by say 1 degree it has the potential for the raycast to hit the wrong spot

winged badger
#

we have an isometric camera

limber gyro
#

oh ye i saw ur project

#

im doing an FPS so its quite diferent

winged badger
#

so we send the mouse projection vector to the server via unreliable RPC

limber gyro
#

u dont need it for gameplay?

winged badger
#

don't need what?

limber gyro
#

the vector

#

sincei ts unreliable

winged badger
#

since its sent so often

limber gyro
#

umm

winged badger
#

any resending would arrive after a next normal update

#

so making it reliable is pointless

limber gyro
#

thats good ot know

#

are you sending it every frame? if yes why?

#

unreliable works like UDP i assume

winged badger
#

not every, but close

limber gyro
#

is there any reason why you cant send it only when nescessary?

#

are u like displaying the other palyers cameras in a minimap?

winged badger
#

depending on what firing mode you're in

#

other machines need that vector to infer your rotation

#

if you're firing , it kinda defines where you're aiming at

#

and if the mouse is moving, or the player is moving

#

the vector is changing

#

which is... all the time

limber gyro
#

LOL

sick creek
#

Anyone know a sufficient way to replicate events that run on a timer? Iโ€™m Iโ€™ve tried to replicate timer events from server to client with a multicast but Iโ€™ll get infinite loop errors when doing so

#

Any point in the right direction would be appreciat

winged badger
#

multicasts run on server too

#

if they end up calling the multicast that called them...

limber gyro
#

can u be a bit more specific?

sick creek
#

Sure lemme get on my pc and Iโ€™ll give a example

limber gyro
#

an rpc in the game mode, wont that work?

#

multicast probably

#

with a timer on it

winged badger
#

and what game mode client side would receive it?

limber gyro
#

it has to have a connecton right

#

well you could call it in the game state

#

doing a for in all the players

winged badger
#

to what, a non replicated actor that client doesn't have?

#

besides, spooky never mentioned game mode

limber gyro
#

i think ive done somethign similar

#

thats true

#

to be fair the question is a bit vague

winged badger
#

he called the multicast from that same multicast

sick creek
#

Iโ€™m trying to replicate a helicopter that currently runs on timer based events works on server but clients donโ€™t receive anything

limber gyro
#

ur just trying to replicate the movement?

sick creek
#

The movement is based upon setting the actor rotation through variables

limber gyro
#

if its a player controled thing u should probably stick a movement component in there

sick creek
#

Yes You can possess it and control it but itโ€™s a pawn not a character

limber gyro
#

well it probably should be a character

winged badger
#

pawn can have movement components, but you're getting off point sonicphi

sick creek
#

And it would not be helicopter like if it was a character because of how Iโ€™m moving it

limber gyro
winged badger
#

that is true, but you did go for the movement like a bull after a red flag

limber gyro
#

LOL

winged badger
#

and there is nothing to indicate movement is a problem here, yet

limber gyro
#

movement components have stuff for flying i think

#

so if he just stuck it in there it would probably replicate on its own

sick creek
#

basically my issue was the timer based events would through infinite loops

limber gyro
#

without much issues

sick creek
#

thats why im wondering if there is another way besides multicast

winged badger
#

no prediction, but there is such a thing as FlyingMovementComponent

#

multicast can do it

#

its not responsible for your infinite loop

#

mistake you made using it is

sick creek
#

how come when i only run on server the infinite loops are gone

#

but when multicasting it throws me that

limber gyro
#

we can only tell that by looking at your code

winged badger
#

that just tells you the error is in client's handling of the MC

sick creek
#

unless im calling a multicast from a multicast that would probably explain it

limber gyro
#

if that helicopter can be controled by the players ur gonna need to give it a movement component regardless i think, if its jsut a thing that flies once in a while on a timer i would do it maybe with a "get all actors of class" and call a client rpc (not sure if this works never tried it lol)

rain sandal
#

is using a reliable client - server RPC for inventory item pickup event a valid use for reliable RPC?

limber gyro
#

yes

#

unless u wanna risk ur players no picking up items when they press a button

winged badger
#

depending on where you put it

limber gyro
#

which would totaly suck fro ma game design perspective

winged badger
#

typically pickup item itself is a bad place for it

rain sandal
#

cool, I heard some stuff about avoiding reliable, but that seems more appropriate than handling a fail

winged badger
#

you avoid reliable when multicasting something cosmetic

#

or when you are sending RPCs so often that reliable wouldn't help

limber gyro
#

well u can avoid realiable for anything cosmetic really

rain sandal
#

yeah, the server then calls unreliable RPC for the particle and sound

limber gyro
#

it just depends on how much u worry about network optimisation

winged badger
#

all movement components RPCs are unrelable

limber gyro
#

but they are called like every frame right? or close to that

winged badger
#

by the time client figures out he would need to resend a reliable RPC

#

it would already had send a more recent one

#

so reliable makes no sense here

limber gyro
#

i think a good rule of thumb is if it is something that affects gameplay and "game feel" u can call reliable on it, unless u are talking about stuff that gets updated every frame or very very often like position

winged badger
#

anything being sent every 0,1 or so seconds or more often - unreliable

limber gyro
#

ofc there is caveats to this but

winged badger
#

if it doesn't meet above rule - everything gameplay critical - reliable

#

and anything else - unreliable

rain sandal
#

yeah, for certain events I want the client to at least get ack of event processed by server, only place I'm using them

limber gyro
#

theres always exceptions, if you were building an app that needed to comunicate with a something in orbit every frame with a packet loss of 90% you could in theory call reliable on an every frame rpc xD

rain sandal
#

and waiting few ms is accceptable

limber gyro
#

but ye what zlo said is right unless ur doing something extremely weird haha

winged badger
#

just a few reliable RPCs on Tick would overwhelm the reliable buffer

rain sandal
#

mostly the concern is making sure it's not also spammable, more gameplay concern

limber gyro
rain sandal
#

yeah, like I have ability to drop and pickup items, I prob need to check for spam

#

or troll could overflow buffer

limber gyro
#

im always impressed by how much zlo knows about unreal

#

i have no idea how u dont work for epic man

winged badger
#

if a player needs to give an input

rain sandal
#

things like that I'm thinking about more now

winged badger
#

its unlikely it can overwhelm the buffer

#

it would need like 300 commands per second

rain sandal
#

yeah, just slowing the event triggering would be enough

winged badger
#

no need

#

player input is by default, slow

#

compared to a PC

rain sandal
#

it's something that needs real testing, but knowing the basics is a good start

winged badger
#

don't overcomplicate your life thinking about stuff you probably won't need to consider even in the optimization pass

#

for starters, ability to pickup and drop items would be nice to have ๐Ÿ˜›

limber gyro
#

@winged badger just out of curiosity do u know that much stuff about other areas of game dev like game design and directing or is it just unreal code?

rain sandal
#

well looking at this as one optimization pass, I want to hit a few things that are low hanging

winged badger
#

not even close, i could probably pass for a junior game designer

limber gyro
#

LOL

rain sandal
#

I seem to be getting much more benefit from optimising my anim bps right now though

#

thought I'd look at some networking at same timee

limber gyro
#

how do u even quantify game design skills, i find that a bunch of rules that u apply to a genre dont apply to others

#

its very hard to grasp

fervent yacht
#

It's an absolutely massive field for sure. The things I have learned doing this...

winged badger
#

it is also not easy to focus on designing and developing a system in code

rain sandal
#

My day job is easy by comparison, I've always done this as a hobby, but the skills have be quite transferable.

limber gyro
#

ive learned tons studying blizzard games

winged badger
#

and keep track of game deisgn considerations at the same time

meager spade
#

Game designer as a title feels game specific. Someone maybe good with a top down game but suck on a fps game...

limber gyro
winged badger
#

you can't

limber gyro
meager spade
winged badger
#

i think fingers is bad after 5 goblins

meager spade
#

Third time lucky

limber gyro
#

i dont wanna keep on with the offtopic but i just wanna say this one last thing that i found out recently about fps game design which absolutely blew my mind

#

projectiles dont hit walls that you are right next too

#

and while it would look natural for them to do so, it would feel terrible in game

meager spade
#

They don't they insta explode lol

limber gyro
#

well they are not suposed to insta explode

meager spade
#

If you are in about rockets ?

limber gyro
#

any kind of projectile

meager spade
#

Oh I know in most games rockets just insta explode without spawning a projectile at all

rain sandal
#

use procedural pose blend and disable fire

limber gyro
#

but thats bad game design haha

rain sandal
#

before that stage even, much better

limber gyro
#

the player always expects to hit the cross hair

meager spade
#

It does his the crosshair tho

#

Hit

limber gyro
#

i ve lost quite a bit of time studying overwatch because of this, how they do it, its very very interesting

meager spade
#

Its does a line trace and causes the same projectile damage there

#

No point wasting time spawning a rocket to travel one foot lol

limber gyro
#

i dont know the exact algorithm used, but the way i did it was to make a raycast and make the projectile switch colision when he reaches the raycast point

#

this isnt perfect but its a very good aproximation of what blizzard and apex legends did

winged badger
#

what do you need the collision for then?

#

obviously not to detect hits

limber gyro
#

the colision ignores only static stuff

#

for players its always on

#

but for example if u have a projectile coming from your left side from the tip of your weapon

#

and that weapon is close to a wall

#

it wont hit the wall

#

because while the projectile doesnt reach the point of the raycast it ignores static meshes

#

it will do some cliping in some extreme cases but the game feel is going to be 100x better

#

honestly ive lost more time on this little feature than i should've xD

#

but a game is either good or bad

#

depending on how it feels

dark edge
#

I do my projectiles as piecewise line traces. So if the velocity is high enough or impact is close enough, it is effectively a hitscan.

celest pawn
#

Quick question, variables local to animation BP. Can they be replicated in the same way as they would be in a character BP? I am wondering because from what i see in this pic, the server is getting the clients rotation variable, but the clients are not. (Rotation variable and function is local to AnimationBP)

low helm
#

Animbp isnโ€™t replicated

#

The values need to change on the character

vivid seal
#

spent a few hours today going through CharacterMovementComponent source in 4.26 with the new FCharacterNetworkMoveData struct. i'm trying to avoid hard coding every different type of movement, so i was going to write a system where my Custom Movement Mode just ticks an external object derived from UCustomMovement (class I made), based on a TSubclassOf variable. I'm wondering how to add a TSubclassOf variable to FCharacterNetworkMoveData, as it doesn't seem to be serialized correctly

dark edge
#

There's nothing special about UE4, jsut buy cloud servers, load them up, profit? If you have to ask the question, probably don't target a dedicated server type of project.

#

Unless you're super careful that's a recipe for a bill with 2 commas in it. But I like DigitalOcean. You'll have to be suffering from success tho.

#

Start with making a game worth having automated server deployments. If it's your first game, don't do it. Just make a project that can be community or listen server hosted.

#

Valheim and GMod and TF2 are all huge games and don't or didn't start with automated servers.

hollow eagle
#

If you're looking for auto-scaling systems then none of the "basic" cloud offerings will do that, it's something you build yourself on top.
For services that already exist, you want to look specifically at amazon gamelift, gamesparks, or azure playfab

fossil spoke
#

Dont use Gamesparks.

hollow eagle
#

Unreal also has nothing to do with the hosting as was already mentioned. You can use any service that lets you run your own executable.

#

I can't speak for any of the services, though that's the first time I've seen someone jump on gamesparks that quickly lol

#

look into them yourself

#

they have their own pricing and one is amazon, one is microsoft

fossil spoke
#

Gamesparks will be discontinued. Also its trash lol

hollow eagle
#

good to know

#

I only have experience with playfab myself, I just knew gamesparks exist(ed?)

#

???

fossil spoke
#

Thats got nothing to do with your Service you use.

#

How well optimized your game will ultimately help determine your usage costs.

#

Pricing between different Services is on you to determine as well.

#

Since every project is completely different

#

With different requirements, theres no way to make comparisons.

hollow eagle
#

pricing/performance is also not easy to compare and something you'd have to do yourself. Every cloud provider runs their stuff differently and on different hardware.

#

but both basically let you use most standard Azure/AWS VMs

fossil spoke
#

CCU is an entirely abstract term.

#

Same thing.

#

All depends on your game.

#

And how it performs

hollow eagle
#

playfab has pricing that's partially based on MAU but it's unrelated to server pricing

#

that stuff is just for the non-multiplayer-server stuff

#

ie player data storage and other services you don't necessarily need

fossil spoke
#

No, we cant.

hollow eagle
#

no, because it depends on your requirements...

#

there is no flat pricing

#

it entirely depends on what VM sizes you use

#

how many

fossil spoke
#

You have to do the research based on your knowledge of your game, how its built and what usage it will incur.

hollow eagle
#

etc

peak sentinel
#

That means my actors sends 810 bytes each? (no replicated actors rather than my zombies on the level, and one player character)

#

stat net on console

#

731 is almost 1kb and it looks huge

#

Not sure, probably on each server update

#

Default system should be like that

hollow eagle
#

only properties that change will replicate

#

also, you sure you aren't reading that stat wrong? That's the maximum that was sent for that stat

#

it's not saying every single one sent that much

peak sentinel
#

Min is also 652, isnt that huge too?

hollow eagle
#

depends, did it send the initial replication data once and then never send anything again?

#

because I doubt it'd track 0

#

or do a bunch of properties always change at the same time?

#

there's no indication of how often that data is being sent

#

so you have no way to tell whether that's bad

peak sentinel
#
USTRUCT()
struct FFRZombieMovementState
{
    GENERATED_BODY()

    UPROPERTY()
    FVector_NetQuantize100 Location;

    UPROPERTY()
    FQuat Rotation;

    /*
     * On engine source code velocity used with NetQuantize10 instead of 100 (CMC)
     * No idea why but it looks OK?
     */
    UPROPERTY()
    FVector_NetQuantize10 Velocity;
};

This is changing on 45 zombie actor instances with 66 netupdatefrequency

#

changes were too frequent on both max and min values

hollow eagle
#

read the pricing pages...

#

search "amazon bandwidth pricing" (or azure bandwidth pricing or whatever)

#

ingress is usually free, as is transfer within the datacenter (and sometimes between datacenters in the same zone). What costs money is egress (download) from your servers to players.

#

both the gamelift and playfab pages list the basic egress pricing

#

and both vary by region

hollow eagle
#

that seems to be supported by the usage of STAT_NumReplicatedActorBytes - it's only reset to 0 once per ServerReplicateActors call and is incremented from there, not set

peak sentinel
#

Thanks

hollow eagle
#

sure... if it's actually doing that every frame

#

pretty sure that stat counter doesn't reset every frame - it's showing the min/max for all time

peak sentinel
#

Values are constantly changing something like per 0.4 seconds

#

more or less

#

its not per frame probably

#

also it depends on your netupdatefrequency settings of actor

vivid seal
#

on top of my earlier question, there apparently exists a struct called FCharacterMoveResponseData which is presumably contained by FCharacterMoveResponseDataContainer. I found FCharacterMoveResponseDataContainer easily enough, but the struct it contains is just an FClientAdjustment, and I don't see FCharacterMoveResponseData anywhere at all. anyone know what this is?

glad minnow
#

Hello, I have a character that replicates, and I'm adding physics on it, but the problem is that whatever is being applied on the server character, about x10 of physics forces is being applied on the client character and I have no idea why. I would really appreciate if anybody is able to help. Thanks.

north heath
#

I have a landing animation that is played when entering a landing state, that only plays on the server and the client controlling the pawn. I thought all animations in the state machine is replicated?

thin stratus
#

What makes you think that?

#

The variables and events that drive the animation blueprint and montages need to replicate, not the animBP itself.

#

So usually all the events and variables are replicated in other actors like the character itself

north heath
#

Ok I will look into this some more

ancient bramble
#

how would i go about creating an OSS inside unreal, is there any guide?

bitter oriole
#

Create a plugin for it

#

For example OnlineSubsystemIOS in source is a plugin for an OSS

#

Actually all OSS are so check any of these out

ancient bramble
#

is it possible for VaREST to recieve requests and process them?

#

like for eg, a normal server send a request to the game, is it possible to get that request inside the engine?

rich ridge
#

I already gave you a product name Nakama, it uses gRPC where server can send events to clients.

#

And gRPC is actually http/2 protocol

#

Beleive me Nakama is very wonderful product.. if you are ignoring it only because you are finding it hard to understand or don't know golang.. then please dedicate some time to understand it. You won't regret trying out Nakama.

ancient bramble
#

the thing is we are testing stuff and we are a small indie company

#

so we dont have a lot of money to spend atm

#

we already started implementation of Authentication and stuff to our main build and its pretty hard to revert to another plugin

rich ridge
ancient bramble
#

it showed me pricing and stuff

rich ridge
#

Source code of Nakama server.

potent cradle
rich ridge
#

Yes and if you want to become their enterprise customer then u will have to pay.. else you can host yourself..

ancient bramble
rich ridge
#

Remember Nakama team do release the latest code for every one either enterprise or free customer

#

What do you mean??

#

I didn't understand

#

Go is server side language it has nothing to do with client side language

#

And by the way Ken Thomson was part of team who developed go.. so go is not small time language

vague fractal
chrome bay
#

Only _Implementation should be virtual

#

You can't have RPC's in an interface

vague fractal
#

Oh, that seems really problematic for me then

chrome bay
#

To get around it you would likely just declare a pure virtual like CallServerInteract or something, and whatever implements the interface would handle that

#

But to be honest, it seems backwards to me - I would move the networking portion of interaction to the character, something like Server_Interact(UObject* Target)

#

That's a more resilient setup IMO, otherwise you have to duplicate networking logic wherever you use the interface which in a sense defeats the purpose of using the interface at all

vague fractal
#

Alright, i'll try to move the logic then to the player class ๐Ÿ‘

golden nest
#

Hi, does someone know how to use ClientTravel? Cause iยดm executing the "clienttravel /Game/Maps/MyMap" command and log print "Unknown command"

chrome bay
#

ClientTravel isn't callable from console but LocalTravel is the console command which will call it internally.

#

It will only work if you are currently playing as Standalone though.

#

I.e. not a server or currently joined to a server

#

though I believe the open command will do whatever

golden nest
#

So if i call open level it will work for local travel?

#

Iยดm trying to travel to a map when iยดm currently in a session

tawny mason
#

Hi guys

#

I'm profiling my multiplayer game, and i see a lot of RepRootMotion calls, way more than anything else, have you guys had this problem before ?

brazen sluice
#

When you set something on replicated, does that mean both the server and owning client can modify the value and have it propagated? Or only the server?

tawny mason
#

@brazen sluice only server

brazen sluice
#

Ah thanks, is there a way to make it editable by the client other than RPC every update ?

winged badger
#

no

brazen sluice
#

(just for the sake of convenience)

#

Okidoki thanks !

#

That does explain a lot

tawny mason
winged badger
#

you should relly grab cedric's compendium and give it a couple of reads

#

@tawny mason and why did you decide that is a problem?

tawny mason
#

my clients are getting saturated and i have setup the dormancy for my objects and such

#

the only ones i can't seem to optimize more is my AI, they move around and animate with root motion, and those 2 calls are the heaviest, from what i see on my profile

winged badger
#

that is CMC

tawny mason
#

RepRootMotion, replicatedMovement and RepAnimMontageInfo are the ones called the most, with a big difference

winged badger
#

replicating root motion

#

whats your considered actor count? listen or dedicated serveR?

tawny mason
#

listen server

#

i have between 6-15 AI characters at any given point

winged badger
#

that shouldn't cause significant network load

tawny mason
#

other actors i have don't do much more than replicate movement and send the odd RPC

#

most have netfrequency set to 10 or lower

#

AI characters have it set to 16

#

seemed as low as i could go without getting artifacts

#

This is the bytes | count profile i get on a 3000 frames profile

#

Could it be my moves are not getting combined ?

winged badger
#

3000 frames 51kB,,,, that is not a whole lot

tawny mason
#

yeah i thought so too, but it does seem to get saturated

#

this is the biggest hitter by far as well

winged badger
#

not because of this

tawny mason
#

ok so i might be looking in the wrong place

winged badger
#

there are ways to clog the network other then bandwidth

#

most notable one time for server to evaluate actors for replication

#

which is capped

chrome bay
#

dropping lots of reliables maybe?

#

or hammering with unreliables even..

#

Calling unreliable RPC's very often can have a pretty negative effect too. I think people sometimes think it's okay because they know they'll be "dropped", but they can still saturate you before that happens

tawny mason
#

the biggest count of rpc i see is ServerMoveDualNoBase

#

707 on a 3000 frame profile

chrome bay
#

The "Dual" portion is interesting

tawny mason
#

the next contender is ServerMoveNoBase

winged badger
#

how many replicated Actors do you have on the level?

#

and also, did you profile it in PIE?

tawny mason
#

i profiled in PIE and in a debug build

#

similar results

#

with stat net it says 1,700 actors aprox on the num actors and num network actors says 238

#

the weird thing is, if i clamp fps to 30 on all clients and the server it stabilizes

#

i tried to clamp network tick rate with

#

MaxNetTickRate=30 NetServerMaxTickRate=30 LanServerMaxTickRate=30 NetClientTicksPerSecond=30

tawny mason
winged badger
#

insights can profile that

#

also

#

just a few actors with stupidly high net priority are enough to destroy the network

#

our designer once "accidentally" put net priority 100 on trash mobs

#

when there were 20ish of them around, nothing else would replicate properly

tawny mason
#

ok i will check that, could you point me to some information source about insights usage ? i have been using it for some over the top profiling, but i'm not sure i would know where to check for the info you mention

#

i saw this video showcase about the insights profiler and i read a bunch of documentation but i haven't seen anything that tells me i'm overbooking the server time as you say

tawny mason
chrome bay
#

It might be nothing to worry about, but just means you have unacked moves that are being resent

#

But to be honest, that's likely anyway if you're saturated and dropping packets a lot

tawny mason
#

ok ty for the info. If you have any information source for this kind of knowledge, other than the source code comments i mean, i would appreciate it.

golden nest
#

How can i move a client to a new map without disconnecting it from server to do some functionality and come back to server map??

winged badger
#

by itself?

#

you can't

tawny mason
#

@golden nest you can't really move them to another map, since it would disconnect you from the server

winged badger
#

@tawny mason our biggest network modifications were cutting down the number of replicated actors

#

never had a problem with bandwidth, even with 8 players and 150 AI running around

#

on listen server

tawny mason
#

ok, so is the, (sorry for repeating myself) 1,700 actors aprox on the num actors and num network actors says 238 a lot ?

#

our actor count is fairly dense but i did not think it was a lot

winged badger
#

we had 33k actors, all Networked according to Stat Net, and 1300 of them replicated

#

when we started fixing it up

golden nest
tawny mason
#

and if the server moves you, it will be moving everyone, research ServerTravel

#

@winged badger did you opt for some sort of centralized actor handling the other actors replication ? I guess i could try and setup something like that

winged badger
#

we moved most of simpler actors to non-replicated, using network manager actors with fastarrays to do their replication for them

golden nest
#

But i donยดt know how to do it

winged badger
#

yes, thats what ServerTravel calls on Clients

#

when server moves everyone to new map

tawny mason
#

"If called from a server, will instruct the particular client to travel to the new map (But stay connected to the current server)" <- as i said earlier, this will move everyone not just you

winged badger
#

you want a private level for a client, stream one in just for that client

tawny mason
#

@winged badger thanks for the help, i will think about that and check what i can do ๐Ÿ˜„ I will be back thoe ๐Ÿ˜›

winged badger
#

@tawny mason with the load you described

#

network should be completely fine

#

if it happened to me, i would go checking if one of the non-programmers played with reliable RPCs

#

and wired a few on Tick, 5-10 or so is enough to break everything

tawny mason
#

ok, thanks for the advice i will check our blueprints just in case ๐Ÿ™‚

winged badger
#

never trust anything in blueprints ๐Ÿ˜„

tawny mason
#

but i guess the profiler would tell me right ?

golden nest
tawny mason
#

i will check the ones coming from bp just in case haha

#

ty @winged badger

winged badger
#

odds are you don't even need a private map

golden nest
#

I donยดt want other clients to see what iยดm doing while iยดm doing it haha

winged badger
#

unless you RPC it to server

#

they can't see anything

golden nest
#

So i can run clientside functionality without anyone seeing it? But server wonยดt let me do it, right?

#

So i have no choice to RPC it to server

#

Correct me if iยดm wrong

winged badger
#

you're wrong

golden nest
#

hahaha

winged badger
#

server can't stop you from doing anything locally

#

it can just verify if what you sent it via RPC is sane

#

and say no if it isn't

golden nest
#

So if i call "Spawn actor" Client side, it will spawn only in my client?

#

I thought server wonยดt let me spawn anything

winged badger
#

it will let you spawn it just fine, you never even ask it if you can spawn it

#

it won't be replicated, and others can't ever see it or know anything about it

#

which is in most cases undesireable

#

note that client side spawned actor will return true if you check for authority role on it client side

golden nest
#

But, for example, bullets are spawn clientside

#

So, there are exceptions

#

haha

#

Iยดm trying to enable clients to operate a certain machine at the same time

#

So, i thought clientside logic would work

#

what do u think?

#

itยดs there another way?

#

@winged badger and what if i donยดt replicate movement? The client starts running crazy ๐Ÿ˜ซ

#

To many questions..

unkempt tiger
#

the client can spawn anything it wants, anything on the client is after all spawned by the client. It's only sometimes that that spawning is triggered by code executed from incoming server packets for the sake of synchrony

golden nest
#

And why if i set Replicate Movement to false client starts moving really fast?

unkempt tiger
golden nest
#

Ok, i will keep trying to do this things, thank u all for ur knowledge

tawny mason
#

@winged badger any chance you know about the push model replication ?

unreal epoch
#

I know this is kinda a repost from #blueprint , but I want to move this topic to the right channel.

#

Having a bit of trouble with networking. I have a 1st person and 3rd person guns that need to have a loadout (set of attachments) applied to them. GI is the game instance, where the loadout is stored. "Dummy Gun" is the 3rd person gun.

#

but the loadouts dont seem to be replicating (right is server, left is client)

#

it just seems to copy whatever the current player is using

random nymph
#

What could be causing calling JoinSession after succesfull session search on c++ to not travel the client to the session map?

unreal epoch
random nymph
#

When using blueprint nodes it works

meager spade
#

Multicast and using get player character 0

#

๐Ÿค”

unreal epoch
#

tried that

#

seems to only work on client

meager spade
#

I know I can see

#

It's all wrong tho

#

Why is your gi holding the load out?

#

Gi only exists locally

unreal epoch
#

because I store it from when it is selected in the main menu

meager spade
#

The youngest gunloadout then send a rpc

#

What's to say gunloadout property will best set on clients ?

#

What is going to happen first? Property replication or rpc ?

#

On phone sorry for typo

unreal epoch
#

lol

meager spade
#

Then you send not the youngest

unreal epoch
#

idk what those are lol

meager spade
#

Well why you messing with multiplayer without knowing what a rpc and property replication means ?

unreal epoch
#

i am new to multiplayer stuff

winged badger
#

๐Ÿฟ

unreal epoch
#

maybie its something I know but dont know the name of

meager spade
#

There is a pinned pdf on it read it and then come back too much to explain

#

Gist is you have a replication race issue

#

Your rpc is arriving before the property

#

Also only server can set replicated properties

unreal epoch
#

oh

meager spade
#

Your client needs to do a server rpc with its loadout

#

Set this as the value then your property needs to be repnotify and in the new onrep function set the weapon.

unreal epoch
#

ill read up on remote procedure calls

meager spade
#

As only the local client knows its loadout

#

Server does not

unreal epoch
#

ye

meager spade
#

So read what I put and do it. Should be really simple:)

#

I explained all the steps

#

But get cederics compendium from pinned and read it. Doing this stuff without understanding basics will be painful

unreal epoch
#

ok, so rpc's are just those replicated events

meager spade
#

So server rpc from client to set loadout property with clients loadout. Make that property repnotify and in onrep set the weapon.

meager fable
#

What happens if I set my actors net update frequency to 20 and then put some RPC in tick? If someone plays at 60hz it's still only going to get called 20 times?

unreal epoch
#

think it works now, thanks for all the help!

#

that makes sense, the client should wait for the replicated variable to change before applying it

meager spade
#

no need for setup gun local

#

in the server rpc

unreal epoch
#

oh yea

meager spade
#

as OnRep fires for server aswell

#

(in BP only)

unreal epoch
#

thats redundant

meager spade
#

@meager fable no

#

net update frequency != RPC

#

that is when the actor replicates its properties

#

RPC's fire off as soon as they are called.

meager fable
#

Oh okay, guess I`ll put it on a timer then, thanks

mellow stag
#

I had a question about replication, I am doing a sphere trace that converts a static mesh to an actor.

winged badger
#

why would you want to do that?

mellow stag
#

It's because I am using Voxel plugin which spawns the foliage as meshes which I need to convert to actors to make them interactable

winged badger
#

you don't really, just needs a manager and ISMC

#

making random foliage into full replicated actors because a player decided to pick an apple is not really feasible from the networking perspective

olive horizon
#

Hi guys, I'm having some problems with network sync. I used to custom events, one for the server (serversmoothrotationYaw) and one for the clients (clientssmoothRotationYaw), the server event runs on the server and it's replicated, while the clients events it's multicast and replicated. I call the server event on the event tick, but the rotation is replicated on only on the server. (the server event is connected with the clients with an execute node). The clients rotation yaw event only manage the rotation of the capsule component while aiming.
Can you help me?
I'll post some screenshot of the blueprints.

ancient bramble
#

Hey guys, is it possible to authenticate a user( in Nakama) using username and password

bitter oriole
#

This is more of Nakama question, not sure anyone here knows

#

Whatever Nakama is

ancient bramble
#

its an OSS

mellow stag
#

Anyone experienced with Replication and explain why the tree only goes away on the hosts side

olive horizon
#

Did you create two events? One for server and one for clients?

#

the server should be server only and replicated, while the clients one should be multicast and replicated

meager spade
#

@olive horizon ?

#

@mellow stag is your tree a replicated actor?

mellow stag
#

I am only using 1 event, I'm pretty new to replication so I have no clue how to start

vocal cargo
#

heys guys, I've asked here before but I still couldn't get this to work... I have a replicated pawn and a character, that work fine on their own, but when I try to walk on top of that replicated pawn with my character, it's incredibly jittery

#

any ideas on how I can fix this?

hybrid zodiac
#

Hi everyone, I'm using ServerTravel rather than SeamlessTravel when changing maps on my server. If the server has a password, the player can supply the password to the server through the URL they use to connect (assuming they have entered it in the server browser). The problem I have is that if an admin sets a password on the server mid-game, then the next map change results in everyone on the server being booted off since they don't have the password set

#

To resolve this, I want the server to maintain a list of authorised players, so if you're already on the server then you don't need a password during map change

#

I plan to do this by maintaining a list of unique references to players within the Game Instance

#

I had a question: Is the FUniqueNetIdRepl passed during InitNewPlayer consistent for each player, or would it be regenerated during a ServerTravel?

#

i.e. can I maintain an array of FUniqueNetIdRepl to identify players who don't need a password to connect, or would each client get a new FUniqueNetIdRepl value when travelling?

meager spade
#

its generated on connection

#

i think server travel is a new connection, so the ID likely changes

#

but you would need to check that

sinful tree
#

Anyone ever seen an event node that refused to replicate to server (Set to "Run on Server") and ran on client instead? That was fun trying to narrow down the problem... Just had to recreate the event and it worked fine -_-

meager spade
#

i don't have anything setup to check yet

#

Sure it was the event and not an ownership issue?

sinful tree
#

100%.

meager spade
#

strange, then again i do hardly any RPC's in Blueprint

#

could have been a slightly corrupt bp

sinful tree
#

Again, just recreated the node in the exact same place, hooked up the call the exact same way, worked just fine. Really weird XD

hybrid zodiac
#

@meager spade hmm bugger, will need to think of something else then. I cant get seamless travel to work, the clients don't travel with the server

humble cargo
#

Guys, please tell me how to access the cheat manager from the client? Or it can be accessable from the server only? I have it not valid on the client(

meager spade
#

server only

humble cargo
#

@meager spade ok, thx

waxen quartz
#

Is there a delegate that fires on the server/host for when a client successfully joins a session?

#

or do I just RPC after joining lol

cyan crane
#

Can someone suggest how to properly replicate grabbing objects in VR?
I grab the cube and move it around on my client, but it stays stationary on the other clients. Although the character itself is normally replicated.
I have set Replicates and Replicate Movement true in the cube replication parameters. And also in StaticMeshComponent Replicates it is also true

winged badger
#

@waxen quartz depends what you need it for

#

there are a few places in the engine you could hook int

#

o

waxen quartz
winged badger
#

to whom?

waxen quartz
waxen quartz
winged badger
#

those are fine

#

PlayerState will register with the GameState as well

#

but not immediately if you delay BeginPlay

waxen quartz
#

got it thanks

winged badger
#

both login and post seamless travel paths lead into handlestartingnewplayer

#

pretty much immediately

#

and PS registration will be delayed if you don't start a match

waxen quartz
winged badger
#

gamestate doesn't have that function

#

and it does

waxen quartz
#

oh wait you're right my bad

waxen quartz
#

I'm guessing I override AddPlayerState and fire my own delegate in there?

winged badger
#

that works

#

note that won't be as soon as for clients, but it will be as soon as its practical[

summer tide
#

So I attach my player to a boat. Then use the player's forward and turn axis to control it. How would I do that? I am thinking call a server rpc from the player and pass axis to the boat BP.

#

I only got it working via interface but it won't replicate

dark edge
summer tide
#

I don't want that since I still want to use the upperbody for fishing and shooting

dark edge
#

In that case have a boat reference variable on your character. When you go to add movement input, check if that reference is valid or not. if it's valid, send the input to the boat. If it's not, use it in the character. Then you enter an exit boat mode by setting and nulling that reference

#

Then you can have it set up so when you press the interact button, you get all boats within a radius and select one to be your boat, play the getting in boat animation, and then set the reference

summer tide
#

I got the boat working but not in multiplayer. How would it look like if I replicate it?

dark edge
#

The same way, just do all the setting of references on the server. and that case, setting the boat throttle would be something like w goes to a boat event which calls an RPC which sets the throttle value

summer tide
#

So I have the boat ref in my player BP. Should I control the boat from player bP or use server RPC or interface? Currently I'm using interface to talk to the boat from player bp. But eon't work in multi.

dark edge
#

Or set the boat actors owner to the player

halcyon totem
#

quick question does anyone know if I need to make different HUDS for different players, I would have to make the hud in the player controller correct not the the player blueprint ?

dark edge
#

If you're making evolve, then yes, everybody's going to have a different ui. If you're making dota, then no

#

@summer tide Either way there are 2 jumps that need to be made. Client to server, and character/PlayerController to boat.

summer tide
dark edge
#

@summer tide ya that looks right but I would set up input to operate on a boat ref

#

Ref valid, send to boat, otherwise walk

summer tide
#

For some reason the server RPC won't call the interface

dark edge
#

I said it before, set the boat reference on the server, and replicate it out.

#

Or you can sit in the client and send it to the server through an rpc, either way. the server and client both need to know what boat you're talking about

fallow quail
#

Hi! anyone here knows how to adjust the OnlineSubsystemSteam voice chat volume to make it louder?

vague fractal
#

Is there anything which would stop me from writing some kind of custom interface class which allows virtual RPC methods ?

unreal epoch
#

Need a bit of help again with replicating impact effects. It shouldnt be as complicated as last time.

rocky night
#

Hi ๐Ÿ™‹๐Ÿป

unreal epoch
#

so my problem is that you can only see the impact effects on the server, not the client

shut gyro
#

I have a premium steam account (paid $99) and I'm not sure if that is equivalent to the definition of greenlighting as people have talked about here and if I can only test it on the Spacewar app id

vague fractal
#

Would this here be bad practice ?

void APlayerCharacter::SetInteractableObject(AActor* InteractableObject)
{
    if(HasAuthority())
    {
        M_InteractableActor = InteractableObject;
    }
    else if(GetLocalRole() == ROLE_AutonomousProxy)
    {
        Server_SetInteractableObject(InteractableObject);
        M_InteractableActor = InteractableObject; //<-- to also set it on the client
    }
}
void APlayerCharacter::Server_SetInteractableObject_Implementation(AActor* InteractableObject)
{
    if(HasAuthority())
        SetInteractableObject(InteractableObject);
}
mellow stag
sick creek
#

Iโ€™m stumbling upon a dedicated server issue where I want clients to host there own session and join together in lobby via peer to peer and then the host tells everyone to join the dedicated server thatโ€™s hosting the actual in game gamemode my issue is Iโ€™m currently not using a online subsystem and I cant pay for steam for a little bit how would I go about this?

#

I donโ€™t even know if thatโ€™s possible but hosting the dedicated server in the lobby will provide me no way to actually tell who is host or not

winged badger
#

@vague fractal why the runarounds?

#

don't need authority check in server RPC implementation

#

and server RPC called from server is just a normal function

#

so why not just call it as one?

vague fractal
winged badger
#

you are just obfuscating your code there

#

everyone just calls the server RPC

#

and server RPC sets the member

#

also that naming convention looks a little weird, prefixing the variables with m, f and so on

#

its painfully obvious its a member, it doesn't need the prefix

vague fractal
#

also that naming convention looks a little weird, prefixing the variables with m, f and so on
its painfully obvious its a member, it doesn't need the prefix
Ye, it is obvious, but this allows my IDE to show me all custom made things which i really prefer in an heavy OOP API.

and server RPC called from server is just a normal function
so why not just call it as one?
I'm not quite sure what you mean by that ๐Ÿ˜…

winged badger
#

server can call a server RPC

#

its just a normal function call if it does

vague fractal
#

I'm sadly still too dumb for multiplayer stuff or more like networking in general. Don't even have 1 month into it >_>
I've probably made a lot of dumb things by now, but so far as i can tell it's working ๐Ÿ˜…

winged badger
#

not for long if you continue to obfuscate the code

#

you have a ServerFunction and SetFunction

#

and both call each other

#

that is pretty terrible

vague fractal
#

So should i rather just call the ServerFunction with the logic ?

winged badger
#

instead of both clients and server just calling the server function

#

and server function being the only one calling set function

#

and set function never calling the server function

#

you also don't need a single role check that way

#

KISS - keep it stupid, simple