#multiplayer

1 messages ยท Page 601 of 1

uncut atlas
#

Oh that makes sense.

winged badger
#

for example, on GameStart, if you try to access the PlayerState via the PlayerState member in Pawn, which is replicated

#

you're likely to get null on clients

#

as for the PlayerState Actor itself usually takes a while till it gets to replicate

#

in that case - your Pawn would have valid NetGUID to the PS, but would be unable to resolve it at the time, since the object hasn't replicated yet

uncut atlas
#

Thanks for the example

winged badger
#

OnRep still fires when the NetGUID is resolved though

kindred widget
#

@brave solar You may need to show how you're setting the bool and how you're debugging it.

limber mortar
#

It is an actor in the level (so on the server.) I tried also just running Any damage straight into the print string

#

In both paths the bolt will not appear

#

the print string fires off

lost inlet
#

it fires off on the client?

limber mortar
#

Oh dang, it fires off on the server twice, wonder why it won't fire on the client, let me look at some stuff

lost inlet
#

like not checking the replicates setting?

limber mortar
#

The actor is set to replicate

#

I take server damage and run multicast in other parts of my game, this is what I don't like about being self taught lol. Doesn't make sense to me

lost inlet
#

does this even need to be a multicast?

limber mortar
#

I tried without

lost inlet
#

seems like something you'd do in an onrep

limber mortar
#

didn't work, so I tried with

#

let me try that

lost inlet
#

and maybe you want to try affecting the visibility of the MESH rather than the entire actor

#

and you should make sure that any default state for the actor is also valid

limber mortar
#

I tried the mesh too

#

that is why I went to the actor

#

ok, hold up, I am making a new actor

#

something has to be jacked up

lost inlet
#

well these things are always much easier to debug in C++, I never do anything but basic stuff in BP

#

but you might want to make sure the actor starts in a correct default state

limber mortar
#

I might just delete the old one. my first attempt with a blank actor, without hiding and unhiding, is showing right

#

I think I might have it

limber mortar
#

things look right as far as the state it starts in to me, I have never had to setup anything special state wise where I destroy my other actors, lol

lost inlet
#

if that doesn't work, then it's probably a really dumb oversight. I would make sure this is the actual actor you placed in the level and it is replicated

#

I've never had issues with SetLifespan unless something else was invalidating the timer

limber mortar
#

I doubt something is invalidating it, that is the only code running in the BP right now, its definitely placed in the level

#

Both my new and old

lost inlet
#

well I obviously can't see everything you can, if the print string is showing then after 5 seconds, the actor should be removed from the world

#

if the actor takes damage again in that 5 second window, the timer will reset back to 5 seconds

limber mortar
#

Yea

#

ok

#

I have an idea

#

I've made some progress, got lifespan to work

#

but I think there is some other networking issue going on

unique wave
#

Not really following everything that is going on for you Bogadu. But a few thoughts:

  • Setting an actor to hidden on the server will actually stop it from replicating (did before 4.26 at least, don't see why it would change)
  • You used a multicast RPC, not sure if you set it reliable.
  • You have "NetLoadOnClient" true, and you're saying this actor is placed in the level. Unlike dynamically spawned replicated actors, this means your actor exists on the client regardless of its state on the server. If it turns off replication I believe it just sticks around on the client, and would then probably not care about anything that happens to the server version of it anymore.

So maybe an unfortunate mix of setting hidden, (which turns it non-replicating) and then the client version of the actor becoming disconnected from the server one and ignoring your RPCs?

(No guarantees, :p but maybe something like that happening?)

limber mortar
#

oh thanks, I didn't know hiding would stop replication

#

or the third point

#

I'm no expert

#

thanks a lot, let me play around

unique wave
#

Basically the server assumes that your client can't possibly care about replication for the actor if it is hidden. By definition you shouldn't be able to see anything on it in that situation.

chrome bay
#

Setting an actor to hidden doesn't stop it replicating

unique wave
#

There are other issues with having replicated level actors as well. Like the actor being tied to the lifetime of the level it is in. So if your level is unloaded from level streaming (imagine a car you placed in the level and you start driving it into the horizon) due to distance, your actor will be unloaded with it. (car go bye bye)

#

jambax tells me i'm wrong, i could be xD

chrome bay
#

Well how would you unhide it if that were the case ๐Ÿ˜„

unique wave
#

I said hiding it on server would make it stop replicating to the client. So it stops sending any messages.

It still exists on the server of course.

So unhiding it on the server is no issue.

chrome bay
#

Right but if you hid it and stopped replicating, client would never get an update if you un-hid it

#

(either way though it doesn't stop repping when hidden)

unique wave
#

Unhiding it would make it replicate again

#

when the server stops replicating an actor, if it is a dynamically spawned one, it gets destroyed on the clients.

#

In his case, where it is part of the level, i think it just stops listening to the server for that actor.

limber mortar
#

I made a physx bulldozer but can't figure out a simple lightning bolt lasting 3 seconds, lmao

unique wave
#

So unhiding on server would make it start replicating again, and therefore spawn back in on the client @chrome bay

chrome bay
#

It might not be relevant anymore, but that's not the same as setting it to hidden

unique wave
#

Ok I checked to make sure ๐Ÿ˜„ I was slightly off @limber mortar

limber mortar
#

maybe this is my problem

unique wave
#

It's a combination of being hidden and no collision that makes it stop replicating.

limber mortar
unique wave
#
    {
        return false;
    }
limber mortar
#

the fire started 2 places when it should be 1 strike

unique wave
#

So my bad, the is hidden probably alone is not causing your issue.

limber mortar
#

let me start function by timer a couple secondsd in

#

nope, still runs twice

#

hmm, 1 print string, 2 fires

sinful tree
#

Don't run it on tick. On the begin play, set up a timer by event.

unique wave
#

@limber mortar

When 1 is called, it calls number 3 and does random integer of an actor from your get all actors of class. (no clue if you have more than one in your scene, but i'm guessing you do?)

When 2 is called. It will call 3 again for every time 2 is called in your for loop. All green nodes that are connected to a blue (callable) node are re-executed every time the blue node is called.

So you are probably expecting it to use the same randomized actor in the for each loop, but it's doing the randomize again. Save the randomized result to a variable and use that to avoid this.

limber mortar
#

the tick is spreading the fire throught the game

#

that all works right

#

oh i see

#

so save that result as a variable

#

got it

#

that explains the 2 fires

#

thanks

unique wave
#

np, it's somewhat non-intuitive how that works ๐Ÿ˜„

limber mortar
#

ok

#

so I fixed the 2 fires starting

#

Now I just need to make a lightning bolt appear at the same location and remove it 4 seconds later

#

I have a new idea on that too

#

maybe instead of having the lightning bolt in the starting actor

#

I generate a lightning bolt from my fire control system

#

so after that function runs you labeled, Spawn instanced static mesh at location of start actor

#

like so

summer tide
#

@winged badger Hi

summer tide
#

So I have a struct with repnotif which is a boolean either male or female. Based on that I set some SK meshes.

#

In player's event play, I assign the struct from game instance to the player's repnotif variable.

#

Any idea why it wouldn't work

unique wave
summer tide
#

So I have the settings in my game instance, how do I pass that to player after spwned.

#

I previously got it working by using swith with auth -> auth connects to multicast event and remote connects to server event

#

Then I called that event in begin play @unique wave

unique wave
#

Does the setting change during gameplay? or do you just set it once in your game instance class before you start the game.

gleaming vector
#

specifically, a variable doesn't replicate if it hasn't changed

#

if you set some variable to 0 that is already 0, for example

#

it wont replicate

#

so, what you would want to do is, on beginplay, set the skeletal mesh to whatever the variable is

#

and if the variable ever changes, set the skeletal mesh

#

do it twice

summer tide
#

That gets set during player selection before the game starts

#

So I'm setting it once

unique wave
#

Then you are probably only setting it on the Client GameInstance.

summer tide
#

before the game starts

gleaming vector
#

also

#

you can make your replicated var RepNotifyAlways

#

which if you do somehow trigger a replication for a variable that is the same value that it was previously, it will fire the OnRep

#

this is becoming more common with Push Model

summer tide
#

where do you see RepNotifyAlways

gleaming vector
#

DOREPLIFETIME_CONDITION_NOTIFY(UEmpAttributeSet_Faction, Tickets, COND_None, REPNOTIFY_Always);

#

like that

summer tide
#

Oh i'm using BP

gleaming vector
#

then you cannot set it to repnotify always

unique wave
#

Korvax: Sounds like you are setting the variable based on a player choice in your GameInstance. Likely on your client version of the Game Instance.

if you want other players to be able to see your choice, this needs to be replicated to the server.

One place you could make this happen is in your PlayerController class. On its BeginPlay once the game has started you can replicate to the server (RunOnServer) what the players choice was. Set it to your RepNotify variable on the server for your pawn/playercontroller.

summer tide
#

My lobby player controller is diff than my gameplay PC

#

That's why I kept it in GI

#

Since I have two diff PC for lobby and gameplay, if they both have the same parent PC, would I be able to pass data

unique wave
#

You can look up your GI in your gameplay PC on its beginplay @summer tide

summer tide
past sonnet
#

Hi, i'm New on net working and
I am a little confused

These are my questions :v

Does the character that I control on the server is the same as the client just replicated?

I mean is the same gamemode and player contoller?

But if it is, ยฟHow could I change the client appearance?(this is my main question xd)

unique wave
#

Yes but the key here is to tell the server what your players choice was. @summer tide Otherwise no one else will get to know about your choice.

#

You can do it through your pawn if you want, but playercontroller is the first real player-related point you can do it. Before the pawn is even created.

summer tide
#

Ok thanks let me try that

#

So I have a lobby character and gameplay character. Lobby and gameplay have their own GM and PC. In my lobby I can customize my player which updates the lobby character. THen I pass the info.

past sonnet
#

Hi, i'm New on net working and
I am a little confused

These are my questions :v

Does the character that I control on the server is the same as the client just replicated?

I mean is the same gamemode and player contoller?

But if it is, ยฟHow could I change the client appearance?(this is my main question xd)

sinful tree
#
  1. For simplicity sake, yes. Your character that you control on your client is the same as the character on the server, and references to your character can be thought of as such.
  2. No. Game mode is only part of the server and is not replicated to clients. Player controllers are clients that join into the server. Player controllers cannot interface with the Game Mode of the server.
  3. You need to set any variables for appearance and the like on the server, and those variables should be set to RepNotify so that a function is created and gets run when the variable replicates - you can then do any logic you need to do to set the appearance of the character based on that replicated value in that newly created function.
#

If you want a client to be able to control their appearance, then you need to do an RPC to the server on the player controller, then the server can handle changing whatever variable needs to change to cause the replication event, and then update the appropriate characters.

austere snow
#

Quick question, is the default character/pawn ran on server and client?

gloomy tiger
#

Hello, y'all! What NetUpdateFrequency are you using in your AI Characters?

#

Some context: I have AICharacters moving with CharacterMovement (AIMoveTo). Since it's a zombie game, I have lots of these actors at the same time. That said, having lower UpdateNetFrequency is giving us better network results, but sometimes clients are noticing some delays/not consistent behaviours and according to my tests, this is occurring due to the low UpdateNetFrequency I've set.

#

I'm quite lost on how I can overcome these issues more appropriately.

#

Ideas? Suggestions?

#

(The amount of AICharacters I have at the same time is something ranging from 50-100)

lucid vault
#

My Steam dedicated server won't allow clients that use Steam to connect. My server says:

LogSteamShared: Warning: Steam Dedicated Server API failed to initialize.
LogOnline: STEAM: [AppId: 0] Game Server API initialized 0
LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
#

I don't see any specific warnings to help me debug this issue. The above warnings seem pretty general, and I haven't been able to figure out the solution based off of them

gloomy tiger
#

LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.

I guess you're running the game in the editor where both the server and the client are invoked.

#

Steam doesn't allow that at all.

#

If you want to test that locally you'd need to either play with a second machine or setup a virtual machine to be your host.

lucid vault
#

No, I am running the server by itself on an AWS instance

#

Hence the world 'could' I guess. Not sure what else would be causing this problem

gleaming vector
#

you can also use the force steamclient link command line arg

#

to link to your steam client

lucid vault
#

Interesting, could you elaborate a bit on that?

#

It seems I've pretty much hit a dead end on debugging this. There aren't any good resources on these errors and what causes them. Seems like a complete mystery :\

gusty slate
#

Hello everyone,
I have been researching the available solutions to creating a party system similar to Rocket league/Borderlands/Fortnite and I just wanted to ask if I should delve deeper into Beacons or Lobbies? Considering that my aim here is for it to work on Steam

gusty slate
#

Online subsystem?

#

I know how the regular session flow works (hosting/joining) etc but im talking pre-game/matchmaking parties

soft shell
#

I switched over to the SteamSockets net driver as I wanted to have pings working on listen servers. This worked and I no longer see the 9999ms ping; however it broke the dedicated servers (complaining about "Ignoring P2P Signal, invalid connection") - I found that if I build the game with bAllowP2PPacketRelay=true, then listen server's work fine.. and if I build my windows dedicated server with bAllowP2PPacketRelay=false it still accepts connections via "FindSessions/JoinSession" and via direct IP connections.. Is this to be expected? Or am I doing something wrong here?

heady python
#

I use advanced sessions plugin for my steam game, and in testing, matchmaking works perfectly fine. After putting my build on steam and testing through steamworks, the matchmaking doesnt work at all. Is there any 'easy fix' to this or do i have to recreate matchmaking until it works?

rich ridge
chrome bay
#

None of the existing OSS's have any implementation for those

#

If you want a party, it's probably best to use beacons - but beacons are inherently part of the session system as well, you can't really use one and not the other

peak sentinel
#

"interpolation" just means FMath::VInterpTo(CurrentLoc, ServerLoc, delta, 1.0f) right?

chrome bay
#

Well that's one way of interpolating

#

You should only interpolate the visual elements though

peak sentinel
#

Whats the other way? You're the only one replying to pawn replication threads as I see ๐Ÿ˜…

peak sentinel
chrome bay
#

yeah

#

Only the non-owning clients though

#

It doesn't interpolate the player who is controlling it obviously

#

Since that player is predicted locally

#

That post is from a younger less-wiser me but it's mostly right. The player controlling the pawn has to predict it's movement locally, that's the only way to have it smooth

#

You can't interpolate the controlling players' pawn, that will always still result in snapping.

#

And jittery movement

peak sentinel
#

I am using CMC on player-controlled pawns (characters) and using FloatingPawnMovement on AIs

chrome bay
#

CMC will "just work" so long as all you're doing is adding movement input

#

Floating Pawn Movement has no such prediction or smoothing AFAIK

peak sentinel
#

Yeah it doesnt, it just teleports/corrects over time. I tried using PostNetReceiveLocationAndRotation() override and interping on Tick as I mentioned above, but didnt worked. Now I will try the mesh to capsule interpolation. Should I do it on Tick too?

chrome bay
#

the interpolation should be ticked yeah

#

The actual position or the object should be hard-set since you don't want collision etc. to be out of date

#

Then the movement component should tick, and interpolate the mesh to the capsule

#

CMC has a maximum smoothing distance, beyond which it will just snap anyway

#

Since too much interpolation can look just as crap

#

BTW

#

Projectile Movement has an implementation of smoothing now IIRC

#

You might be able to look at that for a super-basic example

#

It's not quite the same though since projectile movement is simulated locally too, and I don't think the flying movement is

peak sentinel
#

Great, thanks for the guidance ๐Ÿ™‚

final rover
#

Hey, so I'm working on a directional gravity system, and I'm trying to figure out how to network the player's rotation. I want clientside rotation calculation with an authoritative server to verify the clients action. How would it be best to go about this? Are there any good tutorials that cover doing stuff on the client but confirming the actions on the server, and rolling back if necessary? If someone could point me in the right direction that'd be awesome!

rich ridge
#

And Epic OSS will definately support that in near future

#

Engine do have abstract implementation done.. it's only that the OSS providers will have to write real implementation

chrome bay
#

Well the OSS provider provides the Service, but it's up to either Epic or you to fill out the abstract implementation on the engine side

#

The Steam OSS implementation is pretty dire, but I wouldn't count on any updates to it unless they accept huge PR's from the community. At least they're plugins now so you don't need to work from source to do so.

#

The abstract implementation for parties doesn't exist for steam is what I'm getting at, so you'd have to fill that out yourself. But then again Steam doesn't really have "parties" as such, you just have to leverage lobbies.

rich ridge
#

The developer or studio need to wisely choose the correct OSS provider

chrome bay
#

yep for sure

gusty slate
#

@chrome bay I wouldn't mind using sessions for the game and beacons for party making. I already have implemented a game fully using sessions and a regular Server host/join flow

chrome bay
#

What I mean is you need both

#

You need a "session" for the beacons to work

gusty slate
#

the Party session?

chrome bay
#

It depends on the OSS. On Steam you can only be part of one lobby at a time IIRC (could be wrong there)

#

So party host would create a game session as usual, players join via beacons, then you travel with the host, then re-create the party when all players have joined

#

Parties are a very abstract thing

gusty slate
#

I assume it's basically sharing data without joining an actual "game session" and then being able to join the same game session

chrome bay
#

Beacons still require you to "join", it's just that they allow you to communicate before you commit to loading the level, so you can "reserve" space before joining or something

#

I mean you can use them in many ways, but ultimately the beacon "host" still needs to create a "session" that other beacons can find

gusty slate
#

I see

chrome bay
#

There is a steam party plugin on marketplace, I think that has a pretty decent implementation using beacons

gusty slate
#

I will try and have a look. Thing is, I already had a plugin called SteamCore which I used for leaderboards and it has functionality for Steam Lobbies

#

I have been experimenting yesterday and it seems that they could work but as far as I know, after you join a hosted game (level) the lobby is destroyed, so it might be tricky and annoying at the end of that map or after leaving to recreate the party

chrome bay
#

Almost every Steam plugin on Marketplace has it's own ideas on how the interfacing with Steam should work tbh

gusty slate
#

And I read somewhere that using beacons you could retain the people who joined after a game session has ended?

chrome bay
#

I doubt any of them are really compatible with each other

gusty slate
#

It's basically interfacing directly with Steam's lobby functions

chrome bay
#

Beacons are actors so their connections are ultimately destroyed between level transitions, but if you wanted to retain the members, you'd keep details of the party somewhere and attempt to reconnected afterwards

winged badger
#

lobbies don't need to be destroyed when you join the game

chrome bay
#

ahh good

#

I wasn't sure

winged badger
#

making that action implicit is just bad

chrome bay
#

Can you be in two lobbies at once on Steam? i.e. a listen server and somebody elses "party" lobby?

winged badger
#

steam lobby is completely independent of unreal ingame connection

#

and no for 2 lobbies

chrome bay
#

rgr. always wondered...

gusty slate
#

you can be on multiple party lobbies I think

chrome bay
#

well a lobby is just a lobby, I don't think there's any kind of differentiation on Steam

rich ridge
chrome bay
#

Listen Servers in UE are done via Lobbies

winged badger
#

didn't have time to dig into EOS

#

but coupling that with ingame sessions would be crazy

gusty slate
#

I guess it's just a lobby with a map loaded as listen

winged badger
#

just limits your options

chrome bay
#

So yeah, the TL;DR is.. "it's complicated" ๐Ÿ˜„

gusty slate
#

It is indeed x)

#

and it doesn't help that to properly test lobbies, it needs multiple steam accounts, ie not possible with a single PC

#

except with some way of vm

rich ridge
#

@Shinzo - Ed#8762 to be simple OSS is UE4 term which provides c++ APIs for your game.

OSS is nothing but a frontend wrapper above your game backend service

chrome bay
#

tbh for multiplayer dev having more than one machine is essential

#

Even if it's just a crummy laptop you use to host a session

gusty slate
#

Yeah that's what i was doing to test Steam on a previous game

chrome bay
#

You might be able to use a VM for some stuff.. but there's no substitute for "really" testing on two different machines, and ideally on two different networks too

gusty slate
#

True yes

#

I am still hesitant on whether to go for Steam lobbies only or try to work with Beacons though

chrome bay
#

Essentially beacons require steam lobbies

#

If of course, you wanna use steam solely

rich ridge
#

@gusty slate Engine already have production level party beacon actors

#

It should be inside OnlineSubsystemUtils module

#

Not sure though

chrome bay
#

But you really can use them for allsorts. We use them in HLL for a server queue

gusty slate
#

how much is the Steam OSS handling that though?

chrome bay
#

If you want one machine to connect to another, be it via beacon or the usual hard-travel route, you need to advertise a session of some kind

#

and AFAIK on Steam, you can be in one session at a time

gusty slate
#

I read some of your comments above Jambax and posts on forum from 2017 about beacons and Steam, how advanced or handled is it currently?
Because as beacons are based on lobbies (sessions are lobbies basically as wel) and lots of functionality is there, I might research and experiment before working solely with Steam lobbies

chrome bay
#

Beacons aren't based on anything, they're just actors with a net connection that doesn't need you to load a UWorld

#

The actual online implementation of them is entirely up to you

gusty slate
#

The Party beacons I meant sorry

#

I know there was already a client and host beacons supposed to be aimed at parties

chrome bay
#

The UPartyBeacon classes are designed to work with IOnlinePartyInterface - and currently there is no implementation of that for Steam

#

(And there probably won't ever be)

gusty slate
#

I see what you mean. There is initial abstract implementation of it but it isn't implemented with Steam's backend interface, API and how steam handles itself.
I might look into implementing it with lobbies then, because my current target right now is Steam alone

#

Because, I won't have the time to implement that on my own

#

might as well implement it on top of lobbies directly

chrome bay
#

That's basically what you need to do on Steam

#

Or you host some kind of other server outside of steam, like an XMPP server, and people connect to parties like through that

mortal kernel
#

Hey Guys... I have a Animation blueprint which needs variables from the player character but whatever I do they won't apply for some reason

sinful tree
fast arrow
#

it seems you are not updating value. you cant just take the value out of other execution chain.

#

this set blocks just sets value on begin play then returns the value you've just set. that mean on next frame you wont get data out of it if i correct

sinful tree
#

The Input X and Input Z values should not be set to replicated if they are being fed in by player input.

fast arrow
#

you need to use get for that

mortal kernel
#

@sinful tree I don't really get what you're trying to tell me tbh because... it is the place where I need them to be... inside the animation blueprint so I can change the animation being played

sinful tree
fast arrow
#

yup)

#

im bad at explaining things)

mortal kernel
sinful tree
#

Better ๐Ÿ˜„

#

Your PCT_Master is the player controller?

mortal kernel
#

Yes it's the controller

#

I have all movement logic in there

sinful tree
#

That variable should not be marked as replicated.

mortal kernel
#

was probably just me... trying to get it working well

#

what about the other variables ?

sinful tree
mortal kernel
#

That's in player controller

#

it makes the character move

#

pretty much the "third person example" logic with some validation and debug stuff

sinful tree
#

Why couldn't you just call those in the character instead of from the controller?

mortal kernel
#

Because I may add functionality to swap characters ingame later on

sinful tree
#

That's fine, those characters can inherit from your main character if they use the same control scheme, otherwise they can have their own controls.

#

I'm not seeing anything else particularly suspect. Perhaps verify using print strings on the cast failure and valid checks just for debugging. There may be something not getting set somewhere correctly.

mortal kernel
#

Already done that it's getting all variables on the server too but it just won't apply the animation

#

it stays with idle

#

on Both
Server to Client
Client to Server

#

The local character is working just fine

fast arrow
#

so the local character is moving but from other client - it doesnt?

mortal kernel
#

it moves but it's not animated

fast arrow
#

is it not animated on both side ?

mortal kernel
fast arrow
#

i thought about it) So basically you pressing the button on the client and information about it doesnt send to the server

#

it seems

gloomy sedge
mortal kernel
#

It's the same if I move with the server btw... the client also doesn't see's it's animation aswell

fast arrow
#

ahhh im bad at explaining))

mortal kernel
#

@gloomy sedge

fast arrow
#

so movement component receive input and moves pawn on server BUT you sets the variable on the cient side so the server doesnt know about it

#

your debug shows input x on the cilent = 1 but on the server = 0

mortal kernel
#

yea because the server is the player I don't move :o

fast arrow
#

is far as i remember debug shows value on server and same value on client

#

if you replicate it

gloomy sedge
#

Don't think it would show on server as the variables aren't being sent to the server. (I think)

mortal kernel
#

I've tried adding smth like this

#

problem is still there

sinful tree
#

The Input X and Input Z values should not be set to replicated. If they're being set by the client, the replication thing does nothing.
Out of curiosity, is your character inheriting from Character or Pawn?

mortal kernel
#

I've created it from the ThirdPersonCharacter Example

#

so it should be a Character ?

sinful tree
#

Yep, that's good.

ember needle
#

is this a known behavior?

#

I am avoiding this by spawning on server on begin play, which works, but this is unexpected to me.

#

Can some kind soul please confirm?

fast arrow
#

@mortal kernel Mb i wasnt very useful here, but maybe the problem was that Player controller doesnt replicate to other clients. coz they dont

mortal kernel
#

Well.. I can't get it to work

lucid vault
#

I asked this question earlier, but it has since gotten buried, and I have yet to figure out a solution. Let me know if anyone has any ideas

Creating online subsystem instance for: Steam
Warning: Steam Dedicated Server API failed to initialize.
STEAM: [AppId: 0] Game Server API initialized 0
Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
Display: STEAM: OnlineSubsystemSteam::Shutdown()
Warning: STEAM: Steam API failed to initialize!
Display: STEAM: OnlineSubsystemSteam::Shutdown()
Login request: ?Name=CubedMango userId: Steam:111111111111111111 platform: Steam
PreLogin failure: incompatible_unique_net_id

I receive the above errors when launching my dedicated server (on an EC2 instance). I've followed the documentation when setting up a dedicated server with Steam multiple times. Steam initializes for clients (clients can use the Steam overlay, for instance), but the dedicated server throws these errors and refuses clients that are running Steam

meager spade
#

this is normally cause the appid text file is missing from the binary folder on the executable

#

can you verify if the text file is there?

#

should see something like this

lucid vault
#

In my packaged game with the server as build target, the file should be in Engine/Binaries or ProjectName/Binaries? I assume the latter, regardless, the file is missing from both

meager spade
#

without that, it wont find the id

#

try creating the file and put your app id in it

#

just the appid

sinful tree
#

that's crazy XD

lucid vault
#

Should I put the file in /ProjectName/Binaries/Win64?

meager spade
#

yes

twin juniper
#

Hello. I'm in a huge bind that's been frying my brain and agitating me for 4 days straight. Any chance I could ask for some help?

lucid vault
#

I'm still getting the same error in the dedi server

#

I do notice that the error only occurs when the client tries to join

meager spade
#

interesting, and you have the steam api stuff ?

#

there is additional stuff iirc (steam client files)

lucid vault
#

That doesn't get added automatically when packaging?

meager spade
#

though i have not done dedicated server with steam, just from what i have heard

#

no

#

its not part of the SDK

#

its part of steam

lucid vault
#

That's strange. I haven't heard of that before

twin juniper
#

you have to download it yourself and even add code into the engine.ini file

#

ill link a video for the advanced sessions plug in for ue4 that helped me

#

then the code would be creating and getting advanced sessions and can get ids from that stuff

lucid vault
#

I'll check it out. One other thing, is that I attempt to connect to the Steam server via the open ipaddress command, not sure if that matters

meager spade
#

noo

#

actually

#

maybe

#

i am not sure how steam dedi's work

#

but yeah you probably need IP for steam dedi's

twin juniper
#

also the steam interface sometimes doesnt work if its just hitting play, u wanna stand alone game, or if that doesnt work launch the game itself from the folder ur making it in

meager spade
#

i thought the steam dedi's used an ID

twin juniper
#

im not sure what that means, but thats how i got it to work on mine

meager spade
#

this returns the result that you connect to

twin juniper
#

while hes trying that is there a chance i could ask for some help?

fast arrow
#

@mortal kernel so the problem is that this variables wont replicate. you made this in player controller but they wont replicate. Every player has its own PC and server ,in this case is the host, has its own PC as well. Try to make RPC from PC to owning pawn with 1 flaot param(speed or sthm) and set it in the pawn with replication on. and then use pawn value in your BP_Anim.
To sum up it will be smth like this Client(PC owner (doesnot replicate)) -> To Owning Pawn on the server (which replicates) -> to BP_Anim. Hope this will work for you

meager spade
#

why would you send the input every tick

#

to the server?

#

btw @fast arrow that will not work, Replicated variables have to be set on server to replicate, client will never replicate, and the inputs are always local.

fast arrow
#

thats what i've said. damn i need to learn how to explain stuff to ppl)))

#

this pic in not mine btw

#

it's his

meager spade
#

ah lol

mortal kernel
# mortal kernel

@meager spade I have tried setting it on server but it doesn't work

meager spade
#

you were sending a RPC every tick btw

mortal kernel
#

Right now i don't really care... because I wanna have it working first but welll I can't seem to do it

meager spade
#

well send a unrealiable RPC to the server

#

with the input vector

fast arrow
meager spade
#

btw yours will fail

#

and i really want you to understand why

#

do you understand what this is doing?

fast arrow
meager spade
#

this is wrong btw

#

shoosh

#

@fast arrow

ember needle
#

@lucid vault which documentation BTW?

meager spade
#

trying to teach here

fast arrow
#

ok)

sinful tree
#

XD

meager spade
#

๐Ÿ˜„

#

@mortal kernel you with us ?

mortal kernel
#

Here

meager spade
#

right

mortal kernel
#

Why?

fast arrow
#

nope sry) got 10 min then have to go)

meager spade
#

let me explain, this function is being run on the server

#

so what would the value of My Var be on the server?

meager spade
#

(hint: it would be the value on the server)

#

๐Ÿ˜„

ember needle
#

@lucid vault just checking there are so many

mortal kernel
#

I think I know why my stuff isn't working already but I'm not home anymore So I gotta wait

meager spade
#

so why would it not work?

mortal kernel
#

Maybe it's because my Movement logic (with its variables) is inside the player controller

#

Which doesn't really replicate at all

meager spade
#

nope

#

its like i said, your server RPC is wrong

#

you are telling the server to sets it X and Y axis to the values it already has!

#

not the client values

mortal kernel
#

What even means Rpc in the first place

twin juniper
#

why u giving her the run around, just tell her

meager spade
#

hope you can understand.

#

@twin juniper cause people never learn by spoonfeeding

#

i can easily just give someone some code or a bp screenshot

#

but will they understand it? no.

fast arrow
twin juniper
#

you teach them why as you show them how to do it. not ask them why it wont work when they already dont know why it wont work

#

thats why there here for answers

fast arrow
#

call from serve to client or all the way around

meager spade
#

@mortal kernel btw, running that RPC on tick is not very performant

#

in sense of network traffic

#

thats 8 bytes being sent every frame (though some maybe dropped cause its unreliable)

mortal kernel
#

Yea I know but I can't seem to figure out a proper way of calcuting my 8 way walking Animation :o

meager spade
#

you can do that without needing a RPC of input values

mortal kernel
#

If theres some way to get this... I'm in

meager spade
#

you can calculate deltas between the last movement velocity

#

and work out if they are moving left right, backward, forwards, or diagonally

#

Blend spaces do this automatically

mortal kernel
#

My main issue is... by using the vector length i always get the max movement speed... no matter if I'm walking left or right or backwards

#

So I tried getting this input variable to do it for me

#

Which leads to me being here right now KleeKaboom

meager spade
#

vector length is just speed

#

you need direction

peak sentinel
#

Are you trying to determine the where your input points? like "right side of character" or "forward of character"? There are too many messages I couldnt catch up but if you are trying to do this I can send some examples

mortal kernel
#

@peak sentinel
Basically I have an 8 direction blend space which needs speed and direction...
But the normal vector length is giving me the max speed all the time no matter what my character actually walks

#

Thus I used the input variable for this which didn't replicate which brings us where we are :o

ember needle
#

I would like to show a blank screen in MP when the level boots up. I create a blank UMG on BeginPlay of the PC and add it to the viewport.
This works nicely on the listening server, but due to latency on the clients you can see the workd for a blip of a second. My understanding is that this is due to PC being created later on the clients, and the world may already be up (ths character often is, actually).

What is the best way to avoid this?

#

I would like to avoid the hack of setting exposure to -9999 on the map or so

peak sentinel
#

You plug direction and velocity and it gives you direction with an output of float

#

You use it as Direction variable

#

And use velocity as speed

meager spade
#

@ember needle clients will know when they are travelling

#

(if you use travel)

ember needle
#

i do

#

but the PC is the owner of the UMG

meager spade
#

does it matter?

ember needle
#

ah you're right

#

maybe it doesn't

meager spade
#

you can spawn widgets on the GameInstance btw

ember needle
#

wat?

#

really?

meager spade
#

in c++ at least

ember needle
#

create widget takes a PC

meager spade
#

not sure in BP

mortal kernel
#

@peak sentinel but velocity only gives me a postive value not a negative one... means I won't be able to walk backward

ember needle
#

yep the node asks for a player owner

#

hey since this got buried before...

Are there any known issues with replicated Child Actors?

I have a replicated actor that has two Child Actor component ("hatches"), themselves also replicated.

mortal kernel
#

Also... it starts at the back with -180 goes up to 0 which is front and then goes 180 back on the other side

peak sentinel
#

I am just working with anim bps and blendscapes at basic level but I am pretty sure you cant (shouldnt actually) go for negative values

mortal kernel
#

This means -179 is back and 179 is also back

peak sentinel
#

These are my settings, I can go back and forward

rose egret
#

given the assumption I am making a FPS game like COD Warzone.
is it better to statically place loot boxes and active them randomly when begin play called.
or make something like spawn point that spawn the real loot boxes ?

peak sentinel
#

And its working on Listen-Server

mortal kernel
#

Yes... I may see if that does

#

May I DM you once I get back to it ? :o

peak sentinel
#

Yeah, but you should add me friend first to access the DMs, its blocked

rose egret
#

I guess if I place them statically, whenever clients reference them , their Full path must be resolved to NetGUID which is not good

mortal kernel
#

@peak sentinel Apparently im not allowed to send you friends requests lol

#

You gotta add me first

sharp kestrel
#

Can anyone help me figure out how to properly close a server when a match finishes?
I'm using the AdvancedSessions plugin and can handle hosting, search and joining fine, but for some reason Destroy Session doesn't execute.

gusty slate
#

it needs to be executed by the server and players need to call it as well (When they leave)

#

You need to handle players logging off otherwise they don't properly exit the sessions and you'll have problems

sharp kestrel
#

I figured it would cause problems, can't host a new match if they just open level to the main menu again.

#

So what, would that be a custom event with multicast going straight into Destroy Session node?

winged badger
#

i find it easier to just execute it from BeginPlay in MainMenuLevel

sharp kestrel
#

Wait, that works?

#

That actually works.

austere snow
#

In the default networked character, how do they replicate movement from server to client? Is it just by tick? or is there a different way?

gleaming viper
#

Hello everyone ๐Ÿ‘‹ . I have an issue which I struggle with for 2 days. My character is set up, but something is wrong with head rotation replication. Could you help me? Client character is rotating the head in Server character eyes but Server character doesn't rotate it's head. Every variable used for this is set as replicated.

vestal compass
#

Can ChildActorComponents be used inside multiplayer, can they be replicated?

whole urchin
#

can Unreal handle 3 buttons at the same time?

#

i'm trying to make my characters walk when i aim+fire+move

regal sand
#

What would cause unexpected breakpoints when building a dedicated server for a blueprint project? The breakpoints never appear in Visual Studio, unless it is built as a "development server"?

unkempt tiger
#

Does a client know the class of the current gamemode? Say if I need the gamemode to have its own pause menu widget?

meager spade
#

it says what the issue is

#

@unkempt tiger client cant access gamemod

#

gamemode, so no

unkempt tiger
#

Alright, thanks ๐Ÿ‘

meager spade
#

gamemode can tell all clients to pause those

#

(via GameState)

unkempt tiger
#

Yeah, though I'm talking about a per-client pause menu

#

I think what I'll do is place it on the gamestate? Hmm

#

Actually not even a pause menu, just a basic score screen

meager spade
#

a score screen is just local

#

what does that have to do with gamestate or gamemode?

#

when play presses say tab, you create a widget, that pulls in the scores from GameState (and possibly all player states)

lucid vault
#

I've redone the Steam dedicated server setup so many times at this point, but I can never get it to work

fast arrow
#

try to lunch it on other machine)

eternal canyon
#

Does anyone here use playfab?

fast arrow
#

or try to lunch your game via command line with -NOSTEAM

vivid seal
#

so the CMC prediction works basically like this?

  • client generates a "move" that has input information and some kind of ID
  • client performs the move, saving the last authoritative state and a list of all moves performed since
  • client sends the move to the server
  • server checks the move is valid, edits it (?) if necessary
  • server performs the move
  • server replicates its new state, including the ID of the last move it got from the client
  • client updates its authoritative state, discards all moves up to and including the ID of the last replicated move
  • client performs all remaining moves again, on top of its new authoritative state

i know there's probably a lot more going on under the hood, but im trying to copy the basics over to another non-movement system and support server correction, resimulation, and rollback.

bitter oriole
#

The only thing I'd add is - server needs something more subtle than "performs the move"

#

Client and server have different framerates so the server needs to merge or cut client moves

#

A client's 60fps incoming moves would be played two by two on a 30fps server

vivid seal
#

okay, so server performs any moves it received in the last frame by merging them, or performs the last move received again if no new move was received this frame?

bitter oriole
#

When I implemented a custom movement component, I was sending the client deltatime as part of the move

#

Server would play as much of the move as its own deltatime, keep the rest of the packet if it's too large, move to the next one if too little

#

I also added a variable speed modifier that would allow a 10% speedup or slowdown to compensate network changes

vivid seal
#

was your custom movement component basically a full replacement for the CMC?

bitter oriole
#

Yeah, except way simpler, it was a flying movement

vivid seal
#

any resources on doing something like that? i hate the CMC but I don't have a lot of knowledge on where to start with coding movement from scratch

bitter oriole
#

Not really, this was a trial and error thing over a few months

#

You have the thing clearly understood

#

Implement slowly with a lot of logging, some debugging tools - I had a tool to plot client(s) and server transform over time to compare discrepancies and understand when rollbacks had to happen (resetting to server state brutally, on owning client)

shut hinge
#

I want to eventually learn how to make a multiplayer so that I may play games I make with my friends. Is it easy to rent a cheap server for like 20 dollars per month and connect us all to that? Or is that not really a thing, and we will be forced to still try to connect to a host players IP address? Iโ€™m completely new to this and clueless sorry lmao

bitter oriole
#

My advice is to avoid servers entirely

#

UE4 has a listen server setup where one player hosts

#

Use that + Steam matchmaking and you'll be inviting your friend to your session once both of you have started the game

#

(using the default Steam ID, no fee or Steam setup required)

tidal crown
#

Howdy, I'm attempting to debug a server crash of my dedicated server binary...it seems to only fail in my PlayFab server container (restricted windows env), I looks like maybe a DLL error but not sure...I can see all the DLLs referenced in my package that is being deployed, and ListDlls says they should all be accessible I believe...OTOH, I'm wondering if the mistake is more basic...We're using FMOD for sound events, and I wonder, do I need to guard triggering sound events to be remote only w/ a has authority switch in a dedicated server env?

#

I've tested this just running locally and everything runs fine client/server standalone...its when I move it to the hermetic env that it seems to fail which is weird.

hollow eagle
tidal crown
#

that was my expectation as well!

hollow eagle
#

Your best bet is probably to make a clean VM or something on a local computer and see if you can repro the issue.

#

playfab does have some local debugging tools you could use but I doubt an fmod crash has anything to do with the playfab stack - just running the server manually on a clean windows vm is probably enough.

tidal crown
#

yeah it could be the difference between regular windows and server core

#

which is what playfab requires

lucid vault
#

@fast arrow What does -NOSTEAM do? It got the warning to go away by using it, however, when a client connects with the open ipaddress, I get a PreLogin failure: incompatible_unique_net_id error.
Does Steam even work when launching with -NOSTEAM? Or perhaps I should not be using the open command

lucid vault
#

What I don't understand is that I was never running both on the server, only the server exe

lucid vault
#

It says IpNetDriver listening on port 7777. If I'm not mistaken, it should be SteamNetDriver instead. It seems like -NOSTEAM prevents the dedi from even trying to use Steam

gleaming vector
#

i think the cli argument -force_steamclient_link will work

#

lemme double check that that is the actual argument

#

the issue is not with UE4

#

it's with steam

#

you cannot link to the steam server dlls while a client is running

#

so you have to force the link to the steamclient stuff

#

yeah

#

-force_steamclient_link

#

run that in your command line

#

@lucid vault

#

the code for it is SteamSharedModule.cpp line 192

#

if you are running a dedicated server, it'll use the steamclient link rather than the steam dedicated server link

#

you'll still ahve issues because you are putting two apps in the same steam space, but it should let you connect

#

If you are having issues running a steam dedicated server and a client on the same machine, try launching the server with the -force_steamclient_link command line parameter

lucid vault
#

@gleaming vector My issue is that I'm not running a client. I'm only running the Server exe on a remote machine

gleaming vector
#

oh

#

i had similar issues

#

I ended up updating steamworks

lucid vault
#

Does UE4 not bundle the right version of steamworks when packaging?

gleaming vector
#

it's a few versions out of date i think

#

1.48 iirc. I updated to 1.49, but 1.50 is most recent

#

it's pretty trivial to update it

lucid vault
#

My packaged game only has 1 steam dll. steam_api64.dll. I assume that's what needs updating

gleaming vector
#

also, in steam, you have to enable the steam binaries

#

for dedicated servers

#

and it dumps them into the root folder, i copy them into same folder as the exe (Game/Binaries/WIn64)

#

I have a task in my backlog for my game to fix this

#

but, i do it every time i create a new dedi

lucid vault
#

Where do you enable the steam binaries? Do you have a resource for that?

gleaming vector
#

it's in the steamworks config

#

in the steam backend

#

where you select the dependencies for your app

#

yeah

#

in your dedicated server's app config

#

Steamworks Settings -> Installation -> Redistributables

#

your app has to be a linked Dedicated Server tool app to your main appid

lucid vault
#

Ok, I think my confusion is coming from the fact that I am just testing with the spacewar id 480. I have yet to set up my own app with Steams backend

#

Did you receive the same Steam error, about Steam failing to initialize?

gleaming vector
#

i did, but i never used 480

#

the two things I had to do to fix it were update steamworks, and put those binaries in the executable directory

lucid vault
#

Yeah, my steamsworks folder shows v147, which is 1.47 i assume

gleaming vector
#

yeah

#

it's really trivial to update steamworks if you are using a source build of the engine

lucid vault
#

I guess I can just download the latest from online and drop it in there

#

Yeah, I do have a source build

gleaming vector
#

just copy the updated steamworks into a v150 or whatever the version you use is

#

and then change the steamworks.build.cs to use that version number on the first line of the module build class

#

it's super easy

lucid vault
#

I made the version change in the Steamworks class to 1.50, but I'm still confused as to what i do with the downloaded 1.50 sdk files. Do I replace them in the packaged project, or somewhere in the source build?

#

Of course, the packaged project only contains a single steam dll, so I assume I need to make the file replacements somewhere in the source build

#

Ah ok, I found the location

gleaming vector
#

you want to do this in your source

#

it's like ThirdParty/Steamworks/

#

i think

lucid vault
#

Yeah, I just added that folder and files

gleaming vector
#

in the engine

#

yeah

#

i did this like 6-7 months ago

#

so im going off of memory

#

and updating steamworks is kind of the thing you only do once lol

twin juniper
#

how do we make a coop game?

gleaming vector
#

that is a big question, and probably none that can be answered for you easily

#

I often say those are the wrong types of questions. How do you make a coop game? by making one

#

i recommend looking at some samples

#

and tutorials

lucid vault
#

I don't have access to the Steam back end as I have yet to setup my own app there, I assume that's necessary for the steam binaries step

gleaming vector
#

it is

#

unfortunately it's $100 to get a steam app id for the first time

#

which is kind of annoying

twin juniper
#

@gleaming vector i mean a drop in drop out co op

lucid vault
#

Yeah, I don't mind paying the fee

twin juniper
#

where the other player can go and load another area

#

and not drag the host with them

gleaming vector
#

that is a very complicated question

#

with a very complicated technical solution

gleaming vector
#

there are some GDC videos on how Bungie did it for Destiny

twin juniper
#

destiny was butchered

gleaming vector
#

you'll struggle with it in UE4 though, since it doesn't do peer to peer

twin juniper
#

oh?

#

I thought UE4 does have multiplayer

#

Gears of war and all

#

Gears of war 3 had P2P

#

on UE3

lucid vault
#

Hmm, I wonder if I will be able to access the binaries before the 30 day waiting period

hollow eagle
#

Definitely watch the GDC videos on what bungie did because they're interesting, but definitely don't try to copy them for a real game unless you're a AAA because their hybrid p2p/dedicated bubble system is insanely complex.

gleaming vector
#

dont bother answering him, i banned him for being racist in other channels

hollow eagle
#

Oh, rip.

lucid vault
#

Yeah, the process looks slow for Steamworks. I'm stuck on the tax info section until my identity verifies (2-7 days). I guess I will try and launch my server with the updated steamworks sdk and see what happens

tidal crown
#
#

I managed to detect that the DLLs are not being loaded, even though they are present after packaging :/

#

not sure what to do about that.

#

they are in my $PROJECT/Plugins/FMODStudio/Binaries/Win64 folder...do they need to be copied elsewhere perhaps?

#

maybe they need to be in $PROJECT/Binaries/Win64?

#

but its weird they are attempting to load ../../../ ?

#

starting to wonder if its Msacm32.dll is missing from Windows Server Core

summer tide
#

So I created a steam connection. I invited my other account through my game invite. The account accepts the invitation. We are both in the same game. When the other party choose join game , he doesnt see the server.

winged badger
#

as in doesn't detect the server on the list of available games to join?

#

check how many players you're allowing per game if so

summer tide
#

Allowing 2 and still using the default steam id spacewr if that;s not an issue

winged badger
#

if you're allowing 2

#

your game is full

#

and is filtered out of available game list

#

3rd player wouldn't see it

summer tide
#

So to create a party of 2 i have to allow 3

winged badger
#

no to have 3 you need to allow 3

lucid vault
#

This may be a silly question, but, how do I build the binaries for the new Steamworks SDK that I pointed my Steamworks.build.cs to? I built with both Development Editor and Development Server, but the \Engine\Binaries\ThirdParty\Steamworks\Steamv15\ folder was never created

rapid bronze
lucid vault
#

@rapid bronze I appears that the compiling UE4 section is outdated. OnlineSubsystemSteamPrivatePCH.h does not exist. Rather, OnlineSubsystemSteamPrivate.h. However, it does not contain #define STEAM_SDK_ROOT_PATH TEXT("Binaries/ThirdParty/Steamworks")

rapid bronze
#

I think the step is not longer needed

#

If you're building on 4.25 and have the newest version of the SDK if it's giving errors be sure to get into SteamSocket.cpp and replace ReceiveMessagesOnListenSocket with ReceiveMessagesOnConnection.

lucid vault
#

@rapid bronze I already did that an solved all of the errors. However, after both my Editor and Server builds completed successfully, the binaries for the Steamv15 were still not created

#

Is the editor development build supposed to build those binaries?

rapid bronze
#

You mean Binaries in the sdk folder?

lucid vault
#

\Engine\Binaries\ThirdParty\Steamworks

#

The binaries in that folder

#

There is supposed to be a Steamv15

rapid bronze
#

Oh no no

lucid vault
#

I have the Steamv15 folder in \Engine\Source\ThirdParty\Steamworks\Steamv15. But, when I package my game in UE4, I get an error because the binary version is missing

rapid bronze
#

You literally need to copy them from your Steam to the Engine

#

The compiled Binaries

#

You actually need to put them in yourself, i think half are included in the skd, half from actual Steam folder

lucid vault
#

I will attempt to do that. Am I not supposed to have the SDK in \Engine\Source\ThirdParty\Steamworks\Steamv15 as well?

rapid bronze
#

Yep yep

lucid vault
#

I notice that the previous versions, such as 1.47, only contain the steam_api64.dll and none of the others

#

Are the other files no longer needed perhaps?

rapid bronze
#

i think depends on the platforms you want to built it on too

#

but in theory i think they just go for win64 and linux64 in the sdk that's already there

#

i kept everything just in case

lucid vault
#

Question is, are the files from my Steam directory the latest (ie compatible with the 1.5 SDK) ?

rapid bronze
#

Should be yeh

#

Had no problems personally

twin juniper
#

quick replication question

#

i set my player up for on begin play it creates a widget hud and adds to viewport, as you may know when the clients join they also make one and add a second and third hud to the servers hud. so clients have one but server has 3. how can i make a hud widget just for clients and not make another one on top of servers

#

@everyone idk if that makes sense

dark edge
twin juniper
#

thank you , fixed

vocal cargo
#

is there any plugin available that actually helps replicating physics?

#

or rather, how would you go about it

#

just running into a ball or a cube for example causes a bunch of issues

twin juniper
#

I have a gamemode bp that I am trying to take a variable from and update it in a HUD. How would I do this for multiple players? I keep getting a null reference to the game mode for player 2

lucid vault
#

@vocal cargo Not really. The non deterministic nature of UE4 makes it super difficult. A solution that i have done before is to locally simulate physics for the nearest player, but that won't work if multiple players are interacting with something at once

#

@twin juniper use the GameState. GameMode isn't replicated

vocal cargo
#

thanks @lucid vault

#

any idea if this will be improved in UE5?

lucid vault
#

I wouldn't count on it. Although, apparently Chaos improves physics across the network. Haven't used it yet

vocal cargo
#

huh, interesting

#

what about things like physics constraints?

#

I have a character attached to a physics constraint so he can 'swing'

#

this work pretty damn well in the editor

lucid vault
#

simulate ping and test again

vocal cargo
#

but when I run that on a dedicated server..

lucid vault
#

net pktlag=150

vocal cargo
#

I tried that too

#

seems 'alright'

#

but when I run it on a dedicated server it blows up

#

but in your opinion - would something like this work?

#

If I multicast the attachment to the physics constraint technically it should work?

vivid nymph
#

So for my NPC Actors they have the ActorOnClicked event setup, but when they are clicked I need to get the Player that clicked it so I can RPC to the Server to update their Target. I was using Get Player Character with the index of 0, but that just gets the first player...

final rover
#

Would the ue4 character movement component need any changes if it were to be used in a competitive fps? I would assume games like fortnite and valorant customize it right? (specifically talking about the networking portion of the movement component)

gleaming viper
#

Hey, do you guys know why is pawn movement so jittery?

meager spade
#

๐Ÿ”ฎ

#

nope, can't see anything in the crystal ball @gleaming viper

gleaming viper
#

I will send a video wait a sec

meager spade
#

@final rover change what exactly?

gleaming viper
#

^ you can see it on the left

meager spade
#

what is with that perspective, huring my eyes lol

#

hurting*

gleaming viper
#

100 FOV

meager spade
#

yeah i can tell ๐Ÿ˜„

#

you sure that jitter isn't animation jitter?

#

ie wrong values in your animgraph?

gleaming viper
#

no because in first person everything is okay

meager spade
#

does it happen in standalone (just server)

#

is your skeletal mesh replicated on the character?

gleaming viper
#

yes, I'm controlling client window now and in server's eyes everything is okay

meager spade
#

ok good

#

it really does look like a animation glitch

#

rather than movement

gleaming viper
#

okay, so what could be an issue?

thin stratus
#

Yop

gleaming viper
#

because in everything is okay with client pawn

thin stratus
#

Can totally be that it's because you are using code that is more precise on the Autonomous end

#

Does that only happen if you walk backwards?

gleaming viper
meager spade
#

how are you getting rotation

#

and speed

#

in the animbp

gleaming viper
meager spade
#

this is in animbp?

#

why are you using replicated properties

#

in the animbp

#

you do know that it does not replicate?

gleaming viper
#

yes, but needed to try earlier for something else

meager spade
#

try what?

#

AnimBP is LOCAL only

#

nothing replicates

gleaming viper
#

nevermind, something for head rotation

meager spade
#

well make them all non replicated

#

cause the should not be replicated

#

i need to see more of the graph

gleaming viper
meager spade
#

why are you adding local rotation?

#

in the animbp?

#

why are you using GetPlayerCharacter 0?

#

do you understand what GetPlayerCharacter 0 is going to do?

#

honestly, that static is 90 percent of the causes of breaking in multiplayer games

#

what will GetPlayerCharacter 0 do on the server?

gleaming viper
#

okay, pinned it it to Try To Get Pawn Owner

meager spade
#

who will that return?

gleaming viper
#

I know, didn't notice

#

nothing changed anyway ยฏ_(ใƒ„)_/ยฏ

meager spade
#

also don't ever manip the pawns rotation in the animbp

gleaming viper
#

okay so what do I do instead?

meager spade
#

do it in the pawn if needed

#

what is that for anyway?

#

why are you doing that?

#

some hacky turn in place system?

gleaming viper
#

yes, for turn in place

meager spade
#

its wrong

#

you should never rotate like that

#

TIP is smoke and mirrors

#

what you do is, calculate the delta rotation, and counter rotate the root bone

gleaming viper
#

okay, I unpinned this part of code

#

it's not glitching anymore, but the head is behaving weirdly

meager spade
#

when threshold is reached (like say 90 degrees), you interp the root bone

#

what you mean the head is behaving weirdly?

gleaming viper
#

I wouldn't care about turn in place that much, but I want player to behave like that.

meager spade
#

right?

gleaming viper
#

so if you go left/right head stays in place

meager spade
#

you need a proper TIP system

#

give me a sec

#

ill make a BP version of C++ TIP system

gleaming viper
#

alright, thanks for helping me

meager spade
gloomy sedge
#

Hi, I'm using OSS.VoiceLoopback 1 to get the voice back, it seems to be slightly jittery and the threshold seems to be very high, I also set this to Set Mic Threshold -1 My father, who works for Nokia currently working on a VoIP system, mentioned that it could possibly be due to the fact too much is going over the port. Is there a way to change voice to a different port? if I understood him correctly..

#

My problem is the voice is only detected when the mic is literally on my mouth, and the voice coming back is jittery, anyone know which could be the problem ?

lucid vault
#

WOW

#

I think I solved my Steam dedi server issue

#

I had to install the steam client on the dedi for it to work

#

I believe this is necessary when using 480 (spacewar)

sage creek
#

what's going on?

kindred widget
#

I don't know about messing with those two settings, but LaunchCharacter works fine if you just call it on the server as far as I remember.

heady python
#

When i move my client i get major rubberbanding. Im guessing that movement BP is made incorrectly, but how do i correct it?

mighty zinc
#

If it's for dodging then u can just build a custom cmc

sage creek
kindred widget
#

From input, you just need to ServerRPC.

vivid nymph
#

in my multiplayer game, there are NPC Characters that fire the ActorOnClicked event when clicked. this all works fine in a standalone client or when running as a listen server client, but when you are a true client connected to a server and click on the Actor, my SetTargetOnServer RPC fails to call because LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor NPCCharacter_2. Function SetTargetOnServer will not be processed.
Watching the debug on the blueprint, i see that its NPCCharacter (Client) that fires the event, which looks correct I think. But, I see the Self is actually NULL.

#

This is the basic event handle on the BP. The event fires but Self is always null so it can never call the server function.

#

I think if I understand correctly, I need to reroute this somehow through a Player Controller pawn, but how should that work? I normally cannot get the actual Player Character in this instance since its a Client and an NPC but I did come up with a fairly crazy method that accesses a Global client only object to get the Client instances real player character.

kindred widget
#

@vivid nymph You cannot RPC to server from an actor that the client doesn't own.

#

So yeah, generally you'd probably use something like an interface. On click, get local player controller, call server RPC, pass clicked actor through and then call an interface function on the Actor pointer.

vivid nymph
#

It feels dirty, but it seems maybe I can store the clicked NPC reference in a kind of QueuedVariable on the Player, and then on Tick check for a value and send it from the loop

fringe dove
#

is it valid to call a client rpc from a client? shooter game seems to call ClientSendRoundEndEvent from clients when they exit to main menu:

void UShooterGameInstance::EndPlayingState()
{
    [...]
    if (GameState)
    {
        // Send round end events for local players
        for (int i = 0; i < LocalPlayers.Num(); ++i)
        {
            AShooterPlayerController* ShooterPC = Cast<AShooterPlayerController>(LocalPlayers[i]->PlayerController);
            if (ShooterPC)
            {
                // Assuming you can't win if you quit early
                ShooterPC->ClientSendRoundEndEvent(false, GameState->ElapsedTime);
            }
        }```
kindred widget
#

@fringe dove Sure, It's not any different than calling a ServerRPC from a listenserver.

lost inlet
#

yeah, it won't use networking at all

kindred widget
#

It just won't go anywhere.

#

โฌ†๏ธ

fringe dove
#

thanks

#

is there a built in cleaner way to log out a client? stepping through it seems shooter game just relies on the main menu map load to shut down current net driver

#

more specifically I'd like to make sure any previously reliably sent RPCs from client are acknowledged before exiting (with a timeout if it takes too long)

#

or maybe the net driver shutdown call already does that

#

I can make my own ServerExitRequest RPC or something and do it manually, just didn't know if the gameplay framework already had something similar

#

I guess that is for removing a splitscreen player usually

unkempt tiger
#

If the server spawns a brand new actor, and immediately after sends a client some reliable RPC with said actor's ptr as a parameter, is there any chance that for the client that actor would still be null?

fringe dove
#

@unkempt tiger I think it could be, which may be why pawn possess has a complicated acknowledgement flow

unkempt tiger
#

hmm I see, yeah it is indeed null for me, just checked

vivid nymph
#

So I moved the RPC call into my Player BP, and I am still getting LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_C_1. Function SetTargetOnServer will not be processed.

fringe dove
#

@vivid nymph doesn't matter where the call is called, I think the actor channel it goes on is determined by on which actor it is defined

vivid nymph
#

not sure I follow, so what I did was store the clicked actor on a global variable available on the client, and inside my Player Character's BP OnTick, I check if that variable is set and then do the RPC call

fringe dove
#

@vivid nymph is the player character possessed?

#

it should fail I think until it is possessed and starts going I think through the player controller's connection as a result

vivid nymph
#

hmm, i mean i can walk around with it np in that window

fringe dove
#

did you only spawn it locally?

vivid nymph
#

its definitely replicated, I can see it moving around on the other clients and vice versa

fringe dove
#

I'm not sure then, it should have a working connection if it is able to do that

grand lily
#

Anyone have tips on finding fonts with licences that allow their use in marketplace assets?

fringe dove
#

wrong channel I think

grand lily
#

oops

#

clicked the channel starting with "m"

gleaming vector
#

network prediction work

#

character movement

fringe dove
#

did much change with NP plugin from 4.25 to 4.26?

rich ridge
#

Even if it's changed there is no point in using them

#

It's not documented at all

fringe dove
#

there are a couple youtube videos from the guy working on it but that's about all I've seen

rich ridge
#

NP is supposed to be CMC replacement, if you somehow managed to use NP , then you GAS will break

fringe dove
#

it is supposed to eventually integrate with GAS

rich ridge
#

This video I have seen.

fringe dove
#

can do more than CMC replacement with physics, vehicles, etc.

rich ridge
meager spade
#

yeah but what kind of GAS support are you wanting?

#

like what would you want to do?

fringe dove
#

I think their integration would be having GAS stuff that affects movement be integrated into the network prediction system rollbacks and stuff

#

they have stuff with their NP ability test scenes but it is their own ad-hoc ability system I think

meager spade
#

i didn't ask what they would have, i asked what you would want

#

like how would it be integrated into GAS?

#

cause they are making a new CMC based on it

#

which would handle movements, but this would also be external to GAS anyway

fringe dove
#

Dave Ratti in one of those videos said they would like to integrate it, I assume making one or the other a dependency or putting in some kind of api for optionally doing it

meager spade
#

they wouldn't make it rely on GAS

#

so GAS making it a dependency sure

#

but not the other way round

hybrid crown
#

Stupid ask but : What happen when you call a "Server, Reliable" function on the server ?

  • This is treated as a simple function call ?
  • is it a good practice to do this on every server function, to avoid calling them by mistake on the client ?
meager spade
#

its not a good practice really no

#

and yes it is treated as a simple function call

#

though you should strive to keep the logic known

#

why would a server call a server rpc?

#

why would a client call a client rpc?

#

seperate them.

hybrid crown
#

Thanks for the answer.

#

it's simply to avoid designer calling server function

meager spade
#

make a function

#

that is not a server rpc

#

then handle that internally

#

in BP though, you cant really hide stuff away

#

in C++, we only expose stuff to BP that should be called

hybrid crown
#

Yeah ofc.

#

Guess BlueprintAuthorityOnly is the way.

meager spade
#

well that would say this function should only be called on server

#

it doesnt force it tho

#

its more a cosmetic thing

#

client can still call it

hybrid crown
#

It's enough.

#

i mean beyond function commentary + visual logo, my job is done here.

#

(yeah, that retarded, but designer MUST have the possibility to call this function)

#

cause it's use in quests.

#

Also, i don't remember but... we agree than OnRepNotify aren't called on server in cpp, right ?

meager spade
#

in C++ no

#

in BP yes

#

BP hacks it

hybrid crown
#

yup, thanks

vivid nymph
#

Almost at my wits end trying to figure out why my ThirdPersonCharacter, which is now spawned and possessed by the player after OnPostLogin still cannot call an RPC to run on the server. The error is still "No owning connection for actor ThirdPersonCharacter_C_1. Function SetTargetOnServer will not be processed."

winged badger
#

because there are 2 of them

#

one owner one not

#

and both are sending the RPC

#

and 1 errors out

#

most likely

vivid nymph
#

Nah, i verified it is only a single client instance that is trying to fire it, as it should be

winged badger
#

when?

vivid nymph
#

watching the flow in BP, checked all instances in the Debug Filter

#

hold on, i noticed something that isn't right

#

both clients are giving the same error with the same "ThirdPersonCharacter_C_1" which should different per client

#

not certain how that is possible, given that the flag to send the RPC only exists on a single client

#

that variable is not replicated

minor nova
#

Is it good practice to tie user inputs like "Fire" into the movement component, and replicate them as compressed flags?

winged badger
#

actor names are not replicated

#

they are likely to have their own as _0 both

vivid nymph
#

yep

winged badger
#

@minor nova definitely not

vivid nymph
#

what I am doing is, when an NPC is clicked, they have a non-replicated bool on them called IWasClicked, on the client inside the ThirdPersonCharacter BP I get All Actors with the NPC class and check for that bool to be true

winged badger
#

how would you do about debugging a problem with fire then?

vivid nymph
#

so that bool should only be true on the client that clicked the npc?

minor nova
#

Hm, the same way I image you'd debug a problem with any of the character movement

winged badger
#

you gain nothing by doing that

#

you make your code more convoluted

#

you break encapsulation

meager spade
#

i mean what would the purpose be?

winged badger
#

you create tight coupling with the CMC

#

as if epic doesn't have you already covered there

minor nova
#

Well, I ask because this is how "fire" inputs were done in previous versions of the unreal engine if i remember correctly

#

they passed the bFired flag to server in ServerMove functions

meager spade
#

really?

minor nova
#

yep

meager spade
#

i don't see that in ShooterGame

#

nor in UT4

minor nova
#

I was wondering why there's nothing like that in current classes

#

I'd have to go back and check but I thought that was what I had seen in the past

meager spade
#

i defer shooting via the CMC

#
{
    Super::PlayerTick(DeltaTime);

    // if we have no UKaosMovementComp_Character, we need to apply firing here since it won't happen from the component
    if (GetPawn() == nullptr || Cast<UKaosCharacterMovementComponent>(GetPawn()->GetMovementComponent()) == nullptr)
    {
        ApplyDeferredFireInputs();
    }
}``` ```void UKaosCharacterMovementComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
    Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

    if (CharacterOwner)
    {
        AKaosPlayerController* PC = CharacterOwner->GetController<AKaosPlayerController>();
        if (PC && PC->PlayerInput)
        {
            PC->ApplyDeferredFireInputs();
        }
    }
}```  but that is it
#

๐Ÿคท

winged badger
#

no K is super weird @meager spade

meager spade
#

lol

#

heh

kind ember
#

How vulnerable is direct IP connect instead of using Steam address?

minor nova
#

Is this following how they did it in the UE4 UT project?

meager spade
#

yeah basically

minor nova
#

i was looking at that briefly

meager spade
#

but i would not send fire as a compressed flag

#

then again i use Gameplay Abilities for weapon firing

vivid nymph
#

Legit having scope issues inside this thing. It loses the value of Self after the For Each Completed, I tried storing it in TempSelf variable, but it still doesn't like it...

meager spade
#

eww why you using getallchars of class

#

why not cache your NPC's into an array when spawned

#

so much cheaper ๐Ÿ˜„

vivid nymph
#

oh, i will later

#

once i see this work

winged badger
#

that is pretty bad

vivid nymph
#

i realize this is bad

#

but thats not my concern atm

winged badger
#

controller should have a good idea whats under its mouse at all times

#

so when you click it just sends that to server

vivid nymph
#

what do you mean? controller knows whats under the mouse?

winged badger
#

with the games where you click on stuff

#

controller should trace under the mouse on tick

vivid nymph
#

i am changing away from that OnClick event from Actor, and doing it with a line trace

winged badger
#

highlight whatever is under mouse via stencils or whatnot

#

and have a pointer to whatever is under the mouse in it at all times

spare mortar
#

Quick question here, somewhat new to network programming in UE4...

I want to make "switching weapons" smooth for the client. I intended to update a local replicated variable (on the client switching weapons), then make a reliable RPC to the server to tell it what i am doing. However, the docs warn against this because:

WARNING: Changing a replicated variable's value on the client is not recommended. The value will continue to differ from the server's value...

Is this a case where i can ignore the warning because the RPC is reliable so it will be eventually consistent? Is a there a better way to do this?

meager spade
#

i dont use replicated props

#

for switching weapons

#

all my weapon switches are client side

#

even if server wants to change a clients weapon, it calls a client rpc to switch the weapon (so all weapon swaps are client side)

#

issue is you need to do checks

#

server can reject the weapon swap

#

then you need to handle forcing the client back to the other weapon

spare mortar
#

all my weapon switches are client side
But the client would have to update the server at some point to tell other clients that they are now holding that weapon, no?

eternal canyon
#

Does anyone know if the Ping Variable in the player state is accurate?

#

cause when I use it

#

it doesnt seem to be

#

as I am USEast and my friend is USWest and he somehow has only 20 ping

vivid nymph
#

It works

meager spade
#

@spare mortar yes via a server rpc

#

but you still need to handle roll backs

#

also pending weapon swaps (incase weapon is still in firing state)

#

there is a better version of ping @eternal canyon

eternal canyon
#

wdym by that

#

|?

meager spade
#

you BP or C++?

#

ah

#

so GetPing does return ping

#

which is set

#

so..

#

i am really not sure how accurate that is

#

Ping is a replicated prop

eternal canyon
#

bp

#

but I can use c++

winged badger
#

its accurate enough for displaying ping for players on the UI

#

i would not run any gameplay logic off of it

hollow eagle
# eternal canyon but I can use c++

Make sure you multiply ping by 4.
From the source code...

/** Replicated compressed ping for this player (holds ping in msec divided by 4) */
UE_DEPRECATED(4.25, "This member will be made private. Use GetPing or SetPing instead.")
UPROPERTY(Replicated, BlueprintReadOnly, Category=PlayerState)
uint8 Ping;
meager spade
#

shit iwas meant to say that

#

i though i did