#multiplayer

1 messages ยท Page 402 of 1

final thicket
#

I see that they are diffrent

#

I was just wondering if you need to change blueprint code

#

If it works on a listen server will it work on a dedicated server?

bitter oriole
#

@summer nova Still, $10 for that particular course is probably some of the best spent money I ever saw

summer nova
#

true

final thicket
#

Because I found that some collision box's dident seem to want to trigger

summer nova
#

they have some actually good courses

#

to make people think the website is legit

#

dont waste your time outside of the actually good "flagship" courses. The rest have a huge chance of being youtube level trash

final thicket
#

But I was using it in editior with the "run dedicated server" box checked

#

And I had the steam plugin

#

in editor

#

does that break it?

bitter oriole
#

@mint zephyr (that the right tom ?) I simply can't answer that question because it depends on your game. Really. It depends on how you built your networking. If it assumes that the server is a player, then it won't work.

#

I'd say mostly it's harder to go from dedicated to listen than the opposite

#

But nothing in multiplayer ever works seamlessly with just a different option

final thicket
#

Right tom yes

bitter oriole
#

Dedicated is supposedly just a minimal version of listen, so most of the transition should work fine

gusty raptor
#

@bitter oriole i was hoping to find any info just on google.. im amazed why there's like no good reference on replicating vehicles

final thicket
#

Hmmm, I undestand that thier minimal versions but does that mean that the server does not run the level blueprint information ?

#

As I have some information stored in their

bitter oriole
#

@gusty raptor The knowledge & skill required for creating smooth vehicle movement does not come free. Well it does - you can find research papers on rollback & replay and go from there

#

The reason I recommend that course is, I've rarely seen this level of quality in a tutorial from this level of knowledge

#

That kind of topic is usually taught only in source code dumps and research papers

#

I'd recommend that course for $100

#

It's at $10 most of the time so just get it if you want vehicle replication

#

@mint zephyr The server runs everything

#

It runs the entire level with code, Blueprint, geometry, textures

#

It doesn't render the 3D scene but creates and maintain it accurately including physics

#

Now again, just switching to an entirely different networking infrastructure is never just a checkbox, so you'll need to look back on what doesn't work and fix the issues - which will probably be issues where you assumed there was a local player to do the job

summer nova
#

to understand why this thing is hard

#

you know Rocket League?

#

the absolute madmen ignored unreal engine physics library

#

used Bullet (open source)

#

made sure that it simulates at 120 fps allways

#

even if the game renders at 30, it still calculates physics at 120

#

and then, they also made sure that bullet does the exact same physics simulation on every platform

#

that way, they could syncronize the cars

#

basically, by uploading "car X is at this position, with this rotation, and this physics properties for inertia and speed", and it would sync properly on all players

#

and it still desyncs a bit becouse internet is just shit

gusty raptor
#

@summer nova i think the server then calculates physics, clients not?

#

ive been investigating it and think, maybe the server should run physics and clients just inherit the result..

#

however i cant find out if its possible to do that ^

twin vault
#

That would make the game looks like its running at 10fps, definitely both should simulate physics, and the server result is used if the client is different

summer nova
#

@gusty raptor its both

meager spade
#

predicition is the key

#

prediction*

#

let the client predict the result, the server verify the result. always trust the server

bitter oriole
#

@gusty raptor For any game that has action, you want server and clients to simulate everything

glacial lotus
#

I have 2 cameras in my characters. When I need to swap between them (Third person mode and Scope/zoom mode) I disable one and enable the other. That does work in local but inmultiplayer only the client+server (not dedicated) works fine. Any ideas?

#

The other clients simply don't change camera.

thin stratus
#

Well, you have ClientRPC such a change

#

In case you are doing it on the server

deep island
#

hello, I'm having a big problem with UE Networking

#

I'm trying to allow players to play in a WaitingToStart MatchState, but if I'm in a listen server, host functions are not called (for example Event Blueprint Update Animation or BeginPlay or Tick), what can I do?

#

these functions are only called on remote clients, but not on the server

glacial lotus
#

@thin stratus nope, it's done on client.
But I just discovered that for some reason it cannot get the character from the player controller. It's not valid.

winged badger
#

On BeginPlay?

thin stratus
#

Hehe

winged badger
#

If so use Possessed event, its never ready on BeginPlay

deep island
#

maybe I've found the problem

#

let's hope T_T

winged badger
#

@deep island you should start reading source code in AGameMode and AGameState specifically related to MatchState

deep island
#

already done

#

maybe I have to call NotifyBeginPlay

#

in HandleMatchIsWaitingToStart

#

I'm doing that now, if it works I'll be happy

glacial lotus
#

yep, it is "on Begin Play" ๐Ÿ˜ƒ I understand that this was a wellknown problem. So I have to do this on Possessed.. but I cannot find that in my PC.

thin stratus
#

I'm confused. My Server has trouble updating UI when going back to Lobby with SeamlessTravel.

LogWorld: ----SeamlessTravel finished in 0.03 seconds ------
// SERVER
LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: BP_PC_Base_C_0 
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogGameMode: << GameMode::HandleSeamlessTravelPlayer: BP_PC_Lobby_C_0
// UI VALID?
LogBlueprintUserMessages: [WB_PlayerList] ### UI PlayerArray ###
LogBlueprintUserMessages: [WB_PlayerList] BP_PS_Lobby
LogBlueprintUserMessages: [WB_PlayerList] ### UI PlayerArray ###
// CLIENT
LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: BP_PC_Base_C_1 
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby1
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
// WHAT NOW!?
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### HUD INVALID WHYYYYY ###
LogGameMode: << GameMode::HandleSeamlessTravelPlayer: BP_PC_Lobby_C_1
#

the ### UI PlayerArray ### calls in the UI when it's refreshed. Prints the same array again.

#

And the ### OnRep PlayerArray ### prints in the OnRep, before accessing the UI to refresh it

#

The UI is created in the HUDs BeginPlay

#

So how can it refresh (even if it's doing that through Construct), but the HUD isn't valid

#

And that's only on the Server

#

-.- I dislike SeamlessTravel

#

I mean, HUD/UI wants replicated Array. And OnRep wants HUD/UI.
Even if the HUD isn't valid in the OnRep, timewise the HUD should grab the replicated array when it's created.

deep island
#

YEEEEEAH! That was the problem

#

I'm a genius ๐Ÿคฃ

winged badger
#

Only on server?

#

You could try to Copy the HUD in OnSwapPlayerControllers, but that is just a wild guess

#

Otherwise takes a while for it to instantiate

thin stratus
#
LogWorld: ----SeamlessTravel finished in 0.04 seconds ------
LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: BP_PC_Base_C_0 
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### HUD VALID WHYYYYYBP_HUD_TDM | BP_PC_Base ###
LogGameMode: << GameMode::HandleSeamlessTravelPlayer: BP_PC_Lobby_C_0

LogBlueprintUserMessages: [WB_PlayerList] ### UI PlayerArray ###
LogBlueprintUserMessages: [WB_PlayerList] BP_PS_Lobby
LogBlueprintUserMessages: [WB_PlayerList] ### UI PlayerArray ###

LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: BP_PC_Base_C_1 
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] BP_PS_Lobby1
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### OnRep PlayerArray ###
LogBlueprintUserMessages: [BP_GS_Lobby_C_0] ### HUD INVALID WHYYYYY BP_PC_Base1 ###
LogGameMode: << GameMode::HandleSeamlessTravelPlayer: BP_PC_Lobby_C_1
#

So

#

I printed the Controller to it and the HUD

#

Now I am at a loss

#

I guess I can't access the PC in the SwapPC function

#

Cause it gives me the old one

#

Even after the Server already traveld

#

And why is that printing Base1

#

-.-

winged badger
#

rom experience, takes sometimes over half a second for PC to instantiate HUD and apS for the first time

#

And PS*

thin stratus
#

Sure, that would be fine

#

Then the HUD would grab the PlayerArray though

winged badger
#

It is an actor, can you flag it 5o persist across travel?

thin stratus
#

The problem I see is, that "GetPlayerController0" is returning the wrong PC

winged badger
#

So it persists*

thin stratus
#

Not in BPs

#

There I have to use the default list of persisting actors

winged badger
#

Don't like typing on mobile

thin stratus
#

That's also not the issue. I have two HUDs and two PCs.
Both Base and Lobby

#

Lobby is a child of Base

#

When going from Gameplay level (Base) back to Lobby, it returns the wrong PC

#

You can even see that it returns the old HUD with it

#

And I understand that

#

Cause at that point, the Server hasn't finished his seamless Travel yet

#

But why the hell, do I still get the BASE PC, in the SeamlessTravel of the Client

#

:/

winged badger
#

You tried forcing the isseu with console command GameMode arguments?

thin stratus
#

Yeah, it's forcing the GameMode change

#

If I loop the list update it also updates

#

But who wants to hack that

#

Well at least I know the issue now

ivory rapids
#

Hi, does anyone know a good tutorial for multiplayer over LAN using c++, for UE 4.19? please

winged badger
#

Read Cedric's bible first, if you haven't already

#

Pinned on this channel

thin stratus
#

Uff

#

So I need an Event, that I can use to update my CustomPlayerArray, and it needs to happen after everyone has their HUD.

#

Does BeginPlay of the PlayerState not call when using ST (SeamlessTravel)?

winged badger
#

Not sure

thin stratus
#

Still confused that, after the ST of the Server is done, the one for the Client still gives the Server the old PC (HUD destroyed by then thouhg

#

Weird.

winged badger
#

You could have HUD access the PS and set bHUDReady

#

Re

#

Replicate that, and server side OnRep check if everyone is ready

#

It IS ugly, but it should work

#

Or just set it serverside and have the steer trigger the check in GS

#

Still ugly, but little less spo

#

Steer=setter^

next falcon
#

Guys i have a replicated Array with a length of 10
If i set the value of a index as server it will change on server but not replicated to clients
How do i fix it and whats the problem ?

proper olive
#

@next falcon where are you storing the array?

next falcon
#

in a replicated component.

proper olive
#

on what bp?

#

assuming it's bp

next falcon
#

yes bp

proper olive
#

which blueprint?

next falcon
#

what do you mean ?

proper olive
#

is it on a character, on the game state, on the map?

#

where is it

next falcon
#

in a component on a character

proper olive
#

are the character, the component and the variable all set to replicate?

next falcon
#

yes

proper olive
#

you may have to run on server, then run a multicast, passing the new variable through each event

next falcon
#

mhpf

proper olive
#

at some point you'll want to throw another filter or two on there to prevent little yellow errors

#

warnings*

#

like switch has authority, or is locally controlled

next falcon
#

okay ill do that

proper olive
#

or to get the exact behavior you want

#

but to just get everyone to have the variable, server RPC then multicast RPC, passing thru the variable with the events

#

on some actors you can just run on server, but it doesn't always work for everything

#

Can anyone help me with my own problem? I managed to get the "only the server sees the Quest Icon" problem I had yesterday, basically I made the quest icons NOT replicated and run the spawn event on client, so each client has their own version of the Quest Icon for each character

#

anyway it works perfect on overlap and end overlap with the Quest Icon actor

#

I fixed it by running an event on the interacting player pawn itself, to shut off its copy of the icon

#

anyway, that works, but once interacting with the icon, I load um a widget, you know ,for quest stuff

#

so once I complete the quest itself, I can make it so the icon no longer lights up when you overlap, but I want to shut it off right then and there

#

so coming from the UMG, I can't seem to access the Quest Icon no matter how I pass it thru

next falcon
#

I have the same kind of array in my c++ class and there the replication works perfect... ?

proper olive
#

some actors will automatically replicate from server

#

I think only characters? not sure

#

maybe it doesn't work on the component automatically

lost inlet
#

pretty much only pawns by default, you shouldn't assume the rules of replication

proper olive
#

^ thanks

lost inlet
#

the actor also has to replicated for the underlying components to be replicated

proper olive
#

so how do I pass through a reference to an actor through UMG? this is killin me

#

basically this works perfectly on End Overlap with the "Question Mark" directly:

next falcon
#

if i can't do a multicast how do i do it than ?

lost inlet
#

that's incredibly inspecific

proper olive
#

But if I trigger this event with a UMG reference to the question mark, it comes back as None

#

@next falcon you'll have to multicast a lot

#

down the road

next falcon
#

okay fuck

proper olive
#

I think 1 more pic to show where the Question Mark is being set

#

On the NPC

#

ignore that one branched off node it's just chillin there

#

so this works on server

#

but not for clients, but it does work for clients when running directly from the End Overlap on the Question Mark itself

#

so if I run away and come back, it's disappeared correctly... but at the time of completion, through the UMG, which is spawned by the question mark itself.....

lost inlet
#

oh damn BP

proper olive
#

haha

#

yea sorry

lost inlet
#

but usually i would do it as a dynamic multicast delegate on the player controller

#

bind the event in the UMG widget

#

and pass it that way

proper olive
#

hmm

#

I rarely use delegates but that might make sense

lost inlet
#

the player controller is always valid for a UMG widget

proper olive
#

right

#

I can trigger the event no problem

#

but it's not registering the Question Mark actor

#

the one to set visibility on

lost inlet
#

from the server you would call a client RPC on the PC most likely

#

which would then pass the info onto a delegate that your widget listens to

proper olive
#

so when I create the widget, I bind the delegate?

lost inlet
#

yes, the player controller should be valid in the construct event

proper olive
#

and then that way, it's the UMG acting on the Question Mark in the UMG event graph?

#

delegates confuse me so much lol

#

it's like everything you know, but backwards

lost inlet
#

you would send a "open conversation widget" RPC over the network, this RPC when run on the client would run the delegate

#

i presume you have some kind of HUD UMG widget

#

that can be used to listen to the delegate and create the relevant widgets

#

i think they're called event dispatchers in BP

proper olive
#

yeah

#

in bp we have "bind event to dispatcher" on one side

#

and call dispatcher on the other end

#

so I guess bind event means listen right?

#

there are more functions they need to do a good in depth tutorial on advanced BP topics ๐Ÿ˜„

lost inlet
#

bind and listen mean the same

#

though the game i'm working on is mostly C++ for game logic

#

with BP mainly used for data, prototyping and animation

#

... and UMG

proper olive
#

so whats the deal with UMG replication?

#

they only exist on client right?

#

considering my question mark is being spawned on client, I really don't get why this is being a problem

lost inlet
#

there isn't any replication

#

but any event that happens on the server in a multiplayer game needs to be relayed to your UMG widgets that depend on it somehow

#

no magic there

#

UMG widgets are exclusively spawned on the client, i usually use the HUD class to manage the creation of widgets that belong to the HUD

proper olive
#

yeah I think they made HUD a backend class in BP

#

you don't really access it directly, it just automatically does its thing

lost inlet
#

the HUD class is a pretty legacy class in UE, but that's what i repurposed it for and it works well

thin stratus
#

Uff, I'm so sick of the event flow in Multiplayer haha

twin juniper
#

ack holdon

#

let me repaste that one sec

#

can anyone give me pointers on this pipeline i have for my source build / dedicated server config setup

thin stratus
#

I would recommend putting that into a "Comment Only" Google Doc

twin juniper
#

oo ok

thin stratus
#

So, order of BeginPlay is: PC->PS->HUD

#

-.-

#

So can't access stuff from the HUD in the PS on BeginPlay

#

Fml

#

HUD is such a garbage class, let's move the Widgets to the PC

twin juniper
#

hmm i just had a thought cedric, if you can't access it in HUD cant you move it to game instance? that is the global class right? if u move the vars u need and the logic there, and make callls to the game instance instead?

thin stratus
#

Gnah, no please

#

I only need the Lobby Widget in the Lobby

#

Not global

twin juniper
#

i only use hud for a UI thing that has little radar blips in my game haha. i never use hud for anything else - oh except for a flight alignment indicator

#

for a player ui that has like player score and kill count, i store all that in a playerui widget on screen and that gets loaded up by default with create widget

thin stratus
#

Yeah I have a different problem

twin juniper
#

i got your comments in the doc thank you

thin stratus
#

Yeah, have no time to check the rest out

twin juniper
#

can iask you quick question like really quick about general latency stuff

#

i am noticing like brief lag spikes in my dedicated server when i am on it - but only after powerups spawn and at least 1 other player is in there

#

do you think that the replication settings of the powerups and possibly the replication settings of the player is causing this? i am considering overhauling some of my netcode into CPP to fix this issue

thin stratus
#

That'S the default settings

#

If you don't have massive amounts of them

#

Then it should be okay

twin juniper
#

all right

thin stratus
#

Well, f*ck it

#

I really wanted to have a non-polling solution for my UI PlayerLists

#

But even Epic, in all the Source Code in all their projects, poll the PlayerArray in their Scoreboards

#

I guess it's just too much work to get all events in harmony to have entries removed/added or at least the list updated.

#

Specially when using SeamlessTravel

#

Only thing they do to not recreate everything every tick, they check the length of the array and save it for next time >.>

jagged goblet
#

Hi, I'm replicating addforce it seems to work fine until I simulate lag using Net pktlag = 50 I get a very twitchy erratic behavior on the client. any advice? thanks

glacial lotus
#

So still stuck with my PlayerController not been able to access character (gets Not valid) OnBeginPlay and On Possessed doesn't seem to exists in my PC. What should I do?

jagged goblet
#

are you on listen server

glacial lotus
#

I don't think so. I have a client+server(not dedicated) and 3 more players. Is that listen server?

#

"3 more clients"

jagged goblet
#

how are you casting

#

maybe try "get controller" then plug that into your playercontroller cast

#

o this is the other way around eh

glacial lotus
#

from the PC -> on begin play -> get controlled pawn -> cast to my character class -> to variable. But it's always not valid

#

I think I have to use a On possessed event or something like that but it doesn't exist in my PC

#

oh and I just noticed it's the server the only one complaining, the clients PCs seem to reach the characters fine

jagged goblet
#

ah

glacial lotus
#

ok, I'm confused. Should I initialize the PC on the server or just on the clients?

winged badger
#

OnPossessed fires on the Pawn

#

and server only irrc

glacial lotus
#

@winged badger Thanks...

#

I guess that measn I cannot access it, either way :/

winged badger
#

what do you want to do?

glacial lotus
#

well I want to allow my players be able to zoom (swapping 2 cameras in the character BP).

winged badger
#

ok, that has little to do with networking

glacial lotus
#

yep. But the camera swapping just happened in the client+server, not in the pure clients

winged badger
#

there is APawn::IsLocallyControlled and APlayerController::IsLocalController

#

it will return true if the player that ownes the Pawn/PC is local to the machine

#

its used to filter stuff like that

glacial lotus
#

yep, I'm using that

winged badger
#

So you have InputActionZoom

glacial lotus
#

different name, but yes

winged badger
#

and it should just swap the camera, no RPC, no network calls

glacial lotus
#

"no RPC, no network calls" Don't reallyknow, I'm a newbie with all this. But so far I think it only needs to change the cameras

winged badger
#

yes, but there is no need to let the server or other clients know which camera you're using

glacial lotus
#

one thing, that is done via a "weapon component" in the character.

#

ah I see. So the issue is just a misconfiguration of my stuff here. I should ignore the network code here. Ok, I'll revert this and try again.

winged badger
#

there is literally no benefit from that

#

if you have any InputActions that depend on the camera

#

like selecting an object under a cursor

#

you can just do a LineTrace and send the World Coordinates of the hit to the server as part of the ServerRPC input arguments

#

and you would have to do that anyways, since server has no way of knowing where the client's mmouse cursor is

glacial lotus
#

hmm, not sure if that applies here. This is a Third person shooter game.
Also I don't know yet what the ServerRCP input arguments are ๐Ÿ˜ƒ But I'll figure it out.

winged badger
#

read Cedric's networking compendium

#

pinned on the channel h ere

ivory rapids
#

Where could I learn how to use FSockets? please help

glacial lotus
#

Thanks

jolly berry
#

What exactly is a UActorChannel?

#

actually in fact

#

UNetDriver UNetConnection UActorChannel

#

anyone have a summary of what these classes do?

bitter oriole
#

Isn't that fairly engine internal stuff that games don't use directly ?

jolly berry
#

Somewhat, i was combing through some source examples though and there are some places where that's utilized

#

so wondered what they needed to use that stuff for

bitter oriole
#

No idea, never needed any of that

winged badger
#

understanding the UActorChannel is helpful

#

i just never prepared to articulate something like that

#

but you can get away with just understanding that anything attached to an Actor uses that Actors UActorChannel for replication

vocal dagger
#

When I get invited into a session, is there a way to find out if the session I'm invited to is a GameSession or a PartySession?
OnSessionUserInviteAccepted(const bool bWasSuccess, const int32 ControllerId, TSharedPtr<const FUniqueNetId> UserId, const FOnlineSessionSearchResult & InviteResult)
The invite result contains only an FOnlineSession and from there you can get the session info, but there is nothing there about the session name right?

thin stratus
#

Not that I see

#

But why don't you add a custom Setting to your session? @vocal dagger

vocal dagger
#

because on some consoles it might not work

#

for example on Nintendo Switch you cannot use SEARCH_KEYWORDS

#

and on PS4 external session data is very restricted

#

I'm trying this right now
FNamedOnlineSession* ExistingGameSession = SessionInterface->GetNamedSession(NAME_GameSession);
FNamedOnlineSession* ExistingPartySession = SessionInterface->GetNamedSession(NAME_PartySession);

// Is this a game session
if (InviteResult.Session == ExistingGameSession)

#

@thin stratus also PS4 external session data is not implemented by UE4 ๐Ÿ˜‰

thin stratus
#

If you don't join a session, it might not return GetNamedSession

#

And I assume you want to know that upfront

vocal dagger
#

yep, also I might have game sessions and party sessions running on the client as well

thin stratus
#

Hm, you aren't aiming for Steam, or?

vocal dagger
#

of course but I want to make this as open as possible

#

for steam would be too easy

thin stratus
#

Steam doesn't allow multiple sessions

vocal dagger
#

just a custom keyword would work

thin stratus
#

Either Party, or Game.

vocal dagger
#

oh so you cannot create a Game and a Party session?

thin stratus
#

Nope

vocal dagger
#

oh ok

thin stratus
#

You have to destroy the party if you want to join the game

vocal dagger
#

well ok, that could still work

thin stratus
#

Yeah it would. Just saying :D

vocal dagger
#

are you the one who worked on the Steam party session plugin?

thin stratus
#

Nope

#

That's Devero

vocal dagger
#

I think someone mentioned

#

oh ok

#

well thanks, I'll keep looking ๐Ÿ˜ƒ

vocal dagger
#

well found a way, if I create a party session I just don't set a MAP_NAME, then when invited I know it's a party if there is no map set

#

but handling which session to destroy when creating a new one or join is quite a pain

lost inlet
#

pretty sure you can, in our source engine game you could be in an active party and be in a game at the same time

#

unless it's a limitation of the steam OSS

vocal dagger
#

@lost inlet you are right, you can have a Steam and a Party session at the same time

open gazelle
#

Hello everyone. When i package my game with an custom app id as a shipping build the steam overlay wont start. appid 480 seems to be working fine. also when starting the game in debug mode this seems to work fine aswell. is there anything i need to configure?

bitter oriole
#

@open gazelle Did you start the game from Steam

open gazelle
#

no

bitter oriole
#

That's why IIRC

open gazelle
#

ah ok

#

Thanks ill try ๐Ÿ˜ƒ

#

Are these things documented somewhere?

bitter oriole
#

Not really :/ Steam has some pretty weird behavior differences depending on build type

open gazelle
#

Ok because getting steam running is pretty weird. Sometimes standalone from editor works sometimes not etc.

bitter oriole
#

I should write something about releasing in general because there is so much we learned

#

That isn't documented anywhere

open gazelle
#

Maybe anyone knows why the "play -> standalone game" sometime does not find any sessions hosted. While when running from a packaged build there is no problem.

bitter oriole
#

IIRC there's Appid and DevAppid

#

Make sure you have the same here ?

open gazelle
#

ok need to check. my producer gave me one id

bitter oriole
#

There's only one

#

But I think Epic has two separate settings

#

Can't find a source, so maybe that's just wrong

#

Ah, right

#
SteamDevAppId=480
SteamAppId=480```
#

Check that out ^

open gazelle
#

they are diffrent?

#

Ok stupid question: If I want my shipping build to be working with my steamapp / steamdevid. What do I need to do?

bitter oriole
#

You need to set both values to your appid

#

Then for Steam testing on shipping, you should be launching from Steam (unless you have the relaunch option enabled, IIRC, but I haven't played with that)

#

For "standalone" testing it should "just work" if you have set the SteamDevAppId correctly too

#

Now I don't know what "standalone" defaults too when clicking play

#

Should be Development

#

If somehow it picks the Shipping build, again, shouldn't work (but why would it do that)

open gazelle
#

Ok thanks! I'll try around a little.

gusty raptor
#

hi, anyone ever replicated a simplevehicle and knows how to?

#

angular velocity is very jaggy ..

bitter oriole
#

@gusty raptor Yes

#

You need to implement rollback & replay

gusty raptor
#

rollback is like fixing position/rotation to match server?

open gazelle
#

@bitter oriole
these are the default values from the engine. there is no appid 0o
[OnlineSubsystemSteam]
bEnabled=false
SteamDevAppId=0
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=9

gusty raptor
#

so physX vehicles are not replicated out of the box?

bitter oriole
#

@open gazelle SteamDevAppId should be changed, and yes you need to add your own

open gazelle
#

what i wanted to say is that there is no SteamAppId entry

bitter oriole
#

Yes you need to add yoru own

open gazelle
#

only a steamdevappid

twin juniper
#

does anyone here know how spatialOS integrates with UE4? I haven't found any up-to-date docs on it that have helped me, I am also currently using a mac

bitter oriole
#

@gusty raptor PhysX is basically incompatible with replication so you'll need to implement simulated physics yourself, without using engine physics at all. Replay & rollback is the technique to use for player characters - vehicles, pawns, etc. it's implemented for ACharacter, but for vehicles you need to start from scratch.

#

I linked you a really great course on this

gusty raptor
#

right ๐Ÿ˜’

twin juniper
#

I've been having trouble with their browser interface

#

and I can't find any tutorials

bitter oriole
#

@gusty raptor Problem with PhysX is that it's not deterministic, so client and server will have different simulations, and you'll have to rollback the client very often

#

The general problem is that you need real-time simulation on your client, which then goes to the server, is simulated again there, goes to other clients including you

#

When it goes back to you you rollback (to the server state) and replay player moves more recent than the move the server simulated with

#

Other clients use interpolation to generate smooth movement between server replication events

#

That's the gist of it, get the course to get the detailed version ๐Ÿ˜ƒ

open gazelle
#

Which course?

bitter oriole
open gazelle
#

ah. are you part of it?

bitter oriole
#

No

#

It's just a really great introduction to the topic of multiplayer movement

open gazelle
#

ok cool ๐Ÿ˜ƒ

gusty raptor
#

doesnt deal with physics though it seems

twin juniper
#

So does anyone know about spatialOS

#

I'm having trouble setting it up

bitter oriole
#

@twin juniper Very few engine users need to add a custom network engine so you're not going to get real-time support on that

#

You should probably look if there are spatialOS forums and check with them

#

@gusty raptor UE4 physics won't work with multiplayer, like at all.

#

That's a technical limitation in UE4's physics engine that's not going away soon - you need to create your own physics with a small feature set that you control well

twin juniper
#

Ok, why don't people use spatialOS more? It's like a dream come true for mmo devs

#

Who don't have big teams and high budgets

bitter oriole
#

Because there is no such thing as a MMO team with a small budget

twin juniper
#

It used to be impossible, but now it can be done

bitter oriole
#

@twin juniper Problem with MMOs is getting the players - can't do that without a huge marketing campaign

gusty raptor
#

@bitter oriole damn:/ i was kinda sure i was able to do it but hhm:S

twin juniper
#

Oh, right

#

But it can be done with a smaller budget

bitter oriole
#

This discussion comes up fairly often but basically 100 people who have your game boil down to one online player on average

#

Combined with how the average Steam indie game get 1000 lifetime players, you get a gloomy outlook for indies MMO

twin juniper
#

So the ratio of owning to playing tends to be 100 to 1

bitter oriole
#

Depends

#

CS:GO has something like 30M users and 400,000 peak players this week

#

So for CS:GO that's accurate

#

Others have less, others have more, mostly based on age & retention

twin juniper
#

I was looking to make a 125v125 team-based strategy game

#

With a unique twist by having a chain of command

#

But it would be done in a way that doesn't seem too forced

bitter oriole
#

Then you need your game to get 25,000 players, or basically 20 times more than the median indie on Steam

#

That should get you thinking really hard about it

twin juniper
#

Right

gusty raptor
#

@bitter oriole so what about MP games that actually have vehicles and use UE?

twin juniper
#

And more if I want multiple games

gusty raptor
#

im kinda sure the vehicles do use physics, but...

bitter oriole
#

@gusty raptor Maybe they have custom physics, maybe they have client-authoritative physics where clients are entirely trusted to be nice and friendly and not hackers

gusty raptor
#

lol.. ๐Ÿ˜ƒ

#

perhaps PUBG as example?

bitter oriole
#

Maybe they have lots of smoothing to keep the simulations in line despite differences

#

The key thing to understand is that there is no built-in framework for this, so you need to experiment yourself

#

I believe it's fairly possible to get physics to behave if you have heavy clamping on most forces, don't do anything stupid like multiple physics bodies colliding, and have lots of smoothing between what the server wants, and what the client has

gusty raptor
#

yeah my idea is to move my bike back into the player actor and just sync the actor

#

(where the bike is the physics asset)

bitter oriole
#

There is no such thing as "just syncing" ๐Ÿ˜‰

gusty raptor
#

"Replicate Movement" ?

bitter oriole
#

It's days, weeks of hard work with lots of interpolation

#

Hundreds of lines of code etc

#

Replicate movement is a joke

#

It's only viable for debugging / prototyping

gusty raptor
#

for real?

bitter oriole
#

Yes for real it's entirely unusable for anything looking like a game

gusty raptor
#

hhm ure actually the first one that tells that ...

bitter oriole
#

"Replicate movement" will just replicate the current location & orientation

gusty raptor
#

why would that not be enough ๐Ÿ˜ƒ ?

bitter oriole
#

The thing is, you might get zero update on clients for half a second, and then get 50 updates at the same time. The average frequency will be lower than your display frequency, too. So the result will always look like shit.

gusty raptor
#

๐Ÿ˜„

bitter oriole
#

It will look laggy playing with a friend on LAN

#

It will look very laggy if you have Wifi

#

It will be absolutely unplayable over the Internet

gusty raptor
#

that doesnt sound very funny :S

bitter oriole
#

There is nothing funny about multiplayer, it makes every feature 5x harder than single player

gusty raptor
#

yeah, well true.. i know a bit.. ive been implementing things like actions..

#

e.g. getting on/off the bike.. its not really a issue

#

however im totally stuck on movement/orientation

bitter oriole
#

Like I said, everything is just way harder in multiplayer

#

Features are slightly harder at best, and impossible at worse

#

So for non-character movement ? Get that Udemy course

#

Spend a few weeks working with that

#

There isn't a shortcut on this

gusty raptor
#

what about moving a character using physics, and set it to replicate? just a quess

open gazelle
#

@bitter oriole does my steam account need to be linked with the appid for the game i am working on?

bitter oriole
#

@gusty raptor It will work fine on the server, and it will look like a buggy piece of shit elsewhere

#

There is no such thing as "set it to replicate" for anything that needs to be smooth

#

If it moves, updates lighting or color, or anything like that - then it needs real work to fill in the blanks

#

You have two core issues in multiplayer :

  • server -> client : need to interpolate cleverly because you're going to get replication data at low frequencies, in bulk, with stupid and random delays between each
  • client -> server : need 100% real-time movement on the client, can't wait from server to confirm, but also need to have the server confirm, and handle differences
proper olive
#

hi good peoples

#

I got my issues mostly cleared up yesterday, as far as setting visibility on server only - I simply changed my quest icons to not replicate and spawn on client, and when I set visibility, do a switch has authority -> is locally controlled for server and it works out

#

the problem I'm having now is that I can fire the Client Hide RPC on my character via an End Overlap with the Question Mark no problem, it fires on client

#

but I can't find a way to directly hide the quest icon directly, whether it's through the UMG, or by reference, it keeps coming back as None

#

I just tried passing the reference to Self straight from interacting with the question mark to open its widget (which is easy to tell does in fact open, so I know I'm interacting with the quest marker), so right after that I ran an event on the pawn to set a variable reference, and then later from the UMG, fire that event and it comes back as none ๐Ÿ˜ฆ

#

here's my Client RPC on the Character - the Remote portion fires off normally (the highlighted part) when running from End Overlap, but neither of the Q. Mark references are coming through as valid when I fire this event from the UMG

proper olive
#

wow, neeeevermind... I had the variable on the characters whose head had the icon set to replicate. Turned it to Not Replicate, now it works correctly

#

First time I've had to anti replicate something ๐Ÿ˜‚

tired jasper
#

anti replicate virgin

proper olive
#

:}

jolly berry
#

UNetDriver UNetConnection anyone know what these classes are used for? I somewhat understand UActorChannel now but itโ€™d help to also understand the other 2

thin stratus
#

Did you try simply reading through the class?

proper olive
#

found a nifty little node I didn't know about before:

#

tiny little useful boolean

tired jasper
#

if 'is server' = NOT true then make lag = 999

proper olive
#

save all that juicy latency for server-to-server communication

unborn nimbus
#

anyone ever seen this error when trying to start the server? ue4 LogWindows: Error: Cannot load default material 'engine-ini:/Script/Engine.Engine.DefaultMaterialName'

proper olive
#

sounds like you're using the default material on something but you turned engine content off on your package?

jolly berry
#

@thin stratus Yes, but it's definitely helpful to have a high level run down of what it's purpose is and where it's used if that information is available. I can grab the lower level stuff from engine source but it makes the process a bit easier to know a little insight before hand.

jolly berry
#

like basically something that's a little more description than this:

#

LOL

#

seems like UNetConnection handles packets

#

I think it also handles this on a actor by actor basis

#

one per actor?

thin stratus
#

It looks more like this simply handles a connection between server and client

#

One for the Server and one for the Client

#

And it holds the ActorChannels

#

Sends and receives packages

#

Etc.

ancient ruin
#

Someone here with beacon exp.? i am at loss as to why this is not working .... so i am able to create the session and create the beacon and the clients also can connect to the beacon and the connection is working ... but at a later point when i want to create the listen server and let every client connect it just doens't let me connect to the server with clients that were connected to the beacon (other clients can join just fine ) am i doing something wrong ? do i have to create a new session for it to work ?

gusty raptor
#

So hey guys, ive been asking about replicating PhysX vehicles., networking with @bitter oriole but anyone has a idea about how to replicate vehicles

#

perhaps its kinda like a difficult thing, but i might just make a good tutorial once i fix it ๐Ÿ˜‰

#

i mean, the community would need a good vehicle network base to create games with

#

it shouldnt be totally out of the box, but what if we have some good things to use right?

robust jewel
#

is there any resource where i could read about the network model in UT4?

bitter oriole
#

@gusty raptor You can't reliably replicate PhysX objects, at all. I thought that was clear. PhysX isn't deterministic so it can't generate converging simulations on multiple devices.

#

For general vehicle networking, just get the fucking Udemy course

gusty raptor
#

@bitter oriole lol so sorry, but i mean its kinds odd.. just wanted to mention

#

and @bitter oriole i might get the cource though i did already thanked u for that ๐Ÿ˜›

#

but just, im kinda amazed how much about general unreal engine topics can be found on google, and the less about vehicle replication in common

bitter oriole
#

That's because it's an advanced topic with no easy, plug-in solution for everyone

#

Anyway, good luck

gusty raptor
#

hehe ๐Ÿ˜›

#

i might then just release my project once its really working

#

a real plugin would be good though

bitter oriole
#

If you find something that works for hovering tanks, wheeled cars, bikes and others then sure

#

All of these are going to need fairly different code

pallid mesa
#

did I hear MMO?

#

oh, never mind

jagged goblet
#

Hi, I'm replicating addforce (from char movement component) it seems to work fine until I simulate lag using Net pktlag = 50 I get a very twitchy erratic behavior on the client. any advice? I've tried everything from simulating on client and server to just server everythings smooth on 0 but any pktlag will cause bad lag on client

dull stream
#

@light prawn Similar issues on my end. Solved some problems using SavedMoves, but Im in the same boat in a lot of ways. Creating custom movement behavior can be difficult to get working alongside the client correction

#

I find that for certain things, calculating new speeds and setting them inoverridden getMaxSpeed can help simplify the process

#

but it may not be relevant for your particular thing if it doesnt involve input

light prawn
#

wrong james ๐Ÿ˜

dull stream
#

...whoops

#

@jagged goblet

jagged goblet
#

well I'm trying to get 6dof movement working in a no gravity environment

#

do use inputs

dull stream
#

hah thats funny, it sounds very similar to my project

#

I am doing a flying third person character multiplayer shooter game

jagged goblet
#

ah first person spaceship game here

deft plaza
#

Anyone know why my client one might not be creating a player controller?

dull stream
#

i reccomend checking out the flying movement mode

jagged goblet
#

thats what im using actually

dull stream
#

Im doing a slightly modified version of that

#

essentially just copy pasted and tweaked, along with some overridden functions

jagged goblet
#

hm

dull stream
#

but yeah vast majority of my changes ended up being... calculate new max speed, acceleration, and braking acceleration

#

then in the getter functions for each thing, GetMaxSpeed for example

#

im doing, return FlightSpeed + BoostSpeed

#

for example

#

and boost speed would be calculated somewhere else depending on the inputs

#

in your case, say you have a jetpack in space. you may want to enter "Space" movement mode when you jump. you would then apply different accelerations depending on your jetpacks or something

jagged goblet
#

hm so I guess you use maxspeed not as a limit but the speed you want to set?

#

also are you recreating tribes ๐Ÿ˜›

dull stream
#

hah yeah sorta. its the max speed that full input tries to set you at. its not instant velocity

#

like if i push only slightly on the analog stick it wont do the full max speed, it'd do some percentage

#

but essentially yeah i set the speed using the maxspeed rofl. i mean it works for my purposes, might not be ideal but eh

#

still have to make both clients and server calculate this new speed though, and ensure that its the same everywhere

#

and thats where the SavedMoves comes in

#

from what i understand, it ensures that things remain in sync

#

hold on, theres a tutorial about SavedMoves

#

well, thats how i started the networking portion of the movement controller at least

jagged goblet
#

hm

dull stream
#

Its a bit confusing, but imagine it like this; when something changes the server saves the movement that occurred. You want certain things to be saved if it affects movement.

#

That way if the thing you saved is different on client it can correct itself to match the server

#

I dont fully understand it but thats how I look at it anyway

jagged goblet
#

does onmovementupdated trigger whenever you move on client?

dull stream
#

it happens after all the movement calculations are done, inside of TickComponent

#

if you look in TickComponent you can see specifically where it occurs iirc

#

sorry no

#

it happens in perform movement

#

and it also happens in the simulated versions, for SimulatedProxies

#

Simulated proxies are just characters that are not locally controlled. So other players you see but dont control run the simulated versions, which get values from the server to simulate their movement in a way that accurately reflects the owning player'ss desired movement

jagged goblet
#

i see

#

going to implement this boost dodge see if I can tweak it to handle input axis and addforce

dull stream
#

good luck

scenic tangle
#

James are you doing any sort of interpolation for movement? What's your NetUpdateFrequency value for that actor?

#

The reason why simulating on client AND server didn't work is because UE physics isn't deterministic. This means that if you try to simulate your physics on server and client from the same initial conditions, they will not produce the same result. So you're going to have to use some techniques to alleviate the snapping/twitchy problem because they will eventually go out of sync and the server will send an update to the client which will cause the client to perform a hard snap to new position which gives you that twitchy behaviour.

jagged goblet
#

thank you for the resource! @scenic tangle also thank you @dull stream busy working on this ๐Ÿ˜ƒ

jagged goblet
#

issue im finding is that setting max speed and accel would conflict if you press multiple strafes (like forward + right)

dull stream
#

in what way is it causing a conflict?

jagged goblet
#

well say you set maxaccel when you move forward to 3 and set it to 10 when you move right it seems like it tends apply either one of the values to both

#

if you press both keys at the time

dull stream
#

in that case, you may have to get the characters forward vector and compare it to the acceleration vector direction.

#

and then set the acceleration to be some combination depending on how far to the right/left it is

#

theres definitely some math involved

#

one way to do it is to use dotproduct. ForwardVector DOT AccelerationDir. This will produce a value between -1 and 1.

#

a value of 1 would be, acceleration is in the same direction as forward, a value of -1 is acceleration is in opposite direction of forward

#

and values between that mean that its somewhere between forward and backwards (not necessarily to the right or left though, could be up or down)

#

I suggest looking into some vector math if any of this seems rusty or foreign

dusky yoke
#

@bitter oriole Do you know of any networking udemy courses that aren't done in C++? I'm hoping to take advantage of the Father's day discount of 94% on most courses, but I can't write C++ and I was hoping for a BP course

bitter oriole
#

Nope

dusky yoke
#

Hmmkay. I'm aiming to have 100+ players online, end-goal is a MMORPG-base. Is that possible in BP or would I need to write custom code for that? I've noticed that I might have to make use of the Gameplay-abilities plugin, along with an Open world plugin. I believe most of that is in C++, so buying the courses for learning C++ & the networking with C++ would probably be well worth the money for what I'm trying to achieve? @bitter oriole

slim holly
#

the engine barely runs 100 players on c++

#

for mmo you need something bit more sturdier than blueprint

dusky yoke
#

Custom engine?

#

I'm planning to add a set of subdedicated servers on a specific amount of tiles in the gameworld, and the players that are in that tile would be connected to that dedicated server. That way I wouldn't have too expensive dedicated server hosting and I was hoping that would cut some slack @slim holly

I have no experience with networking so I'm only thinking loudly here

twin juniper
#

yeah you likely need a custom server to do something like that

#

could still use unreal for the game client

dusky yoke
#

Hmm, I'll just go ahead and buy the C++ courses then, wont hurt to learn some of the native language

twin juniper
#

@dusky yoke i am looking at the udemy ones right now, pretty good stuff. am actually in the process of converting some of my game over to CPP to reduce net latency.

copper portal
#

I need some help with making a respawn system. PM me for more info

quiet pier
#

ANYONE AN EXPERT ON NETWORKING i need assistance

copper portal
#

ask the question

vivid fjord
#

ALL CAPITALS MAKES MY QUESTION IMPORTANT

meager spade
#

Please refrain from all caps

#

And if you need help ask here

copper portal
#

dude honesty just do this

#

or this

#

unless that is banned too

meager spade
#

Post your question and someone may help

umbral adder
#

so i have managed to setup 2 meshs (1 for FP and 1 more for Tp) AND 2 gun meshs 1 for fp and 1 more for tp

#

i have checked the owner no see in my tp mesh but still it appears

dull stream
#

@jolly berry how do they sync clientside projectiles?

#

I was thinking about that myself just now. I want it to be responsive, aka immediately fire when client clicks, and then tell server to to fire as well

#

but the syncing im not sure, I was thinking maybe slow the projectile a little until it syncs? or rewind? how does UT do it?

#

if you tell me verbally and I implement it, then its not copying their code ๐Ÿ˜›

#

i would suggest you just reimplement it without looking at their project, once you understand the concepts

#

i dont think epic games would get pissed at you for that

umbral adder
#

sync?

#

wdum?

dull stream
#

yeah, so it accurately represents the server's projectile?

#

idk

umbral adder
#

wtf u spawn a projectile not sync a projectile

dull stream
#

lol

#

thats it? you dont think there needs to be anything else done?

#

Im new to this so you tell me

jolly berry
#

I haven't finished fully looking through it yet but I know it at least creates it's own replicated movement and I think the idea is to sync that up after it's already spawned simulated

#

so all owning clients get the responsiveness and accuracy of the server

umbral adder
#

u just spawn a projectile and it moves lol

jolly berry
#

sure but that's not necessarily client side responsive if u have high ping

umbral adder
#

u just need it to be replicated and a projectile movement component

#

responsive ?

#

wtf

dull stream
#

if you click, you probably dont want to have to wait 100+ ms to see the results

#

i think thats what he means

#

or higher than 100ms depending on situation

jolly berry
#

yeah, if you just do what you're suggesting, you're left with two options, either: A. Validate everything on the server, so when the client fires you have to wait for the Server to tell you to spawn it. Or B. You always spawn it completely simulated at the risk that your location/rotation are incorrect from the Server

umbral adder
#

u spawn it from the freaking server!!

jolly berry
#

The idea is to start with B. but fix as soon as you replicate

umbral adder
#

u just need to setup client side prediction on the character

#

then the server has the correct location

#

but i dont think ull be needing that unless u have 15-20+ players

#

a match

dull stream
#

if i play with 500 ms though, just for testing, if i click to fire would it not take half a second for me to see my projectile, decode?

#

khoas seems to be suggesting spawn immediately clientside to get a simulation of what the server would be doing

umbral adder
#

yes it would

dull stream
#

then sync it up with server

#

as the data comes in

umbral adder
#

but with 500ms its imp

jolly berry
#

yes, that's exactly it

umbral adder
#

that arises the risk of cheating

dull stream
#

how so?

jolly berry
#

it doesn't, server still validates

#

client side is purely prediction, Server still autorotates the state and then sends it's information as soon as it can.

dull stream
#

yeah the projectile client side wouldnt be authoritative in this scenario. It'd be akin to a particle effect or something, just something to visualize your shot

jolly berry
#

Client side simulation will correct after receiving that information

#

If Client decides to manipulate the projectile in any way not true to Server, nothing would happen as Server still spawned and validated the projectile correctly.

#

Worst someone could do is have a Client that lies to them, for whatever reason.

dull stream
#

its encouraging that someone was having similar thoughts to me lol. guess doing character movement first prepared me for projectiles

umbral adder
#

but if u spawn it on client then its definitely hackable

#

with 500ms

jolly berry
#

its not

#

Server still receives the input to run it's own simulation.

umbral adder
#

with prediction u need to spawn on server

#

then u can predict

jolly berry
#

it doesn't receive any state from the client, only an action to fire

#

Server always authorizes the game state. Anything happening Client side is a simulation of what it thinks the Server will do.

umbral adder
#

ok

dull stream
#

decode, imagine an exact copy of the projectile class you have, except with no damaging functionality at all coded into it. And it gets spawned client side as a visual effect while the server spawns a real projectile with damaging functionality

#

thats essentially what hes saying

umbral adder
#

oaky

#

did u buy the course on udemy?

jolly berry
#

I work in the industry.

dull stream
#

my course has been spending a half month reading the character movement component code until i felt like blowing my brains out

jolly berry
#

we work in UE3 still but I'm trying to learn the lower level engine stuff of UE4

#

just to keep up with the new stuff coming out

dull stream
#

thats cool khaos. I used to work in industry but the contractors got fired lol.

jolly berry
#

ah sorry to hear

umbral adder
#

lol

dull stream
#

eh its whatever. fuck em.

#

they didnt hire me fulltime because i couldnt whiteboard a boggle solution

#

๐Ÿ™„

umbral adder
#

๐Ÿ˜„

jolly berry
#

haha, I feel ya. I know interviews can be rough like that sometimes.

#

I recently did Baron Samedi on Smite.

dull stream
#

oh sick. hi-rez huh?

jolly berry
#

yeah! joined last year after retiring from the Smite Pro scene

#

finished my CS major and made a couple games throughout college

#

was a really easy transition

dull stream
#

oh damn, thats crazy. its funny how being into videogames can help you get a job sometimes. someone at my old studio was like a huge WoW person

umbral adder
dull stream
#

oops yeah sorry about that

jolly berry
#

ye sorry

umbral adder
thin stratus
#

And you set the owner properly?

#

Try to set it via code

umbral adder
#

no

#

..... that fixed it lol

#

thx cedric

winged badger
#

Is there any direct way to get CMC to replicate Velocity to Owner?

#

I have been prototyping something quick, used SimpleMoveTo from PC

umbral adder
#

u mean get the speed?

#

or u mean client side prediction like in fortnite

winged badger
#

result is that only the owning client doesn't have the Velocity vector, and animation blueprint can't read it

thin stratus
#

Is vlad actually typing?

#

@winged badger Weird

winged badger
#

yeah

thin stratus
#

You are getting the velocity from the cmc in the animBP and it is wrong?

winged badger
#

and its 0

thin stratus
#

I mean despite this sounding like something broken, have to tried the capsules velocity

winged badger
#

clients see other clients correctly, everything is good on server

#

i did, its also zero

thin stratus
#

Is that client even moving?

#

:P

winged badger
#

it is

thin stratus
#

Cause that has nothing to do with Replication iirc

winged badger
#

and all other clients see it fully animated

thin stratus
#

If you move the instance, the root should have velocity

#

Hmpf

winged badger
#

i can hack my way around it easy enough, but i'd prefer not to

thin stratus
#

Can you check with default AddMovementInput?

#

Just to see where it comes from

#

Might be the move to stuff

winged badger
#

it still has WASD connected, and that works fine

umbral adder
#

from the try get pawn owner get velocity tehn get vectorlength

#

in animbp

thin stratus
#

Im pretty sure he does that already

winged badger
#

that is what it does already @umbral adder

umbral adder
#

so thats not working?

thin stratus
#

Youd need to check what the simpleMoveTo stuff does

winged badger
#

it eventually ends up calling RequestMove on PathfindingComponent :S

thin stratus
#

Just make your own velocity vector then

winged badger
#

yeah, i guess i'll have to

thin stratus
#

CurrentFrameLocation - LastFrameLocation

#

Probably the easiest work around

fleet sluice
#

@dull stream @meager spade Simply put: use RPCs to signal important events, forget about replicating/syncing/predicting on the "instigating" client (only predict on the other clients; don't sync on them either). Example (S - server, IC - instigating client, OC - other clients):

  • IC throws a grenades (or fires a projectile, but this one's easier to imagine).
  • IC sends a reliable RPC to S with the minimum information it needs to simulate its own grenade.
  • S validates the RPC (was IC allowed to throw a grenade? i.e. "Was IC facing north and threw it towards south without having time to turn?").
  • S must have a tunable mechanism for the RPCs it receives so you can experiment with the error margin (what you allow vs. what you forbid).
  • Assuming S validates the RPC, it uses reliable multi-casts to inform the clients of important events (i.e. first it sends the "grenade spawn" event to OC, then it sends corrections to IC/OC, if needed, such as grenade bounces, just in case).
  • After being notified a grenade was spawned with a given direction, velocity and so on (minimum info, including the IC's latency to S), the OCs try to compensate for their latency and IC's latency so that they "defer" the spawning a bit, enough that their simulation becomes accurate of what IC was seeing.

I've experimented with a few methods a while ago. I wasn't pleased. This is what I've started working on and this is the flow that I personally consider most reliable and most pleasant for the UX of the players (but it's nowhere near a point where I'd be able to share it).

winged badger
#

@fleet sluice in 5000 words or less!

fleet sluice
#

Hard, mate, hard :/

#

It's actually 2000 lmao

umbral adder
#

@fleet sluice thx

winged badger
#

that, or make a Client RPC that will send the Speed back to the owning client when it changes

thin stratus
#

@winged badger You have all info on the client. Rpcs would just add bandwidth

fleet sluice
#

Also, to append on that mega-reply: there must always be at least one latency threshold and a fallback mechanism. For example, never predict clients with over 100ms latency (let them "lead" the shots, with the classic mechanism) and completely ignore the 500ms clients because if you don't, they will ruin your game. And their game is already ruined by having 500ms.

dull stream
#

@fleet sluice but that doesnt solve the issue of their being delay when firing on client side during lag, right?

fleet sluice
#

Of course it does. That's how it starts: with clients doing everything locally, with zero-lag, then informing the server.

dull stream
#

ohh okay

#

gotcha

#

I must have misunderstood

umbral adder
#

ohh i was wrong then

fleet sluice
#

The downside of this method is that it will require a shit ton of fine tuning and unique RPCs.

#

I haven't yet come up with a solution to send "generic" RPCs.

dull stream
#

ah yeah i misread the grenade spawn part, you said OC not IC

fleet sluice
#

That would simplify things a lot.

dull stream
#

yeah this makes sense to me

#

i should screenshot it for future reference ๐Ÿ˜›

umbral adder
#

or pin it mabye ๐Ÿ˜›

fleet sluice
#

It's not such a common topic. Cedric's compendium is the only thing I'd ever pin in this channel.

dull stream
#

I need to read his compendium, i skimmed part of it.

umbral adder
#

ohh his compendium is great ๐Ÿ˜„

#

still love it

fleet sluice
#

Also, going from "grenades" to "projectiles" is a simplification, because they wouldn't bounce so they wouldn't need corrections and stuff. This whole approach is essentially separating causes from effects and nothing more.

dull stream
#

I see. thanks for clarifying some things Vlad ๐Ÿ˜„

fleet sluice
#

Anytime

winged badger
#

@thin stratus fixed by issuing the SimpleMoveTo on owning client separately (something i've already tried before but forgot to connect the Controller pin, which doesn't take "self" as context automatically for some reason)

teal crest
#

Anyone here have a slightly deeper than superficial understanding of aws gamelift?

#

Does this Cedric Neukirchen still fare the chat rooms these days?

scenic tangle
#

I have an actor which uses an Actor Sequence Component. Is there a way to make the sequence not replicate to the client?
I want to use OnRep_Notify to play it on the clients but it's also replicating from when the server plays it so the sequence is messing up

#

or in other words, how do you disable the built in replication for things like rotation, scale, etc.
I only want to replicate variables.

keen halo
#

This does not entirely answer your question but...
Have you tried to use a SwitchHasAuthority // CanExecuteCosmeticEvents inside the OnRep function? To make sure it is called only on clients?

Also you could consider using a delegate instead.
You could bind the clients to do whatever you want when the delegate is called.

scenic tangle
#

hmm interesting - no I haven't. I'm using a replicated variable to play the sequence on the clients and it works when they receive the update. The problem is when it also plays on the listen server.. it seems like the updated state is messing with the client's sequence because of replication and it makes the client's version twitch or play twice as much

#

If I'm running on a dedicated server, it doesn't mess up the sequence because each client plays their own version of the sequence and the dedicated server doesn't play the sequence so the state of it is not being replicated to the clients who are already playing the sequence.

meager spade
#

can't work out why he got mentioned :D

cursive shard
#

Hello, can I ask what the Owner means in ELifetimeCondition?
Does it always mean the actor on the server or it means the actor on the client which can control the actor.

#

So if I am running a dedicated server, the actor's owner will always mean the dedicated server I guess?

twin vault
#

Owner is the one controlling it

cursive shard
#

Hmm..not sure about it. Because there is also a condition called COND_AutonomousOnly which I assume is the client controlling the actor.

twin juniper
#

So, I have a struct to hold input of the players.
I gather input on my Pawn cpp class, and then pass it on to my MovementComponent.
But, somehow, after a while, the values of the struct get reset to zero... Any ideas of what it can be?

#

I pass that struct as a function parameter on the functions I call in my MovementComponent, and in the first calls I still have the right values, but after a while I just get zeros.

twin vault
#

An actor may be owned by a client and also be simulated, you set ownership on spawn, or through SetOwner, the ones being controlled (autonomous) are automatically the owners, for other actors u must set yourself

glacial lotus
#

Is ok to use multicast for the muzzle of the weapons? Those are particle systems

twin vault
#

@glacial lotus sure, but if the clients know the weapon is shooting, they can do it locally, no need for a multicast

glacial lotus
#

hmm, so from a client I shoot. Then, in the shoot event, at some point I call "MuzzlePS" (run on server). From the server the event lists for all the players(I don't know how to do that) and tell them to locally exectue the actual creation of the muzzle PS. Something like that?

meager spade
#

i used an OnRep Notify, if the client has bIsFiring, then all clients simulate the fire

glacial lotus
#

"OnRep Notify" I'll check that. Thanks

meager spade
#

if you look how shootergame does it, they use a BurstCounter, and check its greater than > 0 in the OnRep, and simulates the muzzle flash

fleet sluice
#

Reading the chat history, I just realized I accidentally tagged KaosSpectrum instead of @jolly berry in my mega-reply this morning. Ehm... Sorry :/

twin juniper
#

@twin vault So, deleted UPROPERTY() from every member of the struct, and even deleted UPROPERTY() that I had for the actual struct variable in the classes, still gets reset to zero
It was actually a really good idea, and thought it would solve it, but...

glacial lotus
#

@meager spade Thanks. Is "shootergame" that western multiplayer demo?

meager spade
#

no

#

its the c++ game

glacial lotus
#

ah, ok. Thanks

twin vault
#

@twin juniper yeah i said it then i realized you meant in a single frame right? you need UPROPERTY so it doesnt get deleted, but it happens after a while not on same frame

#

maybe the input is getting consumed on MovementComponent?

#

is it a custom movement component?

twin juniper
#

@twin vault So, what I do is gather input in the custom pawn class, and consume it on tick, and pass it on to my custom movement component through a function. On the Tick function in the custom movement component I start by calling the super tick, and after that I do my own things. I access the input struct variable I have in this class and it has the correct values. I pass it on throught several functions, and it still has them correct. After a while I get zeros again...

wary wyvern
#

Does anybody know, why AddControllerPitchInput in Pawn does not replicate controller rotation to the server?

#

It works with Character, but no in Pawn

bitter oriole
#

Pawn does next to nothing with the network

wary wyvern
#

I thought PC works with camera and networking

bitter oriole
#

PC replicates PC stuff, pawn replicates pawn stuff

#

The core Pawn class really has next to zero multiplayer support since it does next to zero stuff

#

Character has thousands of lines of C++ in multiplayer code

wary wyvern
#

@bitter oriole Yes, but Character does not override AddControllerInput logic in any way..

twin juniper
#

@twin vault But, I didn't understand what you said now: UPROPERTY is needed for it to not get deleted? But isn't that macro used to tell the engine that it should be considered for GC?

twin vault
#

yeah, it should be considered, thats why it doesnt get deleted, while the property is used, it holds itself alive

#

once the object that has that property gets deleted, the reference is lost and it gets garbage collected

#

if you got something thats inherited from UOBJECT its already getting considered for GC, and if there is no UPROPERTY referencing it, it will try to delete it

twin juniper
#

Hmmm, that makes sense.

twin vault
#

still, for your problem its hard to tell without some debugging, couldnt think of anything :/

twin juniper
#

@twin vault However, I tried a workaround that should work, but it gets the same results.
So, what I did was:

  • On the custom Pawn class I setup input, and on each input event, send the axis value to the custom movement component.
  • On every tick, the custom movement component consumes that input.
  • I pass it on to a function called PerformMovement as a "const FRepPlayerInput& inInput".
  • Inside that function that inInput has all the right values.
  • Inside PerformMovement I pass it onto another function the same way -> "const FRepPlayerInput& inInput"
  • Inside that other function I get the right values.
  • Inside that other function I pass it onto another one, and on the latter I just get zeros.

I even did a hard copy to a temporary struct inside PerformMovement and passed that temp struct onto that other function, and still it goes to zero.
It would make sense that this temp struct would get to 0 at the end of PerformMovement, but not while in it...

#

@twin vault If it helps I can send you some prints of the code

twin vault
#

yes

umbral adder
#

i dint know which text channel this belongs so i am putting this here

#

what is FInterpto and Lerp?

#

and where can i learn about all there math functions?

meager spade
#

FInterpTo is Float interpolation and lerp is Linear interpolation which is basically a straight line between 2 points

thin stratus
#
  • Lerp: Goes from a value A to a value B by using an "Alpha" value, which goes from 0.0 to 1.0. An Alpha of 0.5 means a mix out of 50% value A and 50% value B.
    For colors that would be for example White for A and Black for B. 0.5 would probably be gray then. All other values are either brighter or darker.
    For a float it would be fore example 20 for A and 40 for B. 0.5 would be the middle of them, so 30.

  • FInterpTo (or other InterpTo Functions): Goes from a value A to a values B over time by using a Speed value and the DeltaSeconds (to make sure lags aren't causing issues).

umbral adder
#

i have done this but it just set's it to this

#

like it stopped mid way

#

@ me please (if u know answer of course)

thin stratus
#

@umbral adder FInterp needs to run on tick

umbral adder
#

Ok thx

#

But how would I do it in an event like this?

#

It is a hot market

#

Hit marker

thin stratus
#

TimeLine + Lerp

#

Or rather

#

Only TimeLine

#

That's already enough

umbral adder
#

Ok

#

Thanks

hazy herald
#

hey so idk how much you know about advanced sessions but whenever i try to create session it just wont create

plain flume
#

Hello! Now I am lost.. When is it not safe to pass references to server? I thought that not replicated, not server spawned actors are unsafe to pass to server functions, but now when I tested this.. It works and server knows the float value, even if the client set it. Why this works? Thanks

#

In this case, the server prints the correct float value

sharp pagoda
#

@plain flume You must be running as the authority, try this code while playing in a dedicated server instance

hazy herald
#

anyone know how to get how many players r in the game

#

@sharp pagoda

sharp pagoda
#

@hazy herald Count the player states

plain flume
#

aah, So I code above would not work in dedicated version

#

*the

sharp pagoda
#

Or you can iterate a variable in the game mode which tracks the player count then decrement on logout @hazy herald

hazy herald
#

@sharp pagoda how would i do that

sharp pagoda
#

@plain flume Yes, you spawned the actor on the client, the server never knows of its existence so when you try and pass a reference to it via RPC on the server, the server can't resolve the reference and will result with a nullptr

#

@hazy herald Create a gamemode, override OnPostLogin() and Logout()

#

In those functions, increment and decrement a variable

plain flume
#

Thanks.

hazy herald
#

thanks

sharp pagoda
#

๐Ÿ‘

worn nymph
cerulean hamlet
#

How do I get an actor's actor channel?

jagged goblet
#

when I spawn multiplayer on the editor sometimes I get strange behaviour like teleporting across the map.. this usually happens on the fresh restart of the editor but usually when I start game plays out normally it's very random. I'm stumped don't see anything in constructor or beginplay that could cause this. Generally doing dedicated server with 2 clients

#

strange if i launch from editor that freeze/launch bug happens but then if I open the character bp and launch from there it doesnt

winged badger
#

@plain flume that code only works from a listen server host

jagged goblet
#

wtf/

winged badger
#

Hmm, nvm, didn't scroll down and seen its already answered

hazy herald
#

so when im switching level in game from lobby to map only my server switches lever not the other players. please help

thin stratus
#

Are you using Steam?

hazy herald
#

not steam

thin stratus
#

What command do you use to move maps?

hazy herald
#

like they all join the lobby but than olny one joins the map

#

using blueprints

#

open level

thin stratus
#

OpenLevel is a hard travel for one player

hazy herald
#

oh what should i use

thin stratus
#

Use the ConsoleCommand Node with ServerTravel MAPNAME

#

Note: If you want to use Steam in the future, you have to work with Seamless Travel

#

That is a boolean on the GameMode that should perform a Seamless ServerTravel.

#

@cerulean hamlet What do you need that for?

#

Try "GetNetConnection"

#

That returns a "UNetConnection"

hazy herald
#

@thin stratus thanks it worked

thin stratus
#

Which has the ActorChannels @cerulean hamlet

cerulean hamlet
#

NetConnection and not NetDriver @thin stratus ?

thin stratus
#

Yeah

#

At least that is what i found in the api

cerulean hamlet
#

Oh great thanks, I was looking in the wrong place

#

I have a custom netdriver and was doing some custom actor channel stuff but couldn't see where to get an actorchannel after initialization

dull stream
#

I have a bool thats being replicated via compressed flags and saved moves in character component. its basically adding some acceleration when true, and becomes true when the player holds down a key

#

the issue im having is that sometimes, i guess when its doing corrections, it will not set the bool to false (or it gets set back to true) during a replay?

#

so you get this added acceleration when you arent holding down the key

#

and you have to press it again for it to be updated

#

does anyone have any idea what could cause this?

#

or how to fix it?

cerulean hamlet
#

how are you setting it to false?

dull stream
#

input binding in controller, then controller calls function on character, then character calls function on move comp that sets it to true

#

oh to false im sorry misread

#

well it gets set to false when you release the button, so the above is true about the input and controller

#

but it can also get set to false when the movement mode changes

#

perhaps this is part of my issue, because it gets set to false through landing

#

specifically, i am overriding Landed function in Character, so when it lands it also sets it to false

#

but there might be something wacky going on there, like the super is exiting early and not setting it to false.

arctic glade
#

anyone have workaround for root motion animation blueprint running in dedicated server? if you have root motion from everything and you have some animation notification events in ur animations, there is 50-50 chance that they wont trigger

#

wont happen in listen server

cerulean hamlet
#

yeah the early exits might be an issue

#

set a breakpoint where you set it to false

#

and see if you can get into a situation where you expect it to be false but it isn't

dull stream
#

I think i might have figured it out Vatyx, or have a direction to go, thanks for talking it out.

cerulean hamlet
#

๐Ÿ‘

dull stream
#

I think i might need to more closely mimic how crouching works, perhaps

#

or jumping

#

I removed all cases where its being set to false/true so it is limited to purely the saved move assignments and setting via input from the player

#

so a client correction must be overwriting it somehow

#

actually no im not even assigning it in PrepMoveFor because im using the compressed flags

#

somewhere i must have to manually determine, as its replaying saved moves, whether or not to set it back to false the replays are finished? I dunno...

broken parrot
#

Anyone dealt with making steam items / JSON files? I'm reading the little steamworks description they give, but it looks nearly impossible to do by hand

teal crest
#

Could someone help point me towards some resources to get started rolling my own online subsystem? I can create my own external services, but after reading the network compendium as well as the official documentation, I have no idea where to turn now other than just reading the c++ for some ideas. There seems to be little to no information on the flow of this thing or how the online subsystem affects the standard "you start your game up and a level loads with a player controller and default pawn automatically".

#

I've read cedrics creating a local session blog post as wlel

thin stratus
#

Subsystem has nothing to do with these classes. At least not that i know

teal crest
#

Online subsystem... friends, sessions, matchmaking.

thin stratus
#

You just have to mimic what the other subsystems do

#

Create your own classes that inherit the specific Interfaces

#

And implement the functions

vocal dagger
#

sounds like a crazy amount of work

thin stratus
#

Could be worse

teal crest
#

So I'm looking to start off by having a log in screen, and when the player is successfully authenticated, gets a list of available lobbies, access to friends list, etc. I guess I'm just looking for the best place to hook into the flow to implement these starting points. Also, without having dug too deep, what is the external UI interface used for?

thin stratus
#

Creating the actual backend of your subsystem is def more work

teal crest
#

I have a lot of previous back-end experience.

vocal dagger
#

the external UI interface is to open things with the... external interface xD

thin stratus
#

As said. If you want your own subsystem, implement the Interfaces

vocal dagger
#

for example with Steam you can request the external interface to open the friends list

thin stratus
#

There is one main interface that is used to return instances of the parts

#

Like your own IFriendInterface implementation

#

Open Oculus or Steam and look through it

#

There is no tutorial afaik

#

Or documentation

teal crest
#

So these are things that would be displayed in the game window itself? or just trigger an overlay sort of thing?

vocal dagger
#

yeah an overlay

teal crest
#

So I still have some concerns though. So let's say I go to implement my own subsystem. There's really no need for a central dedicated server at that point (correct me if I'm wrong)... So at what point would a player get a unique player controller? Once they join a sessioin?

#

If I'm using the sub system thing, I wouldn't have like 1000 connected player controllers ready to act on. It would just be the single local one until there's a session?

vocal dagger
#

A subsystem != Dedicated server

teal crest
#

Right, it's a bunch of separate external services. I've made it that far at least.

vocal dagger
#

you will have the subsystem handle the connections but you still need to setup a dedicated server in that case

#

exactly

teal crest
#

I'm wondering at what point it switches from subsystem to standard oh now there are 12 player controllers inside of a match

vocal dagger
#

also don't get confused, there is nothing like an unique player controller

teal crest
#

pcs 0-11

vocal dagger
#

there is an UniqueNetId

teal crest
#

I don't mean globally unique, just within the match

vocal dagger
#

that gets assigned from the subsystem, it's mapped from every controllerId connected to the console/pc

teal crest
#

Sorry, I know the vocabulary can be ambiguous

vocal dagger
#

ok no problem, it's just that it's already confusing by reading the engine, they have so many names for the same thing sometimes

teal crest
#

So I'm on my local client, I'm player controller 0 and I join a session where someone else is player controller 0 on their system. At what point do we become pc 0 and pc 1

#

Yeah I'll try to be more precise with m y questions. I can see why "unique player controller" could mean a bunch of things

vocal dagger
#

so the subsytem will assign an UniqueNetId to each PlayerState as far as I understand (haven't tested this myself)

teal crest
#

Ah

#

That makes sense

vocal dagger
#

but that's when you connect to the server

teal crest
#

and I would sort of pass around the meta data as they play matches/join lobbies

vocal dagger
#

if you want to get the UniqueNetId whenever you are let's say on the MainMenu you have to request it

#

yep

teal crest
#

Is this something I can assign to the user? Or auto-generated

vocal dagger
#

you can assign it on the LocalPlayer

#

it has a CachedUniqueNetId

teal crest
#

Ok so last question for now I think... Is there a part of the subsystem that would be responsible for handling general user authentication? Or would I just use an http lib to make requests to a service.

vocal dagger
#

it's only auto assigned (I think) when you log in from the ExternalUI

#

it's assigned on the LocalPlayer as I said

teal crest
#

Sorry I mean like.... passing a username/password and authenticating it on a server somewhere, then essentially "logging them in" to what the authenticated interface ewould look like.

vocal dagger
#

not that I know of, nope

#

so with the ExternalUI you can for example open the loginUI for PSN

#

so you can log in to the subsystem

#

in this case PSN, or XB1 or whatever

#

but nothing like auth to a server AFAIK

teal crest
#

Yeah that sounds like something I want to implement. But you said its just an overlay? or is it fixed to the game window.

#

That is auth to a server

vocal dagger
#

depends on how the Subsystem is implemented, on consoles you go back to the dashboard

#

on Steam there is the overlay

teal crest
#

I basically want an external UI to show a login form. Do you know where it gets the external UI from? is it an html page? Just some arbitrary c++ program? If not no worries I'll start digging into the source to find out more

vocal dagger
#

const auto ExternalUI = OnlineSub->GetExternalUIInterface();

#

then you can do whatever functions are implemented on it

teal crest
#

Yeah, like I said if you didn't know any specifics I can just dig into the source code.

#

I'm not a c++ guru, but I can get around well enough to implement an interface. It's just a large system and hard to grasp how everything should fit together.

vocal dagger
#

oh sorry no I don't know specifics on that

teal crest
#

Right on, well thanks for answering what you could. I'm going to delve in a bit deeper and see what pops out.

hazy herald
#

When I make widget it only shows up for host anyone know y

winged badger
#

you made it from a non replicated object that only exists on server

hazy herald
#

How do I fix it

winged badger
#

safest way is to make them from your custom HUD class

glacial lotus
#

Newbie question. When I send a struct to a custom event that's going to be run on server, Is the actual struct sent or is just a point/reference to an identical struct that lives in the server?

winged badger
#

struct

glacial lotus
#

ouch

#

But thanks

hazy herald
#

when i make a widget its only made for the host

#

help

final thicket
#

Were are you creating the widget?

hazy herald
#

third perseon character

teal crest
#

Hey folks. If I wanted to implement a fog of war type behavior, would implementing custom "relevant for" solve this? Or is that not a reliable way to determine 100% replicated or not

glacial lotus
#

In order to change the weapon of a character and all the other players seen the change, would it make sense to have that info in GameState and somehow tell all the client to refresh the weapons when someone "change weapon"?

teal crest
#

@glacial lotus have you read cedric's network compendium? I'm not experienced enough to give you an exact answer, but I just read through his ebook last night and it would definitely help guide you with this. There's more than one way to skin a cat depending on your goal.