#multiplayer

1 messages ยท Page 474 of 1

gloomy sedge
#

Right so far?

thin stratus
#

Don't clear the timer

#

Just let it run

#

Do the check for RemaitningTime > 0 before reducing it

#

But yeah it goes into the right direction

gloomy sedge
#

And then i got confused when you started with "The Server", Where am is starting this?

thin stratus
#

Tha is also in ther Timer function additionally

#

I'll show you what I mean

gloomy sedge
#

And then what value do i hook up the RepTime Notify?

thin stratus
#

And then this in the GameState to set the value whenever you need to

#

By Server only of couse. Clients shouldn't change it

#

@gloomy sedge

#

DefaultTimer should ultimately be a Function and not an event

#

Cause things like "OldRemainingTime" shouldn't be a class variable, but rather a local variable

#

You can use "SetTimerByFunctionName" for that instead of "..ByEvent"

gloomy sedge
#

Okay, i'm pretty sure i understand the logic and how everything works, Thank you very much for your help

#

But just out of curiosity what does Force Net Update do? Never used this before

thin stratus
#

Kinda what the name says

#

Makes sure this happens sooner than later

gloomy sedge
twilit swift
#

Hey guys, I'm trying to set up dedicated servers with Game Lift, and I'm able to connect to my servers with an IP address and Port. However, this skips over the typical CreateSession / JoinSession process. Some of my systems depend on the UE4 session interface. Is there a way to create a session with a specific IP/Port and then join that? Anyone set up Game Lift and have any experience with that?

#

I'm using OnlineSubsystemNull at the moment.

thin stratus
#

GameLift wouldn't use any Subsystem

#

As it's meant to be used to retrieve the data and tell the client to connect

#

Sessions are for when you don't have GameLift and you want online Servers

twilit swift
#

I see.

#

Damn

#

Ok, so I used to have voice chat in my game but without the session interface my voice chat doesn't work.

thin stratus
#
  • GameLift Server Instance aren't actually supposed to run until you query a random one
#

That's tricky

twilit swift
#

Ah, ok.

#

Yeah.

thin stratus
#

You could enable Steam but Steam iirc is not using IP/Port

#

It only reacts to the SteamID stuff

#

Not sure how that is with DedicatedServers

twilit swift
#

So, enable steam but still connect via GameLift?

thin stratus
#

Well yeah you have GameLift for a reason

twilit swift
#

Sorry, this stuff is a little convoluted. Please bear with me while I get my head around it. So, with steam I'd have the server create a session and then the client would join the session via UniqueNetId or whatever else steam needs. You're suggesting that I re-enable steam, create session on the server, find/join session on client and then connect to gamelift via IP/Port?

#

So I would run Steam and GameLift in parallel?

winged badger
#

Steam can communicate IP/Port just fine, won't do NAT punchthrough tho

#

or at least, not in any reliable manner

gloomy sedge
#

Hey @thin stratus , Sorry to bother you again, but i've changed the blueprint slightly, so that i have minutes and seconds on the screen and it works perfectly. My next problem is i cannot figure out how to reset the countdown once it has hit 0

#

It seems to reset on the server but does not replicate to other machines

twin juniper
thin stratus
#

You would not do that in the timer though @gloomy sedge

#

You can just use RemainingTime as seconds

#

And when displying it use Time/60 for minutes and Time%60 for seconds

#

:P

#

@twin juniper Is your game calling any sort of "Open xyz" by default?

twin juniper
#

"Open xyz" I don't know what does it mean. I can call you and show what have I done

thin stratus
#

Na, your Server tries to connect to something, that's why it says it can't open network URLs

#

So whatever either your command line or code in UE4 does, it's causing that

twin juniper
#

@thin stratus I put like in tutorial, in level blueprint, when the game starts the next command. Open level and my IP

thin stratus
#

Yeah the Server also calls that

#

Which is wrong

#

And which is causing your issue

twin juniper
#

@thin stratus The problem is that I can't join to my server by the packaged project, as I understood I should be able to do this. May I call you and show it on my screen?

thin stratus
#

No sorry, I don't do calls

#

Yes, you can connect to your server via your IP

#

But you can't place that into the LevelBlueprint

#

Specially not if the DedicatedServer opens hte same level

#

Cause it will call that node too

#

And try to connect to the IP, which DediServers aren't allowed to do

#

Hence the error you get

twin juniper
#

@thin stratus Ok. I'll try it right now. Thanks for answers

gloomy sedge
#

Lol, Nevermind, just setting the Remaining Seconds/Minutes to Replicated solved my problem

thin stratus
#

@gloomy sedge Whatever yo uare doing that is not the solution

#

There is a reason they aren't replicated

#

And only the ones with the Replicated in the name should do that

#

Are you actually using the RepNotify function to update the non replicated varaibles?

#

And again, having Minutes and Seconds makes no sense

#

It's just double the work

#

/ 60 and % 60 does that for you already

gloomy sedge
#

I'm using the current method because I may want to have a 1 Minute 30 Second Round

thin stratus
#

And what keeps you from setting the time to 90?

gloomy sedge
#

TRUUUU

thin stratus
#

I think you are overthinking this :D

gloomy sedge
#

OH WAIT

#

Should i use the ReplicatedVariable for the ui?

thin stratus
#

No

#

The Replicated one is only to sync the clients every 10 seconds

#

In case something gets them out of sync

gloomy sedge
#

ahh okay, So getting to the replicating of the timer. It counts down from 5 the first time and then when it hits 0 it does not go back to 5 on the clients but does on the server

#

Setting the Regular RemainingVariables to replicated solves this, but you say this is wrong

thin stratus
#

The code I gave you only counts down once, unless you call "SetRemainingTime" on the server once again

gloomy sedge
#

Which is what i do once the seconds has reached 0

thin stratus
#

Where exactly?

#

You should really change this back to only using seconds

#

It's really just complicates the code and makes it more open to logical errors

gloomy sedge
#

Okay, I will change it over now

thin stratus
#

You are also only counting down if seconds or minutes is > 0

#

So how can Seconds ever be < 0?

#

Which you are checking

meager spade
#

i wouldn't do minutes/seconds seperate as @thin stratus pointed out. you only care for seconds, you can convert seconds to Minutes/Seconds

#

you are making more work and more bug possibilities

thin stratus
#
  1. Prevents it from calling if Seconds is <= 0
#

So it will only call for 1 or greater

#

At 2., you are checking if seconds is, after reducing it, less than 0

#

Since this only ever calls for 1 or greater

#

seconds can only ever by 0 or greater

#

So that would never work in the last second

#

Or is that supposed to happen?

#

Maybe it is

#

You see, way too complicated to do it like that xD stick to seconds

gloomy sedge
#

Gotcha, Changed it back to Seconds only

#

I've never used % before, and i've realised how much better it is

#

So am i right in saying that this is the correct place to restart the timer? If RemainingSeconds is not greater than 0 (meaning that it is 0 or less) then increase the round and set the remaining seconds for 3 again

#

YAY! It works!!! I Have to say, you guys know your stuff! such a great help!

onyx gale
#

<@&213101288538374145> anybody know how to do multiplayer for a HTML5 game?

fossil spoke
#

@onyx gale Only ping Moderators if there is an issue with the Server or its Members thanks.

supple crypt
#

Should ServerTravel be disconnecting clients?

winged badger
#

if its not seamless, yes

supple crypt
#

Thanks! seems like that is the issue ๐Ÿ˜ฆ

#

testing that is a pain though

#

Okay not as bad as I thought to test it (since steam would overtake my game with not in pie) using -nosteam

sharp arrow
#

can someone help me i got this car im working on but for some reason the speed is going slower in the clients screen when he is using it but if the server uses it it works perfect

#

and idk what to do

timber garnet
#

How does one get Find Sessions to pull from a list of IP addresses?

thin stratus
#

Most likely write your own system

#

FindSession hooks into the underlying Subsystem

#

Whatever is active at that time

#

And if it's supporting "FindSession" it's usually using the Subsystems MasterServer to retrieve sessions

#

If you need something custom you gotta code that yourself

lapis oriole
#

Can someone tell whether AWS Lambda or AWS BeanStalk is a better option for deploying middleware matchmaking game service? This service will be responsible for contacting servers and finding an appropriate game session then return that game session id back to the ue4 game client

harsh lodge
#

Online subsystem null(LAN) on iOS works only iPhone to iphone not able to connect to windows or android. It just comes out of session as soon as it joins cross platform devices. Can someone help me with this

steady aspen
meager spade
#

when you open the map, the host will do ?listen

#

this makes that player a listen-server

wheat eagle
#

Hello so I have 1 actor child component inside a character blueprint and I want it to be hidden to the player who posseses the character and to be visible to the others. I've tried many things like "set visibility" to false or "set owner no see" to true, but none worked. How can I achieve this?

molten pasture
#

Hi everyone, still no fix for UE-43969 (skip owner not working) in BP. Any workarounds for when replicating properties? Using it to replicate a state, not a one shot RPC.

pallid token
#

Hi, I am having trouble with the NULL subsystem connected over LAN (Same machine) to hosted game. It seems to be connecting to the correct IP and going through the process, of connecting, but it does not connect to the correct Level. In fact, it seems to connect to an empty level. It just looks like a black screen, but when using the unlit, or wireframe view, you can see the character falling.

steady aspen
#

The server is working in the engnine but not as a packaged project^

frigid solar
#

OK. brain fart time.
I can't think how to expose a switch/bool in a material function.

#

Trying to expose this switch here to the parent material. So I can turn colour variation on and off

twin vault
#

expose in a function param or a instance param? also why multiplayer =p

#

if its a instance param the image is right, a function param use a function input with bool type

#

with a normal switch, not a switch param

frigid solar
#

So the screen shot is showing a section of a material function

#

Nevermind. I got it i think

meager spade
#

yeah how is that multiplayer?

frigid solar
#

Oh ffs. I'm really sorry. Its been a long day.

#

Being dyslexic

crimson fiber
#

lol looks like UE-19058 still isn't fixed? PlayerState is not reliable to work with.

winged badger
#

hasn't failed me yet, and its been a few years

#

if you have a problem with ACharacter::OnRep_PlayerState having PlayerState as nullptr the first time it fires, that is common when there is a lot of network traffic

#

that OnRep fires when the Character replicates, before its BeginPlay

#

and PlayerStates have lower NetPriority then Pawns/Characters

crimson fiber
#

nah the problem is that PlayerState sometimes is missing on clients, maybe... Feelsconfusedman

gleaming niche
#

nmever seen that before either.

bitter oriole
#

Haven't seen either, but well

fleet raven
#

it sometimes takes a while to replicate it

#

can take seconds even

#

if there is a lot of stuff to replicate at the start

crimson fiber
#

that's weird yeah. maybe it was just a breakpoint bug. I didn't catch beginplay on some clients

thin stratus
#

Anyone recently did some object pooling for replicated projectiles?

#

We got some (obvious) bandwidth issues with not using a pool (the weapons weren't by far shooting that many projectiles when the original system was designed)

#

And I wonder how one would actually spawn a set of bullets (+ is there some math behind how many bullets one should spawn?) without having the initial replication of this whole pool break everything

#

Annoying @chrome bay cause you put yourself into the line of fire with all your Forum posts!

#

On another note: How much should I look at UT's Weapon/Projectile code?
Is it again too "Epic-like" or is it worth learning from?

real yacht
#

what is the problem with pooling? just bandwidth?

crimson fiber
#

how accurate do you want bullets to be?

thin stratus
#

I'm pretty sure I can code the whole pooling stuff. So yeah these two things are my problem:

  • How to handle the initial filling of the pool so all these replicated projectiles don't cause a huge delay for a newly connected client.
  • How does one math out the required number of bullets for a weapon with X ammo?
#

Generally as accurate as possible without investing weeks of time :P

#

I know UT has some method of spawning a fake projectile with unique id on the client

#

I don't dislike that

crimson fiber
#

just spawn them on clients and server separately with no replication but take into account only server hits

#

so clients sould be kinda VFX

#

but if there are A LOT of bullets who cares

thin stratus
#

Then client bullets and server bullets are highly out of sync

crimson fiber
#

because you replicates them at the moment

thin stratus
#

UE4 isn't deterministic enough

#

So they need to replicate one way or another

crimson fiber
#

ok what about inventory hack?

#

spawn on both and after a while clients bullets will be adjusted from the server?

thin stratus
#

That's what UT does with a fake projectile and that's also all fine, my questions were about filling the pool initially

#

With replicated projectile actors

crimson fiber
#

run math on both

thin stratus
#

I won't spawn any bullets runtime (unless the pool is missing one)

#

That's exactly causing our problems atm, so it has to be a prefilled pool

crimson fiber
#

aah you precalculate pool?

thin stratus
#

That is the idea

crimson fiber
#

hm yeah that's the question

thin stratus
#

Cause we have weapons that have 0.0125 seconds between two bullets

crimson fiber
#

how do server and client pool differ?

thin stratus
#

And if you shoot them (with a magazin of 100) you are quickly at a point where other replication drops

#

The pool doesn't exist yet, I'm merely gathering info before I redo the pool in the middle of coding it

crimson fiber
#

hold on why does replication even drop at first point?

thin stratus
#

Because if you shoot that weapon with 0.0125 seconds between two shots

#

It takes 1.25 seconds to spawn 100 projectiles

#

That all want to replicate

crimson fiber
#

you press a button - call server loop of spawning right?

thin stratus
#

So suddenly unreliable RPCs are dopped. Location updates of pawns stop etc.

real yacht
#

let me check how i have spawned

#

bullets

thin stratus
#

Yeah which is obviously bad. But the weapon is newly done like that, otherwise I wouldn't have done it without a pool

crimson fiber
#

no matter how he does that 1.25 sec for 100 spawning replication is zero possibility to work

thin stratus
#

That's why I need the pooling :D

real yacht
crimson fiber
#

fake it man, no way you gonna have reliable replicated bullets

real yacht
#

this is how i have done spawning without pooler

worthy perch
#

Reliable Multicast?
Wouldn't that just add to the network saturation?

thin stratus
#

Yeah that's not gonna happen haha

crimson fiber
#

i'd replicate only fire command and spawn bullets localy

thin stratus
#

I know James had a sh*t ton of bullets on the screen

#

But he's busy I guess

worthy perch
#

Also, Reliable Multicasts should be avoided. Some people at Epic even said that they didn't even want that option.

crimson fiber
#

1.25 sec for 100 bullets no way player gonna notice the async

#

and apply pooling to the hit

#

not actors overall

#

if it doesn't hit anything why even bother replicating ๐Ÿ˜„

thin stratus
#

It's one of many weapons

#

There are others with less many shots

#

And they have to be in sync with the server

#

In ranked games, a client has to properly see their bullet and not something on their end that isn't even in sync with the server

crimson fiber
#

well your transforms are sync. if you spawn the same way it'll be kinda synced

thin stratus
#

So even if I spawn the fake bullet to avoid the delay before the server bullet replicates, it has to be synced up afterwards

crimson fiber
#

yes that's why I said pool hits

#

something stupid like retrig delay will work ๐Ÿ˜ƒ

#

this topic is so huge honestly. every MP shooter suffers at this point

#

remember PUBG async yikes

thin stratus
#

Never touched that game :P

crimson fiber
#

but for the love of god don't replicate bullets unless it's psysics-based ๐Ÿ˜„

#

I also have a question. feels stupid... How would you know when it's time to update data in your playerstate?

thin stratus
#

What data for example?

crimson fiber
#

anything, just health for ex

#

I don't wanna mindlessly poll a playerstate waiting it spawned

#

there is OnRep_PlayerState but I'm ok with server case, maybe postlogin?

thin stratus
#

Hm, Health I don't even have in the PlayerState.

#

Lemme check

#

I use PossessedBy in the Pawn

#

Cause well ,everything else is too early

#

That's for the Server

#

And well OnRep_PlayerState for the Client

worthy perch
#

There's AController::InitPlayerState().

thin stratus
#

Yeah and that in the Controller

#

As well as another OnRep_PlayerState in the Controller

#

And that's, as far as I'm aware, enough for us to catch all players and having them execute functions with a valid PS

crimson fiber
#

@worthy perch the thing with virtual functions you can't expose them to BP right away can you?

thin stratus
#

No, you'd add a simple ImplementableEvent

crimson fiber
#

and i hate making event dispatchers

thin stratus
#

No need for a Delegate

crimson fiber
#

you mean it'll work:
UFUNCTION(BPImplementableEvent)
virtual void InitPlayerState() override;

#

?

thin stratus
#
// Header
virtual void OnRep_PlayerState() override;

/** Called when PlayerState is replicated. */
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "OnRep_PlayerState"), Category = "Core")
    void K2_OnRep_PlayerState();

// CPP
void AHLPlayerController::OnRep_PlayerState()
{
    Super::OnRep_PlayerState();
    HLPlayerState = Cast<AHLPlayerState>(PlayerState);
    K2_OnRep_PlayerState();
}
crimson fiber
#

yeah that's what I said ๐Ÿ˜„ yet another event

thin stratus
#

Well you set EventDispatcher :D that's something else

#

And no that's the only way of exposing it. Only other way would be modifying source to make that a BlueprintNative event to begin with

crimson fiber
#

boilplates damn them

chrome bay
#

@thin stratus yeah I did pooling... it's difficult :/

thin stratus
#

But you also said "REPLICATE THE BULLET" @chrome bay

crimson fiber
#

anyways seems like postlogin is ok for me at this point. I already had the event injected there

thin stratus
#

Well Postlogin is for GameMode

#

The other two we mentioned are for Pawn and Controller

#

So that's a tad diff

chrome bay
#

What I do was allow the weapon to spawn a small handful of them upfront, then it can add more to the pool as it needs them. I also dropped the replication frequency to 1 and make them use net dormancy as well

crimson fiber
#

I need PC ref anyways

#

both cases have it

chrome bay
#

but, i def need a lighter system for more generic bullets cus it gets way to heavy after that

crimson fiber
#

thx!

thin stratus
#

@chrome bay Right so you also have the issue that initally spawned bullets would replicate and the pool would break bandwidth when the client joins

#

So you spawned less and increase the pool over time

#

But I see that causing the same issues again, at least if that additional spawning happens quick

#

Well network saturation or whatever you call it

chrome bay
#

Yeah to be honest I haven't got as far as having clients join late etc. after a game is long underway.. so the bandwidth thing may well be an issue

thin stratus
#

Stressfull

#

For one I can't spawn 100 bullets in 1.25 seconds. And second I can't spawn 100 bullets at the start, cause the initial replication will be shite

chrome bay
#

To be honest, for actual bullets I plan to use a line-trace bullet thing of some kind, I just can't see anyway actors will scale to that number

thin stratus
#

big brain idea Place bullets upfront into the level.

#

-_-

chrome bay
#

hahaha

thin stratus
#

So you basically fake the bullet's travel time with a linetrace?

#

Cause I mean ,a hitscan is instant

#

A bullet can fly a bit before hitting someone

fickle pond
#

I can't find a single video/thread on how to get raycasting ot work with multiplayer. My rays just end up going through the other players and not detecting. Could someone help me undedrstand whats going on

thin stratus
#

That's not really Multiplayer related if they go through and don't hit

#

Also the word in UE4 is LineTrace

#

RayCast sounds like Unity

chrome bay
#

Yeah just create a bit of data, then step it forward over time.

thin stratus
#

And the pool the hits like @crimson fiber says

#

hmpf

fickle pond
#

Oh well the linetrace would hit and return everythign else it hit but the second it hits another player/client it would just pass through

thin stratus
#

Well the effects, not the hits as in hitresults

fickle pond
#

So it does hit its tjsut effects?

thin stratus
#

I'm talkinga bout my own problem between yours, sorry

fickle pond
#

wiat nvm thats somethingelse nvm me lol

worthy perch
#

It might be interesting to take a look at how Overwatch handles the bullets issue. Maybe open Clumsy and set some lag for Orisa's primary weapon.

crimson fiber
#

how do they?

worthy perch
#

Because from my quick testing, Overwatch "bullets" are just vfx that are played instantly for the client.

crimson fiber
#

aha see ๐Ÿ˜„

chrome bay
#

overwatch most likely uses hitscan weapons, like most games do

thin stratus
#

If your linetrace doesn't hit, then it's mostly a problem with the collision of what you are trying to hit.
Linetraces can be by object or channel and your collision primitive has to block that or be of that type of object. @fickle pond

chrome bay
#

for arena shooters travel time just doesn't matter

crimson fiber
#

that's the most common solution

chrome bay
#

for games with larger engagement ranges though it starts to fall apart a bit

thin stratus
#

Yeah, I might need to convince my client to drop the projectile shit

worthy perch
#

For something like Pharah's rocket launcher, the "rocket" is client vfx but the explosion is then replicated.

fickle pond
#

Oh ythanks lol

thin stratus
#

The Rocket is also totally fine to spawn replicated

#

It's one single rocket

#

That can also be pooled if needed

#

as you might spawn like 10 of them

worthy perch
#

Yeah, that's true. But I mentioned Orisa in particular because she shoots 12 bullets per second.

thin stratus
#

But if you can shoot 100 bullets in 1 second, you are f*cked

#

She does?

worthy perch
#

Yeah.

chrome bay
#

I almost garauntee overwatch is using hitscan

thin stratus
#

Yeah they are

chrome bay
#

yeah, not a problem then in that case

thin stratus
#

At least for everything that is not an obviously projectile

#

They also have stuff like Arrows, Rockets, tripple shot shurikens or wavelike bullets

chrome bay
#

You can simulate everything other than travel time instantaneously anyway, we do bullet drop in HLL but all the weapons are still hitscan

worthy perch
#

Well, I wouldn't be surprised if they were hitscan. But Orrisa has very projectile-like bullets and they travel somewhat slowly.

thin stratus
#

Yeah but that is easy to do

#

You can just perform a handful of linetraces

chrome bay
#

travel time is the hardest part

thin stratus
#

while rotating them downwards over time

chrome bay
#

yeah, it's just parabolic trajectory

thin stratus
#

So the best idea is to have all often shot stuff be hitscan

#

and only have grenates and rockets be actual projectiles

chrome bay
#

That's what I'm gonna do

thin stratus
#

I mean UT spawns 9 flak canon shots

#

But for whatever reason that's fine

#
for (int32 i = 0; i < MultiShotCount[CurrentFireMode]; ++i)
{
    [...]
    // Spawn projectile
    AUTProjectile* MultiShot = SpawnNetPredictedProjectile(ProjectileClass, MultiShotLocation, MultiShotRotation);
    [...]
}
chrome bay
#

Yeah UT doesn't pool anything either and only sends the initial packet

#

prediction with pooling is where shit hits the fan...

#

currently I've got a replicated pool of "actual" projectiles, then the client spawns a separate pool for predicted ones locally

thin stratus
#

I though it hit the fan the second you start doing MP -_-

#

The prediction stuff sounds like a layer I can add later though

#

Like, the prediction really just feels like something you add so that the bullet doesn't appear 5 meters in front of the player once it replicates (spawned/location)

chrome bay
#

pretty much, that and so it appears instantly. As soon as you get a few ms of lag the latent spawn becomes really noticeable

thin stratus
#

Overwatch literally doesn't care iirc

#

They tested it and said "Clients/Players don't notice. Fuck it"

chrome bay
#

hahaha

#

I do but then I always test on pretty extreme conditions

thin stratus
#

Like McCree can throw a stun grenade

#

The animation throws a fake mesh that just despawns

#

The actual grenade comes out of the middle of the screen

#

And is not predicted

#

You just don't see it

#

Only if you replay frame by frame

worthy perch
#

And the animations play immediately on the client.

thin stratus
#

Yeah

worthy perch
#

Oh, I thought they would have hidden it until it exploded.

thin stratus
#

Nope

#

It's actually long gone while the anim still plays

#

xD

fossil spoke
#

The anims in OW are so quick though, no wonder you dont notice unless your really paying attention

thin stratus
#

Yeah I think we are forced to go hitscan with a good chunk of things

#

I have a internal project for which I'm debugging efficient ways of having Physics simulated and shared by the Server

#

And just shooting a projectile into a pile of boxes without anything else happening (first person example) makes the ping spike and the boxes lag on the client

worthy perch
#

The ping spikes?

thin stratus
#

Initially at least

#

Went from 8 to 300

#

Normalizes it self but the box are still lagging

#

And thus all other things that might replicate in the scene

#

Non-reliable sfx rpcs, health replicating etc. etc.
Can predict all of that of course, but hey got better things to do

worthy perch
#

Maybe if the net gets saturated, the ping response is delayed.

thin stratus
#

So my 100 bullets in 1.25 seconds are probably not solved even if i pool them and solve the initial replication

#

Cause the transform replication alone will nuke everything xD

humble comet
#

I've created AI controller which controls players characters when they disconnect, it uses player's player state for HP ammo management, in editor everything works fine, however when I package dedicated server I am getting access violation errors and crash, whenever i try damaging the AI controlled characters. Has anyone had this type of error before?

barren grail
#

Is it possible to check bUseSeamlessTravel from command line in standalone?

meager spade
#

no

#

could make a exec function

sterile plaza
#

morning everyone

#

I have what is hopefully an easily answered question. I'm working on a multiplayer game where clients control characters with click to move. What I'm doing is detecting the hit location on the client, sending an RPC with the location through the player controller and then calling UAIBlueprintHelperLibrary::SimpleMoveToLocation(). This works, but your own character is super jittery. Is this not the pattern I should be using for multipalyer navmesh movement?

south topaz
#

@humble comet did you spawn the aicontroller with a own playerstate? or did you just assign the old one to the ai?
got the problem with assign the old playerstate during the player logout (same for timeout etc)
now i'm spawning the ai controller and add a new playerstate to the controller.

i added a "writetolog" function to debug the dedicated server and always stopped after the playercontroller was destroyed. (the playerstate was invalid / nullpointer)
the editor was working fine even without a log entry, so the playerstate was valid during PIE ^^

humble comet
#

@south topaz I am spawning new player state and then copy properties from old playerstate, but eventually i found culprit, it was some widget reference causing the null pointer exception =_=

#

@south topaz the most annoying part is that it runs in editor without problem, and you get the problems after packaging

south topaz
#

yep, for some reasons the PIE is more friendly for "fatal errors like nullpointer" ;)
got the same with some other things which worked fine in PIE and crashed hard after packaging :)

#

or better... sometimes the PIE holds the refpointers and the packaging version cleaned them up ;)

sterile plaza
#

that fixed everything by calling

            ServerRPCRequestMoveDestination(DestLocation);```
harsh lintel
#

any recommendations on how to handle logging with only one character at a time per account?

#

im currently instantiating the player character based on the character's database information but I don't have anything to prevent logging that character many times, or logging with multiple characters with the same account, or both, how could I limit to only one character per account, and only one instance of such character (not instantiating the same character twice)

winged badger
#

What do you have in terms of server 8nfrastructure?

harsh lintel
#

well, I have a unreal dedicated server (wiki article), which makes server-side http requests to a node server that handles the database queries through http requests, this requests fill server side controller blueprint information about the logged in user, logged in character (which is their unique database ID), and will use this IDs to be able to make queries to the database

#

I only have experience with node so that's why im doing it this way, change's to the database in-game will probably be done through websockets instead of http requests, (if that didn't answer your question, maybe an example would help, as I said I'm a noob ๐Ÿ˜… )

spare glade
#

Just a quick question, are Montages just a cosmetic thing for clients to look at, or do the servers actually run through them.

glass plaza
#

Is there a way to know if a user is a spectator or a player?

#

Is GetSpectatorPawn a safe enough bet?

worthy perch
#

@Junko, dedicated servers can play montages. This is important because some things may rely upon anim notifies to be called on authority.

spare glade
#

interested then i have something wrongXD

worthy perch
#

Oh, you have to enable Skeletal Meshes to play animations when not rendered.

spare glade
#

where would this be?

worthy perch
#

@harsh lintel Why websockets intead of HTTP requests? Do you send information back and forth / or frequently send stuff?
How hard was it to set up websockets?

#

@spare glade, GetMesh()->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::AlwaysTickPoseAndRefreshBones;

spare glade
#

thank you kind sir

#

that sure saved me XD

worthy perch
#

Maybe EVisibilityBasedAnimTickOption::OnlyTickMontagesWhenNotRendered is better.

spare glade
#

ill try that

#

there we GO!, worked, thnx

worthy perch
#

This one? OnlyTickMontagesWhenNotRendered ? This one didn't work for me.

spare glade
#

yes

#

strange

worthy perch
#

It was a mistake on my end. Needed bone transforms refreshed.

harsh lintel
#

I only have the login system setup so far (through http requests), I saw a websocket plugin (socketcluster client) and I plan to use it for in-game requests, as for why I want to use it over HTTP is because WS is more efficient

south topaz
#

@harsh lintel with c++ you can override the prelogin(xxx) function and do your check here ;)
e.g. check all connected playercontroller if they have the login XY (variable of your playercontroller class) in the array... if yes, fill the errormsg.
if not found, leave the error msg and let him connect ^^
it's not the best way, just a fix thinking of a possible way ;)

you can add a own array of "loginclients" with strings of usernames or tokens or something.
just to check if someone already online :P

the ue4hub has a good post about the prelogin functions... "ue4 server password"

#

but don't send request to a external server if you have only async calls ;) (errr... blocking calls are not good too, so use something which works fast ^^)
the prelogin will make the call, but will not wait for the result.
that is why i suggested to check the playerarray (or something like this)

rocky badger
#

I've been testing my build but I can only connect between devices when I'm using my own dev devices. When I use spare devices to test the build, I can't connect to the listen server nor can I host a listen server and have a properly working device connect to it. I'm guessing I'm missing some kind of dependency that is used with UE4. I also get a prompt to install DirectX Runtime everytime I try and run the exe on a new computer. Has anyone experienced something like this?

glad sedge
#

Would you guys spawn pawns in Game Mode or Game State?

gray scroll
#

@glad sedge Game Mode

glad sedge
#

Cheers

#

Basically every beginning game actor within Game Mode, or just pawns specifically?

gray scroll
#

Pawns probably

glad sedge
ember needle
#

After a seamless travel, some clients (not the server) crash with:

 [2019.07.06-07.13.37:622][887]LogWorld: SeamlessTravel to: /Game/Levels/Menus/OSA_Menu_Level_SlotSelection
 [2019.07.06-07.13.37:644][888]LogOutputDevice: Warning: 
 
 Script Stack (0 frames):
 
 [2019.07.06-07.13.37:644][888]LogWindows: Windows GetLastError: The operation completed successfully. (0)
 [2019.07.06-07.13.38:020][888]LogWindows: Error: === Critical error: ===
 [2019.07.06-07.13.38:020][888]LogWindows: Error: 
 [2019.07.06-07.13.38:020][888]LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:Runtime\Core\Public\Containers/Array.h] [Line: 611] 
 [2019.07.06-07.13.38:020][888]LogWindows: Error: Array index out of bounds: 36 from an array of size 0
 [2019.07.06-07.13.38:020][888]LogWindows: Error: 
 [2019.07.06-07.13.38:020][888]LogWindows: Error: 
 [2019.07.06-07.13.38:020][888]LogWindows: Error: [Callstack] 0x000007fefd31a06d KERNELBASE.dll!UnknownFunction []
 [2019.07.06-07.13.38:020][888]LogWindows: Error: [Callstack] 0x00000001406dd7b7 OneStepAhead.exe!UnknownFunction []

This is the complete dump: https://drive.google.com/open?id=15ruCF6FKptwBgP662b5xmnzp140pk1Pp

This is a BP project. How can I start to pinpoint this issue?

winged badger
#

first, instal editor symbols for debugging

#

then you can try acting with more information

#

@ember needle

ember needle
#

iโ€™ve installed them

#

this crash is in a packaged game

winged badger
#

and the project has no c++ at all?

#

packaged or shipping?

ember needle
#

just a tiny little, to expose a couple of c++ functions

#

development build

winged badger
#

not a pretty situation

#

you can try

#

starting a game, attaching the VS to process via Debug menu then reproduce the crash

#

that will also give only limited information, and VS in that mode is slightly unstable

#

but you should be able to figure out what was the last of your module functions that got called

#

odds are its one of your c++ functions

ember needle
#

unfortunately no, i can show you these functions they literally just expose one boolean to BP

#

I can't really attach it, this is a crash in a packaged game over STEAM

#

not sure how to do that

winged badger
#

you start the game normally over steam

#

you open the VS

#

you go to its DebugMenu and select attach to process

#

you find your game.exe on the list of runnign processes

#

and select it

#

VS will load symbols for a bit, then it will be able to catch a breakpoint when the crash happens

ember needle
#

ah ok

#

will try that... thanks

#

then i'll ping back here to understand what to do with what VS tells me...

timber garnet
#

Could someone help elucidate some things I'm experiencing with PostLogin

  1. I have a dedicated server and 2 clients (Just the built-in multiplayer play mode)
  2. I have disabled "automatic login" for the multiplayer settings
  3. Post login is called twice - BUT I am not joining sessions or even finding them in code. Its happening automatically

Why is this happening? I'm trying to get game clients to just load the main screen, and only when 2 players click the "Find Match" button should them attempt to "Find Session".

#

its making it very difficult to simulate my mobile game

hasty orbit
#

Hello I have a problem I can not define a variable of a client in a widjets I have the reference of the client

#

is it possible to define a variable of a client in a widjets ?

bitter oriole
#

Is AGameMode::Logout guaranteed to fire when connection is lost ?

hasty orbit
#

ok so I have to run it in the Agamemode

#

@bitter oriole

meager spade
#

@hasty orbit he was asking a question i think

#

not responding to your widget question

bitter oriole
#

Indeed

meager spade
#

its called when the controller gets destroyed

#

so if the controller is destroyed, logout is called

#

so yeah seems its guarenteed to happening

#

happen8

bitter oriole
#

Cool

#

Thanks

hasty orbit
#

could anyone help me?

winged badger
#

@hasty orbit widgets are in no way, and should not be replicated in any way

#

same goes for your HUD, and your AnimInstances

#

and your GameInstance

hasty orbit
#

@winged badger
how to define a variable of a precise pawn when I click on the button

winged badger
#

that doesn't mean anything to me

hasty orbit
#

what does not mean anything

#

my sentence @winged badger ?

winged badger
#

your question, i literally don't have a clue what you're trying to ask or do

hasty orbit
#

I want to make an invitation system so that the player when he accepts he teleports to the player

winged badger
#

for that you need a ClientRPC in PlayerState is best that sends the invitation

#

and a ServerRPC back when the player clicks accept/decline, carrying a boolean

#

ClientRPC should carry the information about the player who sent the invite, probably a pointer to his own PS

#

same deal with sending an invite

#

ServerRPC carrying a pointer to PS of the player you want to invite

#

Client RPC sending you the response

#

and HUD class hooked into the PlayerState to handle the widgets

fleet raven
#

do you mean reliable rpcs or unreliable ones?

#

reliable rpcs being possible to drop at all is a serious bug that epic is refusing to fix/acknowledge

#

you can find it by just searching for that yes

#

if you got a source build you can make this change to fix it, comment out the nonsensical code clearing the view target on short inactivity

#

no view target means reliable rpcs even on always relevant objects such as the game state will not be sent to your client

#

discovered it when investigating a most curious issue where a user was missing chat messages when his game froze at just the right time

#

hmm I don't think that would be related, as those actors would be determined to be relevant and start replicating once the client unfreezes and the view target is set back to something sensible

#

(minimizing the game also should not freeze it, if it does you've got a whole different issue to solve)

tranquil steeple
#

Is there a trick to doing multiplayer with sublevels? I have MP working fine on a small test level, but when I try to load a level with sublevels instead, none of the players can see each other. Any advice?

timber notch
#

Hey guys, sorry if this is a simple question but i'm working on my first game in unreal. I need to test something in a lobby but for that I need a player to join a few seconds after the session has started. I can't see to do this from PIE mode, and when launching as standalone it doesn't appear to connect to the host, but instead always try to imitate itself as the host. Cheers.

karmic briar
#

hi everyone rn im currently doing a summer till christmas project on creating server

#

i also do bunch of things like smoothing the movement

#

rn i wanna know anyone know ways on making ded server talk to each other to handle load of a single map

timber notch
#

I'd imagine having to create your own system for that, or using something like a webserver as a middle man to communicate between all of your servers. I'm not experienced with this so this is just my suggestion on what comes to mind. It's possible there is a much better way to do it.

karmic briar
#

like the server working togetehr to create smoother experience

timber notch
#

Oh, you mean like sharing resources?

karmic briar
#

yeah like an mmo server like spatialos where they use several ded server to work together handling the loads

timber notch
#

One way, I think would be to have it when you switch level/words you transfer to a different server. I'm think that most mmo's do something like this, where they have multiple servers and players are hopping between them depending on GEO location and your world location in game

karmic briar
#

hmm im gonna take note on that

#

other suggestion?

fossil spoke
#

Look at 3rd party solutions like SpatialOS

karmic briar
#

ouh i know bout spatials im not creating ded server for mmo or anything just a project to challenge myself

hasty orbit
#

Ok I'll try this @winged badger

gusty slate
#

Hello,
I am still new to networking and I basically want to understand the standard flow for spawning the initial players. So the setup doesn't use spawned characters, just the default Pawn (with camera) and a Playercontroller

#

The issue I'm still getting sometimes with 2 players and dedicated server is that sometimes the 2nd client doesn't properly spawn the pawn and possess it

kind star
#

something that should be super simple - get the clients ping... Having some frustration

#

I previously was trying to use the ping from the PlayerController from the variable AverageLag (this is a custom pure C++ function exposed to BP, however this gives me 13 in PIE...

fleet raven
#

@lament cloak yes but they should start sending when it is set again, unlike rpcs which are lost

gusty slate
#

Btw, for anyone in the future, my issue was quite simple after looking at the Output Log (which I should have checked much earlier). My pawn was simply not getting spawned because it somehow was considered as colliding with something.

timber notch
#

Hey anyone know here an event or something for when networked objects are ready? For example I want to do some code on the client, but I need it to run only once it is aware of all the networked objects in the world. Thanks

fleet raven
#

there isn't an event for "once it is aware of all the networked objects"

#

once the client has all the objects that were relevant for him at that time, nothing special happens, it just smoothly transitions to updating those and eventually replicating new ones that enter relevancy

#

you can kind of wait for specific objects by checking if they exist yet

#

like player states

timber notch
#

Okay, my example is a lobby. When a client joins the server fires an RPC that tells that client to open the lobby UI, which then checks all the players and there replicated values and updates it as it should. The issue is I think the RPC is firing too early before the client knows about the other player objects. My server is fine and shows all the players in the lobby, but all the clients show none as if the playerstate hasn't been created on the clients yet

#

Hope that makes sense

fleet raven
#

why not open this ui immediately on the client when the map loads, then add widgets for the other clients to the ui as their player states come in?

#

making it live instead of waiting

timber notch
#

That could work, but I still have no idea of the even for when a playerstate is added clientside

#

event*

#

I'm pretty new to unreal, sorry

fleet raven
#

could just use its beginplay, or I think there might be a callback for it on either the character or controller

timber notch
#

ah yeah that could work

#

Create a static array containing all player, add/remove it's instance based on BeginPlaya nd Remove

fleet raven
#

well there is already an array keeping track of all player states in game state

timber notch
#

Oh

fleet raven
#

there may be events for it being modified too

#

then you can just rebuild the ui whenever that happens

timber notch
#

Thank you

gusty slate
#

Let's say that I have global data, an array for example that isn't relevant to either players specifically or a certain match. Where is data like that kept in a MP structure? Gamemode?

#

Like, I don't know, for example a Map of TeamNumber -> TeamColor

#

Hmm, I guess there is the question of whether we want only the server to have access to it or all clients?

#

Hmm, would it be correct to say that for global data that I want only the server to access and retrieve it should be the GameMode and for data that all can access freely the GameState?

#

Too many questions haha, but would it also be advisable to do a mix of the above? Where at the beginning of a match you set data from the GameMode to the GameState to be certain of data safety? Or is the GameState simply replicated from Server to Clients?

winged badger
#

For team colors gamemode is only an option if you override iniplayerstate

#

And set the color in ps, andeve then... means you have to replicate it

#

Instead of having eadily accessible packaged data

#

Because for displaying team information, ps will be your context

#

You dont want to have to do 2 layers of indirection just to display color on a widget

jolly siren
#

Is there a function that gets called when an actor receives it's replicated location?

chrome bay
#

PostNetReceiveLocationAndRotation

jolly siren
#

So they are replicated together already?

#

It was my understanding that location and rotation were replicated independently of each other. At least to simulated proxies.

winged badger
#

Custom NetSerializing FTransform seems like elegant way to do it

jolly siren
#

I'm running into a spectator issue when a player teleports through a portal (we have teleport functionality in our game) it appears that the characters location is replicating to the spectator before the new rotation.

#

Think of the game portal. So you go through a portal and your rotation can completely change. But we are seeing a flicker issue where it looks like the players location is replicating before the new rotation that you should have when coming out of the portal. So it doesn't look seamless to spectators

winged badger
#

1 frame?

jolly siren
#

yeah

#

Does PostNetReceiveLocationaAndRotation get called for simulated proxies?

winged badger
#

You should check what it does, might be leaving rotation alone for next frame interpolation

jolly siren
#

okay, yeah it does get called for simulated proxies. Will mess around with it

#

What did you mean by Custom NetSerializing FTransform?

winged badger
#

Best eay to find that out

#

Id to breakpoint it while the game is running

#

Examine callstack

#

Its the path of least resistance, you Netquantize_Normal for rotations

#

Maybe compress location a little as well

#

And do not serialize Scale

chrome bay
#

Location and Rotation are replicated as part of FRepMovement so it's called at the same time

#

The function is just called from OnRep_ReplicatedMovement()

#

But yeah, it get's called for any actor, regardless of role

#

ACharacter overrides it for replay purposes

jolly siren
#

If I set SetActorTransform on the server for a character will it go through replicated movement?

#

Or should I be setting the actors position/rotation a different way to get it to replicate through that struct together properly?

chrome bay
#

yeah setting the transform will do it

#

GatherCurrentMovement gets called when the actor is about to be replicated, which is what ultimately replicates the transform (excluding scale)

jolly siren
#

Thank you James, appreciate it

timber notch
#

Hey guys I have a default pawn set up, but when my game start it spawns the pawns but only on each client. For example the server pawn only exists on the server. Client 1's pawn only exists on client 1. Client 2's pawn only exists on client 2. Why would this be happening as it wasn't happening before? Thanks

gray scroll
#

I am spawning a widget on the map... then destorying it after... but it remains on the map after i respawn

#

this is how I am destroying it... any idea why?

#

and this is all running on owning client

unreal pine
#

You try using "remove from parent" on the widget?

gray scroll
#

@unreal pine yes, still same issue

#

it shouldn't be a replication issue atleast I don't think

unreal pine
#

yeah I don't think it is, but throw a breakpoint or a print string on it to make sure that destroy / remove is getting called

gray scroll
#

@unreal pine found the issue... needed a switch has authority ๐Ÿ˜›

#

and run it on remote

unreal pine
#

does that mean if you use a listen server, that version won't destroy the widget? ยฏ_(ใƒ„)_/ยฏ

#

good to hear that you have a fix working though ๐Ÿ˜ƒ

gusty lily
#

Q - client disconnections. I use listen servers and steam for nat punching and some particular clients seem to always get disconnected. Maybe it has something to do with their connections being unstable, but they report that other games (with dedi servers) don't do this. Does anyone have experience with this, or helping Ue4 / steam keep a connection alive despite dropouts?

fossil veldt
#

Do you think it's possible to have good Netcode in Blueprint? I was thinking of setting up my own system for NetQuantize and sending as a Byte Array but I don't know if Blueprint is very good for this as you can only send via RPC, Guessing it will never come close to C++?

timber notch
#

Hey guys I have a default pawn set up, but when my game start it spawns the pawns but only on each client. For example the server pawn only exists on the server. Client 1's pawn only exists on client 1. Client 2's pawn only exists on client 2. Why would this be happening as it wasn't happening before? Thanks

thin stratus
#

That would technically only happen if you disabled AutoConnect in the advanced play settings

timber notch
#

Oh, maybe that's what it was. I'll take a look, thank you!

#

After checking this isn't the case. It is checked.

#

Also, I want to mention that the player states do network

#

a player state for each player exists on the server and each client

#

but the pawn only exists on the client it belongs, client 1's pawn doesn't exist in the servers world, but does in client 1's world.

#

So they must be connected some how for the player states to replicate right?

thin stratus
#

Yeah, so you spawn the default pawn through the GameMode?

timber notch
#

yeah

#

I have a C++ gamemode

#

BP based on it

#

Set defauit pawn in that, and in the project settings

#

It was working for like a week, and then suddently stopped and I don't recall noticing when it stopped working correctly

thin stratus
#

That's pretty vague

#

Hard to offer any advice

timber notch
#

Honestly, I have not done anything to mess with the spawning

thin stratus
#

GameMode and GameState classes both either Base or not Base?

timber notch
#

Gamdmode is based of AGameMode, and state is based on AGameState

thin stratus
#

Hm

timber notch
#

State i'm currently not doing anything in, it's just a blank class basicly. The gamemode the only thing i'm doing is firing an RPC on PostLogin

#

Not overriding any of the paw spawn methods etc

thin stratus
#

On the PC I assume?

timber notch
#

yeah

#

When trying to play from editor

thin stratus
#

And you think the Pawn only exists on one Player why?

#

Cause if it's really spawned through the GameMode default value, then that can't really be

timber notch
#

Well, if I check in the editor hierarchy. There is only one blueprint for the pawn (the servers pawn) but no others for the other clients. When going into the player blueprint and checking the debug tool at the top, I notice that Client 1 has a single pawn, Client 2 has a single pawn, and the Server has a single pawn. They all only have there own pawn, none of the pawns exists on the other clients. How ever, the player states are valid on the server and other clients

#

Just not the pawns

thin stratus
#

Can you just print on Tick?

timber notch
#

Yes

thin stratus
#

Print the DisplayName of the pawn or so

timber notch
#

Prints 1 for server, prints 1 for client, prints 1 for other client. Tick is only called on the client that owns the pawn, it can't be called on the server versions of these as they don't exists for some reason.

#

One second, i'll do it now. You want me to print the display name in the Tick of the player pawn?

#

@thin stratus sorry for the delay, when putting GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, this->GetName()); in the tick for the players pawn, it's shows BPTerrorist_C_0 on all clients

chilly mist
#

So directly replicating a UObject isn't easy. Will it work if I wrap a UObject with a UStruct and replicate the UStruct?

chrome bay
#

No, you can only replicate a UObject through an actor via ReplicateSubObjects

#

As clients have to create the UObjects locally and assigned network GUID for them, so replicating a pointer to some arbitrary UObject won't work.

chilly mist
#

Okay, thanks!!

nocturne berry
#

hey guys, how can i open multiple dedicated servers that are using steam on the same machine? they are trying to use the same port 27015, is there a way to make this auto increment like the port?

chrome bay
#

@nocturne berry you have to set the port in the config file of each installation

nocturne berry
#

it is set to 27015 in the config file

chrome bay
#

Yeah so to run multiple instances on the same machine, you need to create multiple installs / folders with a copy of all the server files in

#

Then in each install, change the port for that particular instance.

nocturne berry
#

oh man, that won't work with my setup because i am using amazon gamelift

chrome bay
#

I'm not sure on the specifics of gamelift, we're using g-portal and I'm fairly sure that's what they do

nocturne berry
#

hmm

chrome bay
#

Let me check

#

Maybe you can override the port via command line?

nocturne berry
#

any idea if there is a way to change the port in code?

#

yea that's what i'm trying to figure out

#

but can't find how to, or if it is even possible

chrome bay
#

Well you can specify anything you want on the command line and then grab it from the game instance in the Init() function

#

WithFParse::Value(FCommandLine::Get(), ...)

#

Thing is though... won't running copies of the exe be fighting each other over file/folder ownership etc? I'm thinking in terms of logs etc. Maybe gamelift does something for that

#

It's a pretty common thing.. there must be some documentation on it somewhere

#

@nocturne berry - Yeah there's already a command line option for it

#

QueryPort=

#

Check OnlineSubsystemSteam.cpp Line 665-671

#

(in 4.21)

#

There's also Port= for normal game-traffic

nocturne berry
#

i will try to see if maybe gamelift has something for that, and see if changing the port with the command line works
@chrome bay thanks for your help!

gusty slate
#

Hello guys,
Question, is pre-defined static data held in Manager objects in the GameInstance for example safe?

#

I'm trying to figure the best way to structure and store my pre-defined data in a MP structure basically

#

I know there's the singleton, but I usually like to split my data structures and their relevant functions into separate "managers"

chrome bay
#

I think 4.20/4.21 added a new system for creating managers

#

someone mentioned in recently

#

Might be 4.22.. I can't find it now

#

Oh it's 4.22 - Game Subsystem

gusty slate
#

Hmm interesting, I'll have a look

#

Thanks

nocturne berry
#

okay found out that gamelift has the option to open each game instance with a different parameter, so i just specified the port i need for each

chrome bay
#

sweet. Yeah I figured there would be something

nocturne berry
#

now my problem lies with finding the specific session that i created on the server

#

it seems that the filtering in the Find Advanced Sessions is not working?

#

it's ignoring anything i put as a filter

#

is anyone using the advanced sessions in 4.22?

fossil spoke
#

@nocturne berry We never needed to manually change or set the port when working with GameLift.

#

Each instance should automatically roll over the port

#

7777, 7778, 7779...

nocturne berry
#

the game port works, but steam port doesn't

#

that was the problem

fossil spoke
#

Ah

#

Fair enough

nocturne berry
#

are u using steam with gamelift?

fossil spoke
#

Not for match making or server browsing no. Purely for distribution

nocturne berry
#

hmm, well that's kind of what i was trying to do before

#

but when i put my game on steam, i wasn't able to connect to the server anymore unless it had steam and i joined via Join Sessions

bitter oriole
#

Seems normal if the game was created through sessions

fossil spoke
#

We use Gamelift directly and simply OpenLevel with the IP it returns as part of the process.

nocturne berry
#

trying to connect with OpenLevel kicks the players right away

#

because the client has steam, while the server doesn't

#

so the server rejects the connection

fossil spoke
#

Why wouldnt your server init steam?

nocturne berry
#

it is currently initializing steam

#

is urs initializing steam?

#

if it is then it shouldn't let you connect via OpenLevel

fossil spoke
#

No we are using GameSparks subsystem.

nocturne berry
#

at least that's from my experience

fossil spoke
#

Client uses Steam for overlay and distribution only

nocturne berry
#

did u have to setup anything in your .cs files to achieve this?

fossil spoke
#

Im not sure i wasnt the engineer that set it up. I did all the Gamelift integration though

real yacht
#

@fossil spoke are you deploying win or linux dedicated server?

#

on gamelift fleet?

fossil spoke
#

Win at the moment. Its on my todo list to build for linux

real yacht
#

tell me, vc_redist.x64.exe need to bee in folder

#

with upload?

fossil spoke
#

Yes

nocturne berry
#

would it be possible to check with the engineer who integrated steam? i'm really curious to know how, because i would like to remove steam's integration and keep it just for distribution

#

exactly as u have it

real yacht
#

this is my sever build

fossil spoke
#

DM me quickly so i remember, im in bed on my phone ๐Ÿ˜ƒ

nocturne berry
#

@real yacht u also need directx installer

#

okay ๐Ÿ˜„

real yacht
#

hmm

#

are we talking about

#

dxwebsetup.exe

#

?

nocturne berry
#

yup

real yacht
#

omg

#

okay

#

thnx

#

๐Ÿ˜ƒ

fossil spoke
#

Yeah those 2 are generally all you need

real yacht
#

does anyone knows how can i shutdown fleet that is in ACTIVATING status?

nocturne berry
#

u'll have to wait for it to activate

fossil spoke
#

You cant.

nocturne berry
#

or give an error (after 1 hour i think)

real yacht
#

so it have some timeout

#

can someone share install.bat

#

?

fossil spoke
#

Yeah you have to wait for it to timeout if it was in an unstable state

#

You can DM me as well if you like

real yacht
#

thnx, i will, just need to check with you is that correct .bat

#

thnx mate!

fossil spoke
#

DM me as a reminder i dont have access to it right now. I will in the morning.

real yacht
#

no problem

real yacht
#

@fossil spoke why is this happening? when i create fleet

#

it runs everything 2 times

fossil spoke
#

It has to run the installer to setup any dependencies your game might have

#

Those are the additional files you upload with the server files.

real yacht
#

so i have 2 files to install in .bat

#

he runs separated

#

one by one?

fossil spoke
#

One after the other yes

real yacht
#

ok, make a sense

glad sedge
#

A question - when can I spawn pawns before I get Player controllers entering the match?

fossil spoke
#

Why do you want to do that?

void nest
#

I have a strange issue. In the network profiler I get a massive amount of updates from a certain class called BP, yet I can not find this class inside my project anywhere? What could be going on here?

bitter oriole
#

Looks like the total

#

Nah, that's not it sorry

void nest
#

Oh ok that makes sense, is it normal that the total is called BP?

velvet parcel
#

How do you name a server in blueprints?

void nest
#

ah ok

chrome bay
#

I don't think it does total them.. it must exist somewhere? Possibly a redirector?

velvet parcel
#

using advanced session plugin

chrome bay
#

or maybe in the root folder?

void nest
#

any way I can pinpoint the blueprint?

chrome bay
#

try searching just in the windows folder for it

void nest
#

ok

chrome bay
#

If it's a little 1kb file it's probably a redirector

#

Although that would be mega annoying if that is the case

void nest
#

hmmm If I search my content folder in windows I can't find any file named "BP"

#

all my files have BP_something

#

could this be an Unreal engine blueprint?

bitter oriole
#

The level BP maybe

void nest
#

yeah that could be ๐Ÿค”

chrome bay
#

I think that gets the level name? Could be wrong though

#

not from a plugin or something is it?

meager spade
#

@velvet parcel please dont post in multiple channels ๐Ÿ˜ฆ

velvet parcel
#

sorry

#

its just kinda going crazy thinking that naming a server is impossible in blueprints lol

#

You have to be kidding me if this is a limitation LMAO

meager spade
#

steam?

#

4.22 added a option

#

to supply the servername

bitter oriole
#

@velvet parcel Advanced sessions is a community plugin, and people who do multiplayer usually dive into C++ pretty much immediately

meager spade
#
Using UE4 with Steam has never been easier! We've made several improvements to usability and quality of life for developers of multiplayer games on Steam.

    Dedicated Servers on Steam can now receive custom names (up to 63 characters) with the new "-SteamServerName" launch argument.```
velvet parcel
#

My project is done in blueprints so for now I guess all servers will be called "Server"

#

LMAO

bitter oriole
#

Use the command

velvet parcel
#

a console command?

#

This is literally the only limit I have run into so far. LMAO

bitter oriole
#

Read the quoted message just above

velvet parcel
#

Listen server? That looks like dedicated server

#

also farily certain that the lan functionality is busted too

#

maybe

bitter oriole
#

LAN works fine for me

velvet parcel
#

so the blueprint session thingy seems borked?

bitter oriole
#

It probably isn't

#

though LAN doesn't work if you're set to Steam

#

Which is not an engine or BP limitation, but Steam not supporting LAN

velvet parcel
#

It shows ping it shows connected clients it seems to be working I just need the session thing to take a string and I am good to go

#

I am not using steam yet

#

And I see no reason to use C++ either. This should probably be fixed imo

bitter oriole
#

Go ask the community that maintains advanced sessions

velvet parcel
#

Yeah you would figure advanced sessions would have this fixed but even they dont apparently

#

there simply is no way to do it for some really weird reason

#

The create session node should literally have a string entry right there and be done with it.

#

Is there something super complex about this I am not understanding?

bitter oriole
#

Well, yeah

#

Sessions don't have a concept of name

#

IIRC if you want a name you have to add it yourself through the key/value system that you can optionally add to

#

"Extra Settings" in advanced sessions

#

And then you can look that up when fetching the session

#

So it's fully exposed to BP, just not in the nice-and-easy way you'd like

velvet parcel
#

Yeah this should be fixed

#

The idea naming a server is not one of the first basic functions is insane to me.

#

Especially considering that literally everything else works fine XD

bitter oriole
#

This works fine too

#

Not everyone needs a session name

#

I definitely don't

#

Anyone who doesn't have a dedicated server probably doesn't either

velvet parcel
#

I should not need a plugin that adds 5000 additional options to barely be able to name a server

bitter oriole
#

You don't, use C++

#

If you want to avoid using C++ for your multiplayer game, then you need the plugin, which works fine and provides the feature you need

velvet parcel
#

Its pretty jacked LOL

#

Ill be naming every server "Impossible to name servers" for now HAHAHA

bitter oriole
#

I mean if you're having this kind of reaction to using extra settings, I sure hope you don't need vehicles

velvet parcel
#

I can do vehicles myself

#

I can script pretty much anything. Except making a server name LMAO

bitter oriole
#

Good luck with the multiplayer vehicles

velvet parcel
#

Vehicle is easy to do XD

bitter oriole
#

Right

velvet parcel
#

Naming a server, thats hard

bitter oriole
#

Sorry, I didn't catch you were being ironic ๐Ÿ˜ƒ

velvet parcel
#

I am joking around at this because this is literally the first limitation I have actually run into and its the dumbest thing ever

#

I have been using Unreal 4 for years now and this was the one

#

My mind is fucking blown that THIS was the one thing I finally found

#

And yes I can blueprint script a vehicle. But thats beside the point

thin stratus
#

I'm pretty sure the things you need to make a proper Networked Vehicle are not available to BPs

#

But yeah, Session stuff is not much exposed

grand kestrel
#

What kind of crappy vehicles do you have to make for it to be considered easy

velvet parcel
#

You can do a pretty decent vehicle in blueprints. Probably do it better than most games.

grand kestrel
#

Lol

velvet parcel
#

Its not insanity to figure out how to get something that acts reasonably well.

chrome bay
#

Whose gonna tell him...

grand kestrel
#

I think you just volunteered

chrome bay
#

hahaha

velvet parcel
#

I am in the middle of building my current project which is a full blown in game multiplayer level editor with mod support

#

but yeah making a half decent vehicle is not insanity

chrome bay
#

Add lag and packet loss

#

then cry a lot

grand kestrel
velvet parcel
#

If I decide to make vehicles in the future ill keep this in mind.

grand kestrel
#

This is for literally everything you make

#

Not vehicles

#

When you have 0ms latency things that don't work appear to work, and most newbie devs believe their code functions

thin stratus
#

Why do you think the Character has a C++ MovementComponent with a literal shit ton of code in it?

#

Cause it's so straight forward to do an even more complex vehicle in BPs?

grand kestrel
#

Coz they made it poorly

chrome bay
#

basically:

  • Good Physics
  • Multiplayer

Pick one

grand kestrel
#

๐Ÿ˜‰

thin stratus
#

Even if it's not poorly

grand kestrel
#

Oh I'm just being silly

#

They did make it poorly but your point still stands

thin stratus
#

basically:

  • Good Physics
  • Multiplayer
  • PUBG vehicles

Pick one

chrome bay
#

haha

velvet parcel
#

We live in an industry where the first Halo probably still has better vehicles than most modern games. ๐Ÿ˜›

thin stratus
#

Yeah but the first Halo also wasn't limited by BPs

velvet parcel
#

Unless its literally a car game maybe

chrome bay
#

to be fair player-driven physics and networking is still an unsolved problem from the 90's

grand kestrel
#

And they had incredibly skilled devs

#

Its not just a few mid level people hashing together a game like most projects people around here work on

velvet parcel
#

Making halo one vehicles is 100% possible XD

thin stratus
#

Don't get us wrong, BPs are amazing and you can do a lot of stuff with them.
Just be aware that Multiplayer and PlayerInput/Physics is a shithole

grand kestrel
#

Physics is a shit hole even if you're working in C++

#

Its all hard coded

thin stratus
#

Yeah

velvet parcel
#

fuck man sounds terrible

grand kestrel
#

Basically if you hate yourself, do physics

chrome bay
#

hahaha

thin stratus
#

You can fake a lot of physics with proper vector math

#

And that's not even the issue

chrome bay
#

You can probably tell some of us are battle scarred from dealing with this nonsense

thin stratus
#

But the whole idea of prediction and rerolling moves

#

Is just not a thing for BPs

grand kestrel
#

Wonder if Chaos will make everything better ๐Ÿ˜‰

#

Even if it was, I'd like to see someone writing readable BP code that deals with that..

chrome bay
#

take fortnites approach and go client-auth. It feels dirty and wrong, but if you want semi-decent collision it's the best we got atm

thin stratus
#

:D I just don't want you to spend hours on a BP vehicle, just to sit in a corner, crying and eating icecream cause you realize it's not a thing for BPs

chrome bay
#

tbh I take some comfort in knowing that literally the most popular game in the world doesn't even do it properly

grand kestrel
#

At that point you gotta simply accept your game will get hacked

velvet parcel
#

Id just jam together an actor with custom movement and be done with it for most shit and players would never know the difference.

thin stratus
#

So you think :P

#

First negative review "Game is unplayable on 60ms Ping."

velvet parcel
#

a car only moves forward and back

thin stratus
#

So does a Character

#

I can show you a 2D Dot that lags if you don't code it properly :D

grand kestrel
#

You say it like its a bad thing, what's wrong with eating icecream in a corner and crying?

chrome bay
#

network physics is the dark souls of game dev

#

and other memes

thin stratus
#

@grand kestrel It's the times you feel most alive

velvet parcel
#

I feel like the physics should only be used for cosmetic stuff and the vehicle is pretty much fine just being a fast running character who can only move forward

#

or float in the air

grand kestrel
#

Hoho

velvet parcel
#

I bet you players wont know or give a crap XD

thin stratus
#

Welp, good luck :P

grand kestrel
#

I envy your thought process

velvet parcel
#

In fact a shitty setup like that will be less buggy where your car can freak out and fly in the air ect

grand kestrel
#

I can't sleep at night if I don't code everything 100% correctly

velvet parcel
#

I am all about smoke and mirrors and getting it to work ... Perfection is murder

#

And the end result? Look at the Horse in Witcher 3..

grand kestrel
#

I think that's how you end up with a game that runs fine on the surface but has enough edge cases to make people throw the controller at the TV

#

The horse in Witcher 3 is exactly ^

#

BOTW is Witcher 3 except your horse doesn't bug out constantly

velvet parcel
#

"Look at how much effort it took to make Roach this buggy"

grand kestrel
#

It's a great name for a horse though

#

I want a horse just so I can name him Roach

bitter oriole
#

@velvet parcel Yeah, using character will yield you a Blueprint , MP capable vehicle - but a terrible one tbh

grand kestrel
#

No angular velocity, no suspension, and I'm not really sure how well it handles collisions at 100kph

chrome bay
#

le stop

grand kestrel
#

Makes sense

#

If it deflected then it would get corrected to hell

chrome bay
#

yeah

velvet parcel
#

Well while my players are flying and ridding it around killing shit your will still be player game dev dark souls

#

XD

grand kestrel
#

Well, I wont be, we have a physics guy

#

Don't hate myself enough apparently

velvet parcel
#

Make him suffer XD

grand kestrel
#

He likes it

chrome bay
#

I'm just hoping chaos makes life easier in some respects but I'm not hinging my bets on it right now

bitter oriole
#

This ^

grand kestrel
#

At least the networked destruction will be nice

chrome bay
#

Being able to just simulate one object at a time in the context of the main scene would make life a billion times easier

grand kestrel
#

We were developing our own solution for networked physics just when they announced it

#

Er networked destruction

chrome bay
#

Immediate Mode for PhysX was a step in the right direction... until I saw Epics integration of it with the rigid body node

grand kestrel
#

I don't feel like the physics guys at epic ever really won the debates

chrome bay
#

Yeah that much is definitely true..

velvet parcel
#

Lets spend hundreds of grand to pay one dude to waste countless hours every year so the next time a car touches a tree stump it can fly 100 feet in the air causing the player to go into epileptic seizures

#

LMAO

grand kestrel
#

No thats PUBG

#

Doesn't take much to get that result

velvet parcel
#

No that is every AAA studio !

thin stratus
#

That's actually the result when you do it with smoke and mirrors

#

But it doesn't seem that you are open to guidance at all

velvet parcel
#

my version just kinda bumps into it

#

LOL

#

It looks like shit but its not flying 100 feet in the air

thin stratus
#

That's also not what we were talking about

velvet parcel
#

This is more fun XD

thin stratus
#

ยฏ_(ใƒ„)_/ยฏ

chrome bay
#

I can see CMC being just about moddable enough for acradey physics

#

But.. within a lot of restrictions

grand kestrel
#

That's pretty much the extent of it

thin stratus
#

I'm happy my drones hover properly by now

grand kestrel
#

@chrome bay Speaking of which, have you added angular velocity to CMC?

thin stratus
#

Still need to get a mode working where gravity works based on what surface you are closest too ;-;

chrome bay
#

Not to CMC directly but to my vehicle-ly version of it

grand kestrel
#

Ah rightyo

thin stratus
#

Yop

#

I had a nice version with PIDControllers

#

But wasn't suitable for replication >.>

timber notch
#

Any reason why GetPlayerPawn always return null on the client?

chrome bay
#

guessing they have no pawn ๐Ÿ˜„

grand kestrel
#

Ah I have a 'nice version of it' too, its the prediction stuff that I don't have working 100% ๐Ÿ˜„

thin stratus
#

Called on what class?

#

Yeah, it was getting correct too much

#

Now I'm just Interping the UpVector

grand kestrel
#

I've been basically copying velocity

timber notch
#

Calling UGameplayStatic::GetPlayerPawn

grand kestrel
#

Epic's integration of Velocity, I mean

timber notch
#

In the player state

chrome bay
#

Yeah I apply my angular rotation/self-righting as acceleration so it's not applied as a rotation directly

grand kestrel
#

Then what do you use in lieu of acceleration

thin stratus
#

Been there, had trouble stabilizing it

#

Never understood how James did that properly xD

chrome bay
#

I'm feeling sharey...

#
    AngularAccel += AlignmentDamping;

    const float ScaledTrackingTension = GetHoverMovementProperties().AlphaTrack * ThrustRatio;
    const float FrontStr = (FVector::DotProduct(FVector::CrossProduct(FlattenedTerrainNormal, Front), Up)) * ScaledTrackingTension;
    const float RightStr = (FVector::DotProduct(FVector::CrossProduct(FlattenedTerrainNormal, Right), Up)) * ScaledTrackingTension;

    AngularAccel += FVector((Front * FrontStr) + (Right * RightStr));```
#

Basically that's what works out the self-righting angular acceleration

thin stratus
#

Yeah the Damp part was something I never got correct

chrome bay
#

The bit that really messed with me for ages was the Dot/Cross product combo

#

Without that, as you spin around the Z axis it starts going crazy unstable

thin stratus
#

Yeah but that's pretty smart stuff

chrome bay
#

having your face buried in it for years will do that ๐Ÿ˜„

#

What I like is it's just two values to balance now, damping and spring strength basically

thin stratus
#

Yeah that's how it's meant to work if you got the physics part right

#

I just never got this to work for Multiplayer

#

The correction just happened too often and I couldn't find out why

#

Replaced it with a relatively simple Interpolation

chrome bay
#

I had a funny one, where using the CenterOfMass for the find-floor trace would cause the tank to jump up and down

#

I had no idea why, changing that to using the component location or even a socket location stopped it

#

that plagued me for months

#

And only for clients too, which made it wierder

thin stratus
#
const FQuat ControlQuat = HoverdroneOwner->GetControlQuat();

const FVector ControlRight = ControlQuat.GetRightVector().GetSafeNormal();
LastUpVector = UKismetMathLibrary::VInterpTo(LastUpVector, NewUp, DeltaTime,  DefaultUpVectorInterpSpeed).GetSafeNormal();
const FVector NewForward = (ControlRight ^ LastUpVector).GetSafeNormal();
const FQuat FinalQuat = FQuat(FRotationMatrix::MakeFromXZ(NewForward, LastUpVector));

Quat = bDisableRotationAcceleration ? ControlQuat : FinalQuat;
chrome bay
#

Ah yeah that works

#

stable too I imagine

thin stratus
#

Yeah solved most of the issues we had

#

What I still have to do is some sort of Dynamic Gravity mode

#

Where you can drive on nearly every surface

chrome bay
#

Yeah that I haven't ever considered

thin stratus
#

It's straight forward as I have a custom Gravity Direction

#

If I change that it instantly works

#

BUT, there are some quality of life things that hurt

#

Like driving up a curved wall

#

The Drone mesh has to rotate fast enough

#

OTherwise your snoot hits the wall

#

Shit like that

#

That's why the code above had that "bUsesDynaGrav" stuff for the interp speed

chrome bay
#

Ah yeah i had that with hills and stuff initially if the tank moved to fast - I do a trace out in front of the direction your moving then average that with the floor below the craft

thin stratus
#

Sadly wasn't a solution

chrome bay
#

Which I can just about get away with if the lift spring is fast enough

thin stratus
#

Yeah tried that too but we had no proper underlying collision for the level