#multiplayer

1 messages ยท Page 303 of 1

twin juniper
#

if there are 5,000 matches

#

how does one find 1 match

#

out of 5k matches

jolly siren
#

sessionname

#

lol

twin juniper
#

so

#

you can give it anything

#

likke i can say "MyGameSession"

#

because i tried that

#

and it didnt work

modern fable
#

I'd recommend you using BPs + the Advanced Sessions plugin

#

then you can just look thru that plugin's code

twin juniper
#

not about to go and add another module to my project

#

xD

#

too much overhead

jolly siren
#

@modern fable that ended up working great. thanks a lot

modern fable
#

โค

twin juniper
#

So ok

#

why does the second value "Result"

#

return 5

#

is that some sort of result code

#

lol

jolly siren
#

because you are casting an enum to an int lol

#

that means it's the 5th enum in EOnJoinSessionCompleteResult

vivid siren
#

Hey, you guys know how printing in debug mode with clients usually says something like "Client 1: Hello!" "Client 2: Hello!" or with server, "Server: Hello!" ?

#

Well my client says "Client -2: Hello!"

#

That's not a problem, right? lol

twin juniper
#

yeah but thats what

#

@jolly siren thats what the tutorial does lol

#

and it isnt joining the match

jolly siren
#

yeah it's just outputting that for debugging purposes

jolly siren
#

but that tutorial works fine

#

i've verified

twin juniper
#

ive only gotten it

#

to work once

#

and join a session lol

#

like i added a debug, and it says there is one session on the network

#

but when i call my function which i modified to join the first session in the SearchResults array

#

it doesnt actually join

rugged radish
#

can gift hub for for working on the same ue4 project at the same time with 1 person for free?

twin juniper
#

@rugged radish go to the jobs section

twin juniper
#

ok so i figured it out, the 5th element in the enum is "AlreadyInSession"

#

what do i doo @jolly siren

jolly siren
#

boobies

#

so it sounds like you are trying to join multiple times

twin juniper
#

i have

#

a packaged build

#

with two separate windows open

#

i want to be able to join on two separate windows

jolly siren
#

is this just the null subsystem?

twin juniper
#

uh

#

its Steam

jolly siren
#

you have two windows open on two different computers?

#

each with steam open?

twin juniper
#

same pc

#

with steam open

jolly siren
#

yeah you can't do that

twin juniper
#

oh?

jolly siren
#

that's why it's giving you that

twin juniper
#

hm

#

ok

#

also uhm

#

SessionSettings->bIsLANMatch = true;

#

if that is true

#

does that mean its not using steam?

#

should i set it to false lol

jolly siren
#

yes

#

set that to false

twin juniper
#

what is "Presence"

#

i read that it means that you are online

jolly siren
#

it's how steam locates sessions based on location

twin juniper
#

oh

jolly siren
#

leave it on if you are using listen servers

twin juniper
#

so where are matches actually hosted?

#

does steam host sessions?

#

like how does that work lol

jolly siren
#

if you are using dedicated then turn it off and then you need some stuff because epic steam + dedicated is broken and they are bitches

twin juniper
#

Do you know what i mean?

#

like where are the matches hosted, and who is hosting the list of matches?

jolly siren
#

the listen server registers with steam

#

the listen server is the host

#

if you aren't using a dedicated server

#

but you need to register with steam

twin juniper
#

right now im just using the test app id

jolly siren
#

which should all work fine with listen servers

#

yeah

twin juniper
#

isnt listen basically a p2p server?

jolly siren
#

that will work

#

yes

#

that is what it is

twin juniper
#

eww

#

so ppl can ddos others

#

lmfao

jolly siren
#

yum

twin juniper
#

i dont want that

#

lul

#

if i build a dedi server

#

it wont work?

#

with steam?

jolly siren
#

nop

#

you need a pull

#

which is managed by someone who isn't an expert

#

and epic has dropped the ball hard on picking it up

twin juniper
#

i dont get it then lol

#

like

#

so is there not a way i could learn to do it myself

#

lol

jolly siren
#

have fun

#

and like comment on the pull too

#

the more the merrier

#

or however you spell that

#

anyways i gotta go eat

twin juniper
#

good luck with that food man

#

i wish u the best of luck

jolly siren
#

same to you

twin juniper
#
jolly siren
#

I haven't used it but I think so

#

I think Allar has something too

neon mango
#

Hey guys, anyone have advice for debugging client movement hitching with ping higher than 10 ms?

#

Really rubber bands baddly

compact gulch
#

ping higher than 10ms is usually expected

#

unreal handles movement component quite elegantly in their native side

#

are you doing any Set Actor Location manually in your code/script?

#

@neon mango

neon mango
#

I actually found the cause!

#

Or nearly one or both of these lines caused the hitching

#

//this->GetMovementComponent()->SetIsReplicated(true);
//this->GetCapsuleComponent()->SetIsReplicated(true);

#

I'm suspecting more the first but could be both

#

@soft inlet ^

compact gulch
#

you tagged the wrong guy

#

lol

#

remember one very important philosophy

#

never replicate anything after 'DeltaTime'

#

example... location = velocity * deltatime

#

if you replicate location. you're in for trouble

#

that's just an example. it's applicable to rotation , and any other values

neon mango
#

Dang didn't notice lol
So I'm having an issue now where my replicated method happens on the server only and while my Client seems to do the same method none of the debug logs I have show client side. Does this mean its all happening on the server? I basically want to update some bools for the client as well How should I handle this?

neon mango
#

Ok I think I figured that part out

#

but now I'm getting some jitter from what I believe is because I'm changing gravity and that isn't replicating?

vivid siren
#

hey, what's the preferred way to force all connected player controllers to call a custom event?

golden granite
#

@vivid siren Run a multicast on the server

vivid siren
#

Awesome, that's what i've been doing but i'm not getting the behaviour I wanted, I guess it's a separate problem then, thanks!

golden granite
#

you have to run multicast from server, if the events arent firing its not beign run from server

vivid siren
#

@golden granite Right, I've done this as well but my possessed camera actor for the client seems to reset itself to 0,0,0 whenever it gets rotated by the multicast

golden granite
#

make sure the camera isnt set to replicated

#

the camera blueprint

#

ive done that by mistake

vivid siren
#

This is just the default CameraActor from UE4, not a customized one

#

I don't see anything about replication in it

vivid siren
#

@golden granite I'm using a character actor now with the camera and the same problem occurs, even when disabling replication on the actor

golden granite
#

Not sure without seeing it. heading out for the night though. Replication sure is fun stuff to figure out though :p

vivid siren
#

It sure is, lol, thanks for the other help tho, see ya!

brittle sinew
#

I had this same problem, a multicast wouldn't work.

#

Because you're trying to call functions on PlayerControllers that don't exist on clients other than the owner

#

Plus, a multicast is for one object. If you want to call a function on all PCs, you'd want to go through the PlayerController iterator and do it there @vivid siren

still finch
rare cloud
#

@still finch, you can't simply set the server version of an actor

#

what is your actor ?

still finch
#

@rare cloud Why not? The actor already exists on the level, why can't we "simply" set the owner as the server?

brittle sinew
#

The owner is another object, not just "simply" the server

still finch
#

Is the owner not "simply" set when the server spawns the actor?

brittle sinew
#

You can feed an actor in when you spawn an object to be the owner

still finch
brittle sinew
#

If you don't set it manually, it doesn't have one

still finch
#

Does "everyone" need to own this actor in order to manipulate it?

brittle sinew
#

Clients can only call RPCs on actors they own. So if you want to call back to the server to make a change, you would have to own that actor, but you only can have one owner

#

That's where you can feed stuff through your PlayerController to make requests to change things indirectly from the server, but you can't directly change an object without being its owner

still finch
#

Hmm

golden granite
#

@still finch Basically you can only issue server calls on an actor owned by the client/server making the call. EG: PlayerController.

still finch
#

So if we have a structure, such as a building that we want to destroy. If I want to shoot that building, I have to own it then manipulate it. Then if someone else wants to shoot it, they, at that point have to own it before they can shoot it?

golden granite
#

Not quite.

#

You can manipulate actors without owning them, you just can't make server calls on them without owning them.

#

Lets say you want to change a players name.

#

Client can change a variable that holds their name, and it could update their name. But if the call isn't made on the server it never actually changes across all clients/server.

#

And you can only change it on the server by owning the actor you are attempting to make the change from.

#

I think part of the issue is you aren't familiar with replication, nor ownership.

neon mango
#

Are RPC's more expensive then variable replication.

worthy wasp
#

@neon mango how do you mean?

#

Question guys - i'm trying to seperate "InProgress" match in BP project.... but it is firing immediately after "WaitingToStart" and I dont see any code that is firing this natively/default...... GameMode travel type is SeamlessTravel(True) DelayedStart(False).... suggestions?

neon mango
#

In terms of bytes sent

worthy wasp
#

@neon mango i would imagine that depends on how much data you are sending.... RPC's are just functions that are casted to either one/many if i'm not mistaken.... but i'm unsure as to how many bytes each node casted would cost.... you'd have to packet-trace this i would assume with a software like WireShark and filter out the packets.... Variables obviously would be different in the nature of the variable... . a texture file would be tremendously bigger than a 32bit INT or a string of text - no?

twin juniper
#

so are we sure that ue4 steam sessions is using peer to peer?

worthy wasp
#

@twin juniper i'm testing this very thing as we speak....

#

i tested across my LAN and it connects fine in hosting/finding sessions.... as well to my brother on a test project across many staates

#

it looks as though steam HOSTS a virtual lobby persay - i'm going to test this out by using multiple clients hosting a game sesesion on steam app.... and see how many show up in FindSessions()

#

right now i'm just testing 1 host + 1 FINDSESSIONS() from a remote client (states away)

#

FYI - setting DelayedStart(True) seperates the match states - it's a good sunday so far! โค

neon mango
#

I guess rep notify isn't working as I thought?

#

I have a float var GravityScale

#

And I have it ReplicatedUsing a method

#

OnRep_GravityScale

worthy wasp
#

rep-notify is to run a function when the value of the replicated variable changes

#

something like this:

#

HP(changes)->RepNotify(apply HUD red flash)

#

i mean thats REALLY stupid high level of what could be done

neon mango
#

Yea

#

I have an RPC call executed on the server that does GravityScale = 0

#

So my RepNotify_GravityScale should get called where I say Player->GravityScale = GravityScale

#

Right?

worthy wasp
#

ok so think of this first

neon mango
#

I guess I can put a log there to see if it is getting called?

#

And when

worthy wasp
#

does GravityScale need to affect movement at all i would assume?

neon mango
#

Yea

worthy wasp
#

ok so....

#

i would ASSUME gravity scale is global to the entire map? Can affect any player right?

neon mango
#

No, just this player

#

Issue I was having is the RPC call executes on the server only

#

so I thought I could set it with a var

worthy wasp
#

what STARTS the GravityScale change?

#

a volume in level?

#

trigger?

#

some level event?

neon mango
#

A button press

worthy wasp
#

ok my own workflow (i'm not saying this is gonna work....)

#

i would do ButtonPress()->CastToCharacter()->Client_GravityChange(SetGravityScale)->Server_SetGravityScale(Replicated to server)

#

then you would have a server RPC funciton that does this:

#

ServerFunction()->SetGravityScale(#)

#

Gravity Scale is obviously replicaated

#

the thing i had troubnles with earlier on in MP setups... was understanding Replication of variables

#

and the biggest success i had was to A: run it on client locally first for visual effects

neon mango
#

Well what I'm trying to do is this

worthy wasp
#

and then B: Run server RPC function to change the same variable (as server this time so it IS changed and replicated to everyone else)

neon mango
#

ButtonPress() -> Calls an RPC (Server) -> Sets GravityScale = 0 -> Calls OnRepNotify?

twin juniper
#

so is the steam matchmaking using p2p

worthy wasp
#

i dont think you need to use repnotify in this situation

#

but i could be wrong

#

@twin juniper - i'm unfortunately not at matchmaking yet .... not with this portion of the game i'm doing

#

but in my own experience with OSS (Gamesparks) -> Matchmaking is handled with serverside scripting..... you would have to have a TEAM (array of players connected) ... which if i'm not mistaken would require some form of either A: Hosted Lobby or B: Dedicated Server

brittle sinew
#

@twin juniper the matchmaking just serves to get players connected, the servers themselves are still P2P

twin juniper
#

yea

#

so how do you deal with ddosing

brittle sinew
#

With a pure P2P setup? There's really no way

twin juniper
#

how do we not use p2p then

#

lol

#

and still use matchmaking

brittle sinew
#

I haven't used dedicated servers, does that not work?

twin juniper
#

uhm

#

what do u mean

#

how would u use a dedi server for matchmaking

#

lol

brittle sinew
#

I mean dedicated game servers

twin juniper
#

that wouldnt work

#

for a game which needs to work in states

#

like round 1, round 2, round 3

#

match ends... submit results to db

#

bring back to main menu

brittle sinew
#

Well you would most likely have to set up your own custom server flow

twin juniper
#

u mean like hard code a dedi server

#

to work as a match

#

lol

brittle sinew
#

Yeah, it would have its own state machine of sorts

twin juniper
#

eww

brittle sinew
#

Well...? That's kinda how you would need to do it

twin juniper
#

i mean yeah

#

but it kind of makes the whole built in matchmaking system useless

brittle sinew
#

You might be able to mess with proxies if you still want P2P, but that would be a lot of custom connection and latency introduced, I don't think that would be worth it

twin juniper
#

like i highly doubt dota 2, csgo, and league of legends

#

use p2p

#

lol

brittle sinew
#

They don't

twin juniper
#

u cant have acompetitive game

#

with p2p

#

why is p2p even an option

#

lolol

brittle sinew
#

It's easy to scale a game with it, COD for example was P2P up until a few years ago

twin juniper
#

its the easiest way, yet most unsecure and laziest way to setup a match making system

#

how did they get away with that

#

lool

brittle sinew
#

It's not like it's the devil himself lol, it has disadvantages for sure but it's not unusable

#

And trust me, if you're looking for random people to ddos, you don't have to look too far

twin juniper
#

ya

#

I mean like

#

if u ddos the person hosting the match

#

doesnt that just crash the whole match

#

lol

brittle sinew
#

Yeah, that would

twin juniper
#

so the question is

#

how easy is it

#

to find the host

#

lol

brittle sinew
#

Sniffing is pretty easy for people who know how to do it, but it's not like everyone is just itching to do it

twin juniper
#

yea

#

idk im just wondering

#

how plausible it would be

#

for a game like h1z1

#

to do p2p

brittle sinew
#

On that scale, I would say most likely not possible

#

Just because of the world scale

twin juniper
#

yea

#

and ping

#

lOl

brittle sinew
#

And I'm 99.9% sure that even if games use steam matchmaking, they still have to implement a lot of their own stuff into it

#

Steam is just great because everyone uses it, and the infrastructure is already there

twin juniper
#

ya

neon mango
#

Ok so I but a log into my OnRepNotify method and I'm not seeing it

#

So maybe I've done it wrong?

#

UPROPERTY(ReplicatedUsing = OnRep_GravityScale)
float GravityScale;

#

Might have been me forgetting this

#

DOREPLIFETIME_CONDITION

vivid siren
#

does the client own a copy of the game instance?

brittle sinew
#

Clients have their own game instance, it's not a copy of the server's or anything

#

It persists throughout the client's lifetime, regardless of sessions or anything

vivid siren
#

awesome, thanks

thin stratus
#

@neon mango is the function a UFUNCTION?

neon mango
#

I got it working

#

It was missing the DOREPLIFETIME

#

I'm confused still on if I should use an RPC or replicate the vars

#

I'm currently replicating two bools and a float to achieve something, it seems fine but should I just put them all into an RPC and handle it that way?

regal relic
#

That question for me usually involves asking myself a couple other questions. 1. Do i need these new variables updates right now? Or is it ok if they silently update somewhere down the line. If its okay they update later then just replicate the variable. If their part of time crucial gameplay mechanics then use an RPC. 2. Even if my variables are not time sensitive, or gameplay crucial. But when those variables finally DO update. Is there any logic i need to perform? If the answer is no. Then your probably great for a simple replicated variable. If the answer is Yes then you might consider Instead using a RepNotify, Which is kind of like a function, But it executes every time that particular variables is changed, and replicated. Excellent for UI/HUD stuff if you ask me.

vivid siren
#

So I have a chessboard-esque level with different types of units, all of which inherit from a single parent class. Some of these units will properly replicate while others will not, and the ONLY difference is their skeletal-mesh. Any ideas on what I should check out to solve this?

#

It's essentially a chess game where player 1 (server) can move any of his pieces and player 2 (client) will see, but when player 2 moves one of their pieces, some work while others do not.
The behaviour is not consistent either. Sometimes a knight will replicate, sometimes it wont.

#

Can the net load be too much sometimes? It's poorly optimized so maybe too much traffic could be breaking it?

#

I moved the client's knight on multiple trials, all of which had identical steps leading to it, 3 results came

#
  1. the piece did not replicate to the server (most common)
#
  1. the piece successfully replicated to the server (about 1 out of every 5 attempts)
#
  1. the piece successfully replicated but after about 5-10 seconds of waiting. (only happened once)
#

Any ideas are appreciated, I'm off to bed for now. Will check tomorrow. Thanks.

glacial goblet
#

I have an event: OpenTheDoor, which is run on owning client. When it executes, I'm calling setRelativeRotation node for door mesh and rotate a door. It works fine visually. Door is opening on a certain client. But there is a problem with door collision. Collision still the same if a connected client opens the door - which mean that door is closed, even if visually it was opened. And if player, which created the server, opens the door, then even if a connected player didn't open the door, he can walk through. How to fix that?

thorn merlin
#

@vivid siren check each of the child classes and make sure is replicated is checked

#

@vivid siren using OO in UE4 sometimes settings get messed up

#

@vivid siren im not sure how things are these days but a year or two ago, I was being constantly punished with glitches doing OO, i.e with settings gettting overwriten - so I changed to data driven classes from data tables instead of all my logic being held in my object hierarchy

modern fable
#

you forgot to mention @vivid siren

jolly siren
#

lol

#

does anyone know why bPauseAnims wouldn't work on server?

supple musk
#

Hi everyone, I can't wrap my head around one problem that I have. I work on a lobby for my multiplayer game.
I simply want to notify my Lobby Widget that a new player connects. I get the incoming connection from GameMode C++. How can I establish the connection between the two ? I can't figure out globally the workflow between Widgets and the rest of the game. Thanks

jolly siren
#

GameMode -> PlayerState -> PlayerController -> HUD is what I do

supple musk
#

Can you get Widgets from HUD Class though ?

jolly siren
#

normally I define the widget in my hud class c++

#

via a TSubclassOf<class UUserWidget>

#

and then set the property in the bp editor

#

then spawn it in the hud

supple musk
#

So all your widgets are spawned directly from the HUD class ?

#

I used the level blueprint

jolly siren
#

yeah

#

I don't use level blueprint

#

except for quick temporary things

supple musk
#

Alright thanks i'm gonna try that

jolly siren
#

sure np

jolly siren
#
void AFPSCharacter::StartStun()
{
    // Stop running
    SetRunning(false);

    MulticastStartStun();
}

void AFPSCharacter::EndStun()
{
    MulticastEndStun();
}

void AFPSCharacter::MulticastStartStun_Implementation()
{
    DisableInput(nullptr);

    // Pause the animations
    GetMesh()->bPauseAnims = true;
    if (GetCharacterMovement())
    {
        // Stop and disable movement
        GetCharacterMovement()->StopMovementImmediately();
        GetCharacterMovement()->DisableMovement();
    }
}

void AFPSCharacter::MulticastEndStun_Implementation()
{
    EnableInput(nullptr);

    // Unpause the animations
    GetMesh()->bPauseAnims = false;
    if (GetCharacterMovement())
    {
        GetCharacterMovement()->SetMovementMode(EMovementMode::MOVE_Walking, 0);
    }
}```
#

does anyone know why my animations wouldn't be pausing on the server?

#

I'm trying to call the multicast rpc from the server

thin stratus
#

@jolly siren Is that Multicast Called on the Server?

jolly siren
#

yes

#

I've verified that

thin stratus
#

What part of your code, exactly, is not working

jolly siren
#

it's not pausing the animations on the server

#

GetMesh()->bPauseAnims = true;

#

I'm digging through core

thin stratus
#

Stupid question, why do you have anims playing on Dedicated Server at all?

jolly siren
#

because they are driving gameplay elements via anim notifies

thin stratus
#

Uff

#

I would not be surprised if you can't pause on a dedicated server

#

I would not use AnimNotifies for gameplay logic

#

Only for FX

jolly siren
#

I'm pretty sure paragon uses notifies for gameplay logic

thin stratus
#

Can't say

jolly siren
#

no going back from this design anyways

#

it's been years in the making lol

thin stratus
#

Ok so, it's going into the "ShouldTickPose" function

#

Which consits out of && in the return

#

so if you set it to true, that should return false

#

Even on the Server

thin stratus
#

The "TurnOff" function, that normally sets the Mesh to be paused (function of ACharacter), excludes the Dedicated Server

#

Yes, that one

jolly siren
#

yeah I"m not using turn off

thin stratus
#

Na just saying

thin stratus
#

So just to recall: You want to turn it off?

#

So it's still ticking on the Dedicated Server?

jolly siren
#

yeah I want to pause the animations

#

on clients and server

thin stratus
#

Okay and I assume you already debugged it that much that the DediServer is 100% still calling it

jolly siren
#

no I'm about to throw in a breakpoint, need to use a conditional because it's a ticking function

#

sec

#

so yeah it's still hitting ShouldTickPose with a bPauseAnims of false when the player is stunned

#

I set a conditional breakpoint on that line with the condition of bPauseAnims==false and disabled it until I stunned the player

thin stratus
#

So the Server still calls it after Setting it to true

#

And it's not just one frame?

jolly siren
#

well it should always call ShouldTickPose. but bPauseAnims is still false on the server after the player is stunned

#

and yeah it's not a single frame

thin stratus
#

Weird..

jolly siren
#

๐Ÿ˜ฉ

thin stratus
#

Did you, even if it's a really simple thing, try to instantly print "GetMesh()->bPauseAnims" on the Dedicated Server Multicast only

#

Maybe something accesses the value at the same time and sets it back to false

#

instantly after setting it to true*

jolly siren
#

no I will try that tho. I never see it being set in core code tho besides for in the TurnOff function

#

and that is setting it to true

thin stratus
#

True though

#

But on the other hand, if you set a var to true and it ticks with false, something is off

jolly siren
#

yeah, and it's not hitting the end stun part of my code until it should. so it's not my code that is setting it back to false incorrectly

heady delta
#

@thin stratus if you had to make a project with ded servers and mostly working steam integration which UE version would you use: 4.11, 4.12 or 4.13?

jolly siren
#

I would use 12

thin stratus
#

Since I did not hear anything about a version working better or worse, i would use the one that fits the needs of the rest of my project

#

Steam + Dedicated Servers don't work with blank UE4 Versions anyway

#

So what ever you take, you need to PR the SteamDedi Server fix anyway

heady delta
#

I'm on 11 which works perfectly but there is a problem where bad packets fatal the server, they fixed in 4.12.. but they don't know where the commit is so I can't merge it lol

thin stratus
#

They don'T know where the commit is?

#

wtf xD

heady delta
#

right?

jolly siren
#

sounds about right

thin stratus
#

Idk, what keeps you from using 4.14?

jolly siren
#

yeah the pull has been updated to 4.14 so I would use that. I haven't verified that it works tho, I'm still on 12

heady delta
#

well I really don't like moving at all, I have made a lot of changes to the engine, and everything works fine... moving version always breaks

#
  • new version of physx murders my custom vehicles
jolly siren
#

yeah I tried upgrading to 14 and my cloth caused crashes

thin stratus
#

to be fair

#

you didn't say upgrading

#

You asked for what version i would use if I would make a project

heady delta
#

ye

#

I know steam voice works on 4.11, is broken in 4.12, works in 4.13 but drops packets if more than 2 ppl speak at once

#

๐Ÿ˜ฌ

jolly siren
#

it works in 4.11 with a pull

#

well if you are on dedicated server

#

but hasn't worked since

#

it's not just 2 ppl speak. you get like a couple words out of an entire conversation if that

#

Alex pointed me to this thread because I've been complaining about these things..

#
#

so i guess that's where we are posting if you want to join the club

#

I guess it's time for everyone to get their pitchforks out

#

๐Ÿ”ฑ

heady delta
#

sigh

#

I don't want to but I feel like I want to bring up the whole "we only succeed when you do" and the lack of steam love

jolly siren
#

I think it's time for us to do that tho

#

I have been waiting patiently for a long time

heady delta
#

Yeah, it's a real no brainer too, how many people are going to use steam vs a VR editor, if I was to put it coldly ๐Ÿ˜„

jolly siren
#

yeah they have been pushing vr so much, but we really just need these steam things fixed. I listed the 2 main issues on the thread. Those are critical issues in my opinion.

#

especially the dedicated server bit, I mean come on

#

@thin stratus hrm so this is printing true

#
void AFPSCharacter::MulticastStartStun_Implementation()
{
    ENetMode Test = GetNetMode();
    DisableInput(nullptr);

    // Pause the animations
    GetMesh()->bPauseAnims = true;
    if (GetCharacterMovement())
    {
        // Stop and disable movement
        GetCharacterMovement()->StopMovementImmediately();
        GetCharacterMovement()->DisableMovement();
    }


    if (Test == NM_DedicatedServer)
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("bPauseAnims: %s"), GetMesh()->bPauseAnims ? TEXT("true") : TEXT("false")));
    }
}```
heady delta
#

There I replied to thread ๐Ÿ˜„

jolly siren
#

good work, yeah we need more people bringing attention to it

jolly siren
#

nvm those are different skeletal meshes lol

#

I do have this set but I don't see why that would cause issus

#

GetMesh()->MeshComponentUpdateFlag = EMeshComponentUpdateFlag::AlwaysTickPoseAndRefreshBones;

thin stratus
#

Think that's only for the start setting

jolly siren
#

oh I'm looking at it's super shouldtickpose now

#
bool USkinnedMeshComponent::ShouldTickPose() const
{
    return ((MeshComponentUpdateFlag < EMeshComponentUpdateFlag::OnlyTickPoseWhenRendered) || bRecentlyRendered);
}```
#

I set it to AlwaysTickPoseAndRefreshBones because I want the animations to still run on the server for clients that aren't being rendered

#

but still

#

it is an and in USkeletalMeshComponent

#

return (Super::ShouldTickPose() && IsRegistered() && AnimScriptInstance && !bAutonomousTickPose && !bPauseAnims && GetWorld()->AreActorsInitialized() && !bNoSkeletonUpdate && !bAlreadyTickedThisFrame);

#

so that shouldn't matter

thin stratus
#

The parent might return true

#

but the pause anims should be false

jolly siren
#

yeah that's what I'm saying

#

so that's not it

thin stratus
#

Are you 1000000% sure that the mesh you check the bool in is the one that still ticks?

jolly siren
#

needed to walk away for a couple minutes to get a fresher perspective. going to look at it again

carmine parcel
#

Hey I am still quite new to replication so I'd be very happy if someone could help me with an issue.

#

I move my characters spine with a transform bone animation node as seen here: http://puu.sh/sNswQ/a814a010ec.jpg but when I run for multiple players only the host can see other peoples bone transform

jolly siren
#

@thin stratus so it looks like it isn't ticking for CharacterMesh0 which is the mesh in question. But the animations are still playing on the server. So confused

#

damn thought I had it

#
    GetMesh()->bNoSkeletonUpdate = true;```
#

that visually stops the animation on the server now

#

but the notifies are still getting hit somehow

#

strange

#

the notifies are only getting hit on the server

#

hmm there is a Montage_Pause

#
    GetMesh()->bPauseAnims = true;
    GetMesh()->AnimScriptInstance->Montage_Pause();```
#

this looks to work

#

montages must work differently? the montage still paused fine on the clients, but not on the server with bPauseAnims

#

so that is still weird to me

heady delta
#

@jolly siren go into your character, click the skel mesh, scroll down to skel mesh section above optimization

#

go to mesh component update flag

#

try setting it to always tick pose and refresh bone transforms

jolly siren
#

that's what it is

heady delta
#

๐Ÿ˜ฆ

jolly siren
#

calling Montage_Pause fixes the issue tho

#

along with bPauseAnims

#

I guess montages work a little different

heady delta
#

huh

#

I think I did that flag thing to fix a problem I had where the dedicated server was screwing up my hitboxes because of animations not working properly

#

like shoot a guy in the head would return the wall behind him lol

jolly siren
#

yeah I've had that set for a long time

#

GetMesh()->MeshComponentUpdateFlag = EMeshComponentUpdateFlag::AlwaysTickPoseAndRefreshBones;

#

because i want animations to run on the server even if they aren't being rendered

heady delta
#

ye need that

#

oh that's a vague question, I was going to get a general opinion of people who play shooters. the capsule style hitboxes epic skeletons have vs replacing them with more generous box shapes like source engine

#

I find the more accurate capsule shapes tend to make picking shots and getting a "feel" for the aim a bit less consistent

#

idk though

fresh saddle
#

Does Spawn Actor from Class automatically replicate the spawn actor?

fossil spoke
#

The Actor must be Spawned on the Server and have bReplicates set to true

fresh saddle
#

Hmm.. odd.. i did that.. although doesn't always work

#

Like it works
Then it doesnt

#

Back to the drawing board :D

fossil spoke
#

Can you explain further?

#

How does it work but then doesnt?

#

Makes no sense

fresh saddle
#

Sorry, I wasn't going to delve into my issue. Basically the player picks up a non existent item (i call spawn item on the server with no parent) then do some local add impulse from the player onto the newly spawned object (reference was passed by the server). Works perfectly in editor. On a packaged build the ball sometimes spawns, sometimes doesnt but when it does, it wigs out and doesnt impulse

night jay
#

@carmine parcel make an event which runs on multicast that does the transform animation node

#

Make sure that event is called on the server though

keen frigate
#

Does anybody here know about an obvious way to use Player-Specific UMG UI in a local multiplayer splitscreen situation? It doesn't scale to the player's part of the screen.

I researched google & forums and there is not that much ot there. What's out there indicates that there is no solution for this inside the engine out of the box. Correct, or am I missing something?

pliant obsidian
#

Is there a way to test multiplayer in editor with different IP addresses?

compact gulch
#

i'm facing a veyr werid multiplayer issue

#

apparently one of my replicated actor play some soudn when it enters the world

#

however, the funny thing is that, for some player the sound only play when they first 'SEE' the actor

#

any idea why

#

i am pretty sure it have to do with network relevancy... but the funny thing is that everytime it becomes relevant again the soudn will play again

#

i don't suppose BeingPlay recycles itself right?

thorn merlin
#

if they become relevant, they are technically constructed on that client at that moment and the begin play fires

#

so is it being fired in the begin play? is the sound set to auto play?

fringe dove
#

@compact gulch are you using network distance culling? if so begin play will fire each time they come in and out of range and begin getting replicated again, unless it is a placed actor (placed on map with net load on client checked, rather than spawned at runtime)

compact gulch
#

@fringe dove @thorn merlin you guys are right... everytime it comes into relevancy BeginPlay fires again... this is something new

knotty frost
#

Anyone know why the blueprint event for NetworkError loops? for instance, if I lose connection to the host NetworkError is called endlessly informing me of that

thin stratus
#

It shouldn't

#

I have them both setup and they call once per error

knotty frost
#

weird, I wonder if its because I call Destroy Session in that event?

thin stratus
#

Could be

knotty frost
thin stratus
#

Make sure to only call that stuff if ti's not the server

#

Otherwise you kill the server when someone has an error

#

The passed bool exists for a reason :x

knotty frost
#

good catch, fixed that

#

hm ok, destroy session didnt seem to be the issue

thin stratus
#

Hm

knotty frost
#

not sure if this is the correct way of going about it but since I cant pinpoint why its an infinite loop (might be due to standalone testing) this is my workaround http://i.imgur.com/zCrX7jU.png

dawn linden
#

Did anything major with Steamworks break between UE 4.13 and 4.14? Having issues with fetching name, setting stats and updating achievement progress. No issues with our Oculus platform build. Recreated ini but still no luck.

dawn linden
#

Looks like we tracked down issue. Getting one of the Steam stats seems to be crashing the Steamworks subsystem. Removed that node and all is working again.

twin juniper
#

how do match states work in matchmaking?

#

can u use rpcs in matchamking?

twin juniper
#

.-.

brittle sinew
#

What do you mean by that? If a client is connected to a server within UE4, then yes

#

But if you're doing the actual matchmaking and not using Steam or something else, you'd have to most likely build your own web API

rough iron
#

@twin juniper using beacons you can add your own communication between clients in your matchmaking process. Not from BP though. It may also require some deep knowledge about the beacon system.

shy geyser
#

is there a way to create automated tests to simulate player input from multiple clients?

cyan bane
#

If a client has a ping of 50ms, that means physics objects are simulating and displayed 50ms in the past, as there's no interpolation, right?

#

But that's not the case for characters?

elder ice
#

xPost from ue-blueprint: Anyone know how UE4 determines what camera a PlayerPawn will use? I have a pawn with a CameraComponent, but for whatever reason when my player joins a game and the pawn is created the camera is placed at 0,0,0 (inside my level.)

#

I've got a two client setup where one is a listen server and whenever P2 joins, P2's camera doesn't use the camera component on P2's Player Pawn actor.

golden granite
#

You might have auto assume camera set in player controller. Also, you can assign camera with set view target with blend

kind magnet
#

Are you positive the camera is spawning at 0 0 0 or is the player spawning at 0 0 0?

thorn merlin
#

some sample blueprints dont assign a default pawn, but have pawns placed in the world with auto assign controller to 0, so in a mp scenario that falls apart

#

(i think the vehicle demo has this problem, or at least it did)

#

the only other thing could be a collision issue - it sucks but you really gotta pull it apart to figure out whats going on

thin stratus
#

Or he simply doesn't possess the pawn

#

Which leaves the PlayerController at 0,0,0

#

Aka the cameramanager aka the camera

night jay
#

@keen frigate Try tthe "add to player screen" node instead of the "add to viewport" node.

#

@cyan bane pretty sure simulated physics don't replicate

keen frigate
#

@night jay yes! thank you, my lifesaver ๐Ÿ˜ƒ

twin juniper
#

hey guys in matchmaking with steam, what happens if the host crashes?

#

is there any way to setup a host switching system

#

where if one host leaves the game

#

another player takes over?

#

like in call of duty

#

host migration?

brittle sinew
#

You could probably implement some way to serialize all important data and send it over to another client, though I'm not exactly sure of a way to do it if the host crashes. COD most likely has some sort of master server that handles that, though that's just speculation on my part

twin juniper
#

thats basically how you would handle ddosers tho

#

if someone ddos's the host

#

migrate to a new host

fierce birch
#

migration makes a lot of sense otherwise too

#

if host just rage quits when losing etc

brittle sinew
#

Ok, yeah, it's just when an actual crash occurs it's probably different, since once you don't have a host not much you can do from it

twin juniper
#

so like

#

is it automatic?

#

or do i need to setup some ground work

brittle sinew
#

You would have to do most of it on your own most likely

fierce birch
#

well, for that to work, you'd need to have all clients to have the same data as host

#

or some other place

#

and if it's some other place, why would player even host the game in the first place?

brittle sinew
#

It's a lot easier to host a simple web API than a game ๐Ÿ˜›

#

A master server that updates every so often that just pulls data from the host might be possible

#

You would have to set up your GameMode in a way that it can take in parameters to set up a game in progress based on them, and set up a way for everyone to get a new IP/session

night jay
#

Sad to see simple host migration to not be implemented natively though

twin juniper
#

^

brittle sinew
#

Well, it would most likely be pretty difficult to support that out of the box

#

You would have to make sure that people are assigned to the right PCs, that possess the right pawns with the right parameters, make sure nothing in the level/game is dependent on the game starting normally, etc

twin juniper
#

Could someone link me to a tutorial on Beacons? and what they are for

cyan bane
#

@night jay Simulated physics do replicate, if you set their movement to replicate. It'll simulate on clients and correct location using data from the server.

#

Problem is it jitters (the worse the ping the worse the jitter) because it's old information.

lapis quarry
#

Hey guys! I'm having massive netlag on the client side when I play in editor. I'm using New Editor Window and 2 players. So one is server and one client.
But the client is more or less unplayable. If I launch the game on two different computers it works just fine. It's just when I play two at the same time in the editor this happens. Anyone else had this issue?

severe widget
#

If you're sure that it's not frame lag, and is indeed netlag, you may have entered the command to simulate netlag.

lapis quarry
#

Yup, it's indeed netlag. A lot of rubberbanding. Don't think I've entered any command to simulate netlag by accident, but I'll check it out.

thorn merlin
#

@lapis quarry whats your servers cpu like? i get that if my physics is being starved on the server

glacial goblet
#

Have a timer on server and "SecondsRemaining" variable, which I cannot replicate, because it's inside a struct, which is inside TMap(which is not replicatable in UE as I know). Any ideas on how to send this variable to the client each tick of timer?

fossil spoke
#

Replicate it through the GameState

glacial goblet
#

@fossil spoke And how can I do this? TMap is inside ActorComponent, which is inside a PlayerState, but TMap on server and on client are different. And I should get this variable in UMG widget.

fossil spoke
#

Why would you hold it inside a TMap?

glacial goblet
#

@fossil spoke Because it works faster than TArray.

fossil spoke
#

Well you have a problem then your TMap cannot be replicated so you need to pass it into a replicated variable first to be able to replicate it

glacial goblet
#

@fossil spoke I tried to mirror data to TArray on each timer tick(which is not good, but for testing purposes is fine), but got the same error, like when I tried to replicate TMap - something like PropertyMap.cpp deprecated code 404 line...

#

Don't know why, because I didn't set Replicated to TMap in UProperty, when I tested this

fossil spoke
#

Is the TMap just holding the SecondsRemaining?

glacial goblet
#

No

#

As I said previously, it holds a lot of data and seconds remaining is inside one of struct

fossil spoke
#

Im assuming these are Timed Events or Quests or something?

glacial goblet
#

Something like that

fossil spoke
#

You probably want to replicate all the data in the Struct as well yes?

knotty frost
#
SteamFriendsPtr->GetFriendRichPresence(SteamPlayerId,"Joinable")```
glacial goblet
#

@fossil spoke No, not necessary

#

System works fine without this

#

All important code runs on server. Basically I just need this variable for UI only

#

and only this variable at this moment

fossil spoke
#

Just have a proxy variable on the gamestate thats sole job is to present the replicated value to clients

glacial goblet
#

@fossil spoke I really don't want to make a links between my ActorComponent and GameState. And I can have unlimited(in theory) number of this(SecondsRemaining) variables, because it's TMap, which means that it can contain a lot of entities. So we're returning to TArray, which didn't worked in a last test. Probably, I will try it in a different way tomorrow... Thanks for help anyway.

wise depot
#

Hey guys have any of you used the Http request stuff? I can't seem to get mine working right

thorn merlin
#

in c++?

wise depot
#

I see you too found Rama's post from the Sagittarius Link Client? ๐Ÿ˜›

#

yeah thanks for the example though! my stuff looks pretty identicle to yours barring mine is GET not POST. can't seem to get it working though -.-

thorn merlin
#

thats probably where i learned it back in the day yea, back then i think he had the only real MP examples out there

#

where/how is ti failing?

#

maybe try switching yours to a post to see if it works

wise depot
#

if (Http->IsHttpEnabled()) { OnFailure.Broadcast("Http disabled"); return; }

#

apparantly http is disabled

#

using an asynchronous blueprint function if you're wondering about the proxy stuff

#

but essentially the order of operations starts at Activate()

#

@thorn merlin any ideas?

thorn merlin
#

i think you want a whack in there

#

oh nm

#

i dont have time to get into this mindspace but perhaps its your device? does this have same behavior on other machines?

wise depot
#

i'm such an idiot -.-

#

if(http->IsEnabled) fail.

opposed to !http->IsEnabled

thorn merlin
#

i thought thats what it was but i quickly doubted that thought because i quickly eyeballed your code

#

i do that alllll the time, i have a similar situation tho when trying to get tcp sockets but it actually DOES fail, but I think its because the engine is already using the one i want to work with

#

(trying to do a hacky NAT punch on android)

wise depot
#

it was actually still failing after i fixed that, turns out there's some stuff that's meant to be in Project/Saved/Config/Engine.ini that wasn't there. so i've added it to that wiki page

#

now if only i could figure out what was responsible for populating the default Engine.ini file

knotty frost
#

Has anyone here worked with the IOnlinePresence interface?

#

It looks like steam supports RichPresenceData but IOnlinePresence doesn't support key/value pairs, just updating the status key

knotty frost
#

This works using delegates for create, start, end, destroy, join session events.

ISteamFriends* SteamFriendsInt = SteamFriends();
if (SteamFriendsInt != nullptr)
{
    if (!SteamFriendsInt->SetRichPresence("Joinable", "true"))
    {
        UE_LOG(LogOnline, Log, TEXT("SetRichPresence failed"));
    }
}
unique patio
#

Somehow this spawns my controllers perfectly on the server, but the clients does not get any controllers.

#

the clients does see the servercontrolled pawns controller. but they dont get their own.

fringe dove
#

I want a server to spawn players with a different replicated variable when connecting in VR vs 2d; so far the only way I've found is to add an IsVREnabled parameter to the join session URL, then have a map in GameMode that maps UniqueNetId to IsVREnabled, and set the value of mapping during PreLogin, where you have access to the URL parameters. Then in PostLogin, where you no longer have access to those parameters, look up the UniqueNetID from the player controller, and check the the map setting before spawning.

#

and even then, when spawning, the variable might not get replicated before begin play on clients?

#

is there a simpler way?

#

I'd imagine you'd need something similar if a client wanted to connect as a spectator; is there already an example of that somewhere that does things right way, and plays nice with all the GameFramework stuff?

golden granite
#

@unique patio You're not giving anything to client, you're only giving client references. Replicating just means client can see the changes made to the server object, but they still don't have their own.

#

You have to create on client.

unique patio
#

Okay, do basicly a multicast and spawn/attach. But how do i replicate it to the other clients. Multicast and then send references and let the other clients attach the same objects?

thin stratus
#

Non replicated objects can't be passed

#

If you have non replicated objects, you need to create them on the client side too

#

However If the object is replicated, you can pass it

#

Replicated actors, spawned on the server, will also spawn on clients

unique patio
#

The actors are replicated by flag.. but somehow just flagging for replication does not replicate the actors...

thin stratus
#

It should though

unique patio
#

Yeah.. but it doesnt :/

#

If i client spawns a actor with replication flagged it does not replicate :(

thin stratus
#

Yeah i just wrote the server needs to spawn it

#

Clients do not have authority

#

Otherwise cheating would be an easy thing, right? :P

unique patio
#

Yeah but even if i do if auth -> run on server. It doesnt spawn anything but the servercontrolled pawn

thin stratus
#

Authority IS the server

#

Remote is the client

#

If Authority gets called, you are already on the server

unique patio
#

Okey so i should just do begin play and do a run on server event where i spawn and attach?

thin stratus
#

Begin Play in which actor?

unique patio
#

Every pawn

thin stratus
#

Didn't read the original problem

#

Are you spawning a weapon?

unique patio
#

Not really. But same thing. Motion controllers

thin stratus
#

Oh, you are from the forums

#

Or?

#

Read someone similar today

#

Anyway

#

You would use BeginPlax

unique patio
#

I got the transforms replication working perfectly though

thin stratus
#

y

#

Switch has Authority

#

Use the authority exec

#

And spawn the controllers from there

#

If they are set to replicate, they should spawn for the client too

unique patio
#

Yeah.. i thought so aswell

#

Haha

#

But they dont ๐Ÿ˜‚

#

I gotta head to bed.. but thanks exi and ben!

#

Ill keep trying it in a fresh project

brittle slate
#

anybody have an issue getting a game instance in a widget? it doesnt seem to be appearing o.o

golden granite
#

I noticed this is on event play. is it possible it's performing multicast before all clients are connected? @unique patio

thin stratus
#

He should not need to multicast

#

Player Joins, Character gets spawned, Beginplay, limited to server, spawns replicated controller actors

thorn merlin
#

@unique patio people always balk at me when I suggest this, but the best way to learn how to attach things in multiplayer right now is the multi vehicle turret asset on the marketplace

#

thats not my asset btw, i just bought it to solve this problem, its nothing complicated, you just have to do it a certain order

rugged radish
#

Anyone know how to make a multiplayer menu?

boreal bay
#

ue4 cant do direct peer to peer can it, for mobile

thin stratus
#

@boreal bay Nope, no P2P build in afaik

#

@rugged radish A multiplayer Menu?

#

Like, host join, stuff?

rugged radish
#

yes

thin stratus
#

Boy, you should be able to find Youtube Tutorials about this

#

Multiplayer Shootout (Epics Learn Resource on the Launcher) should have one

#

ShooterGame has one

#

And even the Video Tutorial of Epic about the Lobby has one

#

Although i don't like that tutorial series cause of the mistakes in it

thorn merlin
#

the epic recent epic one had far too much umg and other things getting in the way of the multiplayer stuff

#

i cant wait till @summer rivet does a refined WTF and HTF multiplayer series

summer rivet
#

I wish @thin stratus would do a series on them he has that stuff down pat ๐Ÿ˜ƒ

thin stratus
#

Wouldn't I be a bit stupid to cover the stuff my Marketplace project offers in a tutorial? :P

#

A Menu and a Lobby will always have a lot of UMG in it @thorn merlin

#

But I agree, a basic Multiplayer Series would also help

#

But then you can also just read the PDF

#

Since that's the same information i nthe end

thorn merlin
#

well.. im not sure what i mean.. it just that last epic tutorial seemed to be doing too much to really refine out the actual MP education

#

the zak perrish content is what i learned on, that was perfect and i wish was iterated and expanded on

#

ill prob buy your marketplace thing in the future, you learn so much pulling apart someone elses work, im still digging through generic shooter like crazy and finding gems

thin stratus
#

My Project is also UMG heavy

#

There is a lot of stuff happening in the UMG

#

But of course also in the actual Replication process

#

So, yeah, you might be able to learn a lot from my project

#

Although that wasn't really the idea behind it, as it's more about providing you with a good lobby solution

#

Despite that, a basic tutorial about replication in a gameplay scenario might be worth more

dense citrus
#

Who knows why my Character is jittering in MP but not in local?

meager walrus
thin stratus
#

@dense citrus You are probably setting the location via the server only

#

And not also on the owning client

#

So client and server fight about the position

vestal cobalt
#

im trying to host a game and then on the second client im trying to get the server up in the server list on "Find Server" (using Advanced Sessions plugin) it find's the server but it fail's to fetch "Extra Settings" -> ServerName and fires off the "Not Found" execute pin -.-

thin stratus
#

@meager walrus Yo, this is an Ownership question

#

Check the docs or my pdf and look into ownership

#

It should feature tables that show how RPCs are handled on specific actors while they are called from owning client, non owning client or server

#

So basically what you are asking

#

@vestal cobalt You should ask the plugin creator :/

vestal cobalt
#

it's just a coding error not a plugin failure but i can't f'in find it -.- been looking over the code for hours now and fail searching everything

thin stratus
#

Settings are passed in the create session node

#

Make sure it's named the same

#

Other than that, no idea without seeing the code

vestal cobalt
#

it is i've copied it directly from create session

thin stratus
#

Are the other settings working?

vestal cobalt
#

well it fail's on the ServerName and that is the first node so it wont get any further as you can see, only if the extra setting is found it will execute the next one

thin stratus
#

Try retrieving a different one

#

Wanna know if only the servername fails or all

#

Also you are testing this on lan and not on steam with 480 appid or?

vestal cobalt
#

tested now, it fail's on the next one aswell (Map not found)

#

im testing this with steam yea

#

steam is working

thin stratus
#

480 appid?

vestal cobalt
#

ye

thin stratus
#

You could end up retrieving other 480 sessions

#

That don't belong to your game

#

Also I'm not sure if steam doesn't have special setting names you need to use

#

Please try it on lan first

vestal cobalt
#

i have gotten this to work befor (sadly i lost the project) -.-

dense citrus
#

Good morning everybody on ETZ ;)

#

@thin stratus also my jittering is only on client side visible, everybody see the next one without jittering :) but how I can set it right ?

eternal quiver
#

Hey, guys. Would it be possible to make a 100-200 player FPS in UE? I know, I know, completely impractical for me to do on my own, I'm more curious as to how it would be done than anything else. My theory is low level socket programming and a custom back end program to handle the sockets and data transfer? Would that be how you would handle it?

stiff wasp
#

@mokilok You'd have to create your own networking solution. UE4's networking is not optimized for large player counts

heady delta
#

with 4.14 and really basic collision geometry in your level you might get close though

vestal cobalt
#

guys

#

to test multiplayer with steam is it possible to just to into the project, right click the project file and "Launch Game" 2 times, wouldn't that be like 2 completely seperate instance's?

thin stratus
#

Yes, that are 2 different instances

#

but Steam doesn't allow the game twice on the same PC

#

@eternal quiver @stiff wasp @heady delta What I read the past months, and don't quote me on that, is that the 200 movement components of the character have the biggest impact. You might be able to get 200 people on a server if you fight the bottlenecks

#

@dense citrus That adds to me idea of you setting the Location somewhere on the Server.
Do you have a point in your code where you call a ServerRPC and pass it a Vector to set the Location on the Server side?

vestal cobalt
#

so i have to test it on to seperate computers with 2 diff steam accounts? _.-

#

-.- *

#

my VMware is flipping out and not helping -.-

#

so i can't test it there

thin stratus
#

Correct

#

If you are a single developer, it's a pain

#

If you have teammates, make sure your stuff is setup to fastly share client builds

vestal cobalt
#

im trying to update (Windows Update) on the VMware but it get's stuck on 9% -.-

#

oh NOW it suddenly jumps up to 45% -.-

thin stratus
#

I'm not sure if you can manage to give your VMware enough resources to actually launch your game properly

#

But give it a shot

vestal cobalt
#

i've given it 8Gb memory more then that i cannot set

#

it uses default video card, cpu and so on

#

if i remember correctly i have used VMware befor and tested sucsessfuly

dense citrus
#

@thin stratus MmH hard to say , I have only couch jump run walk and the pitch for aimoffset replicated :) but didn't know is this right

thin stratus
#

As I said, if you set the Location of the Character by hand somewhere

#

Then this might be the place where it goes bonkers

vestal cobalt
#

@thin stratus now i've tested it with 2 computers and 2 steam account's and i can't "Find Server" -.-

dense citrus
#

@vestal cobalt try to increase the numbers how much sessions you will can find like 1000 it should help

vestal cobalt
#

i have it 1000 xD

dense citrus
#

@vestal cobalt ok funny

vestal cobalt
#

it somehow can't find the "Extra Settings -> ServerName".... so it fails

thin stratus
#

Well, I stay with my idea of 480 being a bad thing to test Session finding with

#

Try it on 2 pcs with LAN

#

If that works, then I'm kinda sure that you are just retrieving tons of other sessions that don'T belong to your game with the 480 appid

#

You can even check your logs

vestal cobalt
#

ok i tested it on LAN and it's on lan i get the "Server Name NOT FOUND" -.- so atleast it find's the server on LAN but it can't get the "Extra Settings -> ServerName" :S

#

i have double, tripple checked the key name it's "ServerName" :S

thin stratus
#

Hm, at this point I don't know anymore. If also all other keys fail

#

Then it might be something with the plugin

#

:/

vestal cobalt
#

that's weird cause as stated earlier i have gotten it to work befor

dense citrus
#

@vestal cobalt are you working with advanced session plugin

#

?

vestal cobalt
#

ye

dense citrus
#

@vestal cobalt ok moment i will send you a pic as an example like i do it always

vestal cobalt
#

kk ty

#

i have done it befor, but for some reason it fails now -.- if only i had my old project....

dense citrus
#

Is it possible to forbid my animation BP auto replication?

#

So that don't even try to send information to server

thin stratus
#

Your AnimBP shouldn't replicate or?

#

It mostly checks the variables it as locally

#

So if you don't replicate the variable, such as "crouching" it shouldn't do stuff

dense citrus
#

Who knows to get the Steam name into a Game ?

wet shore
#

Has anyone here ever gotten LateJoinInPie experimental feature to work? Would be super usefull

night jay
#

@dense citrus get player name variable in playerstate. If you use Steam it'll automatically return the Steam name.

dense citrus
#

Ahh ok thanks

#

One other question , how I can set up the voice over ip ;) is this complicated

unique patio
#

Damn i lost the link to @thin stratus PDF... does anyone have it?

#

Nvm it was pinned ๐Ÿ˜ƒ

unique patio
#

Btw when im spawning something and i use the player controller (not server) as "owner" it means that the controller itself has authority?

if i leave it empty, its default server Authority?

thin stratus
#

If you spawn something not from the server, the whole logic fails already

#

Server has authority. He spawns the replicated actors

#

If a client does it, it will only exist locally

#

@unique patio

#

@dense citrus If the plugin doesn't support it, then voip would require c++ afaik

dense citrus
#

it support itbut donยดt know right now how to set it up

#

๐Ÿ˜‰

thin stratus
#

Hm, sadly never used the plugin. Doesn't he have a tutorial

dense citrus
#

Nope

green berry
#

I asked this in #blueprints too:

#

[11:36 AM] MrCheese: I'm setting my player name before starting/connecting to a server. Once I'm in MP, I can't get the name to work properly.
[11:36 AM] MrCheese: I've tested the replication thing on 3rd person template, it works and I get it.
[11:37 AM] MrCheese: But getting the names to come from BST (Before Server Time) seems impossible
[11:38 AM] MrCheese: I don't even know why I'm getting a new PlayerState, I was sure that was the right place to put everything.
[11:38 AM] MrCheese: Any clues?

#

I'm going mad now. Been up all night and nothing I've tried gets all the names right

thin stratus
#

Ok, so there is no place to actually give the Server the Name while connecting

#

Unless you use Steam or something, that handles it for the PlayerName variable, back in C++

#

If you don't use steam, you simply need to store the Username, before connecting, in the GameInstance or SaveGame

#

And after connecting, you use the PlayerState BeginPlay (Authority) to go over to the owning Client (RPC), ask him for the PlayerName he saved and then going back to the Server (RPC) and letting him set a replicated variables

#

It's actually pretty straight forward

green berry
#

I don't seem to be able to do that

#

I'm getting the names back out of the instance ok now, but I'm not sure how to set the names back to the clients

#

I'm currently in the player controller and have a replicated variable with the correct name in it

#

I'm now stuck getting it one the pawns

#

on^

#

It looks like I am now getting the correct names on to the pawn, in to the TempName

#

But the replication isn't going

thin stratus
#

No this is not how you do that :P

#

Show me the PlayerState part where you get and set the var

green berry
#

Weird, it was an example that worked in a 3rd person template test

#

Then it calls the Update Avatar call from the previous screenshot

dense citrus
#

Really complicated system for get player names ;) or what is your plan

green berry
#

I couldn't get them to persist when I connected to a MP session any other way than saving the name in the instance and getting it back.

#

I'm probably missing something, but my Google-Fu failed to find anything

#

Once I get my head around how this works, rather than me just messing about with trial and error, I'm sure it'll be fine

#

I see there is a pinned PDF guide, I'm going to read that.

#

Thanks @thin stratus ๐Ÿ˜ƒ

thin stratus
#

In PlayerState->BeginPlay->SwitchHasAuthority->AuthorityExec->CustomEvent RunOnOwningClient (GetPlayerName)

In PlayerState->GetPlayerName(custom event)->GetGameInstance->CustomEvent RunOnServer (PassPlayerName) with StringInput

InPlayerState->PassPlayerName->SetReplicated PlayerName Variable

The replicated Variable should be RepNotify. In the RepNotify function, set the TextRenderer

green berry
#

Thanks, that makes sense. Is there an easy answer as to why my solution wasn't working?

thin stratus
#

CallUpdate is not going back to the Server

#

Delays are not a thing if you want to properly code networking

#

Only because it works with a delay, doesn't mean a lag won't break it again

green berry
#

Ok, I think I understand

thin stratus
#

UpdateAvatar das the exact same thing, despite setting the Variable as the Server

green berry
#

Yeah, the delay was temporary

thin stratus
#

that doesn't, at all, make sure that the variable is actually replicated when you call the Client path

#

That's what the RepNotify is for

green berry
#

Along with all those extra connections, I have to print everything to a string to see if it works because it's quicker than building and looking to two HMDs ๐Ÿ˜ƒ

#

Nice, thanks

#

@thin stratus Nope, I'm a dumbass. The RepNotify variable should be on the pawn, yeah?

thin stratus
#

You could use the Pawn, yes. You coul also place it on the PlayerState and get the Pawn inside of the function

green berry
#

Either waay, I'm not hitting the right pawn ๐Ÿ˜„

thin stratus
#

In the PlayerState

#

GetController

#

And GetControlledPawn from it

#

If GetController in the PlayerState doesn'T exit

#

try GetOwner

#

and cast it to controller

#

Using a 3D widget instead of a text render would make things a bit easier

#

Then you don't need the RepNotify stuff

#

You would simply create the 3D widget in the Pawn

#

And pass it the PlayerState reference

#

That one then binds the name to the text your setup

#

So if you change the PlayerName variable

#

the binding would update

green berry
#

Yeah, good point

thin stratus
#

There are probably tons of other ways, way better ways, but in the end, having it working is the base point you need to reach

green berry
#

I'm casting to my Pawn in PassPlayerName, the client pawn is still getting the server name

dull river
#

ive just started setting up my networked game, however all client pawns are invisible to the server

#

i can see none of the components from the server

#

i know about replication functions/events

#

but how do i show the pawn/character components by default?

wise depot
#

hey guys, so there's some event in the game instance for network errors (can't remember offhand)

ever since upgrading to 4.11.2 our game also goes back to the entry map on network errors which we've never put as part of the handling events for that, any ideas why this happens now?

#

@dull river are the actors/pawns/components all marked for replication? and is the server spawning all of them?

compact oyster
#

you have to mark them as replicated/repnotify yourself

green berry
#

@thin stratus I haven't been able to cast to the locally controlled pawn. It's exactly the same problem I had before ๐Ÿ˜ฆ

thin stratus
#

PassPlayerName needs to be a ServerRPC

#

You want to give the Server the Name

#

And don't use "GetPlayerController0"

#

As this gives you the Server one

green berry
#

Yerah, I noticed right after the screenshot

thin stratus
#

You need the one that controls the PlayerState

#

Use GetOwner

#

And cast it to the PlayerController

green berry
#

Done

#

Do I cast to the pawn from there?

thin stratus
#

GetControlledPawn

#

And the ncast ot the pawn

#

that should work

green berry
#

It doesn't. I'm beginning to think I do understand, there is just something else is broken.

#

AFAIK The casting fails on the casting is failing on the controlled pawn and working on the other

#

BEcause I put an IsLocallyControlled check on the RepNotify

thin stratus
#

If the Cast fails, and you don't get an AccessViolation error

#

Then your pawn is of the different class

green berry
#

Ok, then there's something I can try...

jolly siren
#

I am spawning a replicated actor on the server via SpawnActorDeferred, setting it's mesh, and then calling FinishSpawningActor. The mesh is not replicated, however I thought that it would spawn with the correct mesh on the clientside, since I'm deferring the spawn on the server until after I set the mesh

#

doesn't seem to be the case

#

So I have to replicate the mesh?

#

Does it just spawn the default version of the actor on the client regardless?

green berry
#

@thin stratus Well, it looks like my pawn possession isn't even happening for the client. Hopefully that's the issue and it's easy to fix

thin stratus
#

Pawn possession should be called once on the server

#

And the Pawn needs to be a repliacted actor of course

#

@jolly siren Afaik, it spawns the default + replicated values

#

And the StaticMeshComponent is not replicated iirc

jolly siren
#

well actors don't have mesh components by default

#

you have to add them, but okay. I was expecting it to create what it had created on the server

green berry
#

@thin stratus As far as I can tell, eveyone has the right pawn and controller class.

#

Still not working and I can see anything wrong

raw wing
#

Sometimes these things just are staring you right in the face.

thin stratus
#

@green berry Which of these casts fail

raw wing
#

Had that problem last night lol.

jolly siren
#

would you guys put killstreak on the character or playerstate?

#

they both feel right

thin stratus
#

PlayerState

#

Or PlayerController as a component

#

The PlayerCharacter can always get destroyed somehow

#

Then the data would be lost

jolly siren
#

right, but killstreak only matters while he is alive

thin stratus
#

Longest killstreak is not a thing?

#

Keeping track of who ended his killstreak or maybe a deathstreak breaker

jolly siren
#

yeah it is, I guess that would be a separate property on the playerstate

thin stratus
#

I would put it onto the PlayerState

jolly siren
#

okay cool, thank you

dull river
#

im using a multicast event to update the materials on a mesh in a bp that isnt the player pawn, yet it doesnt seem to run or do anything

#

any reason why this is?

#

i get the first print (auth) but not the second one (server)

#

(the second one should be multi - but it still doesnt print)

#

i fixed it by putting the server and multicast functions in my character and calling it from the other bp

green berry
#

@thin stratus I'm getting the correct names from my Instance, moving them in to the State is easy enough but it's getting them on to either the controller or pawn that I can't do

#

So at the moment, it doesn't matter whether I'm aiming for the Text or a widget, as far as I can tell

#

.

thin stratus
#

I just guess

#

that you PlayerCharacter

#

isn't yet spawned/possessed

#

when your PlayerState calls the function

#

And if a cast fails

#

then the Owner seems to not be the PlayerController

#

@green berry

#

Print the display name of the Owner you get

green berry
#

I get: controller

#

NULL, sorry

#

So, that's why I tried a delay, for testing

#

If I bind stuff to a key to fetch the name from the State way later, it returns NULL

#

Somehow, I've got the two completely separated

thin stratus
#

Ok how about you trash the text renderer idea

#

And finally use the 3D widget

#

It would make all of this really easy

#

With the 3D Widget, you would simply save the Replicated PlayerName in the PlayerState. Without a repnotify and all that stuff

#

And then you pass the 3D widget the PlayerState (the PlayerCharacter has a Pointer to it)

green berry
#

I don't see how that helps, because my State is not connected to my PawnController

thin stratus
#

and the widget just pulls the name from the PlayerState

green berry
#

That's what it's supposed to do now

#

But I can't get the data out

thin stratus
#

No, you are currently trying to access the Controller and Pawn on beginplay of the PlayerState

#

Where you don't even know if everything is yet spawned and connected

green berry
#

PlayerState sets the name correctly at the begininng though, I can't get that data out at all

#

Even when I try it after I've started playing

thin stratus
#

How can it set it correctly if your cast to the Controller fails

green berry
#

It's getting it from the instance

#

I can set the pre game menus to set it directly to the State, which is easier, but at the moment, that's not what is broken

thin stratus
#

Show me the code again

#

That whole solution is still not ideal

green berry
#

I know, but I've just been concentrating on fixing the broken part, then I can make it efficient

thin stratus
#

It's not about efficient

#

If your Controller and or the Pawn aren't yet fully spawned and connected to the PlayerState

#

it would fail setting the variable

#

The PlayerName variable should sit in the PlayerState itself

#

And then you can access it from outside

#

If you really want to use the TextRenderer

#

then try this:

green berry
#

Sorry, I'm confused

#

I'm not insisting that I use the text renderer

thin stratus
#

But?

#

I mean, then use the 3D Widget and change the logic

green berry
#

I'm saying that the PlayerState has the correct name for the players

thin stratus
#

Yeah of course it has

#

Why would that GameInstance stuff fail

#

the last row of your code fails

#

At least It could