#multiplayer

1 messages · Page 313 of 1

raven holly
#

¯_(ツ)_/¯

oblique garden
#

Anyone here who can help with a split-screen issue?

#

I'm like, super desperate. It's been months of research and I can't find any help on how to fix this.

#

I've got foliage within my map that works fine with one or two players, but when I play with 3 or 4, it begins dissapearing in patches at random

#

And it's different from player camera to player camera

#

So in that shot, Player 1 (top left) can't see the foliage that Player 4 (bottom right) can

#

Player 1 can see the shadows that they cast though, and can see Player 4

vagrant osprey
#

if I plan on integrating steam, what point in the project a good time to do that? nearing completion, or at the beginning?

rough iron
#

there is no one-fit-all anwser to that, I prefer to integrate it soon in the dev cycle

#

if you do it late in developent you might have to redo a ton of stuff

vagrant osprey
#

like what?

fierce birch
#

Are you talking just steam functionality now or multiplayer in general?

vagrant osprey
#

steam functionality, ive got multiplayer in already

#

in development*

fierce birch
#

Ok good, just checking

vagrant osprey
#

yeah I started out with it in mind

#

so is there something that I may have to redo if i do it later?

#

it seems seperate from pretty much everything else

rough iron
#

I have no idea what you might have to rewrite, it depends on your initial assumptions of course

#

hoy do you travel travel players between your leves

vagrant osprey
#

there will only be one level

rough iron
#

how is your matchmaking adapting

vagrant osprey
#

non-menu level that is

#

no match making

#

its like 16 player coop type of thing

rough iron
#

so the anwser is still the same, there might be stuff but only you know about your code

vagrant osprey
#

hmmm... i guess i should start researching. Ive implemented it before on another unfinished project, so its not entirely new but i could definitely learn some more

#

thanks 😄

rough iron
#

^^

spring oxide
#

@oblique garden it might just be culling because there's too much being rendered. each port still sums up to one cull limit

oblique garden
#

@spring oxide is there any way to adjust that limit, or do I just have to dial down the amount of foliage?

#

My maps are small and this is the most I'd use, so I doubt doing something like removing that limit would cause performance issues, but I can't find any evidence of that being possible.

raven viper
#

Anyone has experience with repnotify vars?

vagrant osprey
#

a bit @raven viper

raven viper
#

We are having a rotation set on repnotify and the net stat says it takes 0.09kb/s to replicate but it's still lagging (LAN)

vagrant osprey
#

is it a physics object?

vagrant osprey
#

well i g2g to school now so hopefully someone else can help

raven viper
#

It's just a sprite in an actor (pawn)

#

I left work already

surreal prism
#

Hi, my dedicated server eat ~4GB ram on linux server, but game on windows consume only 2gb

#

4gb is pre-allocated?

somber lava
#

is there any link between the playerstate and the pawn they control?

thin stratus
#

@somber lava Owner of the PlayerState is the PlayerController

#

So GetOwner, Cast to PlayerController, GetControlledPawn

#

On Server

#

On Client I would have to check

#

Nope

#

Would need you to Pass a Reference to the PlayerState

somber lava
#

aww too bad

#

my target system is working

#

now i wanted to display the enemy name on the UI of the player

#

but that name is saved inside playerstate

#

but my target system targets the pawn 😦

#

thanks for the fast reply though

thin stratus
#

@somber lava The PlayerCharacter has a Pointer to the PlayerState

#

if you have the PlayerCharacter, you can access the PlayerState

#

What i described is other way round

fringe dove
#

why does UE4 use a 512byte MTU? I saw in some code comments or trello that they had moved to 1024 then reverted and had a debate on it? is it safe to bump it up?

#

I mean I know it is safe, but are there any realistic situations where that is going to really cause packet fragmentation for users?

#

gaffer on games recommends 1200 as safe and future-proof for IPv6

somber lava
#

i already found it, still thanks a lot. dont know why i didnt see it in the first place, must have overlooked the connection

vagrant osprey
#

@raven viper youll probably want to Slerp the rotation instead of setting it directly. theres pretty much no way around that

#

also with that you will be able to send the info less likely

raven holly
#

Anyone played with gamelift and ue?

worthy wasp
#

@raven holly - i tried a good 1.5 years ago to do AWS - butj this was before i was able to code C++.... there was no BP support at the time... only thing out there was GameSparks - which sucked at the time (it was new and HIGHLY in development).

raven holly
#

Ok

raven holly
#

Server connection received: ActorChannelFailure

#

Any ideas what this means?

#

When possesing a character

#

It posseses the camera but no input can be made

vivid siren
#

Hey how does the GameMode class behave in multiplayer?

#

Does each player get their own instance? Or is it shared among all connected players

#

Would I have to force all players to reference the Server's gamemode?

fossil spoke
#

GameMode only exists on the server

#

An Client must do an RPC to the server for it to do something with the GameMode

vivid siren
#

Thank you

#

Also, GameMode is where I would keep each players score, right?

#

I assume so but I wanna make sure there isnt some other commonly used thing

fossil spoke
#

Not necessarily. Id put Score on the PlayerState so that its easy for other clients to access other Players Scores for UI purposes

#

PlayerState is replicated to all Connected Clients

vivid siren
#

Oooh, awesome, thanks!

fossil spoke
#

If you have Teams, you may want to hold their information on the GameState

#

Which just like the PlayerState is replicated to all Clients

#

But is used to maintain information about the state of the current session

vivid siren
#

Oh that makes sense, I didn't realise there was a GameState and GameMode, that slipped by me 😛

#

So stuff like score would be on PlayerState, should I include health and ammo on that as well, even if I won't be replicated that to other players?

#

Or is PlayerState exclusively information that needs to be shared?

fossil spoke
#

Not necessarily, depends on how you setup your variables for replication. I generally dont have Ammo/Health on PlayerState, i put those on the Character Base class, because they are specific to the Character, a Player doesnt maintain Ammo after they die, same with Health, those properties live and die with a Character class in my opinion 😃

vivid siren
#

Very true, I'll go with that

#

Any other fun tips? I'm loving this 😄

fossil spoke
#

Ask questions, answers will follow 😛

vivid siren
#

Hmm

#

Is the logic of a gamemode actually in the gamemode? like, announcements that say "5 minutes remaining" and stuff like "if 5 keys are found, 10 monsters spawn" and stuff like that?

#

I'd assume stuff like the 5 keys = 10 spawns would be in the level blueprint, but what about the match timers and stuff like that

fossil spoke
#

Depends, i maintain Time on the GameMode and replicate it to clients through the GameState

#

Your 5keys = 10 spawns yes that would be an GameMode mechanic

vivid siren
#

So what kinds of things would be on the level blueprint?

#

Besides doors and whatnot

fossil spoke
#

I wouldnt do doors in level bp

vivid siren
#

Well, not the press E to open, but like, the special "you must collect this before you can open the boss arena" kinda doors

#

Maybe that doesnt count either though, idk 😛

fossil spoke
#

The only things i would do on the level BP would be triggering cutscene events or level events

vivid siren
#

And when thats called by the server, all clients get updated automatically right

fossil spoke
#

No you would need to tell the clients level bp to do the same thing

vivid siren
#

ooooh

#

So where does GameInstance come into play?

fossil spoke
#

Think of GameInstance as the process of the game on your machine, it is created when you start the game and persists until you close the game.

#

It is only relevant to your machine

#

If you access GameInstance on the client you are accessing the clients GameInstance, if you access GameInstance on the server your accessing the servers GameInstance.

vivid siren
#

And what would you personally throw in a GameInstance?

fossil spoke
#

Generally Menu stuff for the MainMenu at least, session handling, user settings etc etc

#

Usage of GameInstance really depends on what game your making

vivid siren
#

Yeah that makes sense

#

Alright so, say we're playing a game where an enemy spawns at a random point every 10 seconds, where should I store that logic?

cloud ledge
#

What kinda game

vivid siren
#

Nazi Zombies for example

fossil spoke
#

Spawning i usually roll an SpawnManager object that handles that stuff, its maintained only on the Server

cloud ledge
#

I would create a global actor (not based on scenecomponent) that manages this stuff

#

And I would look into a simultaneous server-client spawning

#

Where server spawns an authority of a zombie and client spawns a proxy, predicting the servers next spawn

#

by a predictable random number generator

fossil spoke
#

That maybe a little out of his league right now lol

vivid siren
#

Yeah.. lmao

#

Is that prediction stuff required or just a nice thing to have?

fossil spoke
#

Its not required to have decent gameplay happening

vivid siren
#

What if, for instance, there were 50 instances of an AI wandering aimlessly throughout an area and 3 players are connected

cloud ledge
#

Prediction stuff is required for high spawn rate

#

For example stuff like L4D where there's a ton of zombies

#

It removes the need for server to tell client that a zombie has spawned, server can assume client generated same data and is acting based on same source values - only providing minor low-bandwidth corrections along the way that sync up minor differences

#

Think of it this way - you're spawning 1000 zombies, but spreading out notifications about their presence over a longer period of time

#

If one zombie is a 50 byte notification, instead of a one-time transfer of 50000 bytes you can transfer 500 bytes per second over 10 seconds

vivid siren
#

Yeah I see why that would be significant, So then, this prediction is done by just duplicating the logic used on the server onto the clients instead?

cloud ledge
#

Yes

#

The logic is based on a predictable random number generator. Server still acts as an authority, but client tries to guess servers next moves

vivid siren
#

For some reason i've had it stuck in my head that I would have to do a bunch of (current velocity x direction based on location and probable desired locations) etc etc

cloud ledge
#

Mmm, there are three kinda types of predicting behavior I can think of off top of my head

#
  1. Interpolation - this is not prediction, this is simply interpolation of data from server to produce smooth image. For example, server sends updates of zombie positions every 0.1 seconds. For the duration of each next 0.1 seconds you interpolate zombie state (position, AI state, velocity etc) from previous known position to new known position
#

Pro's: very precise trajectories of movement for objects. Good for stuff that has to retain trajectory data (movement data)
Con's: 100 msec + ping msec lag behind their real positions

#
  1. Extrapolation - when you predict position of objects by extrapolating their last known state up until the present time. So if you received a packet about zombie position just now, it was sent by server 200 msec ago, you extrapolate what happens to the zombie 200 msec into the future
#

Pro's: reasonably or very precise positions. Good for stuff that has to retain its positional data (but it will mess with trajectories, objects will seem to move around weirdly if players disrupt zombies and extrapolation)
Con's: can create really unrealistic trajectories due to extrapolation errors

#
  1. Hybrid approaches/prediction-correction/whatever - when you constantly predict state of the objects on client, every time a new message arrives from server you set a new goal/velocity that is going to bring this object within tolerance of expected state of the object
    Pro's: reasonably good trajectories, reasonably good velocities, any corrections to erroneous data are not as noticeable as they are gradual
    Con's: still retain a delay of ping msecs, your object position can somewhat lag behind
#

UE4 seems to mostly rely on #3

#

Each of these has a corresponding behavior on servers side

#

For example, Source Engine uses approach #1 for player positions. This means that all player positions you see in a counterstrike etc game are actually lagging behind. At the same time, when you shoot against a position of player in the past server will rewind game state and confirm that at that moment in time you indeed shot the person

vivid siren
#

By "past server" you mean the client shoots a player where they were 100msec ago?

cloud ledge
#

Shoot against a position of player in the past, server will rewind game state

#

You shoot at where you see the player (it's lagging behind on your screen), server applies rewinding to check where you were shooting and what player positions were at the time of your shot, time lag accounted for

vivid siren
#

Alright, and so if I wanted to try and implement, say method 3, would this be doable in just blueprints?

cloud ledge
#

Method 3 is doable in just blueprints, yup

#

It doesn't yield reliable data on whether you hit something or no on server - don't use it for player vs player stuff

#

Basically for #3 you have to check what you hit on client, send that info to server, then to a rough estimate on server whether you could indeed make that shot

#

For a zombie shooter it should work fine

vivid siren
#

What about player vs zombies + player vs players?

#

That was my original game plan

cloud ledge
#
  1. will your game be popular?
  2. are you planning that it will be a game friends play or play with random online people?
#

If it's not gonna be a massively popular game and mostly friends play it together, then solution #3 is perfectly fine

vivid siren
#

Considering I've never finished a game, I'll have to go with just a game for friends, but I'd like to aim high 😛

#

Well, I've never finished a multiplayer game

#

So from some research, ive read that UE4 already has prediction built into the movement of players, so do I need to do anything?

cloud ledge
#

You don't need to do anything for CMC afaik

vivid siren
#

Alright thats a bit reassuring, but then implementing shooting is when I have to start worrying about it right?

cloud ledge
#

I think so. I've never looked into making a pewpew game with UE4

#

The game we're working on has no pewpew

#

We're entirely reliant on approach #3 - all player actions are predicted on client, all other object states simulate on player independantly of server, but they are constantly being corrected by data from server

#

So each player see's slightly different world but all players are forced to behave in a way that converges all states to as close to server state as possible

vivid siren
#

Alrighty, I'll see where this info can get me 😄

#

thanks a bunch

versed socket
#

If I want to make Spectators able to do "chase cams" where you can follow a player... do I need to make copies of existing Camera Components for their pawns or whatever and then possess those new components... or is it possible to have more than one PlayerController possess the same camera?

#

Because my current understanding is that PlayerControllers take exclusive possession of camera components...

slim holly
#

well technically, if you only do it in client end

#

it shouldn't affect other players

#

to be sure, I would also set camera component to be not replicated

#

but I'm not sure, I prefer using separate camera actor

versed socket
#

Oh hey that's a really good point, I forgot that components don't automatically replicate. I knew that there had to be some really simple solution. I'm an idiot sometimes.

thin stratus
#

They removed the boolean to conrol if they replicate or not from blueprints or?
Cause I was only able to set that via "SetIsReplicated"

native axle
#

@thin stratus Component Replicates is still there in 4.15

twin juniper
#

hey'

#

can u multicast on a playercontroller

#

i forgot

slim holly
#

iirc no

#

it only exists on server and owner client

vagrant osprey
#

that is correct, player controller only is on server + owning client. Player state is across all though

twin juniper
#

is it possible to keep a single Onrep function to only run on specific clients (with a boolean set as true)

vagrant osprey
#

onrep will only run on the owning client of a player controller if the replicated function is for the player controller, so idk about specific clients but that works at least

twin juniper
#

ya

#

hm

vagrant osprey
#

it may be possible i just dont know how

jagged lotus
#

Hey i have a question about a project ive been making. i need to connect it to the steam service, do i just change that in the Engine.ini file ?

thin stratus
#

@twin juniper You could limit it by setting the Replication condition

#

That got added in 4.14 i think

#

But the class you have the replicated variable in would still need to have instances on all clients

#

PlayerController only replicates to owning client as already mentioned

vernal depot
#

does GameMode NumPlayers include all human players, including travelling players, or just the players that already have the next world loaded?

#

oh nvm, found it in the code 😛

slim holly
#

question: how does "initial only" replication work?

#

is it just once per new client?

jovial ravine
#

Has anyone integrated GameSparks? I wanted to see if there was an object I could check to see if the user was already authenticated so we didn't popup the login.

versed socket
#

I just finished reading @thin stratus 's networking compendium. Does anyone know where I can find out more about making the multiplayer work in final builds? Because apparently it seems that you can't just give a copy of the game to your friend and have them manually connect to your IP and forwarded port?

brittle sinew
#

I don't see why you technically wouldn't be able to do that, it just wouldn't really be a good solution for releasing a game

vagrant osprey
#

i was trying to do it a while ago just for testing with a friend and it absolutely would not work

#

i never figured out why/how to fix it

#

it doesnt happen with some other projects though

brittle sinew
#

The biggest help in that situation is usually your logfile

#

Most things MP-connection-related will end up there

vernal depot
#

I'm seeing something similar. If I package my game and "open IP" I connect to my dedicated server but replication is broken. If I PIE and "open IP" to my dedicated server replication works. Really confused by that difference in behavior.

thin stratus
#

Rule of thumb: Do not trust PIE + Multiplayer

vernal depot
#

definitely not

#

I'm pretty much at "Do not trust PIE" for any kind of testing 😉

fluid flower
#

that goes a little too far 😛

vernal depot
#

well true but I'm taking a single-player demo and making it MP

#

so I went from "I ❤ PIE" to "OMG PIE why do you hate me?"

versed socket
#

So the natural follow-up question is: where do I learn how to make a project so that I can give the packaged build to my friend and have them connect to my listen server?

slim holly
#

damnit

#

stupid replication delay

thin stratus
#

@versed socket The process is called packaging. (google). You would package the game as a development build (not shipping because that removes a lot of useful debug tools, like the console)

#

After packaging, you'll have the usual combination of gamefiles and exe that you can send you friend

#

You both need to use that version

#

Connection is then made through IP, as long as you don't have a subsystem like steam

#

Make sure you have a console key exposed or maybe even a way to host and connect via IP in your main menu

#

Either way, Server launches with OpenLevel node and listen as an option, or with console command, open MapName?listen

#

Client connects with console command, open IPADDRESS

slim holly
#

I wonder is this really smart

#

using OnRep owner only to trigger UI updates on variable changes

thin stratus
#

afaik, yes this is smart

#

Although it depends a bit on what you are changing

#

I always try to set variables like Health on the client too.
So he instantly has updates for his UI. A bit higher ping would result in delayed UI updates

#

But the OnRep thing is good if the UI doesn't need to update instantly

slim holly
#

Just updating player lists on team selection screen

#

not really time sensitive stuff

slim holly
#

hm, doesn't seem to work

#

I guess it only triggers when remote updates it

slim holly
#

these column/row fill rules make no sense >_>

twin juniper
thin stratus
#

@twin juniper what you want to do?

slim holly
#

question: how would one trigger a killfeed message

#

I got HUD message event in controller, damage/death is handled inside the pawn in remote end

#

trough gamestate maybe?

thin stratus
#

Hm

#

Might be worth making a "KillFeedManager" component on the GameState

#

That simply handles calls from the Server to supply everyone with the killfeed

#

Server on the Pawn registers if someone is dead and sends the information to the manage

#

He then turns the data into what ever is needed to display your killfeed and multicasts it (maybe in a struct)

#

And in the Multicast, the client-side can then create the widget etc

#

@slim holly

wintry cove
#

So i traced down a Seamless server travel issue, issue is that the player state stops replicating, or better yet RPC calls can't call from owning client anymore(probably because owning client changes?), I think it may be something to do with having a different player controller/gamemode before travelling. I check the bool if it repliactes and it does, so i'm kind of at a loss here on what to try

thin stratus
#

Seamless travel has some other things that happen and need to be taken care off.
There are things like "SwapPlayerController" and what not. Moss is still the person I would recommened to ask

wintry cove
#

I did but he's at a loss

thin stratus
#

Lost or he doesn't know either?

wintry cove
#

Loast

#

Updated the engine now to see if that fixes it

#

looks like i'm getting further

thin stratus
#

From what to what engine?

wintry cove
#

4.12 -4.15

thin stratus
#

:O

slim holly
#

that's gonna break everything

wintry cove
#

I was under the impression to

#

but it actually didn't for as far as i can see

slim holly
#

I'm really starting to hate BP enums

#

they break in every update

thin stratus
#
    // Note: this is very important to set to false. Though all replication infos are spawned at run time, during seamless travel
    // they are held on to and brought over into the new world. In ULevel::InitializeActors, these PlayerStates may be treated as map/startup actors
    // and given static NetGUIDs. This also causes their deletions to be recorded and sent to new clients, which if unlucky due to name conflicts,
    // may end up deleting the new PlayerStates they had just spaned.
    bNetLoadOnClient = false;
#

Might be worth setting it to false for Seamless travel then again

#

I really need to look into seamless travel. So freaking bad documented

#

Though iirc, you had the issue even when it was false

wintry cove
#

Yeah

#

but i'll fix it, somehow xD

thin stratus
#

But better set it to false then, at least on the PlayerState of the Gamelevel

wintry cove
#

RPC works now

thin stratus
#

After updating?

wintry cove
#

yeah

slim holly
#

is there a more elegant way to do that?

wintry cove
#

Execute on owning client? @slim holly

#

Well, depends what blueprint you're in

slim holly
#

that's in gamestate

wintry cove
#

And you want to broadcast a message to every player?

slim holly
#

every controller

wintry cove
#

Get players in game state, cast to playerstate of your desire, get owner and that is the controller, cast on those owning clients

#

at least that's how i'd do it

slim holly
#

well yea foreach loop on playerarray is one way

wintry cove
#

Yeah, then you already have the player states/controllers without needing to find it in the multicast

frank portal
#

beginner question: Almost every multiplayer tutorial is with integrating steam ... so for example when I test my game in editor with dedicated server will it work when i setup my own gameserver later ? ... just wanna start with multiplayer, but I am not sure when I follow the tutorial from epic if i will be able to use the same logic later for my game ^^ ... hope it wasnt too confusing what i wrote

thin stratus
#

Hm

#

Yeah, in theory you can develop your game with the "fake" Dedicated Server from the Editor

#

But PIE (Play in Editor) has hickups with Multiplayer, as it's mostly simulated under one process.
So you should normally, from time to time, start your game as two standalones and test it then (rightclick uproject file -> launch game)

#

"Problem" with Dedicated Server is, that there is easy button to press to start it.
My compendium (Pinned to this Channel at top right pin icon) lists the command line arguments you can use to start a Dedicated Server of your game

#

In the end, when you want to actually HOST the server, you need to download the Source of the Engine from Github

#

And compile your Dedicated Server with that, as the Launcher version of the Engine does not support that

#

But that's a late state, as long as you don't want to test the Server

#

IF you want to test the server more often on a different computer that doesn't have the engine installed, then, of course, you need to compile/package it

slim holly
#

I guess PIE "dedicated" is good enough to check does the game logic work

thin stratus
#

It really depends

#

The command line to start a dedicated server would be something like this

#

start /d "%EnginePath%" UE4Editor.exe "%ProjectPath%\%UProjectFileName%.uproject" %MapName% -server -game -log

#

That's from a bat file I wrote myself

#

The %% are variables which need to be filled with the actual path etc

frank portal
#

ok thank you for the fast answer ^^ ... I will look at the pinned post and i need to have the port 7777 opened ? will it work for android too ? mhhh ^^ hope most stuff will be logical when i tried it the first time

thin stratus
#

No idea about android

#

Might be that android can connect to the Server via IP

#

But it depends on what your game later has

#

If you want a Server Browser, then it could get a bit ugly with android

#

as the GooglePlay Subsystem has no masterserver

#

afaik

slim holly
#
  • almost every mobile data connection is behind nat
#

does UE4 support ipv6?

frank portal
#

mhhh sadly there arent many informations about that topic tbh i didnt even found a single really helpful site how it will work without steam, but thx for the answers ... why would u need ipv6

slim holly
#

because I can't get public IP from ISP, however they do support ipv6

twin juniper
#

@thin stratus have the player press a button that tells the server to do a line trace and teleport the player to the hit location

thin stratus
#

And what exactly is not working

twin juniper
#

It's just not doing anything if the client pushes a button. Server works fine. Client nodes execute and the line trace & teleport both return true.

thin stratus
#

Does the RPC reach the server?

twin juniper
#

Yeah

thin stratus
#

Hm

#

Movement is probably not replicated on a Pawn

#

Cause of no MovementComponent

#

Try to multicast the location update from Server to clients

twin juniper
#

Would adding a movement component help?

thin stratus
#

And set the location update on the owning client (The one that presses the button) directly, in addition to the RPC

#

Maybe

#

But that's overloading it

#

You don't need it

#

KeyPress -> LineTrace -> SetLocation -> ServerRPC -> Multicast -> SetLocation

#

That might fix it

twin juniper
#

Got it. I'll try it when I get home in a few hours

thin stratus
#

The SetLocation on client is to prevent lag

#

Or the feeling of lag

twin juniper
#

Thanks for the help!

heady merlin
#

I know that from 4.12 - 4.13 migration when they switched over to plugins for the subsystems that I had a couple of projects that "corrupted" and didn't allow for clients to fully load into servers anymore (replicated actors don't load, they possess a pawn but are left without Beginplay being called floating in midair uncontrollable). Has anyone had this happen in 4.15? I had a project recently break again like this.

#

brand new projects with the exact same code and ini files still work fine....

slim holly
#

amazing, server getting access none on gamestate >_>

brittle sinew
#

Is it on BeginPlay? That's probably too early for it

slim holly
#

like half a minute into gameplay

brittle sinew
#

Oh 😰

#

Is that like a one time thing you're talking about? Or does it never work?

slim holly
#

PIE:Error: Error Blueprint Runtime Error: Accessed None trying to read property Controller from function: 'GetPlayerName' from node: Return Node in graph: GetPlayerName in object: RecoilChar with description: Accessed None trying to read property Controller

#

on listen server, function inside character, cant find controller

#

amazing

#

by adding another layer of valid checks seems to fix it, but it's still returning valid controller on first run

cobalt vapor
#

Hmm I think I might end up doing something like Rama's solution for multiplayer physics just to reach a prototype stage and get some more Unreal C++ experience. Networking is kind of holding me back in development right now.

#

I don't want to start drafting a bunch of stuff without networking in mind only to have to rewrite it all.

#

Already close to the same point I stalled in Unity, only this time progress is actually possible xD

rancid nimbus
#

Can anyone help me with deciding what type of multiplayer my game should be if i list some features i would like, Direct Message me if you're willing to help with this 😃

worthy wasp
#

@rancid nimbus - just list it here - what you got?

rancid nimbus
#

a 3rd person Hack n slash, i want the multiplayer but not sure if it should be mmo or less multiplayer than that xD
i want to have Missions that can be 1-4 players and pvp tournaments sometimes that would be 5 per team kind of thing, i would also like to implement some world event type things but not sure if that would be strictly an mmo thing or not

worthy wasp
#

well it depends on the missions and the CARRY OVER state of your game - will these missions be logged/saved and carry over into future game sessions?

#

if so - some database needs to happen. if this is going to be a LIVE SERVER (on 24/7) then your infrastructure needs to be a dedicated server - more than likely holding a database table externally to contact to save state of these missions your talking about

#

you can still get by with a Peer to Peer (P2P) infrastructure - if youre just going to be saving match history & mission status - you can still talk to a DB without having the dedicated server

#

but if its goign to be an open world - where people can come and go into the world as they wish... then yes - you'd need a dedicated server

rancid nimbus
#

i would like available missions to depend on the world state kind of thing, so you could potentially get the same mission twice if for example it was to clear some predators from a nearby area then they might come back and you can do it again, but i dont want it to be always there (hope that made sense xD)

worthy wasp
#

then you are looking at an MMORPG it seems like

#

and would be a DEDICATED SERVER

rancid nimbus
#

thought as much

#

thanks 😃

#

oh is real time combat tough on mmos? i've only really played mmos where everything is global cooldowns and stuff

worthy wasp
#

your design is yours - own it & program it!

In a multiplayer networkign schema - you have to count for lag & not everyone seess everything THE SPLIT SECOND something happens

#

theres methods to play the game "IN THE PAST" - a few frames ago

#

when i first started networking - i read a post about this very topic... was a very interesting read

rancid nimbus
#

fair enough 😛

#

atm im on my own with this project and kind of new to game dev at all so only bp xD but kind of just making what i can and building the picture of the end result in my GDD 😛 Thanks for your help ^^

slim holly
#

if you have generic idea how quantum states work, you should have no problems understanding unreal networking

#

/s 🙃

granite jolt
#

in which case, just set everything to replicate and it will both replicate and not replicate.

rancid nimbus
#

hehe no idea tbh but its likely it wont be made until i have more people and hopefully at least one will know more about it xD

granite jolt
#

its odd that you would make a multiplayer game first tbh. I have worked on 3 released titles and dabbled in a dozen prototypes and I still haven't touched multiplayer ;p

worthy wasp
#

^^

#

it takes complexity level and multiplies it by the power of PI

rancid nimbus
#

its the one project i really want to make but unlikely to be my first release 😛

granite jolt
#

I have a dream project that I am chasing. I won't start it until two things happen. 1. im confident I can make it (which I can) and 2. I get the licensing (which I can't).

worthy wasp
#

and not only the complexity - but your infrastructure and $$$ to even have the project working is greater

#

server hosting for one is otrociouis

#

thats why if you can leverage P2P its a better approach

rancid nimbus
#

i had thought of that but cause of some of the features i want it wouldnt work 😛

worthy wasp
#

it very much still can - i dont think you fully understand the power behind a simple web database

rancid nimbus
#

(just to be clear, Dark Souls is P2P right?)

worthy wasp
#

your common P2P models are Call of Duty

#

Battlefield

granite jolt
#

P2P is terrible though

worthy wasp
#

how do you figure?

granite jolt
#

bad connections,. ISP traffic management spoiling it.

worthy wasp
#

true - but you're also looking at a infrastructure requirement for the game type you're building

#

why would you have dedicated servers for a Call of Duty style game?

granite jolt
#

on most UK ISPs you would be throttled to extreme amounts. It's a scam if you ask me

worthy wasp
#

the price to run these server instances alone would be ginormous!

granite jolt
#

well dedicated = less cheating if you setup right. Also means games are always available even for those with a bad connection.

#

price is more a thing I would let the investors worry about

worthy wasp
#

but when your @rancid nimbus with no investors and starting up - thats not an option

rancid nimbus
#

😄

granite jolt
#

well he might put together a boss prototype and get a million quid on kickstarter :p

rancid nimbus
#

i wish xD

worthy wasp
#

and dont let me scare you off Ikaruza - MMORPG servers - your looking at some pretty above the average programming thats going to be needed

fierce birch
#

good thing about player hosted games is that the online experience doesn't vanish after 1 year if the game wasn't a big success :p

#

(didn't read anything what this was about)

granite jolt
#

I guess that's one upside but then game devs that abandon multiplayer support could also release the dedicated server for use :p

worthy wasp
#

Backend development alone is its own entity - not even closeley related to what we do here in UE4

slim holly
#

question: PIE does trigger EventPostLogin for listen host too?

#

it doesn't

#

that's dumb

#

or maybe it does

hazy siren
#

session / match based multiplayer is pretty easy

#

maybe 3x more complicated than single player

#

persistent worlds, mmos, that kind of stuff is where it really spikes

worthy wasp
#

@slim holly - in my testing - i've print stringed EventPostLogin() and see it fire all the time in either PIE or Standalone - the only benefit to Standalone that I see is that you get to utilize Steam API in effect

slim holly
#

apparently it happens so early for host it doesn't log it

#

I added 5 sec delay to it and now it shows host logging in too

chrome bay
#

Anybody know why a LAN game won't connect on the same machine with Steam Subsystem?

#

Apparently.. OSS: Invalid session info for session Game in GetResolvedConnectString() is my issue -.-

vagrant osprey
#

you cant do it easily

#

Its because of steam

chrome bay
#

Any idea if it works with Null subsystem? That'll do me fine for now

vagrant osprey
#

actually you might not be able to do it at all, and it might

#

I was able to get it to work by playing in editor and in a built version

#

the editor version didnt have any steam stuff though

#

i think standalone + built version worked as well but i dont remember

chrome bay
#

I'll try with the null system and see if that works first, annoyingly have to package game again though sigh

#

I'm guessing Steam doesn't allow a player to connect to themselves

vagrant osprey
#

yeah its about like running 2 games at once or something

#

and game sharing concerns i guess

#

Im pretty sure null subsystem is how youre supposed to test though unless you make a new account on another pc

chrome bay
#

Ah yeah Nullsubsystem works

#

Okay at least I know my sessions are working haha

thin stratus
#

@chrome bay you can't test steam on the same machine

#

It should tell you in the log of the second instance

#

You need 2 pcs or some virtual machine

#

You also need two steam accounts

#

At least that is what i experienced

fiery jetty
#

You cannot test steam on the same machine

#

Also, has anybody had an issue with replicating functions to the server in 4.15?

brittle sinew
#

I haven't seen anything specific to 4.15 so far...what type of issue are you having?

fiery jetty
#

Everything was working fine in 4.14, but after updating my events that got called to the server just don't get called. The person calling to the server is the owning client too.

brittle sinew
#

Have you tried doing a full clean build on that project specifically, and possibly trying it on another 4.15 project? I would think the issue would lie in the upgrade rather than 4.15 itself

#

It's weird, upgrading in-place doesn't really seem to give catastrophic failures often, but just really weird stuff happens

fiery jetty
#

Right, I have never had an issue with upgrading before. I will continue looking into it and get back to you on it.

glad sedge
#

hey folk. Broadly speaking, is there a way to receive HTTP requests?

cloud ledge
#

Broadly speaking, yeah

raven holly
#

Sockets

#

No?

cloud ledge
#

I think there's already a built-in thingy

glad sedge
#

oh ok

raven holly
#

Va rest can send them

#

Not sure about receiving

#

Unless you use web sockets or something

glad sedge
#

oh I'll check out Unreal's websockets

raven holly
#

An initial connection would need to be made first

glad sedge
#

looks like I need to setup a server

raven holly
#

To put the question into context what are you using it for?

glad sedge
#

Doing some VR demos and I want to trigger certain events via a web browser button.

#

Simplistic, but I find standing over a keyboard and hitting a button can be distracting for client pitches.

raven holly
#

One way to do that, would be to poll a specific endpoint

#

Every x amount of seconds

#

To see if it changed

glad sedge
#

yeah that's true

#

Looks like sockets is the way to go tbh.

raven holly
#

Sweet 😃

glad sedge
#

Thanks!

#

8D

cloud ledge
#

I use websockets

#

But not through UE4

#

Websockets work really well though

uneven marlin
#

struggling with blueprint multiplayer pawn possession, can anyone give me some pointers?

slim holly
#

as long as you possess on remote end, it shouldn't be an issue

#

client cannot do that

uneven marlin
#

yeah, i tried that- a lot

#

server only rpc onPostLogin

#

the server can control its pawn, and sees the clients pawn. the client can see the server pawn and its own pawn, but can't control its own pawn.

#

hm

#

#rubberducking

#

gonna go try something xD

slim holly
#

are you sure it's and possess issue and not an input issue?

uneven marlin
#

i may be wrong about what the actual problem is. so i'm looking at the blueprint, and i do see the input being fired

#

it's as if Directional Vector doesn't get set

#

when the client does it

slim holly
#

that's because only authority can set variables

#

client can request auth to change the variable

#

but cannot modify it directly

#

(if it's set to replicate)

uneven marlin
#

should i try putting a server side rpc between the input and the variable set?

slim holly
#

or use the default movement input node that is already replicated

uneven marlin
#

the server now sees the client pawn move

#

but the client doesn't

#

do i need has authority + multicast?

#

am i thinking about this the wrong way?

slim holly
#

is the actor set to replicate?

uneven marlin
#

^ pawn

native axle
#

@uneven marlin have you checked if your client has owner ship when u press w?

uneven marlin
#

this way?

#

what prints out is: "Client 1: " <- blank after Client 1

#

so the owner isn't set correctly

#

could that be the problem?

#

game mode:

#

controller:

slim holly
#

I recommend doing the spawning in gamemode, possess using the controller pin from postlogin

#

no replication required

uneven marlin
#

okay, 2 sec, ill try it

slim holly
#

also no auth check required in gamemode, it doesn't exist on clients

uneven marlin
#

didn't know that, thank you

#

same result. client pawn only moves on the server

#

owner is still blank

slim holly
#

ownership isn't really a dealbreaker

uneven marlin
#

so, i verified that the direction vector is actually being set on the client

#

it is

#

gonna check my movement function

#

osht

#

hm

#

so i'm moving my pawn with AddWorldTransform

#

AHA

#

i wasn't multicasting my move

#

😤

#

is that the correct way to do that?

slim holly
#

probably, I haven't done custom movement system for multiplayer

uneven marlin
#

oh man

#

thanks so much you guys

#

5 days of banging my head against the wall

#

learning is so much fun 😉

#

😄

dense citrus
#

Who knows why always if I create a server session I find no server

#

I use steam with advanced session plugin

#

I try it now with 3 Friends and 5 different pc's

#

But nothing

slim holly
#

what engine version?

dense citrus
#

4.13

slim holly
#

yea I had issues with 4.13 and steam integration too

dense citrus
#

My log showes SessionInfo: HostIP: INVALID SteamP2P: 76561198014971980:7777 Type: Lobby session SessionId: Lobby [0x1860000B7ED9D14]

slim holly
#

have you tried enabling/disabling p2p?

dense citrus
#

No where I can do it

slim holly
#

engine ini

#

it's under the steam settings

#

wait, I guess that doesn't affect the server browsing

dense citrus
#

In my browsing log seems all OK because it shows me that he found couple sessions

slim holly
#

shows sessions in the client hud or in the log?

dense citrus
#

Log

slim holly
#

you have your own steam app id or are you using 480?

dense citrus
#

480

slim holly
#

well 480 is for testing purposes, its gonna always find sessions

#

and write them down in the log

dense citrus
#

Yes but it shows me that my BP it working ;)

slim holly
#

well no, unless you're actually receiving session list inside the client

#

did you remember to use FindSessionAdvanced node?

dense citrus
#

Mmmh wired inside editor it works like charm

#

Yes

slim holly
#

I would still recommend using default create/find sessions until you're absolutely 100% sure it works

dense citrus
#

Ok ..

slim holly
#

Advanced session node is only beneficial when you start to filter out sessions

dense citrus
#

Ok right now I use also a filter

#

To filter my server name

slim holly
#

da fuq steam

#

LogOnline:Warning: STEAM: Session Game Already exists, can't join twice

#

waow that's one dumbass bug

#

so joining session is bound to OnPressed

#

but it triggers twice on touchscreens

#

which then causes joinsession to be called twice

#

resulting 100% fail rate

slim holly
#

well, good news is that NAT punching seems to be finally working correctly

thin stratus
#

disable the button after the first click?

slim holly
#

yea did a timed gate on it

#

I was under the impression it would have been blocked by the steam subsystem like it does for the refreshes

thin stratus
#

Refresh does do that either, does it?

#

I disable buttons that have latent actions always to make sure i don't call it again

slim holly
#

Log shows it blocks refresh on get sessions if you try to call it before it's done

slim holly
#

right, so on to tackle the issue of replicating 5,5million floats

heady merlin
#

20MBs of floats?

#

why ever for?

slim holly
#

map data

#

and it's only like 12MB when I strip down the useless values

heady merlin
#

Are you compressing it?

slim holly
#

I could compress it after that too

#

issue is the timelimit

heady merlin
#

whats the precision requirement / timelimit?

slim holly
#

between map switches

#

1min30sec or so

heady merlin
#

compression isn't going to cost you there

#

it will only help

#

do you need full float precision though?

#

can get it even smaller otherwise

slim holly
#

I can strip it down to integers

#

the raw data is in floats tho

heady merlin
#

thats the same size

#

talking about conversion to shorts or something

slim holly
#

I'm not that familiar with data types

#

and their footprint

heady merlin
#

ah, whats your min / max values

slim holly
#

unset, but by default the maps is 150x100x50m

#

at stepping of 1m

heady merlin
#

where are you getting 5.5 million from then

slim holly
#

loc/rot and content

#

so transform each

heady merlin
#

all blueprint?

slim holly
#

ye

#

performance is fine

slim holly
#

hmm, never heard of such

heady merlin
#

not aware of a rot version in blueprint

#

though they pack rots to shorts in code fairly often

slim holly
#

I could squeeze that into normal and degree

heady merlin
#

there is a quantized normal as well

#

is this a voxel attempt btw? from the sounds of the data it seems like it

slim holly
#

similar idea yes

heady merlin
#

because you can get far smaller sends if you do Run Length Encoding of block type, from a stepped location you don't actually need to send the actual location of a segment

#

if it has a local offset you can use smaller positions

#

generally in anything that has a set increment like 1m you shouldn't need to send the position of each element

#

since you also know the total map size

slim holly
#

it is clustered with origin location and I can convert it local/world position

#

one cluster is 125m^3

heady merlin
#

sending it as local and doing a net quantize10 or 100 would save you a ton of memory

#

but do they ever go offset from on even meters?

#

or are they guaranteed to be even meters located

slim holly
#

because map building takes in world locations

heady merlin
#

yeah but you have cluster locations correct? to act as a base point

slim holly
#

yes that is stored too

heady merlin
#

and are they evenly metered to that cluster?

slim holly
#

yes, every location is snapped to grid of 100

#

clusters are snapped to 500

heady merlin
#

ah, so you don't need to store locations at all for the elements

slim holly
#

ye so the real world value will be like half of the maximum filesize

heady merlin
#

you just store the cluster location, everything within that cluster is snapped to a set grid, so you only store whether it is "full" or "empty" and what it is

#

that lets you do Run Length Encoding on it

#

and get your total down to like 1/50th

#

or less/more

#

depending on variability and density of data

#

RLE should be fairly easy to implement in blueprint

slim holly
#

I see

#

this should be doable

#

if I clamp the transform rotation in 5 degree intervals, I could save another 3 bytes per element

heady merlin
#

when I was playing with replicating my voxel plugin I had a world many times the size of yours, and before splitting it was 11kb, and I thought that was too large at the time.

#

memory management is very important for things like this, if you get the base memory efficient than all of the other operations work better, from editing / changing and replicating those changes, to iterating over it, to sending the entire data structure.

slim holly
#

so even at manual replication it would take like 70sec max

#

ye this is doable

heady merlin
#

well....that 11kb was 117,964,800 voxels though, you should be able to get far lower

slim holly
#

oh yea that calculation was before RLE

#

so it can and will be lower

#

I just do worst case scenarios

heady merlin
#

is your rotation full 3 axis?

#

would think that yaw and maybe pitch would be all you would need

#

depends obviously, don't know why you are storing rotation to begin with

slim holly
#

because the building parts are not just blocks

heady merlin
#

if you can get 255 steps of rotation and do a byte per axis you would save a ton

#

then you aren't storing location unless you need offset from 1m, and your rotations are far smaller, its just up to the data then

cloud ledge
#

Maybe sending a packed quaternion would be better

#

a 24-bit quaternion

#

only XYZ, you can recompute w from normalization

heady merlin
#

he is working in blueprint

#

kind of limits it

slim holly
#

504 bytes per full cluster, don't think I can go lower

#

-4 if I drop the cluster int and rely on logic

jolly berry
#

yo I got steam multiplayer working, but when my friend joins the test lobby my camera/controls detach from my actor and get stuck like this

#

now I know vehicle replication is working because when he moves I can see him moving

#

but idk why my camera randomly detaches

#

and controls

brittle sinew
#

Is that camera at your (0,0,0) location when it "detaches"?

#

I ran into that once by accidentally trying to call a multicast RPC on a PlayerController, though I'm guessing other things could call it in MP

heady merlin
#

usually happens when your pawn gets de-possessed

#

generally its the other way around though, forgetting to turn off Auto Possess on player 0 and clients get kicked out of their pawn on connect

jolly berry
#

@heady merlin hey that's probably it, I'll try that when I get back!

golden crown
#

hey, anyone has some experience in getting dedicated server listed in steam in unreal?

#

I have a running dedicated server, which seems to work so far (i can connect to it via Direct connect). If steam is running, direct connect is not working anymore, but the game is not listed when using find sessions

slim holly
#

afaik steam doesn't support direct connect, at least I'm not seeing traditional IP addresses in the log

#

also is your dedicated creating session automatically?

golden crown
#

oh by the way, i see that i have actually to publish the policies changes to steam (which i didn't so far)

#

let me try that first ^^

golden crown
#

alright, it is still not working as intended, too bad...

#

well @slim holly uhm... i'm using the plugin Advanced sessions

#

and there i have a special dedicated server map, which will select a random map, will create a session (CreateSessionAdvanced) and will open the selected random map

#

so, if steam is not started on the server machine, it will create some kind of lan session, where i can connect to using direct connect (Open level with the ip). If the steam client is started on the server machine, it is not possible to connect to the dedicated server anymore (no direct connect and no session found)

#

Only thing i figured out is that if i add the server ip to my favorites in the Steam server browser, i will get some server informations

#

As far a i heard, it is not required to run steam client on the dedicated server machine to list it on the steam master server, but i have no idea why unreal requires it

slim holly
#

well it can't use steam api if it's not logged into it

golden crown
#

Alright i got it listed on the Steam master server

#

needed to forward port 27000 - 27015

thin stratus
#

Eeehm

#

Weird that this is working without the pullRequest

#

Dedicated Server + Steam is meant to be broken

#

Because it's not actually registering the Server. Are you sure that you are not just seeing the Server cause of your LAN?

golden crown
#

Well the pull request is actually intended for the authentication

thin stratus
#

Yeah, well yeah, but afaik that covers the listing too

golden crown
#

well, i just added the real internet ip instead of my lan ip

#

there are many many steps until it is working, its pretty unintuitive

thin stratus
#

Hm, well, I would try to find the Server from a different machine outside of your network

golden crown
#

oh well, thats a good suggestion

#

When i'm done so far, i will do a linux version and put it on the online server for our website

#

hmmm, i still need to get the listing working in my network first (why should it work outside, when it is not even working inside)

dawn glen
golden crown
#

hmmm, looks like BeginPlay is being called too early?

dawn glen
#

there is nothing in blueprint, its only running c++ lol

#

but editor says nothing, only when i run dedicated server

golden crown
#

by the way, in my case: the dedicated server is not listed in the game when steam is running, finally! BUUUT... its pretty unreliable, sometimes its there, sometimes not

#

Do you use the dedicated server in editor, or do you build the dedicated server?

dawn glen
#

its a built server

#

if i run dedicated in editor i dont get that error anywhere, only when i run teh built one

golden crown
#

alright... did you check the Server Default Map (Project Settings/Maps & Modes)?

#

maybe the server is starting with some weird map causing that issues

dawn glen
#

no the server starts fine with it

#

runs fine

#

i just dont like errors

#

this error in 4.15.0 that still runs might lead to it not running in 4.15.1

golden crown
#

Well looking into your error log, you have an AISpawnVolume somewhere in the level

#

this one is causing the error, seems to be at least

#

cannot say what you have there exactly, but you probably should take a look there

dawn glen
#

i have that actor yes, it spawns AI, the BP is nothing more then a BP version of a c++ class. Nothing in it. Everything is set and run by c++.

#

i think i found it

#

Super::BeginPlay();
was in BeginPlat() twice for some reason... wonder why editor says nothing about htis

golden crown
#

ah okay

dawn glen
#

@sonic heron i found that too when i just did a google on Super::BeginPlay();
to see if it was supposed to be at start or end. But i thought it was a multiplayer thing since the editor gives no errors what so eve. only when built dedicated server runs

#

was just scanning begine play code and caught it in there twice.

glad sedge
#

Hey guys, looking to do a prototype multiplayer game with 6 people. relatively experienced with Unreal, but haven't touched Multi

#

Anything I should look out for that's not in the offical documents that I should be aware of?

golden crown
glad sedge
#

Thanks @golden crown

#

I'll check it out.

heady merlin
#

@thin stratus Pull request is for identity so the server can validate clients, without it clients can't be validated as actual owners / can connect with pirated versions

#

Actually finding the server itself has been possible for awhile now

#

That being said, between audio component lock downs, no identity integration, flag identifiers being too long, and a few other reasons that have persisted for almost two years now. Might finally just be time to make an AdvancedOnlineSubsystemSteam and integrate all the fixes into it......

#

Oh, default nodes still can't see dedicated servers though, they don't turn off searching for presence so it only looks for lobby hosts.

thin stratus
#

I'm talking about C++ Session creation anyway

#

As I don't take the plugin into account

#

And I was really sure that the Dedicated Server listing doesn't work without the PR

#

As multiple users said that they can't see their server + the thread on the forum about exactly that

#

But if it works the ngood. Then I don#t need to tell people that the PR fixes it

golden crown
#

yeah, but now i have the next problem here

#

how to create multi instances on that one machine, which are all listed?

heady merlin
#

I was referencing you talking about Kuchen

#

The PR is still pretty vital for proper dedicated servers though

#

Kuchen have to use different listen ports

#

Also anyone complaining about not finding the servers either has the ports closed, or is defaulting searching with presence to true.

thin stratus
#

Wouldn't presence crash the Server anyway

heady merlin
#

talking about searching though, the steam subsystem branches off of the search flag. if its set to search presence it looks for player lobbies, if not, it looks for servers

#

they are two different calls in steam SDK

thin stratus
#

I know, but the presence bool when calling RegisterServer crashed the server in the passed

#

At least i think that it did

#

No about about doing that in blueprints as register server is not exposed to it

heady merlin
#

probably still does, but clients can still use the flag seperatly

golden crown
#

@heady merlin, alright, i double checked: The router is forwarding port 7777-7780 to the server, both, UDP and TCP. For starting the server with the specific port, i use the command line -port 7777 for the first instance and -port 7778 for the second

#

but steam only lists the first started one

#

no matter if i start with port 7778 first or with 7777

prisma lion
#

Is there any tutorial about sessions?

golden crown
#

@prisma lion, there are, kinda... its a little bit tricky and the whole setup process of dedicated server for steams in unreal seems to be... work in progress

prisma lion
#

Also how would I save multiplayer data? Pass everything to php/mysql ? Or write some custom c++ code to save it locally on server maschine?

golden crown
#

well seaching for multi instances of dedicated servers for steam in unreal 4 are apparently already too much things

#

google can't handle it or lets say... its too specific? ^^

#

you mean persistent multiplayer data?

prisma lion
#

Yes, like level or something like that

golden crown
#

uh, you can save it in a database, or in a file, its pretty much up to you

prisma lion
#

Kuchen I was living in Hamburg for a while 😛

#

Now Colonge

#

well nevermind

#

all right

golden crown
#

its even possible to save it through blueprint in a save file or something

#

should work as well on a dedicated server (right?)

#

and for player data, if you have a steam only game, you can use the steam cloud through the web api

prisma lion
#

yes thats a must

#

Steam cloud I have not tought of this yet

golden crown
#

so you where living in hamburg, how do you know i'm living in hamburg? ^^°

prisma lion
#

Quick checked your steam profile

golden crown
#

Ah okay, are you german then?

prisma lion
#

Yes and still awake 😛

#

Should sleep now

golden crown
#

hehehe, me too, but owning a company shifts the time... a little bit

#

alright, i just figured out (by compiling the development version of the server instead the shipping version), that no matter what command line arguments i use, it always listen to port 7777

#

uh what... how to change the port correctly?

heady merlin
#

Config file has that set for the subsystem

#

Engine.ini

#

Gl

#

Check any of the tutorials and they should list port settings in defaultengine.ini

#

I gotta log for the night though.

golden crown
#

yee

#

i got it working 😄

#

for steam you actually have to set ?port and ?QueryPort

#

... my brain

dawn glen
#

Anyone know why this would be displaying 2 debugs? Its on a volume that is placed on the map before run time. It has an authority check so i would assume it should only display once.

void AAISpawnVolume::OverlapActor(UPrimitiveComponent * OverlappedComp, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
    if (OtherActor && OtherActor->Tags[0].ToString() == "Player" && HasAuthority())
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, TEXT("Player Entered AI Spawn Range " + OtherActor->GetName() + " Tag " + OtherActor->Tags[0].ToString()));
        PlayerInBounds = true;
    }
}
fierce birch
#

@dawn glen maybe you got two overlaps?

dawn glen
#

@fierce birch dunno why i would, just have the one volume and it ALWAYS fires twice when i enter. It isnt the end of the world since it only sets a bool true, just dont understand why

#

Enter Triggers twice but exit triggers once.

dawn glen
#

just threw a check in so if the bool was already true ignore everything

#

no more double

fierce birch
#

@dawn glen do you use substepping?

#

for physics

twin juniper
#

I already wrote this in #virtual-reality, but I guess this also belongs to the multiplayer-section: I again have a question about VR Replication. I managed to replicate the current position from the client to the server, both are HMDLocomotionPawns. So when the client moves, then the HMD model and the controllers can be seen by the server, which is fine. But the client is not able to see the server's movement. The client only sees the HMD model pinned to the ground at the location the server recently teleported to. Can you give me any advice on how to fix that?

thin stratus
#

@prisma lion Come over to Dusseldorf (: say hi at our ue4 meetup

twin juniper
#

Do I need to use "Switch Has Authority" inside of my pawn to make this work correctly?

brittle sinew
#

@twin juniper so that function on the bottom is in your GameMode? Although it's marked as multicast, the GameMode only exists on the server, which would be why the server can see the client move but not the other way around.

#

Personally I would just keep this logic on the pawn itself so it can just multicast on the pawn

twin juniper
#

@brittle sinew I try to do that but I'm not sure if it works right now, because I'm now busy setting up my second pc for testing

brittle sinew
#

Cool. Also, are you sending this on tick or at least sometime regularly? Transmitting an RPC on tick with three transforms might get really expensive

#

I don't have hard numbers or anything to where it stops working, but sending three large structs on tick probably isn't the best practice

twin juniper
#

I sent it on tick and on teleportation, but I think that doing that on teleportation as well is not necessary. I do this just on tick now.

#

@brittle sinew I reduced the transform struct to 3x vector and 3x rotators, because I don't need the scale, so I guess this helps

brittle sinew
#

Yeah that's probably good, I would just be a little careful going forward, especially when you get to the point where every client is receiving multiple multicasts of that per tick

#

Might have to end up reducing the update rate

twin juniper
#

My Tick rate is set on 0.01 so it can do a maximum of 100frames/ticks per second.

#

but why would there be multiple multicasts? Only the server can multicast, so I think this only happens once per tick

brittle sinew
#

Yes, but if you have more than two people in the game, the client would be receiving it for all other clients per tick

twin juniper
#

really? This multicast happens on the server when the server owns the pawn, which it does, so it only fires once per tick. The clients do not have authority but own the pawn and therefore fire the "run on server" event once per tick. So I have 1 multicast and n-1 "run on server" events where n is the number of players, or what am I missing?

brittle sinew
#

The multicast runs on every client, for every client's position

#

So with 4 clients, the server would be sending 16 multicast RPCs total per tick, and each client would be receiving 4 + the server per tick

twin juniper
#

@brittle sinew but why does it say that this only runs on the server? The clients are no servers so why should they send the multicast? I get that the multicast is send to every client, but that doesn't mean that every client is sending one.

brittle sinew
#

But the server RPC is then multicasting it

#

At least in the top screenshot

twin juniper
#

Hmm I'm confused. There is only one server and therefore only one server pawn which could have authority. So this exec path is only run once per tick. The clients pawns do not have authority and therefore have to go the remote route. I feel that I'm completely stumped right now and I want to apologize for that.

brittle sinew
#

I didn't recognize that you changed it away from a multicast in the second set of screenshots, that's my bad, I didn't see the second event on the right side. So now you're just sending the client information to the server, how will clients know about each other's position?

#

(I was still going off of the first screenshot where you were multicasting, and didn't pay attention to the change D:)

twin juniper
#

yeah the both events are kind of identical but they need to be two separate events, so I kind of need to duplicate them, which is kind of annoying

#

I guess that other clients will know about each other when they send their location and rotation to the server and the server runs the replication.

#

But currently I don't have 3 VR sets to test that out. This may be interessting later. For now only having 2 VR players working is totally fine to me

wise bridge
#

Hey guys :), I'm having an issue where in I can connect to a created lobby, but the client who connects loses his character seemingly. When the host closes, the client regains his character.... does anyone have any ideas as to what is happening, because im at a loss 😄

twin juniper
#

@wise bridge had something similar i guess: auto possess?

prisma lion
#

@thin stratus where and when 😛

thin stratus
#

Our next one is already on this Friday (3rd March)

#

Wait a second

prisma lion
#

But i'm a beginner tho, just startet to learn things

thin stratus
#

We mainly have beginners/artists, that work with Blueprints + some more advanced people

#

And the next meetup is a social one, means we just drink beer, eat something and chat about UE4 or other things

#

We even had someone who wasn't a gamedev at all last time. He just came along his friend to listen to some gamedev talks for a change :D

prisma lion
#

Oh thats sounds cool, maybe I can motivate my friend to come with me 😄

thin stratus
#

Sure, bring as many people with you as fit.
Just make sure you RSVP on the meetup page i send you

#

And your friends too. So we don't have an overbooked table at the end :P

prisma lion
#

Just checking blablacar atm 😉

slim holly
#

should I use NetQuantizeNormal or 2 bytes for rotation replication?

#

local rotation that is, so -180 to 180

wise bridge
#

@twin juniper I don't know, I don't think it is! 😦 the setup I have right now is two characters in a test level, one is player0, the other player 1, I run the project from a shared directory so I can run a Default?listen -game on one machine and just the Default -game, on the other.

#

and my character has this set up for replication currently...

#

This is from the parent BP which the two characters im using are derived from.

thin stratus
#

Wouldn't that remove replication for everyone else than the owner?

#

Are you spawning the Character with the PlayerController of the Client being the owner?

wise bridge
#

Im going to go with - I dont think so :D. Would it help if I explained the procedure im going through? 😃

heady merlin
#

@slim holly never did ask you, are you supporting full 360 rotation on the grid? or is it like the 4 cardinal directions?

wise bridge
#

@thin stratus This is the setup 😃 one is set to posses player0 the other player1

thin stratus
#

AutoPossessing?

#

Is that actually working with networked Multiplayer?

#

I thought the PlayerController IDs are for couch coop when one Game has more than one PlayerController

#

PlayerController 1 in a networked game should not be the first client

wise bridge
#

I can connect to the session I make.. the client can see the host moving, but the client loses his the ability to move etc? Im a bit of a networking scrub lol.

heady merlin
#

shouldn't auto possess anyway, manually assigning pawn possession is more robust

thin stratus
#

The thing is, PlayerController0 is the one of the Player you are playing with

#

PlayerController1 is technically nothing in a networked game

#

Unless you have two players in front of your PC that connect

#

Then PlayerController1 would be the second local player

wise bridge
#

Right okay

thin stratus
#

Something like Rocket League, where 2 Players connect to a game from one Playstation

#

You can't autopossess

#

Here

#

Use the GameMode event "OnPostLogin"

#

That gives you the PlayerController of the connecting and accepted Client

#

Spawn him a new Pawn or get the placed pawn

#

And posses it with the passed PlayerController

wise bridge
#

I shall give it a go 😃

thin stratus
#

cheers

slim holly
#

@heady merlin idea was to make rotation from yaw value around normal, but 1 degree accuracy is fine

#

I figured quant rotation is about same amount of bits than using 2 bytes

wise bridge
thin stratus
#

Yes and no

#

You still need to call possess

#

And select a class :P

#

Possess is a function of the PlayerController (Controller)

wise bridge
#

lol, I just wanted to be sure 😄

thin stratus
#

And it takes a Pawn

wise bridge
#

okay 😃

thin stratus
#

Which is the ReturnValue of your Spawn

wise bridge
#

I need a target apparently?

#

would be the new player

#

Yes? XD

thin stratus
#

Yes

#

That spawns a new Character and possess it for each new player

#

Now you could write yourself a way to get actual spawn points :P

wise bridge
#

Awesome sauce 😄

thin stratus
#

So they don'T spawn in themselves

#

With your current Spawn Method (collision), it could be that only the first character gets spawned

wise bridge
#

its for a vr character so im not bothered about collisions between players 😃

#

Not in this case atleast lol 😃

slim holly
#

You could make a boxing game where camera is attached with physics constraint spring, and you need to punch it until opponent throws up from motion sickness

wise bridge
#

Cool! It works, now I just need to get the replication working 😄

#

@thin stratus Thanks dude 😃

twin juniper
#

why the fuck does my vr replication not work.... this really is getting on my nerves....

#

I test on tick that my pawn has either authority or not. That works... The client can see the server's pawn but the client's pawn is all over the place and I don't get why....

#

According to Replication. Is there any reason to check sweep or teleport on "SetWorldLocationAndRotation"?

dawn glen
#

@fierce birch dont even know what that is

fierce birch
#

ok, then it's probably not enabled

twin juniper
#

Can someone tell me how to do vr replication without a plugin?..... I can either let the client see what the server does or let the server see what the client does, but I can not make both of them see what each other does....

#

okay... or different question... why do server and client have authority over the pawns?

#

Isn't the server the only one with authority?

#

Does this happen because I am multicasting information?

wise bridge
#

@thin stratus So the player spawns in, but doesnt actually possess the character im spawning? I setup an on tick to print if it has Auth or Remote in the character im using, As expected it prints Auth when the client starts, when it joins the session however, it stops printing completely.... I am confused 😃 @twin juniper I am pretty sure I am going to be running into that issue to at somepoint! 😄

twin juniper
#

@wise bridge this really gives me pain in my brain...

wise bridge
#

I know the feeling lol

twin juniper
#

this is so absurd.... one way is working... the other way is working... but why the hell not both? And I don't get where they would cancel each other out

wise bridge
#

Dunno 😦

prisma lion
#

@wise bridge Hi I also want to spawn a player, is on post login called after the player login in a login system like Steam?

versed socket
#

I wish I were as knowledgeable and experienced with UE4 as exi

prisma lion
#

@versed socket Same 😄 My game would rock

wise bridge
#

@prisma lion Yes I believe so 😃

#

Though if you want a more definitive answer, I would wait for someone more knowledgeable to come along 😄

prisma lion
#

Session handling trying to figure that out -_-

brittle sinew
#

@twin juniper you'd have to give a little bit more information on your general flow. For VR pawns, where a proxy isn't setup automatically, you would probably just want to use "Is Locally Controlled" to check if you're controlling the pawn on your client/server, then if so, multicast your position/rotation update right there on the pawn

#

You would go Client/Server -> Server RPC -> Multicast RPC

heady merlin
#

@brittle sinew in PM with him helping him figure it out

brittle sinew
#

Ah, alright

heady merlin
#

@prisma lion post login is called on all subsystems

prisma lion
#

aight

heady merlin
#

its server side only though

#

don't try and run client logic on it

prisma lion
#

Ohh I have to remember that

#

My idea for spawning player is like > On Postlogin > Get Steam id> Spawn Pawn > Controller = Steam ID

heady merlin
#

what is the point of the steam id there

prisma lion
#

How else would I set the pawn to the new joined player

heady merlin
#

it passes in a player controller on post login

thin stratus
#

Well SteamID and PlayerController is nothing you can set equal

#

You would only need the ID if you have saved some kind of selected Character in an earlier level, like a lobby

#

And then you would rather have code that gives you the SteamID of that PlayerController and find that in the list of SteamID <-> Character

#

I wouldn't say PostLogin has anything todo with the Subsystem as PostLogin is called in general when a Client/ListenServer gets allowed by the Server

#

That's not really connect to the Subsystem

#

Though I assume a rejected join of the subsystem would happen before PostLogin gets called

prisma lion
#

Thanks !

slim holly
#

oh dear, this is really hacked together solution for map data synch

#

server writes a repnotify variable on each tick, clients compare their map data to that variable and do updates

heady merlin
#

just send changes...

slim holly
#

on top of those yes

#

but there's already x amount of data before client joins

#

need to look into system where client asks for specific cluster data

raven holly
#

Anyone integrated with gamelift yet?

#

Going to have a play as I need a dedicated server solution

slim holly
#

on reasonable scale, how high can controller NetUpdateFrequency be?

wise depot
#

OnPostLogin doesn't get called from travveling right?

#

so if i wanted to set someone to bIsOnlySpectator for joining too late (once lobby goes to diff game mode) that's the best place right?

slim holly
#

🎉 LogBlueprintUserMessages: [LevelActor_C_0] Client 1: Sync done in 33.805267 seconds

heady merlin
#

ouch

#

33 seconds?

#

is that lan?

slim holly
#

no I'm not even capping the bandwidth yet

#

I need to fix the RLE functions, way too heavy for BP

#

oh that time is 50 clusters per request

slim holly
#

31.465775 seconds

#

framerate issue I believe

#

yup, by slowing down the RLE I get 28

dawn glen
#

Anyone know why this is happening? are people trying to connect to my server that isnt advertised to anyone at all?

#
[2017.03.02-16.02.49:659][828]LogNet: NotifyAcceptingConnection accepted from: 187.177.46.145:58828
[2017.03.02-16.02.49:659][828]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-16.23.56:338][ 76]LogNet: NotifyAcceptingConnection accepted from: 187.177.46.145:58807
[2017.03.02-16.23.56:339][ 76]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-16.32.42:299][967]LogNet: NotifyAcceptingConnection accepted from: 187.177.46.145:54631
[2017.03.02-16.32.42:300][967]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-17.32.47:101][819]LogNet: NotifyAcceptingConnection accepted from: 187.177.46.145:65490
[2017.03.02-17.32.47:101][819]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-17.33.40:166][422]LogNet: NotifyAcceptingConnection accepted from: 46.227.176.35:65494
[2017.03.02-17.33.40:166][422]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-17.34.30:504][942]LogNet: NotifyAcceptingConnection accepted from: 46.227.176.35:53875
[2017.03.02-17.34.30:505][942]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-17.37.28:973][332]LogNet: NotifyAcceptingConnection accepted from: 50.157.21.171:52318
[2017.03.02-17.37.28:974][332]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-17.37.33:754][476]LogNet: NotifyAcceptingConnection accepted from: 50.157.21.171:56923
[2017.03.02-17.37.33:755][476]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-18.19.17:838][ 94]LogNet: NotifyAcceptingConnection accepted from: 46.227.176.35:64250
[2017.03.02-18.19.17:839][ 94]PacketHandlerLog:Error: PacketHandler parsing packet with zero's in last byte.
[2017.03.02-18.57.05:152][557]LogNet: NotifyAcceptingConnection accepted from: 47.148.196.204:63534
slim holly
#

intresting

#

those are some odd ports tho

cloud ledge
#

Well they are the usual ports you see when someone connects to you

#

The port on remote system can be pretty random, but it's in the upper 50,000's

#

or around there

dawn glen
#

Dunno why they would be connecting to my ip lol

indigo hawk
twin juniper
#

Improbables SpatialOS SDK is out for Unreal. Can't wait to get home from GDC and test it

worthy wasp
#

for a DedicatedServer build - do i need to do what they do in shooter example - See if pawn is valid - delete it if not and spawn a new one? All pawns should be locally controlled as no client comes in as server right?

Reason I ask - i'm tyring to troubleshoot why anyone that is connecting into the game outside of myself is disconnected almost immediately

wise depot
#

guys, a spectator should have a player state right?

slim holly
#

I think not? playerstate class is gamemode specific right?

#

(and so is controller)

fossil spoke
#

Clients are assigned an Playerstate when they connect. Spectator class is just an Pawn

slim holly
#

welp, map downloading confirmed working in online match too

#

however, the download time is still tied to performance

#

at 15fps it's still gonna take about 40sec

#

without overhead, 3sec

twin juniper
#

Does replicate movement work with simulate physics or do I have to do that manually?

worthy wasp
#

@twin juniper in my own past experiences - any physics simulation is not a part of the Character Movement component - which is replicated by default... so yes you hav eto do it manually.

twin juniper
#

Actually these are for actor blueprints, but gotcha, thanks!

bronze lava
#

Hey all, after updating to 4.15, Character Movement is extremely jittery on clients. Any advice?

#

The movement was/is very smooth on 4.14 :/

#

It's almost as if the server is trying to push the player back when walking

#

To clarify, this jittery movement only happens when connecting from another network, playing on localhost is fine.

bronze lava
#

Well, seems like it's not only the CharacterMovement. Also some variables randomly stop syncinc with the server. None of this happens with 4.14, though.

dawn glen
#

@bronze lava I'm having same issue but only on built clients. In editor it's butter smooth. Even ai are jitter ingredients like micro rubber bands.

bronze lava
#

@dawn glen Yes, sorry, I forgot to mention that it only happens on built clients. Hopefully this can be fixed :/

#

Oh great, apparently it's not possible to downgrade a project.

warm pagoda
#

Are you not using source control?

bronze lava
#

No :/

warm pagoda
#

Are you going to use source control from now on? 😉

#

Perforce is free for small teams.

#

I forget GitHub's deal, though you can technically use Git entirely locally.

#

GitHub is just a Git host.

bronze lava
#

Alright thanks, I'll look into it.

warm pagoda
#

Aye. Sooner than later, I'd advise. While it's not a fun thing to worry about, it should be step one of any project.

bronze lava
#

Understood :)

warm pagoda
#

You can manually try to downgrade

bronze lava
#

I tried, but unfortunately the map isn't compatible.

warm pagoda
#

You can open the uproject file with a text editor, I believe you can change the engine association there.

#

Oh, if you've already resaved assets, then yeah.

bronze lava
#

Yeah. I do have a backup of my 4.14 project but it's quite a bit behind this one so I'll continue working with 4.15 and hope that a fix to the jitter issue will someday be made.

dawn glen
#

Is the jitter on their radar?

dawn glen
#

are replicated variables that are set on the server not supposed to actually replicate to the client?? im getting so frustrated with this. If i make a BP and replicate say a float, then i set it on the server it does not set on the client ever. I have to run it through a multicast to get it to set. If i set the variable in c++ to replicate and set it on the server in a BP it always replicates without issue.

slim holly
#

is the actor set to replicate?

dawn glen
#

yea

#

if i have a c++ base class with a replicated variable and set it on the server in a BP Child its great. If i add a BP variable to that same BP and set replicated it will not replicate, unless which i just tryed i set it to repnotify. So maybe i dont quite understand replication but if its set to replicated it should replicate even if it isnt notify

fierce birch
#

@bronze lava you can manually copy paste map content from 4.15 editor into map inside 4.14

#

You need to have the other assets migrated in before though