#multiplayer

1 messages ยท Page 521 of 1

pallid mesa
#

basically you can drive certain shader formulas with this input data

#

so you could define or drive the size

#

by passing to this shader a variable that determines how big your decal is going to be

mighty rover
pallid mesa
#

that looks cool!

mighty rover
#

oldschool POGs action ๐Ÿ˜‰

pallid mesa
#

now, you really don't want to spam spawn that circle

#

hahaha

mighty rover
#

haha exactly - cleaning everything up and it's one thing that's bugged me that I couldn't find a way to prevent the spamming of the spawned decal, so hopefully by tonight, I can figure it out

#

will post back if I have any more questions - thanks again

pallid mesa
#

no worries, there are more methods to do what you want to do

mighty rover
#

oh yeah? such as?

pallid mesa
#

simply scaling

#

using a mesh

#

for example

mighty rover
#

oh yeah, good point. I can just create a flat mesh of the shape (or even a plane with opacity mask) and scale it then it wouldn't be much different than the method I'm using now

pallid mesa
#

it doesn't even need to be plane

#

it just needs to work out for your perspective

mighty rover
#

that's a fair point ๐Ÿ‘

gleaming vector
#

@winged badger yeah, that is what I did

#

basically I found that the instanced subobject was created and properties were loaded on the server

#

and then the subobject was sent to the client

#

where the properties were not loaded

winged badger
#

was it the replicated one from the server, or a local one?

gleaming vector
#

however, since nothing had changed on the server (properties were loaded and left blank), the initial replication didn't have the changed properties

#

so it was constructed and then just left there

#

the local one

#

Server: Constructed, Properties loaded, Sent to Clients

#

Client: Recieved, Constructed, Properties not loaded (since it was sent from the server)

#

the step where the initial properties was skipped, because on the server they were loaded and never changed

winged badger
#

normally, all replicated properties are sent with instruction to construct the object in the same bunch

gleaming vector
#

not if they are default

#

and, honestly, this isn't the first time this has happened to me

#

so i shouldn't be surprised

#

you can make OnRep fire if they are default

#

but you can't force the server to actually send the property

winged badger
#

instanced is fucked, when you put it on instanced subobject it gets even worse

gleaming vector
#

yep

#

i walked right into it

winged badger
#

oh ffs

gleaming vector
#

"whistles... OH GOD ITS ALL SPIDERS"

winged badger
#

server thinks the defaults are whatever you put into the instanced object on the actor CDO, because its instanced

gleaming vector
#

yeah, if you have a DOREP condition to fire OnReps always, it actually checks if it's the initial construction and if so, fires the replicated property OnReps regardless of if there is actually something from the server

winged badger
#

client receives "make this object, here is delta"

gleaming vector
#

yeah

winged badger
#

client makes the object from its CDO

gleaming vector
#

it's all fucked

#

i have to duplicate the objects

winged badger
#

i avoid using instanced like a plague nowdays

gleaming vector
#

well, i like it

#

because I can subclass data

#

which is a vital feature of what im building

#

(I'm building a MP vehicle system that is game-neutral)

#

(so things like "does this seat do anything special when a player gets in, like animate the player" has to be on a per-game basis)

#

so, just subclass the seat config

winged badger
#

any particular reason why a UObject, and not a full UActorComponent?

gleaming vector
#

uh, lighter

#

and they don't need to be registered

#

plus, i'm doing some stuff with array manipulation

#

i think im just gonna duplicate the object

#

set the dupe to be net addressable

#

and replicate that

#

that solves my problem... it's ugly but it works

winged badger
#

easiest way is

#

serialize the instanced one-> create a new one -> deserialize it from archive

#

i think

#

game agnostic, that a hobby project or a future plugin?

gleaming vector
#

client work

#

and i have a couple of use cases

#

could work as a future plugin

#

but i have no idea how i would sell it

mighty rover
wet oriole
#

Hello guys,
In the game mode class I'm trying to pass player state from a controller to another controller client function but in the client the player state is null
in my game mode :
void AMYGameMode::PostLogin(APlayerController* NewPlayer)
{
AMYPlayerState* NewPS = Cast<AMYPlayerState>(PC->PlayerState);
for (AMyPC* ExsitingPC : PCs)
{
if (NewPS)
ExsitingPC->UpdateNewPlayerInfo(NewPS);
}
}

in the controller class header:
UFUNCTION(Client, Reliable)
void UpdateNewPlayerInfo(AMYPlayerState* InPS);
void UpdateNewPlayerInfo_Implementation(AMYPlayerState* InPS);
in the controller cpp:
void ARTS_PC_Lobby::UpdateNewPlayerInfo_Implementation(AMYPlayerState* InPS)
{
if(!InPS)
\\Some log
}

Why the client can't see the Player state ? As i know the player state is replicated to all clients!

worthy apex
#

Update from my SeamlessTravel issue:
I have managed to get my character be carried forward to another level using GetSeamlessTravelActorList() but the mesh is not showing, please help

pallid mesa
#

๐Ÿ‘ @mighty rover

ivory flame
#

@ivory flame y don't u call create session on the server when it starts up? Then u could use sessions right?
@timid moss I don't fully understand how sessions work when I connect using IP address, because I don't know the way how to use Join Session with my dedicated server IP

thin stratus
#

Sessions are just information stored as a list you can retrieve

#

It requires a central place to store them, called a MasterServer. Steam for examples allows using theirs, which allows you to create and find online sessions. When connecting to them it just pulls the connection info from the session info.

#

@wet oriole most likely a timing issue. The state hasn't replicated to the other client yet

empty axle
#

hello, are there some rules about when the OnRep will be called on the client side? For example if the replicated variables would be set before BeginPlay on server, would their OnReps be called before BeginPlay? Or OnReps just can come in any time and there is no rules regarding them?

chrome bay
#

If the value is changed from it's "default" value when the actor arrives from the Server it will broadcast the OnRep's

#

Hard to say RE them vs begin play, since if the game hasn't "started" yet then BeginPlay is halted anyway.

winged badger
#

Client side: Spawn local version of replicated actor -> PreNetInit -> Set Replicated Values -> Call OnReps -> PostNetInit -> (if the World has/when the World calls DispatchBeginPlay) BeginPlay

chrome bay
#

Ah yeah cool, that's what I thought. So OnReps always first

empty axle
#

@winged badger thank you

winged badger
#

@empty axle if you spawn actor deferred, or use ExposeOnSpawn options in BP, you can use BeginPlay in a more generic way

#

as then server side whatever you plug in as ExposeOnSpawn or initialize between Spawn and FinishSpawning is available on BeginPlay, same as on clients

#

(as NetDriver doesn't send the Actor information the moment you spawn it, any replicated variable you set server side after BeginPlay, but on the same Tick, will be replicated before client's BeginPlay)

empty axle
#

So the actor spawn info and replicated variables set with using deferred spawning are send as one bunch?

winged badger
#

they are

#

well, anything you set between spawning an actor and netdriver sending it over really

#

which might not even be same Tick

empty axle
#

That makes sense, so it is safe to assume that those variables would be available on Beginplay

winged badger
#

it is

#

and that they can't get lost

meager spade
#

in BP its same frame tho. in c++ you have flexibility to call Finish Spawning when you like.

winged badger
#

same packet - either everything arrives, or nothing

meager spade
#

unless you are on about the net driver stuff

#

which could be a diff frame

winged badger
#

if your replicated variable is a pointer to another replicated actor, there is no guarantee that actor will have replicated before your actor referencing it calls BeginPlay

#

but non-pointer types are completely safe there

#

those kinds of race conditions typically happen during non-delayed match start

#

OnRep for pointer types should still fire when their NetGUID is resolved on that machine

twin minnow
#

Hey just wondering, are requests using FHttpModule encrypted in any way?

twin minnow
#

For example, SSL

rough iron
#

Hey, i am getting this error when i try to build from source (msb3075 exited with code 5). Any solutions?

fossil silo
#

Hey guys, I am working on a utility app for our UE platform, and I need to find any running instances of UE on our local network...I currently am able to scan the local ip range for specific open ports...but, when running a listen server, I cant seem to see any ports opening on my UE machine...

Anyone know which ports for sure are opened on a listen server, or any other open port by default w/ UE4?

timid moss
#

@thin stratus Sessions are just information stored as a list you can retrieve It requires a central place to store them, called a MasterServer. Steam for examples allows using theirs, which allows you to create and find online sessions. When connecting to them it just pulls the connection info from the session info.So you can still use sessions with dedictedd server?

pallid mesa
rich ridge
#

Yes dedicated server can and should and that's how it should behave,I haven't used steam anytime but coming from experience of Software Engineering and considering good design

#

Basically steams master server needs to tell your game we have found a match and steam is going to send you the found players and the dedicated server let them in via session

#

@timid moss

limber gyro
#

guys can you not get the game state inside a controller?

#

or am i missing an include

grizzled stirrup
#

If you spawn 10 replicated pickups that are pooled on begin play, in order to update their location when moving to desired locations and resetting, should I use a RepNotify FVector property or just set SetReplicateMovement(true) so that clients will see the pickups at the new location?

#

They are simple static actors so there's not actual movement to speak of, just updated locations from time to time when the pickup gets pooled / reinitialized

limber gyro
#

trying to get the gamestate inside the player controller, its returning null, does one know how to fix this?

#

trying to get it inside the tick function

grizzled stirrup
#

Why would you be doing it on tick?

#

Usually there's a bit of time before the GS is fully up and running so if you were getting it on tick there may be a few frames where it's null

limber gyro
#

i figured that after a while

#

its working now

#

im doing it on tick because i need to know if a round is over every frame

grizzled stirrup
#

@limber gyro why would you need to know that every frame?

#

Make it event based it's far more efficient

limber gyro
#

i know but i cant be arsed

meager spade
#

:/

#

lazy programmers are the worse programmers ๐Ÿ˜„

grizzled stirrup
#

I feel like stuff like that is how some infamous games that are built on a house of cards are made

#

"do it the easy way, we can fix it later"

#

reality- can't fix later without breaking 10 entangled parts of the game

limber gyro
#

its not entagled at all the game is relatively simple

#

and im being carefull haha

wild lagoon
#

Can anyone help me with a gamelift issue? i ran
cmake -G "Visual Studio 16 2019" -A x64 -DBUILD_FOR_UNREAL=1 .. inside [dir]\GameLift-Cpp-ServerSDK-3.4.0\out and got no errors. Then i ran msbuild ALL_BUILD.vcxproj /p:Configuration=Release and got the following error:

#

The lines that it is referring to in Microsoft.CppCommon.targets is this:

fluid prawn
#

I have a question for you networking peeps. I was wondering for network debugging is there a tutorial or a way to use wireshark to track the packets in flight from server to client.

#

?

#

I wanna test Client Side prediction because I wanna see how UE4 handles sending updates to the server if the clients frame rate is uncapped.

silent phoenix
#

If i wanted to start to learn about making a persistent dedicated server does anyone have any suggestions on learning resources?

timid moss
#

u would need to setup a database. actually u probably know that already

#

@fluid prawn I don't use wireshark much but I know there is this channel called Battlenonsense that does the kind of stuff you are trying to do

silent phoenix
#

Yeah Brian i'm more looking for info on configuring unreal server builds , pulling info from those DB and writing to it, etc

timid moss
fluid prawn
#

I have another question brian

#

regarding client prediction if anyone knows

#

if the server ticks at 60

#

does that mean the client will sample its own moves at 60

#

or does it sample it at its own frame rate

timid moss
#

for the prediction right?

fluid prawn
#

i feel like that since the server is authoritative

#

yes

#

so if you have say

#

100 ms

#

server has 20 ms

#

20 tick rates

#

then

#

16 ms to 100 ms means the client is 6 moves ahead of the server

#

but the server acks the client every third tick of client

#

so I suspect the client will sample its moves 3 ticks of the 6

#

and do the delta

#

the issue im trying to wrap my head around is if you uncapp your fps

#

and it fluctuates

timid moss
#

your assuming that the framerate is what determines the distance your character moves. If you follow basic gameplay programming practices, the frame rate shouldn't affect your movement. You are supposed to multiply how far you move in a certain move by DeltaTime, that way your movement is dependent on time, and not your framerate.

#

or maybe im misunderstanding the question

fluid prawn
#

yea you're right about delta time

#

so no matter what fps

#

you get the sum

#

at one second

#

in UE4 i see

#

they send moves

timid moss
#

does that answer it?

fluid prawn
#

the thing I am concerned with is what it looks like when the client sends chucks of information to the sever and fluctuating frame rates

#

i am confused about that

timid moss
#

o

#

i see

fluid prawn
#

the only thing i can think is that

#

ue4 caps the sampling sent to the server by the servers tick rate

#

so if you have 120 fps and server ticks at unno say 60

#

it will chunk out 60 of the 120

timid moss
#

yea that makes sense

#

but again i wouldn't think it would eb a problem because of deltatime

fluid prawn
#

you send delta time

#

over the wire too

#

so yes

#

the thing is the delta time

#

sent

#

must be capped

#

so

#

1/60

#

so like

#

if i have a data set

#

of moves for 120 frames

#

how do you chunk that with another delta time?

#

muliply it by a scalar or something

#

every tutorial i've seen on client prediction is nice and always creates a situation where the client is capped at certain fps

#

but in the real world that doesnt happen lol

timid moss
#

true. is this the Character movement component you are using? or are you making your own. I haven't gotten too much into that stuff yet so I don't have enough knowledge

fluid prawn
#

i am overriding it

timid moss
#

o

#

i see

fluid prawn
#

ive spent a considerable amount of time in the CMC

#

and I wanted to do some fast pased movement

#

with velocity

timid moss
#

yeah i will be doing that sometime in the future and am sorta dreading it.

fluid prawn
#

and i get jittery netcorrections

#

ah

#

I did this

#

might help you

#

I mapped out the networking sequence for the CMC

timid moss
#

i hvae made special movements before in a custom CMC but i havent gotten into what your doing i think

fluid prawn
#

nobody really has lol

timid moss
#

o wow thats useful

fluid prawn
#

its really hard

#

10k lines of code

#

so i combed through it

timid moss
#

yeah. no one talks about it too lol

#

ive read through it before

fluid prawn
#

the netcode for cmc is like the monster under the bed nobody wants to talk about

timid moss
#

its complex lol

fluid prawn
#

the thing is for any character movement you cant actually build a template for netcode

#

for all movement

#

the only one template you can technically do so is for velocity based movement

timid moss
#

have you seen the tutorial by SaberdartStudios?

#

thats useful

fluid prawn
#

is it the one with the max speed

#

and he overrides fsaved move n stuff

#

like they do in UT

timid moss
#

yeah

fluid prawn
#

ya i saw that

timid moss
fluid prawn
#

dang

#

ok

#

bookmarked

timid moss
#

but yeah. im sorta hoping that by the time I'm finished with some of my other stuff Epic will have replaced the system with a better one. They said they were working on it so that it works with the ability sysstem

#

but i have a feeling that will take a while

fluid prawn
#

they are recoding the CMC?

timid moss
#

"Epic recently started an initiative to replace the CharacterMovementComponent with a new Network Prediction plugin. This plugin is still in its very early stages but is available to very early access on the Unreal Engine GitHub. Epic mentioned that they would like to have the plugin working by the end of 2019 but that is not a hard deadline, just a goal. It's too soon to tell which future version of the Engine that it will make its experimental beta debut in."

#

This was said a while ago and I don't think I've heard any real updates

fluid prawn
#

Network prediction plugin

#

isnt it already

#

technically done

#

what interfaces are they exposing?

#

I suspect they are just making it easier to override the CMC

#

to work with net prediction

#

i assume they give you a framework

timid moss
fluid prawn
#

the net prediction and you implement their interfaces with movement

meager spade
#

i actually cant wait for it

#

meaning i no longer have to use bulky CMC for AI

fluid prawn
#

lol

#

man

timid moss
#

i almost am sorta unmotavated to learn CMC because of the news

#

thats y im studying replication graph and ability system rn lol

fluid prawn
#

I've been pissing around with cmc for a while it triggered me so much

meager spade
#

cmc is garbage

fluid prawn
#

i had to take a hiatus from it for like 3 months

meager spade
#

it works, sure

#

but its terrible

#

ah i made my own replication graph

#

based on ideas from fortnite and shootergame

timid moss
#

i haven't actualy made a serious game with it yet so yeah.

fluid prawn
#

you said they made a branch of it on git

#

i might work on it

#

with them or something

meager spade
#

yeah im not touching it till the framework is in a more stable state

#

its in 4.24

fluid prawn
#

I think for me its fine to override it and use it

meager spade
#

you can enable the plugin

fluid prawn
#

i can later port it over

#

when i went deep into their sockets code

#

it was really messy

#

to see how they move the pawn component

#

with replication

timid moss
#

yeah i want to wait on working on movement stuff for now because im sorta waiting for the updated system, but at the same time when the new system is finally out it will probly not be ready for production use right away so im guessing itl be a while.

#

but knowing me ill probably not wait for it.

#

im probably going to use CMC

fluid prawn
#

whats a good idea

#

that they release it

#

maybe this summer?

meager spade
#

thing is i don't see much happening with it

#

in the git commits

#

with is either good or alarming..

fluid prawn
#

jesus

#

we should make a team

#

and just do it

#

fk it

#

we will be gods

timid moss
#

wouldn't that be cool. not sure they would accept our PRs lol

fluid prawn
#

I mean

#

if they arn't doing it

timid moss
#

as someones once said "someones gotta do it"

fluid prawn
#

we should setup a branch

#

of ue4

#

and do it

#

would be doing a tim sweeny a favor

#

not just that im sure if there was an active community doing it

#

epic would intervene at some point

timid moss
#

would totally do it if I felt confident in my networking skills. I'd say im good but idk about THAT good

fluid prawn
#

it's actually not that bad

#

honestly at this point it feels better to build it from the ground up properly

#

than trying to hack the cmc

#

to do your bidding

#

if anyone is interested let me know

#

maybe rama wants in on it

#

the only issue and pain point is hooking in the animation stuff

timid moss
#

I mean I guess its not like CMC is impossible for me to understand. I could probably make progress but would eat up so much of my time hahah. and idk about u but im still in college

fluid prawn
#

root motion and such

timid moss
#

If you want to get serious about starting a team for this, maybe consider creating a discord server for this effort.

#

I'd join the server for sure

fluid prawn
#

I would I need to find people who are interested and want to

#

maybe i should just get the ball rolling myself or something

#

i think some parts of the CMC are reuseable

timid moss
#

hmmm. I like your idea. but who knows. maybe epic has lots of changes they haven't pushed yet

#

but i doubt it

fluid prawn
#

I wonder if someone here knows

timid moss
#

can we get the link here to the branch? I'm curious to see it rn

#

idk where it is

fluid prawn
#

UKaos

#

probably knows

#

hes got his eyes locked on it lol

timid moss
#

whos going to be the one to @ him lol

fluid prawn
#

@meager spade

#

there i did it

#

lol

timid moss
#

๐Ÿ˜…

meager spade
#

:/

fluid prawn
#

haha

timid moss
#

hahjahjja

fluid prawn
#

I Feel if i was a hot girl

#

his emoji would be

#

๐Ÿ™‚

#

kidding

timid moss
#

funny joke

fluid prawn
#

I can look

#

if kaos is busy

timid moss
#

yeah i might

timid moss
#

๐Ÿ˜ฎ

fluid prawn
#

๐Ÿ˜ฎ

fluid prawn
#

there is only 2 contributors

#

it seems

meager spade
#

Dave Ratti is the guy working on it

#

same guy who worked on RepGraph and Gameplay Abilities

fluid prawn
#

so hes a god

#

so it looks like

#

hes doing a seperate class

#

for sim

#

and a new base movement class

#

interesting

chrome bay
#

It's great. I've been using it a little bit (the master branch version). Still some rough edges but it's definitely going to be a game changer.

#

No more ripping character movement apart whenever you want to add basic features...

meager spade
#

i just wonder how easy it would be to get AI system to use it

#

cause it would be so nice for our AI, which don't need all the complex CMC stuff

gleaming vector
#

net prediction is going to be great

#

i can't wait until dave finishes it

twin minnow
#

hey guys, is it safe to store access and refresh tokens locally? For example, if a user authenticates themselves through an OpenId provider and gets AWS credentials that will be used for calling APIs on AWS API Gateway, would it be ok to store these credentials locally? My worry is if the tokens get stolen, then someone can impersonate the client.

cosmic badge
#

anyone know how to disable the rendering for a client that is run with the '-server' command line arg? I'd like to just run the server without the render window

rich ridge
#

@wild lagoon Last time I tried building gemelift it didn't work because Gamelift is not updated to compile with VS 2019, so I will ended up cross compiling for Linux and test things with Linux Dedicated server for UE4.23

wild lagoon
#

wait really? i spent like 10 hours today trying to get it to work lol

rich ridge
#

@wild lagoon I didn't try that hard to build , as official docs of gamelift mentioned VS 2017 supported, so once it failed for me in VS 2019, I didn't bother as I just wanted to evaluate the platform so cross compiled for Linux and tested things out

#

Their Linux build instructions works fine

#

And anyways you want to end server to be Linux right, so better do it in Linux

#

Install VM Ware and build one

#

If you are worried about testing th dedicat d server on local machine then you need to be worried, you might be thinking you need a virtual machine or a Linux machine to run, but that's not the case

#

You can run Linux Dedicated Server inside you windows. Simply instance Linux Subsystem and run can run all Linux things in Windows including your Linux Dedicated server

empty axle
#

@winged badger thanks for making it clear for me

meager horizon
#

so im trying to start up a dedicated server on linux

#

im told in the docs that the correct thing to do is something like:

#

sh ./TowerBattle.sh /Game/VehicleCPP/Maps/VehicleExampleMap -server -log

#

but unless i put ?listen on the end of the map name, it wont open port 7777 so nobody can connect to it, but thats supposedly 'different', right?

#

as in its also a client, and spawns a player pawn?

rich ridge
#

@chrome bay I m now attracted towards Network Prediction Plugin, just wanted to ask does it required to do additional coding to make it work with existing system like ASC, Replication. I have 2 days Saturday and Sunday and was hoping to explore it more.

chrome bay
#

it's not integrated with GAS yet

rich ridge
#

Sad to know

#

How confident are you that in upcoming release it will integrated in all respective components being still in beta

#

Because I don't want to touch CMC at the moment and I do have a lot issues with root motion.

chrome bay
#

It's not going to be ready for months, and I wouldn't expect a new character movement system for at least another 6-9 months, maybe more

#

Obviously this is pure speculation because nobody outside of Epic knows

#

And their internal priorities are always shifting around

rich ridge
#

Ya man u r right.

#

At least 4.26 should be safe to assume that it will have Network Prediction Plugin

chrome bay
#

I highly doubt it

#

Especially not fully integrated with the rest of the engine

#

It's still highly experimental, they might abandon it entirely between now and then

#

I wouldn't put any bets on waiting for engine features to be ready months or years from now, just use what's already in the engine

#

You could be waiting forever

rich ridge
#

What if if they were using it for fortnite internally

chrome bay
#

If they were we'd already have it

#

It's more likely they're doing it based on what they learned from Fortnite

rich ridge
#

Yeah you are right instead of waiting it's better to act on your own

#

Anyways I will explore it on Saturday and Sunday

#

Thanks

meager horizon
#

is all this faff really still needed for a dedicated server build?

#

separately building the server executable, and dragging stuff about, manually cooking half the assets?

chrome bay
#

All I do is package the game in editor as normal for the client, then build the server in VS

#

Then copy the binaries and pdb's from the Binaries folder accross

meager horizon
#

its starting to do my nut in

#

UnrealBuildTool : error : Server targets are not currently supported from this engine distribution.

#

seems to me its being stubborn and i cant make a dedicated server unless im using a source distribution of ue4

rich ridge
#

@meager horizon hahaha, you need source version it won't build

meager horizon
#

ffs.

#

WHY?!

rich ridge
#

That's how epic designed the engine build toolchain

meager horizon
#

we've all got better things to do with our day than wait for unreal engine to build from source

#

and then to have to redo that each time theres an update :/

rich ridge
#

@meager horizon I don't agree on this with you, the source build gives a alot of insights to me

#

I do actually modify the engine to check why I m getting unexpected behavior

meager horizon
#

ive always tried to avoid modding the engine

rich ridge
#

It's one time process to engine rest is fine

#

It takes 30 mins to build the entire engine

#

In this time you could do 100 push-ups

#

@meager horizon I m working on mobile game, and blur doesn't work on mobile so I do modify Engine to make blur work on Android

#

I don't want to wait for epic to fix it. I raised a bug in 4.18 for blur not working and still its not fixed

meager horizon
#

ok, well this is my first dip into networking in ue4. i consider myself clued up as far as networking goes, but this is um... an adventure.

rich ridge
#

Sometimes I feel like these epic Engineer have become arrogant and thick skined after UE4 have become so famous, they only work mostly with good studios closely

#

They don't listen to common bugs at all.

meager horizon
#

i guess today im learning to build from source ๐Ÿ™‚

rich ridge
#

It's very straight forward

meager horizon
#

yeah i suppose when i want a new release i can just do a git pull

rich ridge
#

Yes that's it

meager horizon
#

so my game started out soooo simple

#

and ive gone down the rabbit warren within 2 days.

#

for example. lets talk physics and networking. how to lose your hair rapidly.

#

so i stripped the driving physics and vehicle movement component completely from my prototype and started making my own deterministic non-physics one: https://www.youtube.com/watch?v=M0fDhnufBlw

This video demonstrates WIP car movement behaviours, including independent 4 wheel suspension, 4 weel turning, wheel movement based on vehicle speed, positioning of vehicle to point up and down hills and tyre collision.
I still need to simulate turns tilting the vehicle to re...

โ–ถ Play video
#

but thats just the tip of the iceberg... ugh.

chrome bay
#

Yeah you need a source build to build the dedicated server

meager horizon
#

i wish it would just appear in my list of platforms

#

after ive got the source build built, i mean

chrome bay
#

I suspect it's because extra binaries etc are required, and they don't want to package them into the launcher version

meager horizon
#

rather than having to fanny around building a separate executable in vs then copying it into a packaged build

#

in theory building a dedicated server should take less dependencies than a listen server or client

#

not more

chrome bay
#

Yeah, I've never looked into why. To be fair though most games don't really use dedicated servers, or if they do they're probably already working from source and have a build setup anyways

#

Does seem strange though after all this time

meager horizon
#

im going to do it through a dedicated server to keep it all 'in house', in the same way games like fortnite are kept 'in house'

#

i have some non-ue stuff im going to tie into it

#

for authentication etc

#

but thats a long way down the road

chrome bay
#

Yeah that's fair. I'm not a fan personally, too many games launch with dedicated servers only then when the studio closes suddenly their entire catalogue is unplayable

#

looks at Paragon

meager horizon
#

lol, true

#

i suppose i could easily allow for custom listen servers without any extra hassle

#

you'd have to make a choice then, play on your friends or community run server, without the extra fandangles, or on the main servers with them

chrome bay
#

It's a good idea IMO. My usual intention is to allow for listen servers for private sessions, then for public use dedicated

meager horizon
#

when i say extra fandangles i mean stuff like cosmetic IAP etc

#

ive been dead against games like that for years, but im finding that people are more receptive to a free-to-play model than forking out a tenner for an indie game up front

#

it might even end up that i end up not bothering with the IAP side at all, depending on time constraints

#

@chrome bay are you allowed to share what youre working on?

chrome bay
#

But the game it's based on is still alive and well today because of modding, so my intention is to be as open in supporting stuff as possible

#

It's also my original background though so maybe that's why I'm so open to it..

#

Also given the state of MP Indie in 2020 I doubt it'll ever get enough players to warrant a highly locked down server setup etc, I'll worry about that if it gets that far

meager horizon
#

i like the look of the tank game

#

in some ways it reminds me of tracked vehicles in starsiege universe

#

are you also going to do f2p?

chrome bay
#

Undecided atm, still not far enough along to really decide what to do with it

#

Long way to go

#

As a consumer I despise F2P, so we'll see ๐Ÿ˜„

meager horizon
#

hmmmm

#

setup.bat of the source build failed at 99% fetching deps ๐Ÿ˜ฆ

#

web exception and big fat red error message

bleak raft
#

Hey ๐Ÿ‘‹ !
Does anyone know of any good resources about network beacons ? I've been searching for a little while but I haven't found anything on how to use them. Alternatively is there a non Steam party system ( plugin, lib) ? The game I'm working on is only in local multiplayer. Thanks !

honest scarab
#

Does anyone know if you can hold more than one game mode on a server. For example, if you get a game lift server, and your game is 1v1, can you have 4 separate games on that server totaling 8 people?

chrome bay
#

As separate instances yeah

honest scarab
#

So 1 server can hold separate game instances? And not interrupt games that are in progress?

jolly siren
#

1 physical server can hold multiple game servers (instances)

chrome bay
#

Essentially you run the .exe multiple times and give each one a different port

#

It's something you do on the amazon/server side - not in UE4

cosmic badge
#

@meager horizon I'm with you about the dedicated server stuff. yay more steps just to get back to actual development, seems like a terrible idea.

stiff plank
lean flint
#

I've followed the same guide and I cant figure out how to make the server host online. When I have the server running, I check to see if the port is visible online and it says there's no service running on port 7777. What step am I missing to make this run outside of lan?

stiff plank
#

@lean flint have you checked ur firewall settings?

lean flint
#

I have, its forwarded. I tested running a minecraft server on 7777 and its visible with that

stiff plank
#

Hmmm

#

Are you able to join locally?

lean flint
#

Yeah it works perfectly fine locally

#

Is running the server executable automatically supposed to run the service on port 7777?

stiff plank
#

Have you tried separate pcs on the same network?

#

I think so. But not sure.

lean flint
#

I didnt try that yet

stiff plank
#

Try that. And lmk.

#

Its possible that there is something stopping you from joining from a seperate pc.

lean flint
#

Ok I'll do that. It just seems like I'm missing something here. How do I tell the server itself to run locally or through the internet? The guide doesn't show anything like this

stiff plank
#

I dont think there is a difference. But I'm still learning, so not sure.

#

As i understand it, its mostly where you place it and what you leave open to access it.(not that I'm an expert)

lean flint
#

ok, thats what it seems to be

shadow folio
#

You now need to understand how the internet works with port forwarding, services/servers, ports, etc. The game instance is running on a computer listening on a port, ie waiting for a client to connnect and start the handshaking.

#

Are you trying to have the client connect to your machine outside your LAN?

stiff plank
#

@lean flint you cant connect locally from a seperate pc?

#

On the same network?

lean flint
#

im about to see if i can, transferring the client over now

#

and yeah Adam

#

my problem is that no services are visible on port 7777 when i run the server

shadow folio
#

Oh, I see where you did get something running on that port.

lean flint
#

yeah so its forwarded properly

#

@stiff plank i can connect on the same network from other devices

stiff plank
#

Hmmm

shadow folio
#

So knowing that, the game instance is running correctly.

#

I am assuming the client runs and you can play the game.

lean flint
#

yeah i was able to join into the current server game session

grizzled stirrup
#

At a NetUpdateFrequency of 10 is it common for OnRep bools to just never go through? I have an important reset function that has to happen on both server and the client when a character is pooled and reset, should I make that a reliable Client RPC instead of an OnRep bool when reset on the server?

shadow folio
#

@lean flint sorry, I don't have enough networking chops beyond this point to be a help

lean flint
#

np thanks for trying lol

stiff plank
#

@lean flint a weird problem. I am still a newbie as well, but i would try to isolate the problem with testing. Is it a network issue, or some issue with joining. Seems like a firewall problem, like unreal is blocked but minecraft wasnt somehow? Lmk if you find anything.

#

@shadow folio @lean flint when i made a third person project and actually joined as 2 clients on my local machine after running the server, I get some really hard stuttering every 2-3 seconds when just walking around. Have either of you ran into this? it happens when i join from the local machine as a client as well.

lean flint
#

yeea the main issue is the service isnt being put on port 7777, or yeah something else is blocking only UEs service

hoary lark
#

@grizzled stirrup replicated variables can never be relied on to receive all incremental changes during gameplay - they can only be relied on to always contain a "recent" value for a variable. if the important feature of a variable is to be each separate change of its value, the only way to do it would be a reliable RPC

lean flint
#

i havent gotten any stuttering when messing around locally

grizzled stirrup
#

Thanks HoJo, the bool is only set true on spawn and false on death but it seems it does't go through 100% of the time

#

I'll move to an RPC

shadow folio
#

@stiff plank It has been quite a while but I don't remember any problems, but then again at that time I was not trying to accomplish much in the game either.

stiff plank
#

damn, alright. Thanks anyway.

lean flint
#

@stiff plank ur experiencing stuttering using the standard thirdperson project?

stiff plank
#

yep, after i built it as a dedicated server

#

i run it, and when I join, stuttering when i walk

lean flint
#

is it like desync stutter? or fps stutter?

stiff plank
#

seems like desync

#

comp seems to be fine when it happens

lean flint
#

like moving around locally looks fine, but from client to client it seems like the actors are stuttering?

stiff plank
#

how can you tell the difference, turn on fps counter?

lean flint
#

yeah

stiff plank
#

let me double check quick. Can I just turn on my comps fps counter or does it have to be unreal?

lean flint
#

or its desync somehow if the actors arent lining up perfectly

#

i would just use unreals

stiff plank
#

kk give me 1 sec

hoary lark
#

@grizzled stirrup weird, but might be related to net relevancy too? I think reliable RPCs are always sent regardless of dormancy/relevancy too whereas rep'd variables won't be (don't quote me on that)

stiff plank
#

lol, im not running into the problem now. I gotta investigate more. wtf ๐Ÿ˜…

shadow folio
#

heh, why can't problems be consistent? ๐Ÿ˜‰

lean flint
#

this is from the dedicated server guide. what this guy crossed out should be the servers local IP right?

shadow folio
#

I would think so

grizzled stirrup
#

Micro optimization question, I increment a NumPlayers int32 on PostLogin in the GameMode, but after seamless travel, this number would not persist as post login does not get called again past the first time a controller joins the game, correct?

thin stratus
#

The better question is: Why are you counting them yourself?

grizzled stirrup
#

What do you mean?

#

I can iterate over all controllers to get the count, but thought it would be nice to get a count once at the first post login and use that for the rest of the game (including through travels)

#

Oh there's a helper function GetNumPlayers() that does that iteration in a function already, I was just trying to avoid iterating every time I need the value and make a one time cached value at every seamless travel

meager spade
#

PlayerStateArray.Num() ?

#

is also an option.

grizzled stirrup
#

I inherit from AGameModeBase, don't think that array is available there

thin stratus
#

That's a GameState array

meager spade
#

gamemode has gamestate

#

game state has the array

#

^

grizzled stirrup
#

Oh right good point!

#

Thanks

#

Only downside is my AI have playerstates

meager spade
#

then you can't use that ๐Ÿ˜„

grizzled stirrup
#

So unfortunately doesn't help in this scenario if wanting PCs

#

๐Ÿ˜„

thin stratus
#

Filter them by !IsABot

meager spade
#

yeah or just use the loop, controller iterator is quite cheap anyway

thin stratus
#

Yop

#

GetNumPlayers is not expensive.

grizzled stirrup
#

I always hear the scary never use get all actors of class etc. but this iterator does seem cheap since I'll only have max 4 players

#

So will use it for convenience

#

Thanks!

#

I suppose GetAllActorsOfClass etc. are only to be avoided if frequently iterating over large actor sets

thin stratus
#

GetAllActors of class can be okay. It's just not good to use it in case you can't get a ref otherwise

#

I don't like beginners to use it to get refs

grizzled stirrup
#

I usually use it for example on the AI to get a list of players to find the closest one, or a list of spawners to choose the best one etc.

#

I could have the spawners report to the GM

#

And populate the array

#

But I believe if they are only reporting / the GM is only iterating once on begin play, it doesn't really matter

#

As even a slight hitch before the match has started doesn't really make a difference

#

Will try to keep all my heavy iterators on begin play, at least the upfront cost doesn't affect gameplay

meager spade
#

i use TActorRange

grizzled stirrup
#

YEsss

meager spade
#

so i don't have to cast

#

but it still goes through all actors

grizzled stirrup
#

I'm about to convert all my iteraors to that

meager spade
#

so still expensive

#

every tick

grizzled stirrup
#

But not once off

meager spade
#

exactly

grizzled stirrup
#

Or very rarely / event based

meager spade
#

i cache a lot of stuff on begin play

#

like minimap for example

#

grabs all actors using TActorRange

#

then actors are added themselves via the DynamicMinimapComponent

#

its mainly for static actors pre-placed in the world

grizzled stirrup
#

Nice yeah I do the same for enemy spawners / spawning all loot etc.

#

So it can be slow, doesn't matter

#

Once it's done it's done

meager spade
#

yeah profile it

#

you will be suprised, its not that expensive, just gets expensive if you have 50,000 actors and doing it every tick

#

๐Ÿ˜„

grizzled stirrup
#

Right yeah I'm always wary of stuff but in practice these things aren't even denting the FPS count ๐Ÿ˜„

meager spade
#

hitches is where it matters

#

hitches are worse than a constant fps drop

grizzled stirrup
#

Yeah I can definitely notice a hitch if iterating + spawning 100+ actors

#

But luckily that only happens once on begin play

meager spade
#

do you not spawn them deffered

#

ie, spawn them offset

grizzled stirrup
#

No need really

meager spade
#

eek

#

we do, we spawn 100 monsters at start of game pre-placed in the level (random spots)

#

we defer the spawns

grizzled stirrup
#

Server goes from 300 to 60 back to 300 fps while the "MATCH IS STARTING IN 10" message is shown

#

Good idea though it would then mean there's no hitch at all

meager spade
#

spawn them closest to players first, then spawn the ones further away last

grizzled stirrup
#

Do you do a timer so spawn X then in a few frames spawn the next batch?

meager spade
#

i create a timer for each spawn, next spawn does rand float .05 to .1f

#

and repeats till its done

grizzled stirrup
#

Nice yeah I love that kind of stuff

#

Do it for all AI tasks etc.

#

So everything is nicely offset

meager spade
#

same as my wave spawner

grizzled stirrup
#

And also have pooled all my enemies now so the spawn only happens once

#

And pooled pickups / damage numbers

#

No more constant spawning / destroying!

meager spade
#

yeah, we haven't gone fully pooled yet

grizzled stirrup
#

Was a nightmare to find all the bugs though

meager spade
#

that is next on my list

grizzled stirrup
#

Invisible pooled characters being active on the client

meager spade
#

tbh tho

#

we don't get many hitches

#

when spawning, due to the offset

grizzled stirrup
#

Honestly it probably won't make a big difference but I spawn in large groups and did notice if I kill 30 enemies at once and 30 more spawn there is a hitch but with pooling almost nothing

#

Then again

#

Deferred would fix that

meager spade
#

yeah but we have a wave system, spawns the monsters for that wave. We also have constant wave, where after X monsters are killed, X more monsters are spawned

#

but again not all the same frame

grizzled stirrup
#

Yeah I'd be very curious if pooling helps in that situation

#

Let me know if you get any numbers on it

#

Just feels nice though

meager spade
#

but we don't see noticable hitches

grizzled stirrup
#

Especially for other things like the UI damage numbers

#

Just knowing they aren't constantly being spawned / destroyed is nice

meager spade
#

yeah we use external damage number actor

#

not linked to the hit actor

#

handled locally

grizzled stirrup
#

Nice yeah I spawn 10 locally and just rotate them via pooling as needed

#

If there isn't one available due to 10 being used, I don't spawn any

meager spade
#

10 actors?

#

we just have one ๐Ÿ˜„

grizzled stirrup
#

Well if you damage 5 actors at once in my game I want to see 5 damage numbers

meager spade
#

handles upto 100 hit numbers

grizzled stirrup
#

Oh right you mean the actual actor spawnign the widgets

#

I just have 10 widgets

#

And the PC handles them

meager spade
#

oh we have a client only actor in the world

#

that handles it all

grizzled stirrup
#

PC for me handles the client RPC confirming damage

#

So was easist to do it there for me

#

By the way when you say deferred, you are still spawning regularly and not using theBeginDeferredActorSpawnFromClass right?

meager spade
#

yeah but the player controller spawns that actor

#

and holds the pointer to it

#

locally

grizzled stirrup
#

Is that a problem?

#

The PC spawns 10 and pools them

meager spade
#

no, just telling you my design pattern

#

if your one works, it works

grizzled stirrup
#

Ohh you mean your PC gets the local actor right

#

Got you

meager spade
#

it creates the local actor

grizzled stirrup
#

Yeah I just do the same without the local actor step

#

And hold the array of widgets on the PC

meager spade
#

yeah, i hate bloating the PC class

#

its already big as it is

grizzled stirrup
#

2 lines ๐Ÿ˜„

#

But yeah I know what you mean

#

I have a phobia against adding extra actors

#

So I usually bloat if it's reasonable

meager spade
#

i hate monolithic tho

#

a class should just be for what is for

grizzled stirrup
#

My PC is fairly small and reasonable at the moment only 800 lines

meager spade
#

PlayerController in my case != damage handler

#

if ya know what i mean

grizzled stirrup
#

PC in my case relays damage information

#

So I have it talking to the HUD

#

and passing through any info needed when you deal / take damage

meager spade
#

i just have a static function

#

ShowHitDisplayNumber(HitActor, EffectContext, etc)

#

can be called from anywhere

grizzled stirrup
#

On the local actor?

meager spade
#

local only

grizzled stirrup
#

Nice that makes it more flexible

meager spade
#

its a gameplay static

#

UKaosStatics::ShowHitDisplayNumber(HitActor, EffectContext, etc)

#

like that

grizzled stirrup
#

Mm yeah love statics

#

I have my utitily class like that

#

For common stuff

#

Like align to ground normal

meager spade
#

i have FKaosMath lol

grizzled stirrup
#

Thinking of making a debugging one too

meager spade
#

and FKaosUtils

#

which are C++ only statics

grizzled stirrup
#

It's a lot of fun reusing the common logic

#

Feels efficient

#

Btw about this: when you say deferred, you are still spawning regularly via SpawnActorFromClass and not using the BeginDeferredActorSpawnFromClass right?

#

Afaik the deferred one just lets you change some properties but still spawns on the same frame

meager spade
#

i use spawn deffered, but only to adjust stuff before spawning them

#

and that is not true

grizzled stirrup
#

Oh right yeah you can call finish whenever

meager spade
#

you can call FinishSpawning 5mins later

#

only in BP is it same frame

#
{
    FString RetString;
    if (!TestActor)
    {
        return RetString;
    }

    switch (TestActor->GetNetMode())
    {
    case NM_Client:
        RetString = FString::Printf(TEXT("Client:"));
        break;
    case NM_DedicatedServer:
    case NM_ListenServer:
        RetString = FString::Printf(TEXT("Server:"));
        break;
    case NM_Standalone:
        break;
    case NM_MAX:
        break;
    default:
        break;
    }

    return RetString;
}
grizzled stirrup
#

Is there a benefit to setting stuff before it finishes rather than setting that same stuff post spawn?

meager spade
#

this is a handy function

grizzled stirrup
#

That is very useful!

meager spade
#

when im logging

grizzled stirrup
#

YEah for debugging

meager spade
#

i can tell if it was server or client

grizzled stirrup
#

Really nice

plush wave
#

player states don't have references to controllers, right?

winged badger
#

not direct one

#

unless you changed it manually, GetOwner() will return the controller though

plush wave
#

I see

#

Would only work on the server though I assume

winged badger
#

nope, would work on owning client as well

twin juniper
#

Is there any tutorial about multiplayer AI with blueprints? I found one, but even the guy that records the vid doesnt know at all about AI and replication lol

winged badger
#

you do the AI logic as if you were doing single player, for the most part

#

all of it runs on server

twin juniper
#

But when I tell AI to chase the player, it only chases the server's pawn

winged badger
#

never use GetPlayerController/Character[0]

#

on a server

twin juniper
#

Hmm, so player reference should work

#

Thanks

#

Using the getplayercharacter/pawn/controller works without "run on server" replication (tho i dont need to use it just tried) but only chases server, either way i cant make AI follow any pawn without using "get" nodes

winged badger
#

that is terrible

#

client telling AI what to do

#

1 reliable RPC on Tick per player per client

#

point of AI is it being able pickup on whats going on in the environment

#

then "decide" on what to do

twin juniper
#

i know haha, you always hate my "tick" nodes on replication i was just trying if it will work this time

#

tried my luck

winged badger
#

GetGameMode->GetNumPlayers->ForLoop(0, NumPlayers-1)->GetPlayerCharacter[Index] will iterate through all player characters

#

GetGameState->PlayerArray->ForeachLoop->GetPawn as well

#

whats the point

#

every character on every machine runs that code

#

every character on server, every character on every client

#

and there is no guaranteed order for ticking

twin juniper
#

i understood, point was to check if i misunderstood the replication, i am studying it about 2 week or less

winged badger
#

and reliable on Tick is pointless, it just overwhelms the reliable buffer and fucks up even worse when a packet is lost

twin juniper
#

i know, you said that before

winged badger
#

then if it didn't resend it

#

for example

#

GetGameMode->GetNumPlayers->RandomIntegerInRange(0, NumPlayers - 1)->GetPlayerCharacter[RandomInteger]

#

will set Ai chasing after a random character

#

put it in SetTimerByEvent, 10, looping true

#

and it will pick a random character to chase every 10 seconds

twin juniper
#

understood, will do now

#

thanks

plush wave
#

Directly setting a replicated variable as a client only changes it locally, correct?

gleaming vector
#

correct

#

and your value will be overwritten when the server sends new data

plush wave
#

๐Ÿ™‚

gleaming vector
#

which is, often, fine

#

as long as you know

winged badger
#

and if this is blueprint, OnRep will fire when you do that, on that client

gleaming vector
#

correct

winged badger
#

i hate that ๐Ÿ˜ฆ

gleaming vector
#

and in the OnRep, you have a function param that tells you the previous value

vivid seal
#

Only in Cpp I thought?

gleaming vector
#

correct

vivid seal
#

Wish that was in blueprints ๐Ÿ˜ฆ

winged badger
#

i wish it was not making local "replication callbacks" in blueprints

#

just feels completely alien

fleet raven
#

would be nice if someone figured out how to turn it off

flint rose
#

I'm having issues with a RPC from client to server not getting called. The owner is set to the character but does not seem to get called

BaseWeapon.cpp

void ABaseWeapon::Shoot(float Spread)
{
    ReduceAmmo();

    bInstant ? FireInstantBullet(Spread) : FireBullet(Spread);

    UE_LOG(LogTemp, Warning, TEXT("About to call SERVER_SetActualAmmo. My owner is: %s"), *GetNameSafe(GetOwner()));
    SERVER_SetAmmo(Ammo);
}

ABaseCharacter.cpp

bool ABaseCharacter::TryToShoot()
{
    ABaseWeapon* Weapon = Cast<ABaseWeapon>(CurrentItem);
    if (!Weapon) {
        return false;
    }

    bool CanIShoot = Weapon->Ammo > 0 && !bReloading && !bChangingWeapon;

    if (CanIShoot) {
        UAnimMontage* MontageToPlay = bAiming ? IronSightFireMontage : QuickFireMontage;
        MeshFP->GetAnimInstance()->Montage_Play(MontageToPlay);
        float Spread = MovementRecoil(Weapon);
        Weapon->Shoot(Spread);
#

BaseWeapon.h

    UFUNCTION(reliable, Server, BlueprintCallable)
    void SERVER_SetAmmo(int32 ActualAmmo);
rich ridge
#

@chrome bay I m exploring the Network Prediction Plugin, and they do have an example for GAS integrated with Network Prediction Plugin.

gleaming vector
#

that is not GAS

#

it's simply a mock system

#

it's a number that changes

rich ridge
#

My bad I didn't see the Mock Part, I got happy by seeing "Ability"

chrome bay
#

Don't suppose anybody has experience remapping a net GUID for an object on the client do they? E.g, say I want server updates for a particular object to actually map to another object of the same class.

winged badger
#

could try IsNameSupportedForNetworking and Rename, maybe

#

its on the risky side though, one tiny error and clients get booted

chrome bay
#

Hmm yeah, that might work. Yeah it's quite nasty either way

winged badger
#

i'd give it about 20% to work, as i don't think unreal will send a name more then once

#

i'd cache the NetGUID with UObject* into a map somewhere

chrome bay
#

I have pooled projectiles which all works nicely, now looking at predicting the fire client-side. Since server/client could choose a totally different projectile from the pool atm so I'm thinking about swapping the ID on the client

winged badger
#

but can't say i read that part of the code

chrome bay
#

Yeah me neither.. will be an interesting experiment I guess..

winged badger
#

projectile is an Actor?

chrome bay
#

yeah

winged badger
#

you could physically swap the Actors

chrome bay
#

So I did think about that, but my concern is swapping all the state and particles etc.

#

Although hmm, I guess I could just move the particles around too

winged badger
#

it is less risky then swapping NetGUID

chrome bay
#

yeah definitely

weary zephyr
#

Hi all, I'm running into an issue that I sort of expected would have been common, but I can't really find anyone talking about it. Wondering if anyone here would be able to help me understand why its happening and/or provide a fix.

I run a dedicated server, clients join, then one of the clients uncaps his (clientside) framerate limit (t.maxfps 99999), and suddenly, that one specific client starts warping all over the place when they try to move - everyone else is fine (server framerate cap didn't change, nor did any other clients). Surely UE4 must be able to allow clients to run the game at the highest framerate they can pull, while functioning fine in a server with other players? I'll also note that all my custom BP logic works perfectly fine at all client framerates - it appears as though the only issues are with movement, which is using the default UE4 CharacterMovement component. Is the stock CharacterMovement component using tick for some reason? That seems strange if so, but I can't think of any other explanation :\

#

I've also tried using the Smooth Sync marketplace plugin for replicated movement instead of the stock UE4 character "Replicate Movement" setting, and am still having similar issues

limber gyro
#

Whats the macro name for a "run on client" replicated fucntion?

limber gyro
#

im having a bit of an umg multiplayer issue

#

maybe you guys can help

#

im trying to make a kill feed, i have it nailed down because ive done a chat before and its not so diferent, the issue is i have to call a blueprint function from c++ to add info into the killfeed umg, but blueprint implementable events arent compatible with networking

#

what would be the best way to acess the UMG function then?

chrome bay
#

@weary zephyr Most likely you're sending way too many moves to the Server in a short space of time, or if you've modified character movement somehow and it's not been done in a way that works properly with networking (that has to be done in C++ 99% of the time)

#

At extremely high framerates you will also exceed the saved move buffer very quickly.

#

@limber gyro UMG widgets cannot be used over the network or use network events

limber gyro
#

i know

#

im calling what i need in the player controller, and then it just gets the umg and calls the umg function with the parameters fro mthe server

chrome bay
#

You can't get the widget on the server because it doesn't exist

weary zephyr
#

@chrome bay Hm, the client will be sending a move to the server every frame?

#

is there any way to separate that from the framerate?

chrome bay
#

@weary zephyr It tries to combine moves together and throttles the send rate, but yeah ultimately it does that

#

And no there isn't

limber gyro
#

im not gettign the widget on the server im getting in on the local player controller

weary zephyr
#

I haven't modified character movement at all (except implementing a crouch function, but this happens when you're not using crouch)

limber gyro
#

ive already done a chat system i know how the netowrking works, my issue is mixing the blueprintimplementableevents with networking

chrome bay
#

Crouch functionality is built-in so if you're using that you should be fine

weary zephyr
#

I'm a little at a loss at how I'd go about fixing it though - do you have any ideas? Surely UE4 can function properly while allowing clients to run their local game at 1000 FPS for example

chrome bay
#

Not really

#

The client has to save a buffer of moves, one per frame

#

If they're simulating at such a high framerate that they exceed the move buffer before the server acks/corrects a move, then they will be hard-snapped constantly

weary zephyr
#

It starts causing issues when clients go over 144ish FPS (not sure the exact value, but it's around that), would running the server at a higher framerate (or changing update rates somehow?) fix this issue?

limber gyro
#

the question is, why do u need to have such high framerates? is there no way to achieve what you want without that?

weary zephyr
#

Clients generally like to have the highest framerate possible, especially for competitive games

chrome bay
#

They do but you have to set sensible limits

weary zephyr
#

and if the engine can pull 1000 rendering framerate, limiting clients isn't something I want to have to do

chrome bay
#

You can increase the size of the saved move buffer

weary zephyr
#

especially to something as low as 144

chrome bay
#

But 1,000 is never going to work

weary zephyr
#

How would I go about increasing the size of the saved move buffer?

chrome bay
#

If you look at the output log, you should be seeing a lot of messages like this:

#

CreateSavedMove: Hit limit of %d saved moves (timing out or very bad ping?)

limber gyro
#

144 is more than enough, our eyes cant see more than 125 i think

weary zephyr
#

@limber gyro there's a lot of misinformation (and partially correct) information out there claiming what "our eyes can see" ๐Ÿ˜›

limber gyro
#

and most peopel dont even have 144hz monitors to get a benefit form those frame rates

chrome bay
#

You can modify the size in FNetworkPredictionData_Client_Character::MaxSavedMoveCount and MaxFreeMoveCount

#

Ultimately however, it doesn't matter

#

In the real world, clients are never going to be connected to a server where they are reliably getting updates at 144 Hz

#

96 moves should be plenty for 144Hz though

limber gyro
#

im not saying your not right, i just think your gonna have way too much trouble for somethign that isnt even worth it

weary zephyr
#

Talking about competitive games, 144Hz is usually a minimum - people will be playing this game with 240Hz displays, limiting clients to less FPS than their monitor display rate is really, really bad ๐Ÿ˜ฆ

chrome bay
#

Unless moves can't be combined

weary zephyr
#

In the real world, clients are never going to be connected to a server where they are reliably getting updates at 144 Hz 96 moves should be plenty for 144Hz though
I'm not sure if I understand this right

limber gyro
#

network wont allow

#

most servers run at 60hz i think

weary zephyr
#

I'd be entirely fine with clients sending updates to the server (and receiving updates from the server) at 100-144/second, just I want the local game running on the client system to not have an artificially imposed limit

chrome bay
#

You will have to put some limit in place

weary zephyr
#

even 60 would be fine for the network update rate

chrome bay
#

96 moves is already quite high by default

#

Even that should give buffer room

weary zephyr
#

is that configurable in the character BP or will I need to dig into the source?

limber gyro
#

if a player has 9999 frames he cant be sending 9999 packets per second to the server, that alone would probably make a DOS attack lol

chrome bay
#

YOu will need to subclass CharacterMovementComponent and use a modified FNetworkPredictionData_Client_Character

#

As I said the component will not necessarily send a move every frame. It will combine moves into single packets if it can, and send those at a lower rate

limber gyro
#

im not sure how unreal is sending packets to the server but i assume its on a per frame basis

weary zephyr
#

@limber gyro yeah, I'd be fine with sending 60 packets/second to the server, as long as the client was rendering the world at X FPS

limber gyro
#

it has to be capped

weary zephyr
#

thanks for the help @chrome bay I'll give that a try ๐Ÿ™‚

limber gyro
#

for that you would need to have 2 independent clocks

weary zephyr
#

@limber gyro sending updates using framerate seems like a really awful practice

chrome bay
#

You just don't call the RPC every tick

limber gyro
#

im not even sure how u would do that

chrome bay
#

You don't need two clocks

weary zephyr
#

I have tick disabled on my character BP ๐Ÿ˜›

limber gyro
#

but hes using movement component, he has no control on how stuff is sent

chrome bay
#

This is what I'm saying, the movement component will handle it itself

#

Unless you have done something which prevents moves from being combined

weary zephyr
#

I even tried the Smooth Sync marketplace plugin

#

Unless you have done something which prevents moves from being combined
I haven't done anything like that

chrome bay
#

Smooth Sync is fundamentally different to how character movement works

weary zephyr
#

Yeah, thats why I tried it

#

but unfortunately still had framerate issues - on SmoothSync, the character just didn't move on other clients

#

but worked fine locally

#

(as in, I could walk around on my screen, but everyone else would see me standing in the spot I spawned)

chrome bay
#

Even if it did, you wouldn't have any client prediction

#

In a real-world scenario it would have huge input lag

#

That's what Character movement solves

weary zephyr
#

Well with Smooth Sync I was allowing the client to own their own pawn

chrome bay
#

In which case the client has full authority then and can easily cheat

weary zephyr
#

so no input lag, but other players did have a bit of a delay on my pawn's movement

#

yeah, that's fine for this use case

#

actually it's what I wanted - fully client authoritive movement

chrome bay
#

In a competitive high FPS game?

#

If you want that, just disable client corrections in the character movement component

limber gyro
#

thats good to know

#

whats the exact name of the varaibles to set to false?

weary zephyr
chrome bay
#

Bottom one

#

Just means the client will have complete and total control over where the character is

limber gyro
#

oh i thought you had to do somethign else

chrome bay
#

It will still send moves to the Server however

limber gyro
#

i already have messes with those

#

dont u have to set bServerAcceptClientAutoritativePoisiton to true aswell?

weary zephyr
#

I've legitimately been looking for months for a way to do that, apparently I'm just an idiot ๐Ÿ˜›

chrome bay
#

Character Movement is a beast

#

Takes a while to fully wrap your head around it

weary zephyr
#

Man, that's really annoying me now ๐Ÿ˜›

chrome bay
#

I mean it goes without saying though, unless you have good reason to, you shouldn't ever set it to true

weary zephyr
#

I had 2 projects over the past 3 years that I ended up scrapping, and a large part of the reason was due to not being able to figure that out ๐Ÿ˜›

#

It opens a lot of cheating potential and I totally get that

chrome bay
#

Giving clients full authority is basically asking people to cheat

limber gyro
#

ur suposed to set it to true when u need to move very fast for very short periods of time

weary zephyr
#

for some specific use cases, that's not as big of a concern as other issues

chrome bay
#

Well, it's a hack for that really. You can modify it to work with faster speeds

#

Just an easier option

limber gyro
#

ye, for me it works fine, i cant be arsed to mess with custom movements, documentation is outdated and it looks quite messy

weary zephyr
#

compatibility with garbage connections that are dropping packets and have unstable latency, some types of games where cheating isn't a big issue (MP puzzle games or something), games that handle anticheat in another way, etc

chrome bay
#

Yeah but in fairness if it's a competitive game and they have a terrible connection, tough luck for the player

weary zephyr
#

Haha yeah, fair enough, in most cases you're probably right ๐Ÿ˜›

chrome bay
#

Put it this way, we have maybe a few thousand players CCU on our game - and already there are rampant cheat programs and scripts out there for it

weary zephyr
#

going to test how clientside framerate affects stuff now

chrome bay
#

Unreal being open-source makes it even easier for people

weary zephyr
#

Yeah for sure

limber gyro
#

well now a days you dont make games taking into consideration bad conection, its not 1990 anymore lol

weary zephyr
#

I remember with Cube 2 and Tesseract, cheating was a HUGE issue there because 1. they're open source, AND 2. clients have full authority of not only their own movement, but over whether or not they hit opponents when they shoot

chrome bay
#

Yeah.. they asked for it then ๐Ÿ˜„

#

Division 2 was another example also IIRC, more higher profile one

limber gyro
#

favor the shooter is common in fps's

chrome bay
#

Favour the shooter can be done without giving them authority over the hit

weary zephyr
#

Hm :\

#

with that option ticket on, it seems a lot better, but still not right

limber gyro
#

thats a bit over my head tbh

weary zephyr
#

the client is still being warped around when they stop moving

chrome bay
#

What does the log say?

#

Spamming anything?

weary zephyr
#

the server log?

chrome bay
#

client

limber gyro
#

try setting bServerAcceptClientAutoritativePoisiton to true aswell

weary zephyr
#

is there a cvar for verbose logging somewhere? I'm not seeing anything related in the console

chrome bay
#

That one I mentioned is a warning so it should come up regardless

#

The pawn is properly possessed by the client too right?

#

And input is being added via AddMovementInput?

weary zephyr
#

movement

chrome bay
#

yeah that's fine then

grizzled stirrup
#

Does event begin play not get called on PlayerControllers after seamless traveling?

weary zephyr
#

possess should be done properly? I'm using a marketplace kit, but I'm looking at the BP now and it seems to be configured properly

chrome bay
#

@grizzled stirrup Possibly not, the controllers are kept

weary zephyr
#

bServerAcceptClientAutoritativePoisiton where is this?

chrome bay
#

Oh if it's marketplace... good luck

grizzled stirrup
#

Thanks just going through the GM code now, I think it may miss the begin play call post travel

weary zephyr
#

well it's a marketplace framework for the gamemode, not much else

limber gyro
#

i set it in code, but u should be able to set it in the constroctor or begin play

weary zephyr
#

but the possess node is being used when the pawn is spawned

#

targeting the player's controller

limber gyro
#

drag ur character movement and search for that vriable

weary zephyr
#

bServerAcceptClientAutoritativePoisiton on character movement?

limber gyro
#

ye

weary zephyr
#

nothing ๐Ÿ˜ฆ

limber gyro
#

must not be exposed to BP's then

#

try removing context sensitive

weary zephyr
#

yeah I did, still nothing ๐Ÿ˜ฆ

limber gyro
#

well, do it in c++

#

๐Ÿ˜†

weary zephyr
#

Yeah, I will, was hoping to avoid that ๐Ÿ˜›

#

I have the source generated for my project already, so I should just be able to do the edits in visual studio, save, and compile/build from the editor, right? Sorry, I'm not familiar with the C++ UE4 workflow much

limber gyro
#

you should

#

depends

#

if you change stuff in the .h ur gonna need to rebuild

#

not sure if u need to rebuild too if you change the constructor

#

but if you change it in the begin play you can just build from the editor

grizzled stirrup
#

If anyone is searching in the future, begin play does not get called on the PC when seamless traveling, only the very first time it is loaded in the map

weary zephyr
#

@limber gyro going to ask a dumb question because I've done barely any UE4 C++ ๐Ÿ˜› I made a new C++ class to extend CharacterMovement, how am I supposed to go about setting that var in BeginPlay in C++? ๐Ÿ˜›

limber gyro
#

you dont need to extend

#

go to your character class that comes by default

#

and it should have a tick there

#

since its only for testing it will do

weary zephyr
#

oh, that?

limber gyro
#

GetMovementComponent()

#

no

#

on ur cahracter class

chrome bay
#

GameNetworkManager->ClientAuthorativePosition

#

bServerAcceptClientAuthoritativePosition is transient anyway

#

You can set it in the games DefaultGame.ini

weary zephyr
#

virtual UPawnMovementComponent* GetMovementComponent() const override; in Character.h?

#

Oh

limber gyro
#

do u not have a class clled "urprojectCharacter."

weary zephyr
#

Oh yeah, I do

limber gyro
#

thats the one

#

thats the equivalent of your blueprint

chrome bay
#
ClientAuthorativePosition=true```
#

No need to mess around in code

#

There are a lot of other settings in that class too

#

related to throttling etc.

weary zephyr
#

Man, I've been using UE4 for a few years now so I'm pretty experienced with it, but still, every time I try to deal with replication/multiplayer, I feel like I'm back to knowing nothing about it ๐Ÿ˜›

#

Thanks to both of you, I'll test that now ๐Ÿ™‚

#

Ok so it's miles better now, but it still seems like there's some correction going on

#

and I'm not sure why - with those 2 options, shouldn't the server never be updating my local client on my position?

limber gyro
#

i belive so, but there might be some other stuff that u need to set

#

unreal is simply too big

weary zephyr
#

Yeah, it's huge ๐Ÿ˜›

#

Hm, this is very weird

#

I thought Smooth Sync overwrote most (if not all) of the network related settings in CharacterMovement, but with the 2 options you guys said, plus SmoothSync, it's almost working flawlessly

#

It seems like Smooth Sync isn't replicating control rotation properly like the stock component does, so I need to handle replicating the player's third person pitch separately, and some animations are a little buggy, but clients aren't warping around on any framerate

flint rose
#

When setting the owner of an object such as a weapon, should I set the owner as my character or the playercontroller?

fervent yacht
#

Multi feels like quantum states a lot XD.

cosmic badge
#

anyone know why I'm getting crashes with dedicated servers on Unable to load package (A:/Epic/UnrealEngine_4_24/Engine/Content/Animation/DefaultAnimCurveCompressionSettings.uasset). Package contains EditorOnly data which is not supported by the current build.

#

from what I understand its saying that things were packaged editoronly, but why is the server trying to use this?

cosmic badge
#

I figured it out, was in the wrong folder, derp

gentle lion
#

Hey guys do you know any good cheap relational database services? I'm trying to choose one for my games. What do you guys use and how is it?

gleaming vector
#

@chrome bay i looked into GUID remapping

#

it was bad