#multiplayer

1 messages Β· Page 399 of 1

twin juniper
#

i have a really really quick question

#

do you have like experience with EC2 configs?

#

or any dedicated hosting stuff

#

cuz i remember you posted a deciated ue4editor.exe line in here earlier just wondering

granite jolt
#

not really. I've done dedicated server stuff before but only minimal

twin juniper
#

im trying to setup my game with amazon aws rn

#

ok

granite jolt
#

yeah I was gonna do that until they tried taking money from my card to authorise me 😦

twin juniper
#

im basically trying to pick the right amazon instance and get it up and running

#

haha

#

jtxp got his working

#

he's not online so i can't ping him yet :X

#

i don't know how he did it lol.

granite jolt
#

I don't know. I just run -server on the editor exe for now until I need something more "online"

#

I know one guy who knows AWS but hes afk atm

twin juniper
#

i will muck around with the settings. thanks.

granite jolt
#

no worries. ill probably come to you for help when I need it πŸ˜„

tawny rivet
#

can i deliberately not replicate what an actor is attached to

#

i have a fps with a viewmodel

#

its multiplayer

#

item needs to attach to viewmodel on client in first person, perspective can be switched to third person and unreal's master/slave skeleton system has strange side effects

#

so far everything works but clients see host's item floating on the camera

#

not in his hand

#

attach should not replicate in this case

hasty adder
#

@twin juniper don’t forget to open the ports in your security settings or nothing will get in

twin juniper
#

the ded server host has to have that 7777 port open right? so if iuse amazon ec2 i have to go to their udp settings and open that one up?

#

on their machine?

hasty adder
#

Yeh

twin juniper
#

kk thx i will remember to do that

reef tinsel
#

@twin juniper yeah, I'll probably do what you say instead

#

just use X and Y

#

thanks a lot

sick orchid
#

hi, I'm new to UE4. I'm trying to follow a youtube tutorial on multiplayer. I'm using the FPS template project and basically I'm stuck right at the beginning: on the editor, I select 2 players and click the Play button, both players connect but only player 2 can move and see the FPS gun mesh (player 1 mesh disappears). it's like player two is stealing player 1's components and meshes or something. I was wondering what configuration I'm missing here. thanks.

versed socket
#

@sick orchid By default, the FPS template makes the arms appear only for the individual player and for nobody else. Since there are no other meshes on the players, you can't see anything.

#

If you want, try adding a Cube or Cylinder mesh to the player character blueprint so that you can see them running around.

sick orchid
#

yeah, I saw that only the owner can see the arms and gun meshes, but in my case, player 1 meshes disappear from his own screen. and also player 1 can't move, so that's why I guessed player 2 was "stealing" player 1's components.

hasty adder
#

There is a livestream on replication you may want to watch from epic

versed socket
#

Yeah - the reason why it looks like the other guy can't move is because of "Replication", which just means that even though you are moving and the server is aware of it... the server isn't letting everybody else know.

hasty adder
#

I think that’s the obe

sick orchid
#

thanks guys, I'll watch the video

oblique garden
#

Hey all, is there a reason I can't find the "switch has authority" node in 4.19?

#

Or can it just not be used inside an actor component?

tawny parcel
#

Curious, anyone know the difference in network efficiency for using these two nodes on a multicast through Gamestate?

severe widget
#

Can you not do the entire array in one go?

#

Can't speak for which is better as I don't know and I don't have a test for that set up

twin juniper
#

@oblique garden It can't be used inside an actor component, so I made my own ActorComponentMacroLibrary where you can "get owner->has authority"

#

Or if you don't need to repeat it very often, you can just do that without the macro

#

@tawny parcel The total packet size should be the same, but it's never a good idea to call a multicast on a forloop

severe widget
#

I'd think the loop case would result in overall more data

twin juniper
#

Yeah, and processing time

severe widget
#

payload size, yes that'd be the same

#

See I was going to say that

twin juniper
#

@tawny parcel Why are you passing each string independently and not just as an array?

severe widget
#

but they're strings so it might have to batch anyway

#

(i asked that lol)

wary willow
#

Just send the whole array over

#

in one go

#

but tbh...there's no reason why you need to do what you do

#

in a Multi

#

Seems more like a job for a RepNotify

#

Or just a replicated value

#

Especially so, since it's in GS

twin juniper
#

@wary willow That depends entirely how often it needs to update, and if it's Join In Progress logic or just a one off

wary willow
#

If you want clients to know of the change, just tell them individually

mystic field
#

Trying to build a dedicated server, getting an "Failed to produce item" error on WmfMedia.lib when trying to make a x64 package for the game. Source engine was built with VS2017. Any known solution for this other than rebuilding the engine with VS2015?

wary willow
#

I don't disagree necessarily, usecases will vary of course.

twin juniper
#

@mystic field I had to sadly revert to 2015 for unknown reasons...

#

Engine kept recompiling every time I built the project

wary willow
#

But if we looked hard enough, we would probably see the 5 pins vs 1 to be more costly

mystic field
#

Hell, I've uninstalled 2015 just some hours ago

twin juniper
#

I feel your pain

#

Not saying it will solve your issue though

wary willow
#

I never updated past 2015

#

everything works

twin juniper
#

VSCode is awesome

wary willow
#

If it's ain't broke, don't fix it

mystic field
#

Yeah a quick google search shows that others have the same issue and report that building with 2015 resolves it

twin juniper
#

And supported

wary willow
#

Haven't tried out VSCode yet but I have heard good things

tawny parcel
#

It was mostly a hypothetical question just for my knowledge in the future. Im working on my leaderboard and just making sure network traffic isn’t hogged. Aiming fr the 100 person game size so I wanted to verify the most efficient way of replicating it. I believe it is better to send as much as you can in one packet as possible vs sending tiny amounts of updates (within reason ofc).

#

While at the same time, keeping code clean and simple

copper portal
#

@twin juniper ok so how do I make the name tags work. I used the struct but it wouldnt work

twin juniper
#

hey egg, working on a dedicated server thing rn

copper portal
#

k

twin juniper
#

i will try to be on a little later. i am sure someone else can help you in here. did you watch that multiplayer tut?

copper portal
#

the guy made the struct and then went onto main menu so there isnt anything else to watch. If there is a specific episode I have to look at, then link it to me pls

copper portal
#

@twin juniper

twin juniper
#

?

copper portal
#

the guy made the struct and then went onto main menu so there isnt anything else to watch. If there is a specific episode I have to look at, then link it to me pls

twin juniper
#

yeah he starts talking about the player settings struct in about the 9th video, i looked a moment ago but there's a ton of detail in there and im working on a dedicated server right now so i would unfortunately lose productivity if i looked at it right now but someone else can help, all right? i will try to be on a bit later.

copper portal
#

its not helping that much

versed socket
#

@copper portal What I do in my project is, instead of storing array index I just use an array of PS references themselvesv

#

Besides, if a player quits and another player rejoins later, then that Player Array will get shuffled around and then your index method you described could break.

copper portal
#

wym

#

I get an array of player states?

#

@versed socket

versed socket
#

Yeah, an array of player states

copper portal
#

how can I make that array?

versed socket
#

Maybe I'm misunderstanding what you're doing

copper portal
#

I want to make nametags with each player's names on them and everybody can see them

versed socket
#

The way that I do this is by making an array of Player State object rerferences and then using that array as the list of people who are currently in the lobby or on the given team or what-have-you

copper portal
#

is the player state array a var?

#

@versed socket

versed socket
#

You make your own array and then you change the type of the array to PlayerState

copper portal
#

like a var or the make array node

#

@versed socket

versed socket
#

A var

copper portal
#

in my character bp?

versed socket
#

In the place where you need to keep track of that stuff

copper portal
#

I dont really have a place

#

and do I need a struct?

versed socket
#

There's never one single way to do something, programming-wise

#

So "need" is the wrong word

#

You can do it however you want

copper portal
#

do I want a struct?

#

xD

versed socket
#

I'm just telling you about how I do a similar thing

#

Look -- you need to figure out which players are relevant

#

So you need a way to keep track of that

#

The way you keep track of it is by making a variable that is an array of PlayerState references

#

And you fill the array with the ones that you care about

#

So you can save it for later use

#

If all you care about using is just the list of all players in the server, then you can just do the GetGameState()->GetPlayerArray() or whatever it's called

copper portal
#

im confused on how to do tht

#

that*

versed socket
#

@copper portal I think you need to do some more tutorials man

#

Specifically, I think it'd be good for you to review the "Multiplayer Shooter Demo" that the Unreal developer people put out on the marketplace for free. You can find it in the "Learn" tab of the epic launcher program thing iirc.

copper portal
#

all i am wondering is why the name tags only work on server side and on client side, the name tags are only the server's name

versed socket
#

Because the Server owns the PlayerState class and so it is in charge of updating everybody's name tags. So it only ever updates it with what the server wants their name tags to be.

#

If you want to get the actual player's name, you want to do "PlayerState->GetPlayerState()" the function, and not do the get variable thing directly. They changed that in 4.19 so that getting the variable doesn't work properly anymore.

twin juniper
#

@agile lotus hey you get the indicators fixed up yet?

#

i'm debugging my games ded server. i got the server open with port 7777, still trying to join from a local machien to test though.

agile lotus
#

@twin juniper I did using OnRep

twin juniper
#

nice glad you fixed.

agile lotus
twin juniper
#

ahhhh πŸ˜ƒ

#

ill have to write that down incase someone else asks i might actually switch my code to that. cool man. good job.

agile lotus
#

@worn nymph showed me this

twin juniper
#

do you have a tut you used? or

agile lotus
#

just his code not sure if he followed a tut

versed socket
#

@agile lotus just in case if you're using 4.19 then you need to change the "Player State -> Name" to "Player State -> Get Player Name()" the function instead of just the normal get variable

agile lotus
#

4.17 here

versed socket
#

Ok sorry nevermind

agile lotus
#

good to know for future though

#

thanks jfaw

#

Is there a way for me to check if I'm in an online session from within a pawn?

#

that way I can use offline names for offline play

copper portal
#

@versed socket I am using 4.19 and it works fine with the var

versed socket
#

That's really weird because for me in 4.19 it doesn't work anymore with the var and the patch notes said to use the function instead from now on

twin juniper
#

@agile lotus you can use is logged in for default session and is player in session using the unique net id if using advanced sessions.

agile lotus
#

thanks my dood

#

is there a way to do it without grabbing a player controller

twin juniper
#

so in game mode, you can use on post login to determine if players are logged in, you can logout to determine if they are logged out. i use onlogout to remove from my player name array

#

i store it in my game state

#

you can use something like that when people login and store their player controllers that way

#

and then you can know if the current player controller is online or not by goign thru the array

#

i only have a logout check in my game tho

hollow pulsar
#

Ok time for a quickie how much C++ Do I need to know to add voice chat to my game?

twin juniper
#

none

#

advanced sessions has voice comm

#

i run that in my playercontroller, works.

hollow pulsar
#

Oh it needs to be in player controller

#

thanks for the quickie my dude

twin juniper
#

well i bind it to a key press

#

so in that case its easier. yep np

#

did you get the advanced sessionsplugin yet?

#

you gotta install that first for it to work, dont forget

hollow pulsar
#

Yep already installed

#

big ty from me had no clue how to get local player number

#

should It work in my PIE?

#

Cause I hear nothing

copper portal
#

@twin juniper do you know what the SetName console command does

#

?

twin juniper
#

i believe you gotta package it out or use standalone to get the voip thing to work. you also gotta set some code stuff in projectroot/Config

#

[Voice]
bEnabled=true

[OnlineSubsystem]
bHasVoiceEnabled=true
In DefaultGame.ini

[/Script/Engine.GameSession]
bRequiresPushToTalk=false/true```
#

@copper portal not sure. sorry.

copper portal
#

I think it sets the local name. thats what it said on the forum

twin juniper
#

@hollow pulsar check the advanced sessions plugin forum page if you are having issues, its the first result on search that comes up for advanced sessions plugin unreal

hollow pulsar
#

No I figured out it was using the microphone my ps4 controller xD

twin juniper
#

ah ok

#

lol

hollow pulsar
#

I dont know how to switch which audio device ue4 is using tho

fleet raven
#

how do you guys normally handle weapons getting attached to characters in multiplayer? since the owner needs to have it attached to something that makes sense for first person, but everyone else needs to see it attached to the arm for 3rd person view

fringe dove
#

is it possible to have a dedicated server but send some data peer to peer? I've seen some commented out stuff in the voice code where peers could send voice directly to each other for minimal latency

twin juniper
#

are you able to connect to your ded server locally?

#

cuz i can use some pointers. i am able to connect to it using E:\unreal\src\UnrealEngine-4.19.2-release\Engine\Binaries\Win64\UE4Editor.exe "E:\unreal\game\mygame_SRC 4.19.2\mygame.uproject" -server -game -log but not from my actual vs built Server.exe binary if i use the "open level" node with 127.0.0.1. i am actually considering putting up the entire engine source code into an EC2 instance in addition to my game packaged folder..

fleet raven
#

of course, connecting to dedi server works just fine

twin juniper
#

yea i am having issues doing local testing on mine

#

you gotta use an open level node for the client right?

#

with 127.0.0.1? i already did the tcp/udp config for the 7777 port as well

fleet raven
#

I'm not sure if that works, I use a custom node for that because I want to catch invalid urls

#

before that I used a console command one with 'open [ip]'

twin juniper
#

and that worked?

fleet raven
#

if you start your server with -log does it print anything when you try connecting?

twin juniper
#

so here is "ready" for the player

#

now i am going to run my game binary, and try going to my menu where i have a join dedicated server button

#

nothing happens when i click the button, and there are no additional lines in the log

#

once i clicked it

#

i might have built it wrong in VS?

fleet raven
#

no lines in the log of the client either?

#

oh

twin juniper
fleet raven
#

the server is using a 'SteamNetDriver'

twin juniper
#

here are the steps i did for the server build

#

basically

fleet raven
#

I'm not sure if you can connect to that one manually

twin juniper
#

if i did something wrong in there let me know pls.

fleet raven
#

it might require joining through steam

twin juniper
#

oh

#

do i have to create a normal session then?

#

in the case i setup dedicated server? and avoid advanced sess?

fleet raven
#

no idea, have not used the steam integration before

twin juniper
#

i can still leave the advanced sess up for when people create listen servers / join listen

#

thats my menu basically for multiplayer

#

ill try using a default session

fleet raven
#

@fringe dove that's theoretically possible but you would either need all of your clients to have a port forwarded for incoming P2P connections, or have the dedicated server act as some sort of nat punch manager

fringe dove
#

@fleet raven where I saw it (maybe in steam voice code), I think it might have been using the steam id to connect, which handles hole-punching

fleet raven
#

could be that steam already has that

fringe dove
#

hmm, it must do something similar for querying available servers too

#

unless the session api that doesn't actually have to conenct p2p

#

or at least not in a way that is exposed to UE4

fleet raven
#

the server probably maintains a connection with steam in that case so it can handle the hole punching for connecting clients

#

only way to avoid that would be to have steam relay all the packets, which would be inefficient and increase latency

fringe dove
#

yeah, steam in general sets up hole-punching and falls back to relay only if it fails

#

I can't find where I saw it in the code in the past anymore, it was definitely voice related

#

maybe in the netdriver and not the steam plugin

#

@fleet raven ah yeah, : ```cpp
NetConnection.cpp
2374: // Determine if the server should ignore replication of voice packets that are already handled by a peer connection
2375: //(!Driver->AllowPeerVoice || !Actor->HasPeerConnection(Sender)) &&

#

commented out but was at least considered at one point

fleet raven
#

interesting

#

but does removing 50ms latency from voice really matter that much

fringe dove
#

no I'm not wanting it for voice

#

I had just seen it there

#

'HasPeerConnection' doesn't seem to actually be a real function =/

#

bReplicateAsPeer doesn't exist either, but some usages of it were replaced with !bReplicateAsServer, so maybe there are some vestiges

fleet raven
#

anything useful if you just search for "peer" with va?

fringe dove
#

bIsPeer, but it seems to not really get used

fleet raven
#

might have been removed then

twin juniper
#

(sort of) good news. i got the ded server to connect to the default ipnet driver if i remove the steam subsystem lines from my defaultengine.ini

#

i think what i will have to do - i might have to make two versions of my project. one will be a dedicated server and one will be default. so for the dedicatred server project, i will set that up to be used eventually in the EC2. for the default one, this is the build i wil upload to steam and stil ahve the default functionality for.

#

so if i do that, it will work. just an extra step of creating a separate unreal project for the dedicated version @fleet raven

#

if you can think of any workarounds or anything pls let me know if there's some easier way that you can think of

fleet raven
#

why not make a steam dedicated server

#

surely that is a thing

#

having 2 versions of the project sounds like nonsense

twin juniper
#

found this in the project launcher - i might be able to cook out two targets, but i dont know how to get the defaultengine.ini file to be different for them. i might have to try that. i'll see if i can figure it out.

twin juniper
#

ahh i think the way i can do it is by having an "is dedicated server" check in my default server map's level blueprint. then from there i can basically create an advacned session with a custom "dedicated" server name. then i can find advanced sessions when a user tries to connect for that server name. that should work i hope.

#

brb, testing.

copper portal
#

the code is in my player state

sharp spire
#

Not sure what you're asking @copper portal. What about that player are you trying to get ?

copper portal
#

I am trying to get a player who has reached a score of 3 for example

sharp spire
#

Are you trying to announce the winner?

copper portal
#

yes

#

with a widget

sharp spire
#

Does eAch player have a unique name or ID of some sort?

#

Regardless,

copper portal
#

I have an array of player controllers

sharp spire
#

You can send the player controller to the gameinstance (I believe that's shared) and have a UI visibility binding to gamestates player winner variable and have the widget have a text with a binding of his name etc

copper portal
#

wym

sharp spire
#

Or you can foreachloopwithbreak to scan all players until you find one with a score of 3

#

Then break it an announce and multicast the UI

copper portal
#

I have the score stored in a custom player state bp

#

would that still be fine?

sharp spire
#

I believe that fine

#

Personally I've only worked with pawn and controller variables

copper portal
#

what do I do for the break?

#

part of the forloop

#

do I check what the score var is set to?

#

on the playerstate

sharp spire
#

Once you hit a player with a score of 3, store that reference and break them displayed the reference in the break

#

Yes

#

Check the controllers player state and see if its 3

copper portal
#

how do I do that

sharp spire
#

If so, save that reference, break and upon finish if that variable is valid, there's also win er

#

There is a winner *

#

You may want to plan all this out first lol

copper portal
#

what im doing is getting the array of player controllers and then I dont know what to do from there because I have never done anything like this

sharp spire
#

I'd say having a repnotify variable for your score, and onrep check if it is equal to 3, if so send that to your gamestates custom variable "player controller winner" which is also repnotify. Once that onrep is called, send everyone the winner and endgame content

#

That'll handle all the work for you as well as server handling

#

Just make sure your score is only incriminated by the server or anyone can cheat and win.

#

Anyone here have suggestions on a self sustaining individual actor based ecosystem?

#

I created one, but I feel in the long run itll get too laggy with the world covered in actors.. would it be smarter to create my own structure to keep track of foliage instead? For example: randomly spawn a foliage under conditions, and save the location, foliage type, and foliage statistics into a structure inside what file is handled by the world and shared between players?..

#

And when interacted with, edit its stats in the struct?

#

My only problem with that method that I see is the foliage index will change if I remove any foliage therefore breaking its reference

#

The reason I ask in multiplayer is because I have to keep multiplayer in mind when designing this system

#

Ah better question to sum everything up, is there a way of only streaming actors that are nearby / visible (top down game so visibility is very easily handled) ? Is there a distance factor or something ? And if so, does it keep track of what's going on inside of that actor even when it is not streaming? of not, then It is still useful, but not 100% as useful lol

#

Possibly having the server handle all actors and clients only relevant to nearby?

#

I'm reading the documentation now. If anyone has extra input outside of the documentation feel free to share. Sorry for my novel

thin stratus
#

IsNetRelevantFor

#

An AActor function desgined to say if an actor is relevant for the viewer

#

You can override it in cpp or use the exposed variables under replication to control

#

@sharp spire

twin kite
#

Hey there, I got a question. Is it possible to connect to a dedicated server using it's raw IP and port?

#

It uses Steam and the server is listed on the Steam server list, I can connect via Steam too

#

But as I found out that calls "open steam.<steamid>" while steamid is the ID of the server

#

Since I am using Amazon GameLift for matchmaking I only receive a raw IP and port, and when i try to just "open", that just tries to connect, and after a minute times out

twin juniper
#

by default it's 7777 and you want 27015 open for steam. ip connection should work, that's how it's intended. i'm working on the same issue RN with my ded server testing locally.

#

make sure your ports are forwarded in your virtual server on your router, and make sure they are open in windows firewall too.

twin kite
#

Yea I know these ports, and they're forwarded on AWS aswell. I just can't connect

twin juniper
#

oh you're testing on EC2 rn?

twin kite
#

yep

twin juniper
#

as in you already have it on the ECB drive

#

ok

twin kite
#

That's my port config in there

twin juniper
#

are you using advanced sessions

twin kite
#

I don't think so

#
[2018.05.31-21.54.18:670][406]LogTemp: Holy shit, I found a match! URL: 18.217.3.169:7777
[2018.05.31-21.54.18:672][406]LogTemp: And here's a session: 76561198069709745, psess-6ea1c959-2154-4617-ae43-e0eb3feb0693
[2018.05.31-21.54.18:672][406]LogGameLiftClientAdapter: Display: Request marked succeeded.
[2018.05.31-21.54.18:673][406]LogNet: Browse: 18.217.3.169//Game/Maps/ShooterEntry?playerid=76561198069709745?playersessionid=psess-6ea1c959-2154-4617-ae43-e0eb3feb0693
[2018.05.31-21.54.18:675][406]LogTemp: Display: ParseSettings for GameNetDriver
[2018.05.31-21.54.18:676][406]LogTemp: Display: ParseSettings for SteamNetDriver_0
[2018.05.31-21.54.18:676][406]LogTemp: Display: ParseSettings for PendingNetDriver
[2018.05.31-21.54.18:677][406]LogInit: WinSock: Socket queue 32768 / 32768
[2018.05.31-21.54.18:679][406]LogInit: WinSock: I am DESKTOP-8HCLLKN (169.254.188.167:0)
[2018.05.31-21.54.18:680][406]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2018.05.31-21.54.18:683][406]LogNet: Game client on port 7777, rate 10000
#
[2018.05.31-21.55.18:690][706]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.05.31-21.55.18:692][706]LogNet: Warning: Network Failure: PendingNetDriver[ConnectionTimeout]: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.05.31-21.55.18:698][706]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID'
[2018.05.31-21.55.18:699][706]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL,
#

That's my log, you can see after the "Game client on port 7777" it waits exactly a minute, then times out

twin juniper
#

are your logs all looking good for the dedicated server when you launch the binary on aws?

#

no yellow / red errors?

twin kite
#

yea they're fine

#

But when I try to connect this way, the server doesn't even notice it (no logs when I try to connect)

twin juniper
#

you sure it's the right IP?

#

because console command open (ip) should work

twin kite
#

Yes I get that one directly from a callback from GameLift, and I compared it multiple times, it's the correct IP

#

I tried to connect to a local server too yesterday with open, even that didn't work

twin juniper
#

when you did your local test

#

did you see your game

#

in the steam server browser under LAN / internet?

twin kite
#

No since it can't initialize Steam when I run the server locally, "this could be due to steam client/server running on the same machine"

#

But I see my AWS game in the server list

twin juniper
#

here's what i mean

#

if you try to do a local test with your code

#

you should be getting that to show that steam is picking up your server on there

twin kite
#

The highlighted one is the server currently running on AWS

twin juniper
#

ah ok good

#

so its picking up with steam

twin kite
#

yea

twin juniper
#

so then the problem lies in your join code somewhere

#

for sure

#

its not with your steam init code or create session code.

#

look into your join code and make sure gamelift syntax is right

twin kite
#

We had the regular steam server stuff working for ages so for sure that's not the problem

twin juniper
#

i havent used gamelift unfortunately, just join session from find session advanced.

#

ic

#

did you change the code or something? maybe some guy went into the source control and did some kinda commit or something?

twin kite
#

FString Command = FString::Printf(TEXT("open %s?playerid=%s?playersessionid=%s"), *URL, *PlayerID, *PlayerSessionID);

GWorld->Exec(GetWorld(), *Command);

#

That's the code

twin juniper
#

may i actually ask you a question about aws because im thinking of getting an EC2 now that i have you here.. does your aws instance lag at all? are you guys using t2.medium?

#

apart from that pretty stumped. you will have to hope someone can forward their thoughts to you on here.

#

if you were using advanced sessions you could try something like this. i dont use CPP to connect to mine though :

twin kite
#

We are currently using a c4.large instance which is the free tier, and I'm incredibly suprised by the performance. We could run at least two dedicated server processes in parallel on the instance, and it's currently in us-west and I'm in Germany, and I couldn't notice any lag at all

twin juniper
#

nice

twin kite
#

Thanks for the tip, so another option would probably be to iterate through all sessions and look for the one which has my IP and Port I search for πŸ€”

#

Or to somehow ping the server about his steam ID

twin juniper
#

hmm

#

i was goign to say something else

twin kite
#

What is it?

twin juniper
#

just a thought - if you can convert the raw IP to a steam id

#

you might be abvle to use steam join instead

#

since you know that works

#

there might be a way to get that ID from the server, i'm sure.

#

i gotta 😴 good luck to you i'm sure you'll fix it. keep at it!

twin kite
#

Yea that's my thought, convert IP to steam ID, I'll hang in there, gnight!

fleet sluice
#

@twin kite @twin juniper The USteamNetDriver class doesn't support direct IP connections. It's not as easy as "converting IP to SteamID". I can tell you that for sure because I spent a month creating a NetDriver class that allows both IP and SteamID connections and multiple clients on the same machine. To date, it was the most complicated part of my plugin.

#

(P.S. Just noticed and replied to the thread related to the same question a minute ago.)

twin kite
#

Ha lol

#

But it seems like I found a way

#

You can use the Steam SDK to ping the server, and get a gameserveritem_t back, which contains the steam ID

#

And then connect using "open steam.<steamid>"

fleet sluice
#

Yea, that sounds right, but it won't be possible with listen servers and you were asking for direct IP connections. This would still use Steam's networking library (this is actually preferred, because it has NAT traversal techniques on top of it).

twin kite
#

Ah then you misunderstood me, I meant connecting to dedicated servers via the open command, and I tried it, it works

lost inlet
#

for dedicated servers i just killed off the steam p2p stuff

#

if you look at dev-networking, i think i saw something which will allow you to easily switch between them

#

that branch also has the important thing of having steam auth

sharp spire
#

@thin stratus thank you, so using the IsNetRelevantFor will still keep actors running on the server and only on relevant clients ?

thin stratus
#

Correct

surreal harness
#

Hi, anyone with experience in MP replication? i am having a weird issue with a MP project i am working, i have a base bp and i create another i called socket bp that have some properties and i can attach objects there and i add some of the socket bp to the base BP, i have all the socket parented to the base, but the problem is that i there are some small sockets that are not attached or parented in the base from the client side, so when i play as the server everything works fine, but if i play from the client the small pieces stay in the starting position

#

anyone had this kind of issues? if you have any suggestion or tip to test would be really helpfull. i dont know what else to test for this, all the sockets are instances of the same bp, the only difference is the size of the static mesh

thin stratus
#

Is your base actor marked as replicated?

#

How do you attach the other sockets?

#

Code? ChildActorComponent?

#

Are they marked as replicated and replicate movement?

#

Are the ChildActorComponents (if used) marked to replicate?

surreal harness
#

first i just had parented in the world outliner and it work in the server side, in fact work in the client side for the larger objects, and the sockets are replicating and replicating movement

#

first i tried adding as childactorcomponents but that didnt work, so for now i add it as actors in the scene and parent to the base actor

#

same socket bp work in large objects bot not in small objects in the client side, from the server side it work fine

#

i am working everything in bp

wanton pebble
#

Hey guys, why can't my friend see my game ;-;

wary willow
#

@wanton pebble many reasons

#

But generally, not in same download region

wanton pebble
#

it works locally

#

and we're in the same country

wary willow
#

steam?

wanton pebble
#

same isp

#

well, it's not on steam yet

wary willow
#

What are you using?

wanton pebble
#

but i have the steam api enabled

wary willow
#

AppID?

wanton pebble
#

literally just sent him the packaged game

#

like, the folder that you get once you package it

wary willow
#

did you put the appid in build?

wanton pebble
#

appid?

wary willow
#

steam_appid txt

wanton pebble
#

i have this in the default engine txt

#

:
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

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

tawny parcel
#

For GameInstance, when is the client game instance initated? When the .exe launches or after it connects to the server?

twin juniper
#

@tawny parcel When .exe launches

tawny parcel
#

Thanks, thought so

twin juniper
#

First map load

#

Prior to I believe

#

And, it doesn't exist on the server

#

Remember that

tawny parcel
#

Yeap

wanton pebble
#

so wait

#

is there anything else i need to have online multiplayer apart from the steam api and then having a way of creating/joining sessions?

thin stratus
#

Well the SteamAPI is something more technical for C++ to be able to access all features of Steam

#

For online multiplayer you would "only" need the Ini settings, the enabled plugin and Creating/FInding/Joining session nodes

#

That is for ListenServer solutions

wanton pebble
#

alright

#

what's the Ini settings?

thin stratus
#

Most of what you already posted

#

You can read up on that here

wanton pebble
#

oh, that

thin stratus
#

Might be a tiny bit out of date if unlucky

wanton pebble
#

alright, in that case i should have everything

thin stratus
#

Probably yes

#

Just be aware that 480 app ID can be annoying

#

Cause everyone uses that

wanton pebble
#

but my friend can't see my session 😦

#

oh, can i use another one?

thin stratus
#

Not without having your own

wanton pebble
#

ah, alright

thin stratus
#

Increase the num of results

#

and maybe choose a download region that is a bit less known?

#

Idk, it's often that people can find sessions with 480

wanton pebble
#

how do you mean that?

thin stratus
#

cause you get thousands of session results of other games that are filtered

#

And your list stays empty cause your friends session wasn't part of it

#

The FindSession node

#

has a Result Integer

#

Increase that

#

that might help

wanton pebble
#

is there a specific way that i have to send it to him?

#

because what i'm doing now is just sending him the built folder

#

max results on find session are at 9999

#

BP's look like this

thin stratus
#

Na, that's okay I think

wanton pebble
#

alright, thanks

arctic willow
#

I want to replicate the ActorComponents that get spawned by their Parent. I tried this and the Client loses his Connection whenever ActorComponents get's spawned. Can anyone help me pls?

wary willow
#

Same way you use all OSS I would assume?

#

@grave lynx What's the exact question

twin juniper
#

my matchmaking program failed again

#

do I need additional code regarding the multiplayer elements in the gamemode or player controller?

winter zenith
#

I'm having trouble with my hit detection using line traces when my game is running as a dedicated server. It feels that the physics asset for the skeletal mesh is in a slightly wrong position. My current thought is that the locomotion animations is not being ran on the dedicated server, so the physics asset for the skeletal mesh is staying in the standard pose position (rather than moving slightly in the character's idle animation). This isn't a problem when running as a listen server. Does anyone have any idea how I might go about fixing/debugging this? thanks!

#

Ok - ended up solving the issue only ten minutes after posting it here, hah. Out of interest the issue was, for the mesh component I had to change the Mesh Component Update Flag from "Always Tick Pose" to "Always Tick Post and Refresh Bones"

burnt meteor
#

@thin stratus is gamesparks free?

meager spade
burnt meteor
#

is gamesparks like amazon e3

lost inlet
#

gamesparks was recently acquired by amazon, i would expect that its features will eventually be rolled into AWS

#

but right now it's a standalone product

burnt meteor
#

ok

twin juniper
#

the issue appears to be that my "find games" function isn't finding any games when I was testing with my friend

#

could there be any reason for this?

sharp spire
#

Question for the multiplayer squad, an online subsystem takes advantage of leaderboards and such that the subsystem encompasses correct? Long story short it does not have to do with hosting/finding sessions? I'm having issues with hosting or discovering sessions on android ONLY with Google Play Services enabled

#

My online subsystem is set to null, is that the reason why?

meager spade
#

a null subsystem will only work on LAN

#

so if it is null, then yeah, you won't find anything

#

unless you are over lan

sharp spire
#

But I cannot host either

prime gorge
#

Looking at learning the UE4 Client to Server multiplayer anyone know of good source documentation or tutorials?

wary willow
#

@prime gorge pinned msgs

prime gorge
#

ty

copper portal
pallid mesa
#

Could you post the same picture using the windows snipping tool?

#

the image compression isn't helping at all

copper portal
#

k

pallid mesa
#

same

copper portal
#

huh

pallid mesa
#

the image isn't clear enough XD

#

is score to win a value setted on every player state

#

is it constant?

copper portal
#

yeah

pallid mesa
#

the score to win shouldn't be part of each playerstate, it should be part of the gamemode/gamestate instead

#

you could try printing the values

#

to see if they are correct in the context you need em

#

also, where is this rpc located?

copper portal
#

in my game mode

pallid mesa
#

that's wrong already

#

you can only rpc things which have a client as the owner

copper portal
#

so where should I put the event?

pallid mesa
#

the event shouldn't be a rpc, first of. Where are you calling this event

copper portal
#

in my player state

#

I call the event

#

@pallid mesa

pallid mesa
#

so in your player state you are calling this event on the server

#

so take it like this

#

you can only rpc things

#

if you have a client as the owner

#

in the case of the gamemode

#

it only exists on the server

#

so you can have your rpc on the controller for instance calling that event on the server

#

Left: player controller

#

Right: gamestate

#

the top node in the left won't work

#

because it is calling the rpc on the server

#

the bot node in the left will work because the rpc is on the controller, which has a client as a owner

#

and as you can see the function that is calling thjat rpc is not replicated

#

so knowing this

#

now you should consider where to place your rpc

#

engage yourself doing networking, read cedric_eXi#4538 conpendium

#

but the most important is: knowing the theory, try yourself

copper portal
#

I dont understand tho

pallid mesa
#

You need to understand that the gamestate or the gamemode

#

already reside on the server

#

so you cannot rpc there, because a rpc needs a client as the owner

#

there is a pinned compendium to see where each UE4 element is located so you'll understand which rpc makes sense and which don't

copper portal
#

what I dont under stand is where I should place my events then

pallid mesa
#

it is fine to have it on the gamemode tho, since it is a gamemode thing (I believe)

#

the only thing I'm pointing out here, is that the rpc shouldn't be made on the gamemode itself

#

another objection I had with your code was the ScoreToWin variable

#

From my point of view it should be a gamemode variable

copper portal
#

its on my gamemode now

#

but I dont know what to do with the custom event now

pallid mesa
#

don't make it a rpc, now you know that

copper portal
#

well what do I make it?

#

a func?

pallid mesa
#

a normal event

copper portal
#

so no replication?

pallid mesa
#

no rpc's on the gamemode

copper portal
#

what does rpc stand for because I might be getting confused

pallid mesa
#

the rpc (if needed) should be somewhere else

#

remote procedure call

#

If you read the compendium I posted before

#

you will understand this all much better

copper portal
#

I dont want to read it rn

#

cuz im trying to solve a problem

pallid mesa
#

well you are reading me

copper portal
#

all i am asking is what I should do now because I dont understand where all these things should be placed and stuff like that

thin stratus
#

He posted you my compendium

#

If you need to solve an issue that you can't solve cause of missing knowledge, then read up on it

copper portal
#

πŸ”ƒ confusion πŸ”ƒ

thin stratus
#

I already took the time writing these pages

#

Now please take the time reading it and come back if you still have questions

pallid mesa
#

I'm always willing to help, only if the other side cooperates

copper portal
#

im trying to god damn it

thin stratus
#

Your question is usually answered by reading the pages of my compendium which explain each class

#

Plus the overview of what exists where (server vs clients)

pallid mesa
#

ayee, that's core.

copper portal
#

I will read it after I fix my problem. I want to fix my problem first

thin stratus
#

As far as I understood, your problem came up cause you don't know where to place the events

sharp spire
#

@thin stratus im struggling ._.

pallid mesa
#

I could tell you, place the rpc on the playerstate and be done with it, but class interaction in networking is much more than that. Also you'll learn when to replicate a variable and when to not.

sharp spire
#

can someone explain creating sessions and how i can get others to join over WLAN on an android device?

#

i assume its not port forwarding, so it is not online for others to see

#

lan works fine

copper portal
#

@pallid mesa btw it doesnt work still.

#

i read now this better make sense

sharp spire
#

no offense, but youre being very rude about free advice. nobody in here is obligated to respond. keep that in mind.

#

@copper portal

pallid mesa
#

use printstrings to know what is happening and see if your values are setted correctly on the server

#

complement this debugging using cedric exi compendium, replicating a variable is not enough to make it update on the server every time you increase it

thin stratus
#

It makes sense if you learn it and try to understand it.
Multiplayer isn't learned in a short Discord chat session.
You'll take a few days/weeks till you fully get the concept.

#

So read the Compendium I wrote and start playing around with the new knowledge then.

#

@sharp spire WLAN and LAN is the same.

#

It's both your local network

#

Nothing internet related.

#

Also probably SubsystemNULL as you use an Android System with Windows

dull stream
#

anyone know some good examples to look at for custom movement components, in regards to networking

sharp spire
#

Oh haha fail. Idk why I assumed that was the case. Lack of knowledge. So @thin stratus you dont need to have any mechanics setup to allow connections between android devices over non-lan play?

thin stratus
#

@sharp spire You need a Subsystem for Android that has Session Support

#

Or join via IP which needs port forwarding

low obsidian
#

Hello, I am trying to network my sprinting inside my game but the 1 issue I am running into is when I pass CharacterMovement from the client to the server, it says Accessed none. I am not sure what I am doing wrong. Does anyone have any suggestions?

thin stratus
#

You don't need to pass the component

#

Just grab the variable again

low obsidian
#

When I tried that, the client gets stuck in the running animation, and the new speed is never applied to the client. (Server works fine)

thin stratus
#

The variable isnt replicated

#

You need to set it on everyone

#

Best way is to use a RepNotify float

#

Letting the server set it to the new value

#

And then setting the component speed with that variable in the OnRep function

low obsidian
#

That didn't work for me but this is what I have after those changes. I wasn't sure what you meant by setting the speed in the OnRep function so I could have made a mistake but I tried assigning MaxWalkSpeed after I assigned the RepNotify variable

thin stratus
#

If you mark a variable RepNotify, it creates you a function

#

Check your functions on the left

#

Usually named OnRep_VariableName

#

It executes on everyone when they receive the replicated variable valur

#

Even people who come in late

#

Or join later will get this event/function

#

In there you should set the maxwalk speed

#

@low obsidian

low obsidian
#

Thanks for the clarification. I applied what you said but unfortunately it didn't work.

twin juniper
#

my replication suddenly stopped working, i havent changed anything in my blueprints, last time i was testing, everything was fine, but now for client everything is delayed and some things dont work at all

#

and my minimap thing doesnt work too

#

oh lol it got fixed

#

mhmm

#

i just removed the multicast thing from event tick

#

but minimap still doesnt work

#

aand i fixed it too

#

nvm then

thin stratus
#

@twin juniper Multicast on tick is fine but don't mark it reliable

twin juniper
#

i didnt

thin stratus
#

It sounds like it though. Cause that would stop most of the other rpcs from calling

twin juniper
#

but when i deleted it because i was like "maybe it just overloads the net" and everything became smooth and instant

thin stratus
#

Hm. Okay

twin juniper
#

it was 2 array variables

thin stratus
#

Ah too much data could also cause it, yeah

twin juniper
#

Vector3d and Character (both of them had 2 elements because 2 players)

thin stratus
#

Okay that's not a lot of data

#

:D

twin juniper
#

xd

#

and it turns out that i dont need it, everything is still replicated... im not that good at networking i guess

twin juniper
#

Hello I need some help with a steam dedicated server showing up within the internet tab of the steam server browser. Currently the server shows up within the LAN tab using adv sessions to create the session. I forwarded ports 7777 and 27015 on my hub firewall I also allowed these connections on my inbound tab both tcp/udp. Now firstly, is there any other ports that I should be forwarding? I heard 7778 is one but I honestly don't know. It would be great if someone could help me in this situation. I have a feeling its my hub that's causing the problem.

winged badger
#

iirc there is a steam limitation where a server that is running on the same machine you're connecting from will show only and only on LAN list

twin juniper
#

So I need a separate account for the server? And another account acting as the client to search for the server?

winged badger
#

dedicated servers can run without a steam client running on the machine

#

they just can't use the client interface then

twin juniper
#

Right okay.

winged badger
#

i do not know how to set that up tho

twin juniper
#

I try it in a bit. Thanks for help.

twin juniper
#

@winged badger You were right. If I view the server list on another machine it appears in the internet tab. Everything is working fine. Thanks!

#

why when i create widget in multiplayer, it makes 2?

#

2 for each player

#

Where did you create the widget?

#

in character

#

What is the widget for a server browser? or a hud? etc.

#

its for hud

#

i add it on beginplay in character bp

icy nacelle
#

I'm having issues using SetMaterial on a server event. Does this not work on server? Cant figure it out.

ruby meteor
#

Sometimes, probably when there were too many reliable multicasts, a client compeletly stops sending network info, he doesnt move on the server for example, how do I detect a disconnect like that? And whats the best way to prevent it (other than using as little reliable/multicast functions as possible)

icy nacelle
#

Thanks for your reply @ruby meteor, I'll take a couple screenshots and maybe you can see where I'm going wrong.

ruby meteor
#

@icy nacelle Im sorry it was a different question, not an answer ^^, I dont know why your node does not work, what do you want it to do? screenshots always help ofc

icy nacelle
#

Here's where I run on the server, pulling in variables from 'ItemBeingBuilt'

#

Here's the function thats running on server, that prints out the CORRECT material that I'm trying to use, but the material is the default one from that class.

#

Oh, apologies man. I thought you were answering me πŸ˜›

dull stream
#

Im trying to figure out why my movement is only working on the server. If i run dedicated, no one can move. If its not dedicated, only the host can move. I assume Im only running the movement on the server and its not being replicated to clients? but i look at other example projects like shooterGame and i dont see them doing anything in particular

#

also looked at UT's character and controller source and im confused because they seem to do nothing for networking movement. I assume its all handled in character movement component

meager spade
#

custom character component?

#

if not then maybe you have not enabled replication

dull stream
#

yeah I derived from character component to make my own custom movement modes

meager spade
#

how are the inputs being put in

dull stream
#

but i still use the normal PhysWalking

meager spade
#

standard way?

dull stream
#

inputs are done in controller, calls a function on character

meager spade
#

and you haven't missed a Super call anywhere in the custom movement component (just eliminating stuff)

dull stream
#

I'll make sure

#

oh wait yeah maybe you're right, I didnt super my AddInputVector

#

that could be it

meager spade
#

the character is set to replicate and replicate movememnts

#

did you override it?

dull stream
#

yeah I did

meager spade
#

cause be the cause

#

could*

dull stream
#

ok im gonna try that

#

hmm, no. that didnt help. I'll keep looking through my movement component to make sure its calling all the base code

#

Im not seeing anything that stands out in particular 😦

meager spade
#

on the blueprint for the character

#

is replicated set and replicate movememnt?

dull stream
#

its replicated on the character BP yeah

#

I never touched any of that stuff

meager spade
#

just check see if replicate movement is ticked

dull stream
#

I did the other day, but I'll do it again

meager spade
#

oh right then you may need to debug it, find out what is getting called and why it isn't going to the server

#

do they move locally

#

or is there nothing?

dull stream
#

well if i run dedicated server checked, nothing moves. i can move the camera with mouse and pawn moves with camera, but nothing else moves

#

if i run with a peer to peer setup, the host can move around like normal

#

other person cant

meager spade
#

its weird how they can't move locally, sounds like they are sending a request to the server which doesn't get fulfilled, the client should move regardless

dull stream
#

hm

#

is there a server log or something to print to

#

oh yeah i just remembered something

#

well wait, let me do some prints first.

#

ok for some reason my character is null

#

well, my reference to my character is at least

#

I keep a reference to my character in my controller so I dont have a to cast all the time, and I set it in the Possess function

#

I assumed that would be fine, because you can only possess a character if it exists correct?

#

fuck me, that was the issue. how embarassing

meager spade
#

ah glad you found it

#

i handled my inputs in the character

dull stream
#

I still dont understand why possess function didnt set my character 😐

meager spade
#

but i use GAS

dull stream
#

ah

#

wait what is GAS

meager spade
#

gameplay abilities

#

built into UE4 but hardly any documentation

#

its what they used for paragon/fortnite

dull stream
#

ah

#

i thought that was a plugin, interesting.

#

yeah my custom movement is all kinds of broken, but at least I know the built in movement is working now. Thanks for being my rubber duck lol.

meager spade
#

np πŸ˜„

icy nacelle
#

Any ideas as to why the material wont change when run on server? The material that is printed out in the second screenshot is correct.

meager spade
#

does it change on the server?

#

cause you might need to replicate that change to the clients

icy nacelle
#

Nope, it stays the default material from the actor thats spawned

#

Ah, I need to pass the infomation back down the server to all clients? Like a multicast?

meager spade
#

i think you have to create a instance

icy nacelle
#

a material instance?

meager spade
icy nacelle
#

Ah

#

I cant be doing this, as the blend type is different for the original material

#

I am actually using this on the original material though πŸ˜ƒ

meager spade
#

don't you just pass in the instance

#

i assume thats what you mean, you have an instance of that material

icy nacelle
#

Yeah

#

So I'm passing an instance material to set the material on the mesh thats spawned

meager spade
#

and the instance is an actual asset?

#

or you doing it like above?

icy nacelle
#

Its an actual asset

meager spade
#

let me have a try

#

so basically spawn a mesh on the server and update its material?

icy nacelle
#

Correct

meager spade
#

it works for me, if i don't multicast the material change, the change only happened on the server

#

that's without the multicast

icy nacelle
#

hmm

#

Right now when the object spawns, it odesnt set the material..

meager spade
#

no clue then, it works when i set the material

#

dedicated server?

icy nacelle
#

ah...

#

I'm changing the mesh before setting it

#

and I need to input the new mesh

#

I think thats what the problem is.

#

Ah no, that didnt get it.

twin juniper
#

anyone else get this bug in 4.19.2 when trying to join a steam online subsystem dedicated server using exec console command "open x.x.x.x:7777" https://github.com/EpicGames/UnrealEngine/pull/4673 concerning steamclient64.dll entry point not found errors . they say 4.20 fixes it. am waiting around, and finishing up my singleplayer campaign until it's fixed. until then i only have listen server functionality. :x i get the errors in when trying to connect to the ded server from a binary packaged for shipping build, and i look in packaged folder\WindowsNoEditor\Game\Saved\Logs and receive this (i tried moving steamclient64.dll to the ThirdParty folder from my source build, still didn't recognize the dll file) :

LogOnline: Display: STEAM: Loading Steam SDK 1.39
LogWindows: Failed to load '../../../Engine/Binaries/ThirdParty/Steamworks/Steamv139/Win64/steamclient64.dll' (GetLastError=126)```
sharp spire
#

Do you have steam installed? Not sure if that's related as its failing to find a file inside of your Engine folder but who knows

#

My comment is probably irrelevant. @thin stratus I'll try looking into port forwarding again and subsystems

twin juniper
#

yeah, steam is installed.

#

i am strongly considering removing the steam lines from this code in my defaultengine.ini file [/Script/Engine.GameEngine] +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver") [OnlineSubsystem] DefaultPlatformService=Steam bHasVoiceEnabled=true [Voice] bEnabled=true [OnlineSubsystemSteam] bEnabled=true SteamDevAppId=480 [/Script/OnlineSubsystemSteam.SteamNetDriver] NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection

#

to leave the net driver to ipnetdriver instead of steam net driver. if i use the default net driver, i can still play my game dedicated, i just cant have interoperability with steam (for now) until they fix it. so i can't do things like adding steam friends in game, checking steam messages, or any steam achievements for now.

#

so that way, i can package out, up load to my ec2 t2.medium instance and it should run fine. my friend jtxp was giving me a lot of helpful advice on setting it up so props to him. πŸ˜ƒ

#

it's either - do this, or go back to singleplayer development until 4.20 is rolled out as a major release (i like waiting for release branches in the git so it's bug tested fully). i figure, heck, if i can just change the ini lines, i can still keep my dedicated server functionality. i can change the defaultengine.ini lines back to the old way once the steamclient64.dll error is fixed in 4.20. all i need is a backup of my .ini file just to make sure i have the lines exactly right.

rare cloud
#

Hello !
I recently build a linux dedicated server, and I got this error when a player log in :

LogNet: UNetDriver::TickDispatch: Very long time between ticks. DeltaTime: 29.91, Realtime: 29.91. IpNetDriver_0

I would like to diagnostic what going wrong

fossil spoke
#

This is not an error?

#

Does it occur often?

#

@rare cloud

rare cloud
#

when a player log in, also I don't use the native Unreal Network

#

I use SpatialOS

#

so since I don't use Net Driver, this mean something overload the machine

#

and sadly I don't know a tool to diagnostic a remote server (which is used as worker in this case)

fossil spoke
#

Again this is not an Error, its telling you that time between frames took to long to occur and that replication is probably being affected. If you see this often you need to optimize your code to reduce times on the Game Thread.

#

If your not using UE4 replication then you can probably safely ignore this.

#

Although i would still investigate why your frame time is so long.

rare cloud
#

actually this is an error for me since it generate some timeout

#

but yeah I'm agree it's a warning πŸ˜„

fossil spoke
#

Doing an simple Google search mentions problems with HMDs causing this to occur because the Render thread and the Game thread run in lockstep, since an HMD usually causes the Engine to run at an fixed frame rate, this can cause issues when one lags behind the other.

#

Are you using an HMD?

rare cloud
#

no I didn't

#

and I found this topic yup

#

I use 4.18.2 I don't think it's a know issue

fossil spoke
#

Its not an bug, please read what im telling you.

rare cloud
#

Sorry It was confusing, just to say my Unreal version, and ask if it's a know issue with this version or not but I don't think so.
It wasn't related to your message πŸ˜„

slim holly
#

question: if I use FloatingPawnMovement primarily, how could I get client-pawns velocity on server?

fossil spoke
#

The pawn should still have an Velocity

#

Just an simple GetVelocity on the pawn in question will work?

slim holly
#

no, every GetVelocity returned 0 on server

#

oh well, none of this is replicating anyway

#

guess I gotta build something to make it work

slim holly
#

oof, so turns out floating movement doesn't accept any input unless local controller is present

bitter oriole
#

So, the question is how do you get inputs without a locla controller

#

Inputs shouldn't be replicated - the local controller feeds input to the component which then replicates movement

#

Local controller has authority, sends stuff to the server, server works with that, replicates back to other clients

#

If it's AI then it all happens on the server

#

That's the basic workflow

slim holly
#

I rpc the input-vec3 from client to server, tell server to use that vec3 to floating pawn movement

#

it ignores it

#

doesn't make sense

bitter oriole
#

It does

#

What you are doing doesn't

#

Your client should know of movement first

slim holly
#

this is pure data

#

I know, but first I want server to actually do something about it

twin juniper
#

the local controller wont always have authority, so you use has auth to test it in case the exec flow is coming from a client machine.

#

and if its remote, you can exec on server for movement.

slim holly
#

I need server to move the pawn first, then ill figure out the kinks to make it actually usable in real world application

bitter oriole
#

@slim holly This is about multiplayer architecture. Your client can't wait for the server to acknowledge input.

slim holly
#

I know, not important in this context

#

problem here is, why is server ignoring the data client sent

bitter oriole
#

If you want to do that then you can drop the movement component out entirely because you're breaking all assumptions

#

Replicated movement components are built on the assumption that the client has authority, simulates locally + tells the server

#

Then rollback + replay on rep

#

If you don't care about that, just use your own component

#

Or inherit the class and override it

#

The reason it doesn't work like you want it to is that it's explicitly built to not do it because it sucks

slim holly
#

I'm aware it sucks and not intended workflow

twin juniper
#

if you set replicates / replicates movement to true on the component and you move it locally, it will replicate the position..

#

you wont even need to exec anything on server in that case.

slim holly
#

but you're saying floating pawn movement input function is scripted not to accept any Vec3 inputs unless the component is in locally controlled pawn?

bitter oriole
#

@twin juniper No, replication is only server to client.

twin juniper
#

if you spawn it in under a server RPC, and set replicates movement / replicates to true, it should replicate without a exec on server RPC.

bitter oriole
#

@slim holly That's what you are saying 🀷 I'm just saying it would make sense because the local controller is always the one feeding inputs

#

@twin juniper In that case yes, but quality will still be abysmal

twin juniper
#

thats how i did my powerups. anyways ill let you guiys talk. gotta go do texuering.

#

probably.

slim holly
#

I' m not concerned is it "right way to do it" or does it make sense, this is purely engine functional question

pallid mesa
#

got lost

#

summarize?

slim holly
#

and my graph currently is only getting controller input from keyboard, and puts it to variable

bitter oriole
#

@slim holly I think you're overthinking it. If you want a simple flying behaviour and no real networking, just implement it yourself on a server RPC

twin juniper
#

can i just briefly state there's a really good MP plugin for 6dof movement as well.

#

just fyi.

bitter oriole
#

I don't believe the flying pawn movement has any real networking built in either, short of replicating location

twin juniper
#

i use it. in my 6dof game, that i made. and it has prediction and latency compensation. build into the plugin.

slim holly
#

it's not complex enough to be overthinked

pallid mesa
#

no floating pawn movement has no smoothing programmed on it

#

but if you replicate movement

#

you will see it on every single client

#

and yeah, I work hand in hand with mookie he is a great engineer, for sure

bitter oriole
#

@slim holly doesn't care about it looking decent

slim holly
#

thing is, movement replication is server authed, but floating pawn is client authed

#

so I would have to send the actual actor location to server

#

which is bad

bitter oriole
#

Proper movement replication is client-simulated, server-auth, with rollback & replay

#

That's basically the only way

pallid mesa
#

the simulated proxies have to do part of the work

#

also if you want to add prediction based on player input

#

you need to let the server know

#

but the player

#

the local controller is the first input you get

slim holly
#

I was hoping to make client auth-server simulated version

pallid mesa
#

you can use _validate to decide wether or not to process certain movements

slim holly
#

where server takes over if simulations is outside margins

bitter oriole
#

The entire role of the movement component is to take inputs from the controller on the client, simulate it locally, tell the server the inputs, have the server simulate it too, tell the replicated pawns, and replicate back to the cloent for rollback if needed

#

That's what your production code will look like

pallid mesa
#

perfect explanation.

slim holly
#

yea, this is currently failing because server is ignoring the input

bitter oriole
#

No

#

You never tell inputs on the server

#

The movement component tells the server

#

You need to subclass it and implement that

#

It's not another class's responsibility

#

The floating movement thing doesn't do shit

#

You need to implement this yourself

#

There's a great tutorial on that on Udemy btw - UE4 multiplayer or something

pallid mesa
#

yes, Udemy one is defo great

#

there are a lot of approaches to acomplish the same objective

#

but I consider the one given in that course a pretty good one

bitter oriole
#

Yeah, every game will have a different variation. Shooters will put more trust on clients, for example

pallid mesa
#

yeah and methods of doing it basically

#

for example, net update method

#

onrep method for movement

#

that last one would be the BP method

#

but yeah, two different problems to solve

#

Krazy Karts - State Synchronisation And Interpolation

#

that part

bitter oriole
#

^

twin juniper
#

will look at it. havent seen taht tut yet. i do all my stuff in BPs 😦

#

im not CPP savvy yet really

#

i use only code plugins for my game

#

but i wana add it soon.

bitter oriole
#

Though KrazyKarts misses a crucial step for production-quality if you're using a listen server - server smoothing of client inputs.

#

But that's fairly easy

twin juniper
#

Stranger - can i ask. have you used any dedicated server stuff before?

#

i am trying out this whole idea. and my first jump was aws ec2 t2.medium.

#

i literally got an instance spun up earlier today and tried to launch my server binary, needed more ram so i am asking customer support

bitter oriole
#

I had dedicated servers on a project once, but that was UDK days. I stay away from dedicated servers now, not scalable for indies, too annoying to work with, and I'm not going to have a game with many players in the first place.

twin juniper
#

ah ok

bitter oriole
#

(Well, not going to have competitive gameplay, really)

twin juniper
#

i am planning on spending roughly $40 a month on the server or so

#

it has 4 gb and i think a fair amount of bandwidth

#

in ram* that is

#

it was either that or listen servers

#

and i kept worrying . gosh what if some guy keeps getting lag

#

plus

#

i found that when i host my own listen server , which usually ends up being the case cuz mygame haasn't hit that critical mass yet

#

i experience some lag in the game

#

since im the listen server host. and i actually noticed a fair amount of lag when i was the listen server client

#

you mentioned quality is abysmal at some points if the code is bad - i might need to look at my bp netcode

#

and optimize it to make it all use the least amount of data i think

#

Stranger, do you know of any good other multiplayer tuts that are BP based other than the unreal engine multiplayer tutoiral wes bunn did?

bitter oriole
#

Listen server is great for 3-5 players with non-competitive gameplay, dedicated server is required for anything bigger than that

twin juniper
#

ok

bitter oriole
#

As to my comment about quality, it's about replay + rollback etc, which is implemented in UE4 only for the character class

#

Anything non ACharacter, you need to implement it yourself

#

Typically, I test my replication code with 150 lag +-50 and some packet loss

#

Obviously lag will be noticeable (especially for shooting people), but the movement itself should be fine

#

Simply checking the "replicates movement" box will not achieve that

worn nymph
#

@twin juniper i run my dedicated servers on ec2 free tier with only 1gb ram you probably selected the wrong type of instance

severe nymph
twin juniper
#

sorry, I can't seem to get multiplayer to work

#

is there anything I need to put in the gamemode or player controller, or anywhere except for the game instance to join or create a server?

#

because right now, when my friend creates a server with my exported game, and I try finding games, his doesn't appear (apparently)

#

and when I start on the start screen and click find game, I don't end up with another player even when using the local multiple player setting on the play button

next belfry
#

Hello, can anyone help me about Cast to a player and define/edit variable from another blueprint by not affect with another player?
the problem here is when I do increase or edit some variables cast from actor blueprint there will be edit/define whole of the player character in the game.

severe nymph
#

make that variable public so its instanced

#

or store the var in playerstate

#

so its per player

next belfry
#

Thank YOU SO MUCHHHH

twin juniper
#

@worn nymph yes - i tried this with t2.micro instances, turns out there is a limit on the instance type for new aws users. the problem for me is is, my dedicated server for UE needs 4 GB of ram, as i tested it locallky and thats the amount of ram it needs when it starts up. so the t2.medium one is the one i need at least. if there are any other options for dedicated hosting that are fairly good and cost optimized i will be looking into those as well.

versed socket
#

@twin juniper In the "Find Sessions" node -- the white line is coming from the wrong thing. You need to make it go from "On Success". That's the reason why you can't find any results.

#

The way you have it setup now is so that it will instantly go to the next thing, but that array hasn't been filled up yet. When it gets filled up, it will trigger the On Success white line, which is where you want to be doing all of that stuff.

glossy vessel
#

Is there any documentation how the steam party system works with UE4?

potent prairie
#

any idea why this immediately fails? I migrated my project over, sessions work fine in my other project but this one goes to On Failure immediately

#

I forgot to add the code to the engine ini file, problem solved

proper olive
#

can I ask a quick question? I have a blocking volume and I just want to remove it (setting collision off) only on owning clients when they pass a certain test - but whenever the server does it, it seems to have a dual nature on other clients, where the client gets blocked but then it passes through on the server's version and then the client clips through eventually

winged badger
#

you could put the blocking volume in separate custom collision channel, then set your PlayerPawn responses to it to Ignore after they passed the test

#

(it will not work well if you have many blocking volumes like that, in that scenario you would have to attach trigger volumes around it that will alter the Pawn's collision channel responses off and back on)

umbral adder
#

@severe nymph cool

severe nymph
umbral adder
#

Destructible mesh in Multiplayer?

slim holly
#

doable, but you can't replicate it accurately

#
  • the trouble of replicating it for late joiners
ebon crag
#

@umbral adder depends on what you want to do, if it's just a one-shot destructible mesh and debris are purely cosmetic, then you don't even need replication (like Overwatch)

umbral adder
#

wait so the depris dont replicate in ow? @ebon crag

#

aslo please @me again

ebon crag
#

I never tried but I don't think the debris go at the same place on all machines

#

they don't even care about this

#

since debris dont block skills

#

for instance a fence, when it's alive, is blocking the skills

#

but once it's dead, the debris dont block skills

#

if you want destructible to behave like any other damageable actor -> they take damage and then they die and if you don't care about debris afterwards, it's just a regular actor to handle on the network

umbral adder
#

ok

#

thanks

#

has discord changed thier message sound?

ebon crag
#

but as ctzn mentionned, if someone disconnects and reconnects, he'll have to know about the destructible mesh being destroyed

#

not the destructible mesh itself

#

the actor

slim holly
#

and having that many replicating actors in it self is a problem

#

probably πŸ€”

icy nacelle
#

Just a quick question: I'm making an 'arrest' system, where a player must go to jail for a certain amount of time. Should I handle this time with a event timer or a timeline???

#

(I've heard that event timers can be abused on a multiplayer game, still not sure)

bitter oriole
#

Well, no matter what you do it needs to be on the server

#

Simple timer on the server will do

icy nacelle
#

Okay, so I run an event on the server for the one player? Should I run this through a seperate actor or actually using the character/controller?

bitter oriole
#

Depends on your game. For example if the user can join-in-progress, you might anticipate the player leaving and reconnecting

#

If that's not the case then yeah, simple timer on the player controller on server

icy nacelle
#

Yeah, I'd like it if the player left the game, they'd come back and still have to server the sentence.

bitter oriole
#

Is that also persistent across games ?

icy nacelle
#

Yep

bitter oriole
#

In that case it's not a timer anymore

#

It's more like a database of jailed players in save

#

Doing a MMO or something ?

icy nacelle
#

Slightly yes πŸ˜ƒ

#

This is why I wanted to ask about how to do it, I'm not 100% sure on the right way of handling this

bitter oriole
#

Well at this point you're not in UE4 territory really, it's up to how you store player progression

#

Probably have a "jailed until date X" field in your player database entry

#

Then every few seconds or so on your server, look if the current date is past the jailed date, free the player, reset the date

slim holly
#

so um, I'm doing a quick and dirty playername so I can identify these boxes from eachother

#

but GetPlayerControllerID seems to only work for host

#

but all the controllers to my knowledge should be present on host, yes?

icy nacelle
#

Thanks @bitter oriole

slim holly
#

or is this like a split screen thing only

icy nacelle
#

Anything I should be looking to research to help me along with this?

sharp spire
#

@icy nacelle it sounds like you only want the time to go by while they are in game. you could setup a JailTime float or int, on tick if jailtime > 0 then they're still in jail. Maybe a bool as well that allows the tick to proceed if inJail. And if the timer <=0 and the players coordinates are still in jail, release them

#

I didnt read your whole thread, just the last post or two

icy nacelle
#

I appreciate the help on the logic @sharp spire but I'm well aware of this. What I'm trying to figure out is how to handle a server database for this

sharp spire
#

Are you using built in sav games or a custom database? Technically it's the same process either way

#

Just creating those two variables in the database and having them scripted through your jail code. Sorry if I'm stillconfused, but I dont see why a database would change the concept

bold ravine
#

When my friend joins my multiplayer game (using steam dev id) it crashes for him but it worked the first time but hasnt worked since

#

any ideas?

hazy haven
#

anyone using AdvancedSessions seeing an issue where the "CurrentPlayers" always returns 1?
BP i am using to access it:

thin stratus
#

That's a Steam + UE4 issue afaik

#

Create your own Setting and update it

wary willow
#

Anyone ever have a crash after ServerTravel twice to the same map?

low obsidian
#

Hi, I am trying to replicate players switching weapons but I am not sure the best way about doing this in multiplayer. On the server should I calculate the previous weapon, replicate the equipped weapon and cancel the ads, THEN multicast the swapping animation and the equipping of the weapon?

hazy haven
#

@thin stratus really appreciate the info, thanks πŸ‘πŸ»

agile lotus
#

Is there a way to make this not jittery on clients? It's the way I do parrallax backgrounds in my 2D project

fossil spoke
#

Why wouldnt you just let clients manage the location themselves?

agile lotus
#

I tried that and it was still jittery

fossil spoke
#

Why are you doing an Interp with no speed?

agile lotus
#

Was playing with the settings

#

recent screenshot = recent settings

#

If I dont have anything replicated in this actor its still jittery

#

normally I don't interp at all

#

and it works great in local

#

and on the server

fossil spoke
#

This is not something you should be replicating at all. The Background is cosmetic, the clients should be simulating it completely locally.

agile lotus
fossil spoke
#

Use that but add the VInterp to it with an speed

#

VInterp should stop any jitter

agile lotus
#

Thanks I'll give it a shot

#

It worked no more jitter! I just have to mess with the interp speed to get it how it was before vinterp thanks @fossil spoke

fossil spoke
#

No worries

wary willow
#

@twin juniper On Server it should

thin stratus
#

Anyone know why a ListenServer would print: Warning: Server failed post-challenge connection from <UniqueNetId> even though the Client connecets properly a few ms later?

#
[16.27.16:506][769]LogHandshake: SendConnectChallenge. Timestamp: 7.015589, Cookie: <Cookie>
[16.27.16:506][769]LogNet: Warning: Server failed post-challenge connection from: <UniqueNetId>
[16.27.16:506][769]LogNet: Warning: There is no connection to: <UniqueNetId>
[16.27.16:517][770]LogHandshake: SendChallengeAck. InCookie: <Cookie>
[16.27.16:517][770]LogNet: Server accepting post-challenge connection from: <UniqueNetId>
[16.27.16:517][770]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[16.27.16:517][770]LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: <UniqueNetId>.oculus, Name: OculusNetConnection_0, Driver: GameNetDriver OculusNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[16.27.16:517][770]LogNet: NotifyAcceptedConnection: Name: vrSplashLevelMatch, TimeStamp: 06/05/18 09:27:16, [UNetConnection] RemoteAddr: <UniqueNetId>.oculus, Name: OculusNetConnection_0, Driver: GameNetDriver OculusNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[16.27.16:517][770]LogNet: Warning: There is no connection to: <UniqueNetId>
[16.27.16:528][771]LogNet: NotifyAcceptingChannel Control 0 server World /Game/Maps/vr_splash/vrSplashLevelMatch.vrSplashLevelMatch: Accepted
[16.27.16:528][771]LogNet: Remote platform little endian=1
[16.27.16:528][771]LogNet: This platform little endian=1
[16.27.16:539][772]LogNet: Login request: /Game/Maps/StartUpMap?Name=<UserName> userId: <UniqueNetId>
[16.27.16:561][774]LogNet: Client netspeed is 30000
[16.27.16:606][778]LogNet: Join request: /Game/Maps/StartUpMap?Name=<UserName>?SplitscreenCount=1
[16.27.16:606][778]LogGameMode: FindPlayerStart: PATHS NOT DEFINED or NO PLAYERSTART with positive rating
[16.27.16:608][778]LogNet: Join succeeded: <UserName>```
winged badger
#

IpNetDriver.cpp line 450

#

is where the warning is printed from

#

it is a little bit verbose tho

thin stratus
#

I assume it's not normal that this is printed or?

winged badger
#

it has a category of VeryVerbose

#
            if( !Connection )
            {
                // Determine if allowing for client/server connections
                const bool bAcceptingConnection = Notify != nullptr && Notify->NotifyAcceptingConnection() == EAcceptConnection::Accept;