#multiplayer

1 messages Β· Page 363 of 1

severe widget
#

If its just an age thing and you have a budget you can put to use here, that's different.

twin juniper
#

I could get 100$ from kickstarter or somewhere else but i dont have tax that steam needs

severe widget
#

lol just don't go make a kickstarter for exactl $100 though

bitter oriole
#

@twin juniper Seriously though, if you're 14 and doing your first game, don't touch multiplayer

twin juniper
#

thats only thing im interested in, i want to just play something with friends

bitter oriole
#

I'm twice that age with two released games, and it's still really hard to pull off

twin juniper
#

and so other people can play it too

#

multiplayer isnt that hard, i have made everything work besides the connecting and hosting itself cuz steam

#

it doesnt work

#

on lan i tried and it worked just perfectly

severe widget
#

Are you trying to use sessions?

twin juniper
#

yes

severe widget
#

Can't do that if you're not using a subsystem AFAIK

#

But

#

you can absolutely just join to an IP directly

twin juniper
#

thats not that cool, but looks like the only option available to me

#

my game works great if the player is hosting the game

#

then i need a website with connectable ip's

#

the other can find the host server

#

its on shipping or dev build?

#

on shipping it doesnt work because its not on steam

#

but if i run "F:\UnrealEngine-4.18.1-release\Engine\Binaries\Win64\UE4Editor.exe" "F:\Unreal ProjectsServer\TheLegendsOfArthur\TheLegendsOfArthur.uproject" /Game/Assets/Maps/Lobby?listen -server -log

#

the other client donΒ΄t find the host

#

ok gotta run to kickstarter and get 100$

#

jk

#

i dont have a game ready for STEAM

#

i think my server its not creating the session when run in cmd like this F:\UnrealEngine-4.18.1-release\Engine\Binaries\Win64\UE4Editor.exe" "F:\Unreal ProjectsServer\TheLegendsOfArthur\TheLegendsOfArthur.uproject" /Game/Assets/Maps/Lobby?listen -server -log

thin stratus
#

You don't start Dedicated Servers with "Listen" anyway

twin juniper
#

ok

#

i new using unrealengine

#

what i have to change

bitter oriole
#

How are Pawn remote roles defined, based on the owner PlayerController ?

twin juniper
#

i have to leave for now

#

have good day or night

twin juniper
#

i back

bitter oriole
#

Hey @thin stratus , sorry to bother but you keep popping up in every search result. Would you know what the correct RemoteRole would be for a player pawn on a listen server ? It seems like it should be simulatedproxy, but UE sets it to autonomousproxy. Can't understand why and whether that's normal.

#

I've looked at APawn::PossessedBy, where SetAutonomousProxy() is called as soon as it's not a standalone game

twin juniper
#

sorry @thin stratus but what i have to change

bitter oriole
#

Well, I found a workaround for my issue - overrode PossessedBy and set SetAutonomousProxy() only if controller is autonomous too

twin juniper
#

i creating the session in class THELEGENDSOFARTHUR_API AServerGameMode : public AGameMode

#

can the be the problem

#

and not the gamesession class

twin juniper
#

i pass what i have in gamemode class to gamession class

#

now what i have to do when i run the server create the session

twin juniper
#

i try find the soluction to my problem

#

its hard to find the soluction

thin stratus
#

@twin juniper What is not working about it?

#

Peeps, explain your problems properly

twin juniper
#

i using null system i want convert the peer to peer system to dedicaded server

thin stratus
#

You can't use NULL and ServerLists

#

-.-

#

At least not outside of LAN

twin juniper
#

i using in same pc

thin stratus
#

Can you clean up your code and post it again?

#

Is your game itself also using NULL?

twin juniper
#

yes

#

@thin stratus when client dies, it's camera remains at same place but server respawns, and servers pawn remains

thin stratus
#

Dieing happens on the Server

#

Or not?`

twin juniper
#

It is onAnyDamage

thin stratus
#

When you decrease the Health of your Character to 0, it dies, or?

#

That means you are already on the Server, I hope, cause that should only happen on the Server

twin juniper
#

It just has 0 health, I try respawn and destroy actor

thin stratus
#

So you then create an Event in the PlayerController "RespawnPlayer"

thin stratus
#

So when the Character dies, you do "GetController", cast it to your Controller class and call the respawn

twin juniper
#

i create to pastebean

thin stratus
#

In the respawn you check if the controlled pawn is valid

#

Destroy it if yes

#

ANd in both cases spawn a new character and possess it

twin juniper
#

But then there is that problem

#

That client doesn't see itself die

#

For client when he dies he doesn't possess

thin stratus
#

@twin juniper

  1. You are binding the wrong Function to "DestroySession"
twin juniper
#

Oh the client just doesn't possess

thin stratus
#
SessionInterface->OnCreateSessionCompleteDelegates.AddUObject(this, &AServerGameSession::OnCreateSessionComplete);
SessionInterface->OnDestroySessionCompleteDelegates.AddUObject(this, &AServerGameSession::OnCreateSessionComplete);
#

Clients don't call possess

#

It must all happen on the Server

twin juniper
#

I had a run on server event

thin stratus
#

You are killing the Character in AnyDamage event

#

that IS on the Server

#

if not then your whole damage logic is wrong

twin juniper
#

And a variable of player controller in that event

#

how i fix the problem

thin stratus
#

@twin juniper

auto ExistingSession = SessionInterface->GetNamedSession(SESSION_NAME);

#

Come on Pedro

twin juniper
#

The destroy actor is in anydamage

thin stratus
#

"Wrong Function" is easy enough to fix

#

I even posted the two lines

#

You have CreateSession bound to DestroySession

#

Change that properly

#

And this auto ExistingSession = SessionInterface->GetNamedSession(SESSION_NAME);

#

Use "GameSessionName"

#

Instead of SESSION_NAME

#

Ue4 has "Game" nad "Party" predefined, which is later also needed for, e.g., Steam

#

And I think you also need to START the Session once it's created

#

Which works the same way as creating

#

Or all the other functions

twin juniper
#

So I have destroy actor inside event any damage and the possessing and spawning new pawn in that respawn event which is "run on server"

thin stratus
#

@twin juniper Buddy, do you understand that the Damage event should already be on the Server?

#

What ever you call from there, is on the Server. No need for any Run On Server events

#

If you are dealing damage on the Client, then you got hte problem there already

#

Usually you NEED to deal damage on the ServerSide

#

So if you call respawn, then that's also on the Server

twin juniper
#

It's on server I could say, because event any damage is on server

thin stratus
#

And Destroy Actor can be wherever you want

twin juniper
#

can put in pastebean the changes i have to make

thin stratus
#

Yes exactly @twin juniper

twin juniper
#

if possibel

thin stratus
#

And rest is:

DamageEvent -> Health minus Death -> If Health <= 0 -> Die -> Call "Respawn" FUnction on "GetController"

#

And in the Respawn function "GetControlledPawn" -> Is Valid? - yes -> Destroy and if valid or not, both cases, spawn new character and possess it

#

@twin juniper I already wrote you the changes

twin juniper
#

Then get player controller is the damaged player?

thin stratus
#

GetController

#

GetPlayerController would refer to the Server

#

GetController refers to the Controller of the Character you are in

#

Which you want

twin juniper
#

ok

#

Oh so getplayercontroller (target) - > respawn and add a "player" var which is getcontroller

thin stratus
#

No

#

"GetController"

#

Cast to your Controller class

#

(The one that has the Respawn event)

twin juniper
#

Get controller is damaged

thin stratus
#

And call respawn

twin juniper
#

Get player controller is the server which is target

#

For event to run in

#

Ok I will try to explain my theory in normal understandable language

#

Call event respawn, target is GetPlayerController and a variable "player" that is what player to possess into that new pawn that is GetController, right?

thin stratus
#

:D no

twin juniper
thin stratus
#

No, remove the GetPlayerController

#

And use "GetController" directly

#

Remove the "Player" Input

#

And just call possess directly

twin juniper
thin stratus
#

"GetPlayerController" is always the Controller of the player you are currently "watching" on the server that is the Server

#

Yes

twin juniper
#

and this is right too?

#

oh yes its working thanks πŸ˜„

#

helped alot

#

i canΒ΄t put work

thin stratus
#

Buddy, the main issue is that you don't follow instructions

#

Line 22.

#

Wrong function bound to DestroySession

#

Fix that

#

Line 89. wrong Session name, still

#

Line 128 the same

#

The code for finding a session is missing

#

But I assume you are there too searching for the wrong Session Name

#

Fix that

twin juniper
#

I always look in the log after compiling

#

Because VS is always showing like 20 errors at a time, but everything works

#

It says that FPaths::ProjectDir is bad xD

#

That :: is name needed

#

about this function what i have to change i only have to renove from the code SessionInterface->OnDestroySessionCompleteDelegates.AddUObject(this, &AServerGameSession::OnCreateSessionComplete);

#

in server gamemode project setting i have to put a new gamemodeclass

#

but no luck

twin juniper
#

what i doing wrong

#

i have to change my project settings

#

i make the changes but no luck

#

@thin stratus i make the changes and dont work

#

its a fork but the code its the same of my same

#

i make the changes you say but i canΒ΄t put work

#

maybe the problem its i forget the build in desolment server

muted sigil
#

So I've got a box trigger that, when overlapped, casts the overlapped actor to FirstPersonCharacter and then uses Launch Character to launch them. What's the best way to set this up for multiplayer?

thin stratus
#

@twin juniper "OnDestroySessionComplete" and you use "OnCreateSessionComplete" as a function

#

That's what I meant with wrong function

twin juniper
#

whats right function

thin stratus
#

An "OnDestroyed" function maybe?

#

I mean, that's kinda logical, right?

twin juniper
#

yes

thin stratus
#

You even have one defined

#

You are just not binding it

#

And what do you mean with "maybe the problem its i forget the build in desolment server"

#

If you want to launch a standalone Dedicated Server, you need to build it with Engine Source

twin juniper
#

i using githiub source code engine

#

have to go

#

i gonna back

#

i go to dinner see you soon cedrick~

thin stratus
#

Yeah if you have that, then build a Development Server

#

That generates the .exe for the SErver in the project binaries folder

#

Then, after packaging for Development, you can move that file into the Binaries folder of your package project

#

That's the Dedicated Server you can start then

#

But first you should make sure that your code is proper

#

The stuff you posted etc. has too many mistakes

twin juniper
#

can help-me fix all my mistakes

#

i running my game cliente and server by cmd

#

i your i have to packge the server every time i want test

#

if possibel

thin stratus
#

You need to package, yes

twin juniper
#

i not possibel to teste with not package the game

#

using this "F:\UnrealEngine-4.18.1-release\Engine\Binaries\Win64\UE4Editor.exe" "F:\Unreal ProjectsServer\TheLegendsOfArthur\TheLegendsOfArthur.uproject" -game

thin stratus
#

That's only starting a standalone version through the editor

#

And actualy Dedicated Server can be started like that with -server -game

#

However usually you want to package it and then host it somewhere of course

twin juniper
#

ya

#

thanks forthe help

#

can you help-me fix the mistakes i make in the code if possibel

twin juniper
#

its so hard fix the problem

twin juniper
#

i think i solve problem

#

now i find the server

#

@thin stratus thanks bro i have good new year

#

have good new year for everybody

thin stratus
#

You too!

inner iris
#

Is it fine to have no pawn by default in the GM and simply set the controller viewpoint to a spectator location until a pawn is spawned to possess?

#

Had a spectator pawn that seems basically redundant, as it gets destroyed as soon as the game starts anyway, and all it does is set a viewpoint position until ready to possess.

jolly siren
#

@inner iris yes that is what I do

inner iris
#

Cool, thanks!

jolly siren
#

np

inland sun
#

The 17 digit number for the Steam Unique ID, is that a fixed number or does ever change?

verbal wave
#

@inland sun conversion between steamID3 and steamID64 can be done rigidly. my steamID3 (the folder under Steam/userdata/) doesn't change

#

so I think not

inland sun
#

Cool I did a check to find my steam ID which was the 17 digit number, was thinking of for now letting it be part of a variable to know its me to let me have privs that other players do not get lol

twin juniper
#

d

#

whoops

#

Does anyone know if there's a generalized article covering how to smoothly replicate character movement in multiplayer? I've only recently started working on multiplayer stuff and I've got to make it work on my custom character movement.

#

I'm not using CMC, for the record. I found it to be a little too loaded.

verbal wave
#

MovementComponent replicates well out of the box

#

what functionalities do you need?

twin juniper
#

You mean character movement component?

verbal wave
#

yea

twin juniper
#

I just don't like how it feels. I'd like to have direct control over every aspect of the way my character moves, and when looking through the code for CMC it's just so loaded.

#

It also doesn't play well with physics objects in multiplayer.

#

I tried making CMC work for me, but in the end it feels like I'm trying to hammer an existing setup into something completely different

verbal wave
#

'loaded' is how you make it replicate well. You can inherit it and make your custom character movement component using the network framework

#

are you going for something like gang beast, human fall flat, or stick fight?

twin juniper
#

I'm going for Mirror's Edge style movement but in a sandbox environment

#

Which means that I can't really use premade rails or surfaces specifically geared for interaction of that sort

#

I thought using a physics object and slapping procedural interaction on top would be a more robust approach

verbal wave
#

replicate that would be extremely difficult

#

I'm not pro on this topic but a more common approach is using a robust movement replication method and add procedural (or physical) tweaks on client's side to make it feel less clunky

#

replicating every limb movement can be done but it's huge work

twin juniper
#

Any idea if there's educational material on the general principles of how movement replication works?

twin juniper
#

Also nah every limb would be just silly

verbal wave
#

great article

twin juniper
#

Thanks! I'm gonna read that.

verbal wave
#

np glad to help

twin juniper
#

Yeah. In my case I'm only replicating the position and rotation of the collision capsule

#

But I'm basically doing my movement by moving it around with impulses

#

Thats the general jist. I do "override" some physical stuff by doing my own friction based on the collisions of the capsule so in the end it works better than it sounds

#

the issue is the actual replication of the capsule.

#

Right now its like

#

crazy jerky

verbal wave
#

I think the tutorial covers exactly this πŸ˜ƒ good luck

twin juniper
#

Thanks!

twin juniper
#

anyone knows if there is a way to pass argument to a server when connecting to it

#

like with the open console command

#

open localhost:7777 -argument foo

#

@twin juniper I've been trying to dig through the same answer your looking for

#

Ive got some recources of other peoples tests where they manage pretty well to replicate physics if your interested πŸ˜ƒ

verbal wave
#

@twin juniper I'm interested can I join the party

twin juniper
#

yessit

#

yessir

#

leme dm some

verbal wave
#

too late. I just sit

twin juniper
#

?

verbal wave
#

tried to make a dad joke and failed

twin juniper
#

does anyone know how to pass argument when connecting to a dedicated server?

twin juniper
#

Most likely a stupid question but if I package my early dev build as a linux standalone, will I be able to join a hosted game session with that said player from my windows device

#

sorry for wierd Q lol

#

i have a linux dedicated server and windows client connecting to it

#

[2018.01.01-09.17.15:514][519]LogNet: Join request: /Game/Maps/MyClientEntryMap?Tip=Master?SplitscreenCount=1
[2018.01.01-09.17.15:519][519]LogBlueprintUserMessages: [MyGameMode_C_0] Options string:?Name=Player

#

does anyone know how to correctly pass an option string to a server.... it seems that it doesn' work

#

I'm passing Tip=Master, but the only thing i'm receiving is a Name=Player

bitter oriole
#

So does FOnSessionInviteReceivedDelegate do anything ?

#

Is it even handled in the engine ?

#

Well, it's not

#

Quick question - is GameInstance expected to exist on clients ?

twin juniper
#

i only have server side code there, so i'd say it's server only

gleaming vector
#

GameInstance is available on clients, yes

#

GameInstance exists per game instance

thin stratus
#

It's basically the class that represents your game itself

#

Would be bad if that's not available

bitter oriole
#

@thin stratus I'm asking because, the GetGameInstance() method in GameMode gets it through the World object

#

Isn't World only on server ?

thin stratus
#

GameMode already is only on server

bitter oriole
#

But GameInstance isn't ? Cool

thin stratus
#

GameInstance is per Game

#

It has 0 to do with networking/multiplayer

#

WEll not 0

#

There are c++ functions and BP events related to it

#

But replication wise it's not multiplayer relevant

bitter oriole
#

Okay, thanks a lot !

bitter oriole
#

What's the clean way to remove all clients from a server ? Like, host is leaving the game, everyone goes back to a menu

thin stratus
#

That happens automatically

bitter oriole
#

So I don't need to call DestroySession ?

#

I tried calling it, and have the server change level after it's destroyed - that leaves client on the level, with errors spamming the console

#

Is it called automatically when I exit the game ?

#

For example if the server does "open mylevel" - the MP game is finished, but the session appears to still be alive

#

Oh well, I get it now. OpenLevel() is what I want

#

I was using ServerTravel instead on the Destroy callback

#

Thanks ! Actually thanking you because that was in your guide too.

twin juniper
#

Do i have to use "Create Session" node to connect to ppl i will use "connect <IP>"

bitter oriole
#

No

#

Sessions are used to not need IPs

twin juniper
#

so i need to only open level with "listen" parameter

bitter oriole
#

For the hosting client, yes

twin juniper
#

ok and connecting is "ExecuteConsoleCommand" node with "open <IP>"

bitter oriole
#

Yeah

twin juniper
#

thanks

twin juniper
#

Do i need to call DestroySession if connecting is by IP and there is no CreateSession and JoinSession?

#

The spring arm doesnt replicate while camera does :/

loud sage
#

Should the listen "flag" when opening a map be ommited when opening a level just after you create a steam session?

twin juniper
#

i always use the "listen" when open level after create session

thin stratus
#

@loud sage They aren't connected

#

The session will create even without the listen

#

And the listen works without session

#

However the session gives you the ability to search for the game etc.

#

And listen is ue4 intern to actually listen for incoming connections

#

So it doesn't matter what order iirc

loud sage
#

So if I understand correctly, the session is kind of telling everyone this is my game, while the listen actually allows players to connect to your game (meaning you need them both for proper functionality), or did I misunderstand?

thin stratus
#

Session

Something that describes a "game" or what ever you want to call it (can also be a group/party in other cases or a lobby room).
It holds information such as "ServerName", "IP to Connect to (P2P when using Steam)", "PlayerCount", "Ping", etc.
It's used to advertise a game and make it visible to the outside. Doesn't allow connections.

Listen Option

Let's your PC listen to incoming connection on port 7777 (or changed one if differently defined).
So it allows connections to your PC. However usually no one knows about your game, despite LAN.
A Session is not needed for this, however a Session is used to share the connection information, like explained before.

loud sage
#

Ah, got it πŸ‘ Thanks! πŸ˜ƒ

twin juniper
#

[2018.01.01-09.17.15:514][519]LogNet: Join request: /Game/Maps/MyClientEntryMap?Tip=Master?SplitscreenCount=1
[2018.01.01-09.17.15:519][519]LogBlueprintUserMessages: [MyGameMode_C_0] Options string:?Name=Player
Does anyone know how to correctly pass an option string to a dedicated server.... it seems that it doesn' work
I'm passing Tip=Master, but the only thing i'm receiving is a Name=Player

#

to be more precise, i want my client to pass an argument when connecting to dedicated server via "open level block" or "open console command"

thin stratus
#

I only managed to do that via ClientTravel and PreLogin/Login

#

C++

twin juniper
#

i did find one stupid workaround

#

i'm setting the player name on client, and then getting the player name on server post login

#

and passing the data inside the player name variable, which i don't use anyways

#

do you think this is fine @thin stratus

thin stratus
#

Well, kinda

#

It only allows you one of them though

#

OptionsString in GameMode is the one you set when the Server loads teh map (so what ever you pass in the string on OpenLevel)

#

The OptionsString for the Client is not available in BP iirc

twin juniper
#

i tried the options string , but no matter what i do , i only get Name=Player

thin stratus
#

Yeah as said, the Client one is not exposed

#

The Options you set there are the Server ones

twin juniper
#

Ah!

#

interesting thing is, that if i set a Name option in Open Level, in client

#

then i can get this name in OnPostLogin

thin stratus
#

Yeah but that's auto assigned

#

In some internal function

#

Yo ucan't even pass Name if you join via Sessions

twin juniper
#

i will use this as a workaround for now, and maybe dig into C++ in the future

shell sinew
#

hello

I still didn't start setting up my multiplayer system, but I do want to make some preparations. what do you guys recommend to store account and character data? right now I have 1 SaveGame BP per account, with individual characters stored in their own character info Structs, like the pic. is it better to use something else?

for example, having an Account Save with individual Characters Saves?

thank you for the advice :)

thin stratus
#

What do you define as Account

#

I would always recommend a proper database

#

SaveGames are usually only for actual saving of parts of the game

#

And mostly used in Singleplayer

twin juniper
#

i'm currently using LE File and LE Json plugins to persist character data... but this might evolve to something completely different, perhaps a web server or a database

shell sinew
#

hmmmmmm, I see. through Data Tables and Data Curves?

thin stratus
#

No

#

DataTables are only to store premade data, that can't be modified during runtime

#

Database as in actual SQL Database

#

Nothing UE4 related

shell sinew
#

I see. I'll export the data to external server files. got it. thank you :)

#

for now I'll just store the data this way

#

thank you!

loud sage
#

Anything obvious I missed that makes this go back to the previous/default level a second after it get's opened? The level's BeginPlay is empty, and the GM's OnPostLogin is only doing a reliable RPC to the controllerto add a UI widget (with a line of text), meaning I don't think anything is being called that loads the other level (my main menu)

#

It appears to be working just fine, opening the level....but switching back a second (maybe a litle less) after πŸ€” I've tried changing the server default level, but it gave me the same result leading me to believe that isn't a cause

thin stratus
#

That code is okay

loud sage
#

Hm πŸ€” Odd

#

How interesting - I've created a blank testing level, and that appears to magically be working? How interesting.....and why didn't I try that before?!

#

Could something like a reliable RPC call not working cause an issue like this?

thin stratus
#

Reliable Multicast on PC could cause what you said

loud sage
#

Hm, I guess that's probably the cause then. Thanks for the help (again) πŸ˜ƒ

bitter oriole
#

Basically, should a hosting player (listen server) interpolate a client's location between RPCs ?

#

This sounds pretty obvious, but trying to figure out how to interpolate on the server is a massive headache for me

#

Like, do we replicate the last "real" state, or an interpolated one ? What about collisions ?

wary willow
#

@bitter oriole I haven't had the chance to jump on that course, have other things to do, but do you like it so far?

bitter oriole
#

It's pretty good for an introduction

#

At $15 it's pretty great value

#

Obviously don't buy any Udemy stuff at the full price

icy nacelle
#

[Looking for advice]
When I use the 'Get Player Controller' Node in a multiplayer game, what should I use as the input parameter of Player Index? I dont have any specific problem with this, just concerned about how I should be doing my multiplayer indexing generally.

thin stratus
#

GetPlayerController is not really Multiplayer suited

#

The Index refers to local players

#

In Multiplayer you always use 0

#

At least as long as you don't have additional splitscreen players

#

The returned controller depends on what instance you are on

icy nacelle
#

What should I use to replace get player controller?

#

For example, this function determines the players Z value to create a bearing

#

So it uses GetActorRotation, and its target is getplayercontroller

thin stratus
#

GetController refers to the Pawns Controller

grand kestrel
#

How did this fad happen anyway

#

What's wrong with maintaining an actual reference

#

I've never once been in a situation where I don't have a clear reference to what I need

#

Just seems like a bad practice through and through that the YouTube heroes keep feeding newbies

winter plover
#

Is there an easy-ish way to brute force skeletal mesh ragdoll physics to replicate? I am not worrying about optimization for now, I just wanna have something that works for now.

magic helm
#

Probably getting each bones location on the server and updating the clients to be what server has, probably in an array and such...

#

Thats off the top of my head tho

winter plover
#

Do you happen to know what the easiest way to access them is?

#

I havent really worked with skeletons indepth before in C++

#

Tried poking around a bit in the source, but thus far unsuccessful

magic helm
winter plover
#

I tried implementing that, but I didnt have much success with it

#

theres some physx stuff going on there

#

and I didn't get the "setGlobalPose" member

#

I have thought up a different approach but im not quite sure about it

#

so far I CAN get the location of bones

#

and since I only need ragdolls to be roughly in sync I could use physicshandlers to get them into place

#

it'd be a bit hacky but it could work

#

I'd only need tracking a few vital ones

#

root, hands feet etc

magic helm
#

Somebody also suggested adding force to that bone's location towards the direction of the server's bone until theyre about the same...

winter plover
#

isnt that basically what physics handlers do?

magic helm
#

yeah pretty much, that would be the best route to go then

winter plover
#

aight

#

I just wanted to know if there was an "easy" way to go about it

#

guess not, oh well

magic helm
#

again this off the top of my head, havn't really tried replicating ragdoll myself so I wouldn't really know the best way...

winter plover
#

yea its not typically a thing you needa do

#

but I wanna create a sorta immersive sim environment

#

so the location of bodies is kinda important

#

it doesn't have to be 100% exact, it just has to prevent extreme inconsistencies

#

oh right and if possible I wanna have bodies be draggable

#

that ones gonna be fun

magic helm
#

the physics handler should be able to control that so it shouldn't be that bad...

winter plover
#

ye I'll see

#

I just hope my expectations dont get crushed :v

grand kestrel
#

Whats the default MTU

chrome bay
#

MTU?

bitter oriole
#

Max transfer unit

#

Packet size, basically

#

And I don't know

grand kestrel
#

Yeah that

chrome bay
#

Ah yeah. I think you can set it. Search Max Client Rate, that's a thing somewhere

#

Might lead to the source

dull jasper
#

if only physics would have the same result on every pc πŸ˜›

inner iris
#

For most small props that use physics, it can all be done on the client right? I’m sure even ragdoll simulations on most online games are done locally as they aren’t really gameplay important in many cases.

#

I remember seeing a Battlefield video showing that it’s possible for one player to be completely hidden by simulated props on one screen, but on another client, the prop had moved completely away

dull jasper
#

gta and games like that are mostly not in sync

inner iris
#

I guess the same goes for many things like the small differences in emitters, different variations of a sound cue being played etc

dull jasper
#

multiplayer physics opens the door to unintended gameplay features πŸ˜›

inner iris
#

Also had a question regarding ShooterGame- this quote from their docs β€œThe instant-hit implementation also features weapon spread. For trace/verification consistency, local client picks a random seed each time FireWeapon() is executed and passes it in every RPC and HitNotify pack.”

#

Wouldn’t this make it very easy for a cheater to pass on spread of 0 and the server would accept it?

#

I’ve instead started using a per shot spread array replicated from the server, so I think even if the client removes his spread locally, the server will be firing with the correct spread regardless when validating

chrome bay
#

Ragdolls are usually local, with collision turned off

#

And yes, by default shootergame doesn't do any kind of cheat prevention, so the client could send the same seed

#

They don't send the spread, only the seed. But if they found the required seed for a small spread, then yeh you could do that and effectively cheat

#

I do it a slightly craftier way

mild hull
#

cant you seed the seeds?

chrome bay
#

No matter how many seeds the end result is always the same :p

#

That (in theory) is the idea behind the seed

mild hull
#

no server gives seed for generating the seed for the spread, than the client has fast but random spread pattern, but cant cheat because the seed is not freely decide

chrome bay
#

I do something different. When a weapon is created, I initialize a replicated seed. The seed is only replicated once for that weapon. When a client fires a shot, they increment the seed and send it to the server. That seed is used for any kind of RNG. When the server recieves it, they increment their own copy of the seed and if they match, the seed is accepted. If it doesn';t match, then the client has cheated and they are instantly kicked

mild hull
#

that what i meant with seed the seeds

dull jasper
#

as long as you cant make a script for cheating u get rid of 99.9% of the cheaters

chrome bay
#

You can make a script for any game, and any kind of game can be cheated at.

dull jasper
#

you would have to adjust your script at start of the game

chrome bay
#

Well depends, things like Cheat Engine exist

#

A lot of the time cheat prevention just involves firing up a program that checks certain applications aren't running

#

I think there's a plugin on marketplace that does exactly that

dull jasper
#

hmm i do have cheat engine installed, I only use it for frameskipping

#

*used

chrome bay
#

nice save

#

lol

dull jasper
#

actually didnt know its used for online cheating , I used it for some stress tests

mild hull
#

doesn't the name give a slight hint?

dull jasper
#

I guess it does πŸ˜ƒ

#

you can use it for a bunch of other things tho

thin stratus
#

Only bad people would change Offline Account values that are also used in Online modes while blaming the devs for allowing it. cough

bitter oriole
#

@dull jasper Some classes of cheats are pretty much impossible to eradicate though

inner iris
#

@chrome bay very interesting! I guess by guarding as much of the most easily exploited areas of the games with checks like this, you can eliminate most of the common cheat techniques without an anti cheat 3rd party setup.

dull jasper
#

depends how much data u wunna send over the network i guess πŸ˜ƒ

#

if there were no cheaters you could put more players in a server

bitter oriole
#

@dull jasper As long as you're doing the rendering locally, for example, wall hacks are pretty much impossible to prevent

inner iris
#

And yeah, I assume for modern games that have stats and unlocks tied to a master server + steam account for example, it’d be impossible to spoof as the server only sends down the correct versions. I remember call of duty games having tons of maxed out accounts due to the client host being able to edit the lifetime stats of all players.

dull jasper
#

yea texture modding sux

#

buttttt.... you can load the pack from a server

bitter oriole
#

Doesn't matter

#

As long as the player's location is stored on the PC, you can retrieve it

dull jasper
#

but you would have to do it every time u boot up a game

inner iris
#

Or not replicate players that aren’t currently visible but that hurts gameplay more for everyone I think

#

When latency is involved

bitter oriole
#

That's really hard to pull off, too, and would mess with texture streaming, etc

#

Same goes for lagswitch hacks, how are you going to prevent that ? Not easily, at least

dull jasper
#

yea that1 sux, why would any1 do this? πŸ˜ƒ

inner iris
#

For lagswitch, wouldn’t the server reject the shots as the positions of the player on server and client wouldn’t line up?

bitter oriole
#

What if it's en evasive measure to get "untouchable" for one second in competitive games ?

inner iris
#

Well on server they would be wherever the other player sees them

#

So they’d still be touchable

#

Unless I’m not seeing it the same way

bitter oriole
#

Except with prediction, you're probably not shooting on a client where the server knows it to be

#

What i'm saying is, for a given network model, you're pretty much always going to find a way to game it

inner iris
#

Don’t the simulated clients get their updates positions from the server though? And yeah definitely agree- there will always be cheating

#

Impossible to stop

dull jasper
#

impossible, i dunno, worth the tradeoff is something else πŸ˜›

bitter oriole
#

Simulated clients typically get keyframes from the server and interpolate between that. So generally speaking, when the server stops getting inputs, it's common for clients to consider the movement constant

dull jasper
#

every sort of cheat is gunna cost you something

bitter oriole
#

At least for a few frames

#

There's a reason real anti-cheat software is usually some kind of backdoor on your machine monitoring other processes

#

You get pretty far with dedicated servers and good security

#

Aimbots and wallhacks, though ? Good luck with these.

dull jasper
#

an actual robot behind a PC ....

bitter oriole
#

You could create a hardware box that connects to your mouse and screen and does the autoaim itself, for what it's worth

dull jasper
#

unstoppable πŸ˜›

bitter oriole
#

It's not even that hard

#

Cheating is most of why I'm never doing a competitive PVP game

dull jasper
#

tribes ascend got pretty horrible after a while

#

ppl would fly up 2 km. and shoot nukes down to the ground

#

honestly i dont see the fun

bitter oriole
#

People cheat in Destiny, a console exclusive that doesn't even ranks players or anything like that

#

That should tell you everything about cheating

#

Well, the last one isn't exclusive anymore, but people cheat on console versions too

inner iris
#

I wonder if it’s possible to monitor patterns or average accuracy over a period of time to determine if someone is cheating. Probably would result in false positives

#

But if the wallhacks or whatever are snapping to bone positions exactly every time, there could be some info there

#

I guess the cheaters could add in some slight randomization... haha

dull jasper
#

yea scan for 100% straight lines

#

would be an interesting approach

inner iris
#

Also maybe unnatural input movements like snapping from one rotation to another with no overshoot etc

#

As many of the aimbots do from what I’ve seen

#

But yeah all this stuff is easily reversed I guess with some extra code

#

But snuffing out the obvious cheaters is definitely a good step forward

dull jasper
#

its not about making it impossible, its about making it hard

inner iris
#

Dedicated servers + lots of these kind of checks would be decent I think

#

Acceptable

bitter oriole
#

Dedicated servers + monitoring software on everyone's game + team looking after cheats

#

$$$

inner iris
#

Yeah unfortunately the team part just goes past $$$ and brings up complexity managing workers

#

I wonder if the game is less ultra competitive, does the odd cheater here and there still ruin the experience?

dull jasper
#

for sure

inner iris
#

For example in CSGO it feels very unfair to grind to get your competitive rank up to only get deranked by a cheater

#

But then playing something like Fortnite

#

If you come across 1 cheater in 10 games, it’s no big deal

#

Not fun but not enough to make you stop playing

#

Depends what’s on the line for players I guess- how much they have put in and how much an unfair loss affects them.

dull jasper
#

play versus a player with endless health is not gunna be fun in any game πŸ˜›

inner iris
#

I don’t think endless health is a common cheat with a good setup

#

That can be prevented along with movement hacks etc if using a dedicated server and proper validation

#

The main cheats would be aimbots and wallhacks

bitter oriole
#

Endless health is pretty much incompetence on the developer's part

#

Wallhack though ? Good luck preventing it

inner iris
#

But I mean if the player can just leave that match and join another, their experience doesn’t get ruined. If it’s a battle royale game with leaderboards and you are about to set your record, only to get aimbotted at 2nd place.. probably another story

#

They’ll never be fully prevented, so it’s interesting to think about keeping the experience fun for players even around inevitable cheats from time to time

dull jasper
#

invisable walls for every1! πŸ˜„

#

epic mega cheater the game

bitter oriole
#

Worth mentioning : cheaters are often able to sow doubt about anti-cheat

dull jasper
#

every possible cheat allready build in

bitter oriole
#

There were reports the past few days of Valve's VAC banning people based on username

#

Turned out to be a lie

#

Same goes for Destiny 2's launch - made news about PC player getting banned for having Discord

#

Turned out to be a lie

inner iris
#

So they spread false rumors?

bitter oriole
#

Basically

#

On r/linux_gaming you'll find actual self-admitted cheat developers talking about that, like VAC is banning everyone and doesn't work

inner iris
#

Wow, as if cheating wasn’t bad enough πŸ˜„

bitter oriole
#

THat guy πŸ˜ƒ

faint fable
#

My steam functionality stopped working on my blueprint only project. Looking for a knowledgable tech support person to help me get it back on track. Payment possible.

#

LogOnline:Display: STEAM: Loading Steam SDK 1.39
LogOnline:Warning: STEAM: Steam SDK 1.39 libraries not present at ../../../Engine/Binaries/ThirdParty/Steamworks/Steamv139/Win64/ or failed to load!

Any clue how i change it so it looks for SDK 1.41 instead ?

bitter oriole
#

Probably not

#

Unless you actually have 141 there

#

But you shouldn't need to change anything about that for Steam to work

frank forum
#

How could i make an mmo system to let multiple people be logged on in one server, this is just a question for future reference cause i only got ue4 recently

twin vault
#

not really multiplayer but:
anyone knows if its safe to make rest requests directly from the client, wondering if they can find the post contents somehow inside the program

merry hemlock
#

So, am I suppose to send events to spawn FROM the game mode TO the game state? I want the server/local client host to have a different pawn than the connecting client(s)

brittle sinew
#

@twin vault what exactly do you mean by 'inside the program'? Do you just mean within the client?

#

If so, I don't see why making HTTP requests from the client wouldn't be fine

twin vault
#

@brittle sinew yeah, i mean i have 'sensitive' stuff like a post to delete character, just passing a character ID, if someone else called that he would manage to delete someone elses character

#

i know there are stuff like cheat engine you can find strings in the process, but idk how hard it would be so they find out a post request content

bitter oriole
#

You can't trust anything from clients

#

Except maybe on consoles

#

It may not be trivial to guess the message, but if someone does it ? Your game is dead

twin vault
#

yep

brittle sinew
#

Well, by asking 'within the client' I was basically asking if the information would be passed to the server or not

#

It sounds like it is :p

bitter oriole
#

So you need at least authentication

#

Loghin + passwd inside the request

brittle sinew
#

In that case, like @bitter oriole said, you can't trust any client information

twin vault
#

at first i was making the request directly thinking encryption would save me but then i got suspicious something bad could happen

#

so, what would be an alternative to send commands to the server if im not 'playing' in a server yet?

#

there are those beacons right, gonna see if thats what im going for

bitter oriole
#

@twin vault You need a login system

#

With a session system - tell the player you are logging in with user/pass, have the player return a unique identifier for that session

#

Then use that identifier for every request so that the server knows it's really that player

#

And expire the identifier some time after the last request

#

Pretty easy to set up, and pretty hard to break if the server is well done

twin vault
#

oh, that way i think i can keep how i was doing

#

thanks

bitter oriole
#

Assume your encryption is broken, your players the dirtiest hackers in the world, and plan accordingly

worthy wasp
#

@bitter oriole - you almost make it sound like every day humans are playing this game..... ❀

merry hemlock
#

LogNet: Warning: Network Failure: NULL[NetDriverCreateFailure]:
LogNet: Error: LoadMap: failed to Listen(/Game/ModularNeighborhoodPack/Maps/UEDPIE_0_Demo_Map_Main?listen) What am I missing here ( this is the listen/client server) Here are my settings

worthy wasp
#

@merry hemlock - is your Maps & Modes setup correctly?

#

SErverMap should be Demo_Map_Main

#

TransMap should be something blank level (i call mine TransMap)

#

DefaultMap should be something like "MainScreen" (wher ethe player enters the game from... typically just a UI map for starting the game)

merry hemlock
#

would that make the actual netdrivercreatefailer

worthy wasp
#

this is a pre-cursor to any session joining in multiplayer - so yes its needed.

#

ALTERNATIVELY - hold on a sec and i'll load up my project.... there SHOULD/COULD be an entrance to your CommandLineArguments in the Multiplayer Options window your showing here....

#

which will load a map as well

#

1 sec

merry hemlock
#

thanks for taking a look

worthy wasp
#

so you can alternatively put in here the name of the map -

#

/Game/.... is your root CONTENT folder

merry hemlock
#

I did that

#

here is how i am running it

#

open DEMO_MAP_MAIN?listen

worthy wasp
#

FYI - any packaged game needs to have /Game/Maps/ for cooking

merry hemlock
#

this is just editor for now

#

But i will remember that about the game/maps

worthy wasp
#

whats your connection type? Dedicated or ListenServer?

worthy wasp
#

ok so firstly - you need to connect to the guy

#

are you doing that successfully?

#

actually lets back this up a bit

#

the "open DEMO_MAP_MAIN?listen" i assume you are trying to launch this AS THE LISTEN SERVER right?

#

the guy HOSTING the game?

merry hemlock
#

ack, I mean it's a client

#

the one where you are the server and a client

worthy wasp
#

yes - the LISTEN SERVER (the host)

#

in ListenServer - 1 client acts as the SERVER and the rest as CLIENTS

#

so at this point....

#

all clients should be CONNECTED to the listen server

#

and your GameMode should be set to bSeamlessTravel = true;

merry hemlock
#

LogNet: Warning: Network Failure: NULL[NetDriverCreateFailure]:
LogNet: Error: LoadMap: failed to Listen(/Game/ModularNeighborhoodPack/Maps/UEDPIE_0_Demo_Map_Main?listen)
LogWorld: Bringing World /Game/ModularNeighborhoodPack/Maps/UEDPIE_0_Demo_Map_Main.Demo_Map_Main up for play (max tick rate 0) at 2018.01.02-16.29.48
LogWorld: Bringing up level for play took: 0.292703
LogBlueprintUserMessages: [Alpha1_GM_C_0] Server: PlayerControllerPlayer has joined:

#

that's when I'm on the host and hit Play - then I type open demo_map_main?listen

#

maybe I'm reading the message wrong

#

I think that's my issue..that error is from when I BeginPlay in editor without hosting that command

worthy wasp
#

i had a similar headachage with the UEDPIE_MapName

#

i had to setup the CommandLineArgument as i stated above

#

in order for hte map to show up appropriately

#

SORRY

#

thats false

#

hold on

merry hemlock
#

Wait....is this my issue

worthy wasp
#

that belonged in the SERVER GAME OPTIONS

#

the map name

merry hemlock
#

I have a OnPost event firing on the beginplay of my game mode

#

but if you are just playing in the editor and having started a server yet, that OnPost wouldn't fire correctly

#

I'm sorry, OnPostLogin event

worthy wasp
#

OnPostLogin (in game mode) is its own seperate event.....

merry hemlock
#

ugh, it's still giving me the error

worthy wasp
#

it should never be tied to BeginPlay() at all

#

it is automatically fired when a client CONNECTS to the server

merry hemlock
#

so it won't fire for me?

#

in any case...it kicks me out when I try to open the map and listen

#

do I need to have ?bIsLanMatch=1listen?

#

Um....i'm not sure why but I think online substyem Null isn't enabled

#

that's the one you still need for Lan games correct @worthy wasp

worthy wasp
#

yes you need a OnlineSubsystem setup for connections

merry hemlock
#

do I need OnlineFramework for Local connections as well...

#

or just null?

worthy wasp
#
;PollingIntervalInMs=20
; Uncomment the following line to use the Null Subsystem
DefaultPlatformService=Null
; Uncomment the following lines to use the Steam Subsystem
;DefaultPlatformService=Steam
;VoiceNotificationDelta=0.2 

;[OnlineSubsystemSteam]
;bEnabled=true
;SteamDevAppId=480
;SteamAppId=480
;GameServerQueryPort=27015
;bRelaunchInSteam=false
;GameVersion=1.0.0.0
;bVACEnabled=1
;bAllowP2PPacketRelay=true
;P2PConnectionTimeout=90

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

that will get you setup for a NULL subsystem

#

and you can UNCOMMENT out the things you need should you ever go to steam integeration

merry hemlock
#

hmmm

#

okay I got it hosting let's see if I can figure out the 2nd client connecting

#

am I referring to it right, seeing that the server is also the client ?

worthy wasp
#

no - in ListenServer - the server is the server. ONE CLIENT PLAYS AS THE SERVER (said that before)

merry hemlock
#

@worthy wasp I can ping the server's IP find through windows but when hit play and then type "open IPADDRESS:Port" it just shows a black screen and says:

#

LogNet: Game client on port 17777, rate 10000
PIE: Play in editor start time for /Game/ModularNeighborhoodPack/Maps/Demo_Map_Main 1.086
LogBlueprintUserMessages: Late PlayInEditor Detection: Level '/Game/ModularNeighborhoodPack/Maps/Demo_Map_Main.Demo_Map_Main:PersistentLevel' has LevelScriptBlueprint '/Game/ModularNeighborhoodPack/Maps/Demo_Map_Main.Demo_Map_Main:PersistentLevel.Demo_Map_Main' with GeneratedClass '/Game/ModularNeighborhoodPack/Maps/Demo_Map_Main.Demo_Map_Main_C' with ClassG
eneratedBy '/Game/ModularNeighborhoodPack/Maps/Demo_Map_Main.Demo_Map_Main:PersistentLevel.Demo_Map_Main'
LogNet: Browse: 192.168.1.189:17777//Game/ModularNeighborhoodPack/Maps/Demo_Map_Main
LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, Channels: 2, Time: 2018.01.02-22.26.25
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL
LogNet: DestroyNamedNetDriver IpNetDriver_0 [PendingNetDriver]
LogExit: PendingNetDriver IpNetDriver_0 shut down

#

It keeps shutting it down it seems

#

Not sure why it needs to spawn two windows when I only want one (using Play in stand alone) from ListenServer

merry hemlock
#

Can someone please advise which one of these two popup windows when it hit standalone game to test for networking, which one I need to use, or does it matter? (wtf is it spawning two for?)

jolly siren
#

because you have "Number of Players" set to 2..

merry hemlock
#

ah

#

I thought that was for the server limit but now that I think about it, it's obviously not

#

most network tutorials for local meant splitscreen, so they set that to 2

jolly siren
#

it's how many clients to spawn when you hit play in the editor

merry hemlock
#

well thank you that really clears things up, was driving me crazy

jolly siren
#

np

merry hemlock
#

is it possible to use the console to send message/commands

#

i think I'm connected but i can't confirm

merry hemlock
#

So, something is wrong with the way I'm connected to my listenserver because on my client this evaluates as TRUE

#

@jolly siren I am using stand-alone games and my host machine opens a map with ?listen

#

then on the other machine I type open IPADDRESS:Port and I can ping the machine through command prompt so I know I can connect
'

#

Why doesn't it just fail, WHO is it connected to if not the server?

#

and if it IS connecting....how does it have authority?

#

This only has to work ONCE

stone coyote
#

Hey, we`ve got a problem with our Multiplayer-Spawning-Logic. After we spawn actors and possess them on the gamemode ... we have absolutely no control over the movement and therefore our character seems stuck. Our HUD is also not displaying. The camera input are working, the rest not. Maybe someone of you guys have a solution, would really appreciate it πŸ˜ƒ

#

It seems that we have no control over the pawn (just rotation)

#

just rotation works

merry hemlock
#

@ivory merlin replication set?

#

crap

#

@stone coyote

#

you might have set it maybe one the rotation but not the other ones

stone coyote
#

What need to be replicated ?

#

ahh, je completed movement is replicated

merry hemlock
#

any variable that controls the movement...otherwise how is it being sent out for other clients to see?

stone coyote
#

it worked without problem, before we started the spawn logic

merry hemlock
#

how are you referencing the newly spawned characters...you might be controlling some other instance of those characters

stone coyote
#

over spawn actors

#

and afterwards we possess them, the PC get posted from local to the PC server version and from there to the gamemode

merry hemlock
#

did you try adding a print message to when the movement event happens? and add the display name to the event, compare this to a print name of the spawned actor event to make sure the display names match

stone coyote
#

just trying now

#

The Pawn get`s controlled by the controller, also the input events are working

#

just it dont moves and the animation dont get "played"

merry hemlock
#

no idea unfortunately...i can't even get my other computer to connect to a listenserver

stone coyote
#

^^ But thank your for your time πŸ˜›

merry hemlock
#

anyone find anything wrong with this? I'm only using platform name just for simple testing

stone coyote
#

Okay, lol .. we fixed it. Our GameMode was just broken, the Code was right ... just created another gamemode and transfered our code into it ... and it worked -.-* Sometimes we love UE ^^

bitter oriole
#

For those here who have worked on non-character multiplayer, how do you handle movement on listen servers ? Do you have pawns moving at every tick, or when the client sends a movement RPC ?

winter plover
#

If you are doing your own movement you probably will have to apply movement every tick, but input should only be sent when stuff changes

#

ie. your client sends a "start moving" or "stop moving"

#

which you then check every tick

bitter oriole
#

Yeah, thought so.

#

I currently update the speed / location when inputs arrive

#

And that just doesn't work :/

winter plover
#

What about it doesnt work?

bitter oriole
#

Well, if the client runs at 30fps, I only update it on the server at 30fps.

#

Plus, RPC arrive in salvos, and don't come back for a few frames... Which is to be expected in a network setting

winter plover
#

Yea, you will want to simulate movement locally aswwell

#

i.e. basically apply the movement on both server and clientside

#

that way the delayed response wont be overly obvious

#

and the server will still correct if the client is way off

bitter oriole
#

What I did is based on udemy's multiplayer course, which has the client simulate locally what's changed, send the input + delta time ; the server processes the inputs, updates the state and replicates to the client, which in turns ensure it's compatible with what he did.

#

What's wrong in that setup is that the server only updates the pawn when receiving new inputs - possibly at 10fps, or at a 60 fps average that's wildly inconsistent

#

I'm just not sure whether moving the simulation to the tick, just by taking the input into account, will result in the same simulation as on the client :/

winter plover
#

well the way it should work is

#

you update the pawns position based on the speed you receive from your client

#

and keep using that per tick until you get something else

#

or actually technically not the speed from the client

#

the input data

#

which you then derive the speed from

#

prolly not a good idea to let the client give you those directly

bitter oriole
#

Yeah, I've been thinking about it for some time and no matter how you do it, I guess the only reasonable way is to simulate every tick based on currently known inputs

#

It's just that my setup has a rollback system - when the server replicates, the client resets to that, and replays movement that wasn't received by the server yet on top of that

#

Which make sit super smooth for the client (that part does work really well)

#

I'm worried about whether I can still do that if the server simulates all the time, per tick

#

Thanks for the hint @winter plover - at least I'm not crazy yet

#

Replication is pretty nuts

winter plover
#

ikr, I'm trying to get ragdolls to replicate

#

now that's fun

bitter oriole
#

I feel your pain

winter plover
#

apparently there is no default functionality for that, so I'm trying to roughly match them up with physics handlers

#

with mixed results

bitter oriole
#

From what i've heard, networked physics in UE4 only work in very isolated situations

#

PhysX being pretty unpredictable

winter plover
#

it works fine for static meshes

#

but ragdolls are generally too expensive to replicate in most applications really

#

for how little they usually affect gameplay

#

it's probably why in pubg dead players turn into small boxes

#

but yea I'm trying to have bodies be draggable in multiplayer

#

so I wont have it quite as easy lol

merry hemlock
#

Okay...I'm a bit baffled ...I am able to connect to my listen server but my connecting client cannot cast to the game mode...is that because he doesn't have authority?

brittle sinew
#

I wouldn't say it's because they don't have authority (they're just side effects of the same general concept), but only the server has access to the GameMode.

#

I would suggest looking at the network compendium linked in the pinned messages; it's a really good resource for beginning in MP

merry hemlock
#

I've read through it a couple of times - obviously there is a difference between learning and application of said learning

#

So the only thing I can access from a client is gamestate then....i was trying to print a variable from gamemode, that was my problem I guess

#

thank you @brittle sinew

#

@brittle sinew One question I couldn't find the answer to - BEFORE I am connected, how do I setup logic that determines if the machine should try hosting or connecting? and which blueprint should this be on?

#

crap, sorry for tagging you twice, that genuinely was an accident

winter plover
#

Isnt it the gamestate that you wanna pass to the clients?

merry hemlock
#

yeah that appears to work

#

I'm trying to figure how to do make the server automatically host and the client automatically join via blueprint but I'm not sure how to go about that

merry hemlock
#

@winter plover I'm trying to remove the references to player controllers when they leave the game -- I'm removing the 2nd index item OnPostLogout but it seems to have no effect...can you advise?

winter plover
#

wait what are you trying to do?

#

by removing the 2nd index

merry hemlock
#

that IS the 2nd index isn't it?

#

it's a listen server, so the first client is also the server isn't he?

#

which would be zero

#

maybe i should just do last index

winter plover
#

idk seems unnecessarily hacky

mild hull
#

is that the second player ? otherwise you need to remove the item

#

if 2 login and the 2ten one logsout you would remove the first one

merry hemlock
#

I've got the listen server but he's the first playercontroller added to that list

#

so his index should be 0

#

any clients joining would be added

winter plover
#

if the host disconnects the server dies im p sure

merry hemlock
#

yes

#

this is a local tech demo

mild hull
#

so your game will always only have server and 1 user?

merry hemlock
#

pretty much

#

I will say this...it will always be LAN based

#

so I'm not worried about cheating whatsoever

winter plover
#

well it doesnt really matter whether it runs in lan or not

#

atleast not logically

merry hemlock
#

i've read through the network compendium but I can't find the magic button to give a connecting client total authority over server

winter plover
#

oh so you want the "server" to switch?

#

to another client?

merry hemlock
#

can that happen?

winter plover
#

I dont think thats a thing UE can do

merry hemlock
#

it didn't sound like it

winter plover
#

it's a strict server/client architechture

#

what you describe is more of a P2P thing

merry hemlock
#

it's weird

#

I set up a print message before and after and the index was still there

#

I'll try last index

#

Okay that makes no fucking sense

#

oh wait, i'm an idiot

merry hemlock
#

After an hour I am no further, can someone PLEASE tell me what is wrong with this:

#

I have a test button fired from the server to see what the current connected client is

#

Does OnPostLogin ALWAYS make a new player....

worthy wasp
#

for starters @merry hemlock - why are you getting the LastIndex of the playercontrollers list? what if you have a client that disconnects and he is the 3rd in line of 17? This methodology is not well thought through, and far from accurate.

And i dont know how you missed the Exitiing Controller pin off hte EventLogout()..... you could take that, use a FIND node of the PlayerControllers array and simply return its index and remove it from the array..... which is 100% accurate and what you SHOULD be doing anyways.

merry hemlock
#

Which, I'm discovering, is hardcoded so I should completely abandon this line of thinking

#

I'm only having one client connected other than the listen server

worthy wasp
#

secondly - your 2nd picture is the same unthought/unplanned methodology.... getting the last index of the array

#

who cares?

#

whaat if you have 30?

merry hemlock
#

and the server won't do an OnLogout so the only time that happens is when my one client disconnects

worthy wasp
#

your method is unthought

merry hemlock
#

This is a local based demo with only two players

worthy wasp
#

who cares - what if player 1 disconnects

#

he'd be array index 0

#

not last

merry hemlock
#

he won't, he's the host

worthy wasp
#

oy vey

#

you need to be more accurate bud

merry hemlock
#

This is a local VR based tech demo

#

If i can make enough money I'll pay someone who knows what they are doing, I have no business doing it myself but here we are

worthy wasp
#

well you've already discovered that OnLogout only happens when a client disconnects

#

thats the entire focus of that function

merry hemlock
#

I was trying to keep my references consistent, in case the laptop I'm using as a client has a problem I don't have to shutdown the server, he can just reconnect

#

so when he comes back, any events I have that need to target him, can still do so

#

believe me, i know my bootstraps are ugly but unless you want to do this for me or give me money to hire someone who knows what they are doing, I'm going to be hear occassionally (or frequently) asking stupid questions

#

The network compedium is fantastic at least

mild hull
#

so all you want it that the server takes the active player and refers to him only?

worthy wasp
#

A: i wont be doing this for you - i've had to learn just as much as anyone here has had to learn - as you'll have to learn
B: I wont be giving you any money - its already a hard economy.
C: I'll help you - but you also have to want to listen & learn.

merry hemlock
#

I want to be able to know who is who

#

@worthy wasp no problem there, i will take any and all help

mild hull
#

if there is only you and server thats not even a question

merry hemlock
#

let me be more specific

#

I have two computers

#

the VR one, that acts as the host/listen server

#

and the instructor one, that is a gaming laptop and the thing that facilitates the VR player's experience

#

so the person on the laptop hits a button and the fire changes conditions on the VR player's map

#

There's no real gameplay in the tradiational sense, but there are events that need to be seen by all

#

and some sounds i want to be played on only one of the players

#

What I'm trying to do isn't overly involved or complicated however, I'm still learning the in's and outs of the networking and it's obvious I'm missing some key concepts

worthy wasp
#

you already have Cedrics compendium... great resource

#

google search key specific topics

#

understand the framework classes. all described in that first link

#

understand that for the server - timing of classes coming to life is different than clients.

#

understand HOW a client connects to a server.

#

and what funcitons fire in what order

#

all in taht compendium + the first link i sent

#

my suggestion - dont jump in straight to steam or dedicated servers

merry hemlock
#

I have no plan to do anytype of online networking

worthy wasp
#

my other suggestion - dont jump into a paid gig that you have 0 experience in doing.

#

online networking = listen server

#

even if its just a local LAN

merry hemlock
#

It only needs to work once

worthy wasp
#

your still at that point doing networking.

#

if thats the case - why a listen server NETWORKED model?

merry hemlock
#

I mean I just need to figure out how to make a widget fire events on the server...I can access gamestate so that should be enough, it's just some of the syntax I haven't figured out yet

sterile pebble
#

if you want to understand how to sync fire state between two computers, you should read about replication and rpc stuff

merry hemlock
#

By the way, thank you for taking time from your day to go over this and lay out '

#

I used an RPC to fire something on gamestate

worthy wasp
#

i'm in no way trying to be offensive - please dont take it as such

#

i'd rather you get on the right foot - than be misguided

merry hemlock
#

No, I sincerely appreciate it

worthy wasp
#

but i'll be honest with you - THIS ISNT EASY lol

#

i'm 2 years in - i still come to this channel with questions all the time

merry hemlock
#

my biggest regret is that I should have jumped into unreal sooner

#

i've only been at it 10 months or so but networking is a new thing

worthy wasp
#

its changed so much in 2.5 years .... its hard to keep up at times

#

my only suggestion - keep up with the updates.

#

dont sit on 4.8 on your 1 project your working on

merry hemlock
#

no, i'm on 4.18

worthy wasp
#

i was just using an example

merry hemlock
#

it's a good one to keep in mind..believe me, i have done everything the hard way and learned because of it

worthy wasp
#

at least your learning.

valid imp
#

@merry hemlock Damn that's a good idea that project. Never thought about using VR this way. Thanks for doing this.

merry hemlock
#

@valid imp appreciate it....I'm probably one of the top Unreal developers in the Fire Service industry, but in the actual Unreal developer industry, I'm ranked 2nd to last, right above the grandma who figured out how to install the editor last tuesday... there's no much help in our industry....if anyone here comes from a tradiational business background, public safety is a fascinating beast from a business perspective....many concepts don't apply, it's an anachronism

valid imp
#

You say on your site this is your company, are fire services not funded by the government in the USA ? How do you get revenue for this ? That's fantastic. I heard of training for industries (althought never saw it applied, just theoritical idea), but demonstrations to teach kids about fire is really smart.
I am just a CS student at the moment, but working later in public safety sounds far more satisfying than business.

merry hemlock
#

@valid imp they are tax payer funded however 70% of all fire departments are volunteer-based, so their revenue is lacking most of the time

merry hemlock
#

If you want to make sure something gets to all clients, can you just multicast it to test?

mild hull
#

maybe look at the content example, there is a level "Network Features", with each replication type explained visual,text and documented BPs

merry hemlock
#

@mild hull I'm having a bit of trouble even after studying these "ghosts" on the replication -

#

pretty much anyplace that says "replicates" I have ticked but it doesn't seem to be replicating

#

Just to make sure I didn't screw something up - Gamestate is shared meaning if you update the gamestate from one player, it should update for the other correct?

mild hull
#

you really should open BP_HUD_Network that shows you how to look if you are the server or client

merry hemlock
#

where is that drawhud called from?

mild hull
#

gamemode in the network map

merry hemlock
#

I'm looking at the Remote Procedure Calls and I am confused about how they work with gamestate

mild hull
#

oh you meant the event, it should be called from code for any hud class, but the important part is getowningplayer controller has auth

merry hemlock
#

I can make things happen with RPC on BP's placed in the level

#

But when I try to update a string variable, for example, it doesn't update FROM the client to the server

#

I have a widget button that casts to my controller, and from there to the gamestate

#

widget

#

There are no gamestate examples on that Network example I could find

mild hull
#

it has no custom gamestate, but you need to setchange testvar to server

merry hemlock
#

I guess that's what I need to review - if you change it on multicast, why does not change it on everything?

winter plover
#

So I made some progress with replicating ragdolls, but it only works for listen servers so far

#

as soon as things become dedicated the ragdolls become very stiff and weird

mild hull
#

multicast can only be executed from server, it even says so in the node when you call it

winter plover
#

are ragdolls not calculated when running dedicated?

mild hull
#

it will still execute locally

merry hemlock
#

@mild hull I see that now, it is working....I think....I'd like to playasound...but the node says it doesn't replicate.... can I use a getlocation and spawnsoundatlocation as a workaround? I want the sound to be an UI/2D sound though

#

That spawn at location workaround does seem to work but it's going to be a pain to use that for 2Dsound

mild hull
merry hemlock
#

geez that's perfect, thank you!

#

I seem to have the functionality I need.....simply making a widget button fire events in gamestate....now I just need to make sure I can do this in my main project and not a learning project

#

but thank you @mild hull ....one step closer

mild hull
#

especially: If the RPC is being called from client to be executed on the server, the client must own the Actor that the RPC is being called on.

merry hemlock
#

In this case, a widget created by the client is completely fine....however if that widget is created and has special variables on it...I want to make sure that those variables are drawn from and updated by the gamestate so they are all consistent....am I understanding this correctly?

#

practically any data I have is managed on gamestate so that should be okay

#

treat anything that the actual widget draws as cosmetic

mild hull
#

any data that are set on server in a replicated variable will be know by all, but your client does not own gamestate, so you should at to your character key binds or functions that are called from the widget and those should call server rpc that are also declared in the character and those set gamestate or whatever you want to update

merry hemlock
#

since I own the widget, I can use it to get to the controller, which can then access the gamestate?

#

@mild hull Do I need to have two player controller BP, one to handle VR player and the other to handle an instructor - i'm asking from a networking perspective...the actors that use them have their own different elements

mild hull
#

you dont have to but it would be cleaner and for a widget to send rpc to server you would need to create it on server for the client and replicate it which defies everything a widget stands for, so its better(easier) to add all logic into the controller or pawn

#

you could create VR player char and observer char and spawn them based on if its server or client

merry hemlock
#

that's what I'm trying to do ...i'm getting there it's a matter of handling the replication

#

Right now my gamemode OnPostLogin has a branch using HasAuthority --- server gets VR player and the client gets instructor....but for some reason the client wasn't being replicated even though the actor class has replication set

#

not sure why but my server has it's pawn turning gold (which only clients should be)

#

Ah...I was spawning it in the gamemode....I didn't need to spawn it because it's already a default pawn to be used in the gamemode

#

I am still foggy on this actually

mild hull
#

since you own all you will always find yourself having authority, since that never gets called on the client side, but the server will always spawn itself first, so anyone coming after that is the observer

#

so change the hasAuth to a bool that you set the first time

merry hemlock
#

AH

mild hull
#

yeah

merry hemlock
#

another question - if you don't have much data/logic flowing back and forth (it's basically events, not ticking) does it matter performant wise WHO is the server?

#

since the instructor nneeds to do a lot of button pushing, it makes more sense just to have him be the server even though that's a three year old gaming laptop and not a modern pc like my VR machine

mild hull
#

you could set different settings for instructor

#

like VR has a realistic blazing fire, while you only show some cheap fire effect to know where it is

merry hemlock
#

but the cpu wouldn't be a bottle neck it being the server right?

#

that would only matter if it was processing a lot of different players and gameplay interactions across an online network

#

also, when my client joins, his pawn actor stays in the ground

#

@mild hull annnnd the client can't move at all

mild hull
#

does the client char work when you use him on server?

merry hemlock
#

I can move around on the main computer ...even though I'm not the right color ...

#

this is a custom pawn that simply inherets from default pawn....all I did was add a visible sphere as a component

#

but I set everything with a "replicates" tick box to replicate

mild hull
#

do you posses correctly?

merry hemlock
mild hull
#

try to drag out the new player directly and not use the array

merry hemlock
#

hmm...i had issues with that but it was probably because I was doing 7 things wrong elsewhere

#

can I plug it from new owner off OnPostLogin to any references?

mild hull
#

yeah

merry hemlock
#

hmm

#

I can move on the client but I am invisible apparantely - and i don't know why this function is turning my ListenServer Pawn yellow

#

@mild hull what happens to the default pawns that are listed in the gamemode class defaults?

#

I'm confused ....normally you don't have to do anything but I'm using the same pawn (instructor pawn) and it's listed in the class defautls of my gamemode

#

actually that doesn't matter does it?

#

I just can't figure out why the game is making my listenserver pawn do that

#

and why my client is completely invisible

mild hull
#

i also dont know since it works for me, but they either dont spawn or die faster than you can see

#

but you could also do it like the net example and set the spectator pawn

merry hemlock
#

What does it do to spectator spawn?

mild hull
#

i tried it with a normal pawn, gets spawned and i can use it and when i replace it in post it is gone, so that should not be your problem

merry hemlock
#

I'm putting together some screenshots

#

I don't care how difficult networking is for me i WILL figure this shit out

#

so....why is my 2nd player invisible

#

The pawn he has obviously has a mesh

#

collision component has replication

#

mesh component - replication

#

movement component, replication

#

class defaults

#

C:\Users\blmcc\OneDrive\Pictures\Screenshots\2018-01-03_1726.png

mild hull
#

there is no need for the components to replicate and i have no access to your c drive :D

merry hemlock
#

so why can't I see that pawn?

mild hull
#

any errors in log? are you spawning the right pawn? maybe restart ue

merry hemlock
#

i've restarted a bunch and I'm running standalone due to the problems with PIE networking

#

I would LOVE to figure out a way to do error checking other than print strings

mild hull
#

window-> developer tools -> Log

merry hemlock
#

doies that record from standalone???

mild hull
#

no, but the log is also written into saved/log

merry hemlock
#

no errors when I do CTRL+F

#

Further testing reveals the following

#

my client cannot move THROUGH the server pawn

#

but the server pawn can move through him

#

What does that mean?

mild hull
#

you dont see movement from either side?

merry hemlock
#

I can see the server pawn move

#

on both of them

#

and you can literally see him move THROUGH the client's sphere

#

and when he is spawned, the actor name is InstructorPawn

#

when the client spawns, his actor name is InstructorPawn1

#

this is a listenserver just to make sure we are clear

mild hull
#

shouldn't the server be vr pawn?

#

is there a difference?

merry hemlock
#

right now I'm just doing this in non-vr for ease of testing

#

no way i'm putting up my headset everytime

#

so I've switched out hte pawn for now

#

I don't know why so many things are happening