#multiplayer

1 messages ยท Page 569 of 1

chrome bay
#

due to the physics integration

waxen socket
#

No way...

chrome bay
#

(hopefully not)

waxen socket
#

So it is.

#

Their Trello board has some exciting hints on it for 4.26.

analog rover
#

Which version were you testing from @chrome bay ?

chrome bay
#

I think I downloaded the 4.25 plugin but was using 4.24 at the time. Had to make some small tweaks to get it to compile there

#

Demo project does work though, I don't think there's any interop with GAS yet though

#

Mostly just movement-orientated atm

analog rover
#

I was more looking to just do generic interaction systems without having to route everything through gameplay abilities

#

Might be overkill in that case ๐Ÿค”

north kettle
#

not entirely mutliplayer related: can you get navmesh path info without using the CMC?

chrome bay
#

yeah, can get a navpath from anywhere

#

PathFollowingComponent interops with UNavMovementComponent

north kettle
#

yeah i'm currently trying to follow the code. i want to implement my own method on how to traverse the given path, but i dont even get any path result from FindPathtoLocationSynchronoously

#

and that would be pretty much all i need

wanton tulip
#

@limber gyro All working now fine and new Project, when I'm using my IP instead of 127.0.0.1. Thanks for your help man C: (NULL Subsystem, Steam i have to test)

limber gyro
#

@wanton tulip i dont think i did much but you are welcome hahaha

twin juniper
#

Hey what does steam means

wanton tulip
#

Steam Online Subsystem

brazen totem
#

Is there a trick to get steam to work from the editor (play standalone)? It works if I launch the game by right clicking the uproject file but not from editor

twin juniper
#

so is there a downside to doing this:

.h
UFUNCTION(Server, Reliable)
void ServerMyFunction();

.cpp
...
{ // if(something)
    ServerMyFunction();
}

void Class::ServerMyFunction_Implementation()
{
   // stuff here
}

vs

.h
void MyFunction();
UFUNCTION(Server, Reliable)
void ServerMyFunction();

.cpp
...
{ // if(something)
  MyFunction();
}

void Class::MyFunction()
{
  if(!HasAuthority())
  {
    ServerMyFunction();
  }
  else
  {
    // ... stuff here
  }
}

void Class::ServerMyFunction_Implementation()
{
  MyFunction();
}

Seems like it's redundant to do the 2nd one, no?

steel vault
#

Actually wait, yes that is redundant

twin juniper
#

I just see the second method used in everything, so just curious why do all that extra work and functions instead of just directly calling the server function

north kettle
#

i think that depends on dedicated vs listen server

steel vault
#

I guess technically it's not though because when you call into the function and you are the server it doesn't call itself again

twin juniper
#

So the first one can used if you are a dedicated server, but the second one if you are peer to peer?

steel vault
#

What I normally do is check if I have authority, if I do, I call the normal local function. If I do not, I call the server function which then calls the normal local function

twin juniper
#

Yeah, I'm just curious why go through all that loop around lol

#

Is calling the Server function if you are already authority (the server) not good?

steel vault
#

If you are doing client actions, the server needs to know about them so it can do the same thing and basically synchronize your client with it

#

Yea it's a waste of a call

#

You don't need to RPC if you are already on the server

#

Unless you are trying to tell the client to do something from the server

north kettle
#

i guess that pattern is there so even if a client were to call Myfunction, you'd be sure that it is actually executed through the authority

twin juniper
#

but if I was a client, and called ServerMyFunction(), wont that just go through the server anyway?

north kettle
#

yes, ifyou were to call the server function

steel vault
#

Yes. You are calling to the server to tell it what to do

#

The server knows nothing about a client action unless you tell it

north kettle
#

this would be when you wanna make sure that this function never executes on a client to begin with

steel vault
#

The server is your source of truth. If you fire a gun on a client you better tell the server to do the same or else no one else will know you fired your weapon besides you

#

Which means you basically never fired it at all

#

If you want to synchronize things properly, you would tell the server to fire it, and then communicate that same action back to the client OR just call the same function before calling the server one

twin juniper
#

but why do:

Fire() which checks authority, calls serverfire, then goes back to Fire to do the shoot

than just

ServerFire() directly tell the server to shoot

north kettle
#

it also means you can make MyFunction blueprintcallable, and not clutter the node api with Server_ functions

steel vault
#

By calling Fire() inside a server function you are telling the server WHAT to do

north kettle
#

its a design pattern to make sure you're executing function where they're supposed to run.

steel vault
#

Fire is an already made function that you just want to get called on the server, so you must tell the server to do it by calling an RPC aka a server function

#

And the server function mimics the same behavior by simply calling Fire()

#

It's just the way RPCs work

#

If you did not call fire on the client and only on the server, however, the server will see it happen and your client will not

twin juniper
#

but I just don't get why I can't just say hey ServerFire() which is a server RPC, than doing Fire(), which calls the server rpc and goes back to Fire(). Can't I just put all the Fire() logic inside ServerFire(), call ServerFire() directly, and it do the same thing

steel vault
#

But what happens when you don't want it to fire on the server?

#

You're splitting out logic so that you can use it for non server implementations if necessary

twin juniper
#

then I don't call ServerFire?

#

i would only call Fire() if I wanted to fire on the server to begin with, no?

#

because it will go through and call the server rpc

steel vault
#

What you posted before with MyFunction() basically tells you to call the server no matter what if you are the client, and only call the local implementation if you are not

#

If you have a Fire() function that is just a regular function with logic, then you make a Server_Fire() function that is UFUNCTION(Server) and only call it when you need to call the server then that is fine

twin juniper
#
 if(!HasAuthority())
  {
    ServerMyFunction();
  }
  else
  {
    // ... stuff here
  }

But I am saying if I am not the server, call my server, which then calls this function again, and it will then go down my else branch.

My question is, why can't I just put that else branch inside ServerMyFunction() and just call ServerMyFunction() directly, instead of it going through basically a loop with Fire();

steel vault
#

You can

#

You don't have to redundantly call inside of the server function

twin juniper
#

But I just don't understand why most do that redundant call if it's redundant lol

#

I didn't know if there was a point to that

#

or just choice

steel vault
#

You're trying to keep logic in as few places as possible. I don't do it the way you have posted. I make a function called Replicated_Fire() which says am I authority? If so call Fire(), if not call Server_Fire() and Server_Fire() simply calls Fire(). There is no redundancy there

#

Then I just call Replicated_Fire() if I want it to be replicated to the server

#

Or Fire() if not

twin juniper
#

but isn't that putting stuff in more places than just calling ServerFire() directly?

steel vault
#

Calling Server_Fire() is calling an RPC. You don't want to call an RPC unless you need to

#

Server_Fire() would be marked UFUNCTION(Server)

twin juniper
#

yes

#

ah wait

#

I think I get it now

steel vault
#

You want to keep your RPC deciding logic on the client

#

So you don't have to call into a server RPC to figure it out

twin juniper
#

so if I am already the server, such as a listen server, I don't want to call the RPC on myself, just call the function

steel vault
#

Correct

twin juniper
#

but if I do call the RPC on myself, is there any implications to that, or just an unnecessary RPC call basically

steel vault
#

Unnecessary RPC call

#

I'm 90% sure it will still work

twin juniper
#

i see

#

but it should still function as normal

steel vault
#

Should yes. But I wouldn't recommend it

twin juniper
#

Haha, alright. Thanks man. Sorry for the confusion

steel vault
#

Np!

north kettle
#

ugh. i just realized that my packaged game, when not focused, running at ~5fps, and i'm assuming that this might be where all my replication issues stem from. its the first time i see that happening in packaged versions though. does anyone happen to know the flag to disable that?

steel vault
#

Anyone here know a best practice for telling clients about damage taken or do you just multicast the event from the server? I assume everyone lets the server decide when damage happens and replicates it to clients.

#

I was considering just adding a replicated property for last damage taken and saying OnRep and then react to it client side.

north kettle
#

it depends on usecase, generally i'd just replicate the health variable

steel vault
#

Well my health variable is replicated, but for me if I want to decide more things to happen based on the damage type or hit location etc, I would need the same amount of information that take damage has passed in

north kettle
#

then i reckon an unreliable multicast is your way to go

lucid socket
#

Hey guys,

I've been having an issue with changing a projectiles initial speed value for a long time. Every different way I've tried has either not worked or produced laggy results for clients. Could anyone help guide me in the correct way to change the initial speed of a projectile?

Is initial speed the right way to go, or should the projectile movements velocity be changed instead? If so, should this be on a rep notify?

Context, I'm spawning an arrow that has it's initial speed changed depending on how long the player has held down the fire button

winged badger
#

you're not changing it in flight

#

if your arrow is replicated, then just having a replicated FVector InitialVelocity there would make sure that InitialVelocity is good on clients before they call BeginPlay

#

in which case they just need to set velocity on ProjectileMovement to INitialVelocity and they are good

#

no additional replication required @lucid socket

meager spade
#

deferred spawn is your friend

winged badger
#

because then you can use same BeginPlay logic on server + clients

lucid socket
#

thanks for the reply, I'm just trying to visualize it, sorry one sec

winged badger
#

you also want client authority for determining the initial velocity and then RPCing that to server

#

otherwise it will feel clunky and non-responsive

lucid socket
#

ok so, am I correct in saying there is a variable I set called Initial Velocity (FVector) in the projectile in the construction script, the value sets the projectile movements Velocity?

winged badger
#

BeginPlay

#

construction script won't do

lucid socket
#

ah

winged badger
#

not when its replicated to clients

#

as construction script then runs before replication

#

BeginPlay ruins after

lucid socket
#

thanks for clarifying, i've been misinformed for a long time about the construction script

winged badger
#

it doesn't run in exact same order on server and clients

#

so thats fun

lucid socket
#

๐Ÿ˜…

#

this seems to work smoothly now, just the spawn rotation to fix when spawning now, appreciate the help!

floral crow
#

Is there any way I can make use of ReplicationCondition "Custom" from Blueprints? I've found no BP counterpart to SetCustomIsActiveOverride

#

I'm confused by the fact that it is available there but I can't seem to find any way to operate with it

meager spade
#

not that im aware of

#

custom requires some c++ work

lucid vault
#

What is the optimal way for HUDs and players to communicate in a multiplayer game? Currently, I use dispatchers from my player state that get received in my HUD class. Does it make sense to do this as opposed to having the player controller send information? I figured that if the player controller was the one setting data, I would need a new player controller for every game mode that has a different HUD with different requirements

gleaming niche
#

i do both, depending on the type of information.

#

even gamestate for some stuff that doesn't matter if it lags behind.

#

if it's something that should be reliable, like it must be received, and it only needs to be sent once, then with an rpc

winged badger
#

i often call into the HUD directly, as the delegate setup is far more verbose and HUD is large as is

#

i never call into widgets directly though

lucid vault
#

If the player controller calls into the HUD directly, does that mean you have a different player controller for every game mode?

#

Also, when you say that you do not call into widget directly, I'm assuming that means you use the HUD as a mediary?

winged badger
#

i have two PCs but they all both have their own HUDs

#

no, widgets have a context

#

and use event based approach with what they are supposed to display

#

HUD just manages which widget is shown when and where

#

So i'll have something like HUD->ShowMissionObjectives();

#

i do have almost 300 differnt widgets in the prject

#

so while HUD doesn't manage all of them directly

#

its still way too verbose for HUD to just respond to event dispatchers for show/hide

lucid vault
#

That makes sense. So you don't create HUDs based upon gamemodes, but rather player controllers

#

If your widget requires a variable from the player state, do you pass that variable from your controller to the HUD?

winged badger
#

i pass it a reference to the playerstate

#

well, not really, as it can find the PS on its own

#

but if its context was something thats not as easy to find as PlayerState

#

i'd pass it a reference to that object when the widget was instantiated

uneven cliff
#

From what I understand, it's better to design your game from the ground with multiplayer in mind. That being said, if you've already got a full game, since UE4 has a lot of built in MP support, how difficult would it be to make that game multiplayer?

tall raft
#

You need to change every BP which should be replicated, which means any change to that should be visible to other players.

#

Also, some of functionalities depends on user being server, so in multiplayer none or just 1 player (listen server) is a server, so you need to remake that in mind.

#

Every statistics/health counters etc needs to be rebuild too.

#

There are a lot of caveats about that and you need to rethink most of things you did. And test if everything works fine.

uneven cliff
#

Alright, thanks. I have a good idea of what would need to be rebuilt, but tbh I have next to no experience with networking. I know it'd be a massive undertaking.

tall raft
#

Multiplayer is complicated and not trivial at the beggining.

#

It's not that hard when you get your mind around it, but needs some effort. And a lot of headbanging when something is not working.

uneven cliff
#

Yeah, I was working on a very small MP thing and it took me about an hour to realize UMG events needed to be marked as reliable

tall raft
#

widgets are not replicated in the same fashion as actors, thats one of caveats ๐Ÿ˜‰

uneven cliff
#

Yeah... the tutorials I've seen are lacking. It's like "let's spend 6 hours doing UMG, skip a video, and it's working"

tall raft
#

Or, on the other hand, some tutorial guys are going in opposite direction too much - they explain every basic thing too much :P. Fastforwarding them and looking for that 1 click that does all job is sometimes time-consuming.

winged badger
#

i have yet hear about a good MP tutorial video

tall raft
#

There is one, full written documentation-tutorial about this topic.

#

It's a great one, i have parts of it printed in front of me when i'm working on multiplayer. It's from 2017 but fair enough. It's even pinned to this channel.

ripe ferry
#

Hey everyone! I am pretty new to creating multiplayer games and wanted to know if its worth it to use GameLift/Playfab for my multiplayer backend. I am fairly comfortable in native AWS, but wanted to know if those these services provided features yall thought were super useful/time efficent or if they were worth the price point.

fossil spoke
#

GameLift is expensive.

#

Not sure about Playfab.

#

Though either solution is better than rolling your own.

#

We use GameLift.

#

Functionally its great.

sacred ridge
#

trying to replicate character movement, getting client stutter and cant seem to figure out how the hell to fix it lol

#

nvm figured it out. ima dingus

fossil spoke
#

Happens to the best of us.

lost inlet
#

i'm not sure if PaaS is always better than rolling your own

#

it depends on what your needs are

#

and at least if it's custom, it's yours and you can do whatever you want with it and you don't have to worry about API deprecations or the service just disappearing one day

#

gamelift seems terrible though, i've heard so many horror stories about it and that amazon's own game teams don't want to touch it with a 10ft barge pole

fossil spoke
#

Ive had problems with documentation and a few bugs here and there that we discovered.

#

But its usable for our purposes and given that i dont have anything to compare it to i guess im biased.

lost inlet
#

though the latter is worrying, being at the mercy of... amazon

fossil spoke
#

Its worked out reasonably well for us so far. Their support team has been quite helpful.

#

Although, we wont be using it for our next project lol

lost inlet
#

i preferred the look of playfab even though our current backend is on AWS

peak sentinel
rich ridge
#

AWS is best if you have sufficient budget.

#

Microsoft customer service is pathetic

peak sentinel
#

GetCharacter() is controller 0 only?

rich ridge
#

Yes

#

But it has different effect on server

peak sentinel
#

Instead GetCharacter() and GetControlledPawn() how can I access my pawns CharacterMovement?

drowsy belfry
#

Hello, I have a question about networked projectiles and attachment/detachment. I'm making a game on which the character has a weapon attached to his hand and what I want to make is an ability on which the character throws that weapon towards the enemy.

For this, the weapon replicates (and replicates movement) and has a projectile and a rotating movement component and what I do right now is calling a "Throw" function on the weapon. This function if the caller has authority detaches the weapon and activates the rotating and projectile movement components (which are deactivated while the player has the weapon on its hands).

    if (HasAuthority())
    {
        DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);
        SetActorRotation(Direction.ToOrientationQuat());

        FVector Velocity = FVector::ForwardVector * Force;

        ProjectileMovementComponent->SetUpdatedComponent(GetRootComponent());
        ProjectileMovementComponent->SetVelocityInLocalSpace(Velocity);
        ProjectileMovementComponent->Activate(true);

        RotationMovementComponent->Activate(true);
    }

The problem with this is that even if in single player everything looks perfectly fine and the throw has a nice trajectory and spinning effect, when in dedicated server and with "average" lag simulation option the throw animation is done on the character and the bat does some strange teleports and ends where it would have landed and the trajectory or spin can't be seen at all.

If someone can tell how to make weapon/projectile throwing look fine even with lag let me know. I guess im missing something but I dont know what.

rich ridge
#

@drowsy belfry why don't you make your server only to teleport and let your clients handle animation or rotation stuff.

#

Your player character does know that enemy is throwing his weapon, so animate that weapon coming towards you, and server is doing translation update.

drowsy belfry
#

That might be an optimization (using projectile movement on server and rotation movement on clients only) but it's not what I'm asking, the teleport would still happen if the server is the one handling the projectile movement

random nymph
#

Is it possible to make replicated variable in base class, but only replicate that value on selected inherited classes?

#

Or does it take bandwith to have replicated values that never change?

worthy knot
#

this is my test machine ^

#

So i upload my packaged game with the dedicated server here and launch it ^ ?

#

Need some huge tips on this

chrome bay
#

@random nymph you can do stuff like this:

    if (OverheatConfig.bSupportsOverheating == false)
    {
        DisableReplicatedLifetimeProperty(AShooterWeapon::GetClass(), AShooterWeapon::GetClass(), "PackedOverheatData", OutLifetimeProps);
    }```
#

But that only works for flags that you set on the class itself.

random nymph
#

Oh, cool

chrome bay
#

So if you had an actor component that had a flag, you'd have to subclass the component, then add it to an actor

#

I added a UPROPERTY meta tag "EditSubclassOnly" to avoid changing it accidentally

#

If you want to do dynamic switching on/off of properties though, you can override PreReplication()

random nymph
#

Okay. What about the overhead of replicated property if it never changes? When replicated actor is spawned on the client are the replicated values initialized to default value without any additional data sent over the network if the server has never changed the value?

chrome bay
#

If it never changes it's never sent

random nymph
#

Okay that's nice

chrome bay
#

But it will still be in the changelist manager and compared

#

If the value is different from the serialized value, then the server will send the property

#

So if you change it in begin play or post init comps or something, it will be sent

random nymph
#

Okay makes sense. Thanks

chrome bay
#

ACharacter has an implementation for PreReplication btw

#

Which enables/disables the root motion replication stuff

#

I'm pretty sure disabling it there removes it from the changelist manager / skips comparisons too

meager spade
#

i disable replication in PreReplication

#

on my weapon

#
{
    Super::PreReplication(ChangedPropertyTracker);

    bool bCanReplicateAmmo = false;
    if (UKaosAbilitySystemComponent* ASC = GetPawnASC())
    {
        bCanReplicateAmmo = !ASC->IsAbilityActive(PrimaryAbilitySpecHandle) && !ASC->IsAbilityActive(SecondaryAbilitySpecHandle);
    }
    
    DOREPLIFETIME_ACTIVE_OVERRIDE(AKaosWeapon, AmmoCount, bCanReplicateAmmo || bUpdateLocalAmmoCount);

    if (bUpdateLocalAmmoCount)
    {
        bUpdateLocalAmmoCount = false;
    }
}```
vagrant grail
#

I still need help with nerworking pleaaaaase ,anyone good at it please tag me

winged badger
#

@vagrant grail if you have a question ask it, without doing it in multiple channels

vagrant grail
#

@winged badger It's the same as yesterday, I can't printstring the num of players to all clients

worthy knot
#

Is this what dedicated server machines look like?
@worthy knot Does anyone know about this?

bitter oriole
#

Dedicated server machines look like what you use for your dedicated server

#

Usually a random Linux VPS with a bit of CPU

twin juniper
#

I have a widget component whose visibility is changed to true when a player walks close enough. The problem is that the visibility is set on all players. Is there a way for me to only change the visibility for the player that is close enough?

worthy knot
#

@bitter oriole The machine i am using is a total windows server and doesnt use a graphics card

#

or audio

winged badger
#

@twin juniper handle visibility locally, no network involved

worthy knot
#

So i deploy my packaged game folder with the server .exe and launch it from there for testing right? @bitter oriole

bitter oriole
#

@worthy knot Most people just rent a VPS since it's much cheaper, easier, safer and provides more performance than hosting your own machines.

#

For testing you can run your dedicated server from your development computer

worthy knot
#

I have tested from my own pc, but i need to test from an actual server machine that will be on 24/7

#

with a better CPU and ram

#

so tell me im not doing anything wrong here

bitter oriole
#

Well, does the actual server machine has access to uninterrupted redundant power and 100MB uplink ?

#

Because that's a lot more important than RAM

worthy knot
#

power as in electricity power?

#

no power outtage?

#

and whats an uplink?

bitter oriole
#

Basically if your server hardware is not in a data center you are doing it wrong

#

Other than testing - testing you can do on your own development computer

worthy knot
#

im using an IBM's server

#

and its customizable, right now i have only taken a test machine

bitter oriole
#

Okay but the important part is not what is it but where is it

worthy knot
#

its in India

bitter oriole
#

Sigh

#

What I'm asking you is is this machine in a data center

#

yes/no

#

If it is, then you're good

#

if it's not, then you're not

worthy knot
#

Okay so thats how it is, ill ask the staff if it is or not

#

@bitter oriole it is a VPS machine of HP hosted through ESXi

#

im sure its in a data center

bitter oriole
#

So it's fine

#

Get a Linux machine when you want to pay 10x less

worthy knot
#

ooh aight

#

so about testing on the server machine , i just have to launch the server exe of my game, then make my pc join it via public IP right?

bitter oriole
#

Yes

worthy knot
#

Ok and do you know anything about joining the server via steam?

bitter oriole
#

Yes, use sessions instead

#

Lookup advanced sessions for quick support

worthy knot
#

thanks

fossil zinc
#

I think there something I don't quite understand yet about RPC's. I have a combat game that clients can hit AI enemies. When an attack starts it will call a function in the enemy that tells him to react to that attack (They use this by starting an ability from the ability system) and play an anim montage. We start this ability by doing an RPC call to the server, since I supose there is where the ability should start. However, something weird is happening, since 9 out of 10 times this system will work nice, but every once in a while the attack will start and the hit reaction wont start. The RPC is reliable since Its a core gameplay feature. Is anything I'm missing?

#

In each attack I have a reference to my target, so when is time to start the Reaction I tell him to call the function.

zinc garden
#

If you inflate the ping a lot, does it fail consistently then?

#

If not, it might not be a network issue

#

If it does, then maybe something to do with timing? Some event/function being fired off in the wrong sequence

fossil zinc
#

If I play locally always works.

#

Maybe is something about syncronization. I'll give it a look. From your perspective the RPC is fine, right? This should be made on the server?

near bison
#

How does reliable vs unreliable for RPCs work?
Does unreliable mean it's actually sent over UDP, and reliable over TCP?
Or are both sent over UDP and then taken care of accordingly by the engine?

zinc garden
#

I'm not an expert on multiplayer ๐Ÿ˜› But looks fine

fossil zinc
#

As far as I know, reliable means that the game will make sure that the packages are being recieve over the network. Unreliable means that they may or may not arrive to the destination. Usually used for visual effects.

zinc garden
#

UE4 uses UDP. Reliable just means that it will queue it up and then fire it at some point

fossil zinc
#

Or something like that

zinc garden
#

And yeah, unreliable ones can be dropped if the queue is too long

near bison
#

Okay. It's actually a question more pertaining to how UE4 is utilizing the transport layer. Was wondering if UE4's networking implementation was some sort of UDP + TCP hybrid like modern VoIP

meager spade
#

someone asked that yesterday

#

i swear i answered it..

near bison
#

Really? I don't browse this place often ๐Ÿ˜›

meager spade
#

lol

near bison
#

But what is your answer, in 1 line?

#

I can't find your answer above

meager spade
#

may7be 2 days ago

#

lol

near bison
#

thank you! ๐Ÿ™‚

meager spade
#

get lost with time lol

near bison
#

That's the one thing I don't like about discord. information is ephemeral and not search indexable

meager spade
#

yeah there is a search above tho

#

but yeah i understand what you mean

#

its not easy to find previous stuff

near bison
#

Yeah. Maybe discord will introduce a message history cap like Slack.

#

10k messages and you have to pay or something

fossil zinc
#

Just realized that the problem may be in the animation. I have anim notifies that use the Send Event to Actor, but only some times this event won't arrive. Is something I need to do or this method is not good for networking?

meager spade
#

make the notify Branching point

#

if its from a montage

#

ensure it happens before blends

#

(montages default to a .25 blend)

#

this can cause notifies to not fire.

wanton tulip
#

@limber gyro Today I just change the Online Subsystem from NULL to Steam ~ Not working ๐Ÿ˜ฃ. The Client outdates even if I try to connect to my IP instead of 127.0.0.1. I tried it with Steam on and off, but nothing helps. Do you know what I have to change when I would like to use Steam for Dedicated Server?

brazen totem
#

is the steam subsystem still supposed to work when you run standalone from the editor?

limber gyro
#

@wanton tulip what is the error in the log?

#

@brazen totem yes

brazen totem
#

hmmmm. doesnt work for me, but it does if I launch the game by right clicking the uproject file

limber gyro
#

that is strange indeed, works fine in .24

#

@wanton tulip if it complains about id's then you gotta override login and prelogin

wanton tulip
#

@wanton tulip what is the error in the log?
@limber gyro There aren't any Error in the Server. Nothing Red, but I can send you Client and Server Log if you want.

limber gyro
#

what does it do?

wanton tulip
#

Who, Server or Client?

limber gyro
#

client

#

does it show the map and then goes instantly back to the previous one?

#

like it tried to connect but got rejected

wanton tulip
#

No nothing

limber gyro
#

well there must be a something in the logs to tell you what is going on

#

if you are attempting to connect something must be going on

wanton tulip
#

Oh, here an error on the Client:
[2020.09.16-13.58.09:257][775]LogWorld: Warning: SetActiveLevelCollection attempted to use an out of date NetDriver: GameNetDriver

wanton tulip
#

No, that isn't the problem. I already read this. I turned on everywhere seamless ServerTravel

#

Maybe because in the beginning is standing:

[2020.09.16-13.58.08:855][725]LogNet: DestroyNamedNetDriver IpNetDriver_2147482045 [GameNetDriver]
[2020.09.16-13.58.08:855][725]LogExit: GameNetDriver IpNetDriver_2147482045 shut down
[2020.09.16-13.58.08:855][725]LogOnline: OSS: Creating online subsystem instance for: Steam
[2020.09.16-13.58.08:871][725]LogSteamShared: Warning: SteamAPI failed to initialize, conditions not met.
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamUtils() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamUser() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamFriends() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamRemoteStorage() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamUserStats() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamMatchmakingServers() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamApps() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamNetworking() failed!
[2020.09.16-13.58.08:871][725]LogOnline: Warning: STEAM: Steamworks: SteamMatchmaking() failed!
[2020.09.16-13.58.08:871][725]LogOnline: STEAM: [AppId: 0] Client API initialized 0
[2020.09.16-13.58.08:871][725]LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
[2020.09.16-13.58.08:872][725]LogOnline: Warning: STEAM: Steam API failed to initialize!
[2020.09.16-13.58.08:872][725]LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()```
winged badger
#

that in PIE?

wanton tulip
#

No Packaged Game

winged badger
#

is your steam client running? ๐Ÿ˜„

wanton tulip
#

I tested both. But maybe when it is on, my Server use it so my Client cannot use it

winged badger
#

dedicated servers don't need a steam client running alongside

#

clients do

wanton tulip
#

ok, so what the problem could be?

winged badger
#

well, this looks like that whatever machine ran that code couldn't find a steam client running on it

wanton tulip
#

But when I shut down the Server and start the Client this errors don't appear in the log?!

winged badger
#

usually dewdicated servers don't run on same machine as client

#

but i haven't worked with them much, so i wouldn't know

wanton tulip
#

Ok, I now started my Game first and then my Dedicated Server and then happends what sonicphi discribes, the client joins and get instantly kicked, because the UID not matching, because Client uses Steam and Server NULL. So I try to run my Dedicated Server on my laptop with another account.

low helm
#

Still having this eerie problem in multiplayer setup -

An AIController is controlling a pawn on the server which the client is never supposed to see. The pawn is not replicated.

Insanely, the unit shows up on the client anyway, but does not even run Beginplay logic, it's like a ghost. TearOff works, but only for currently connected clients. Clients who log in later will see all the ghosts of the controllers.

winged badger
#

how's it spawned?

low helm
#

The server runs a non-replicated spawnactorfromclass node, then that pawn runs SpawnDefaultController on server only branch, this replicates the pawn to the client

#

someone at Epic is on drugs or something

winged badger
#

how much c++ is involved?

low helm
#

all bp

chrome bay
#

If you Tear it off, client has to destroy it

#

It will initially replicate, then tear off just closes the channel down and gives client authority over the pawn

vagrant saddle
#

Is there a proper way to replicate setting a clients velocity? Iโ€™ve been trying to set up a system where the client asks the server to calculate itโ€™s next velocity then the server tells the client what it is, but everything Iโ€™ve tried has failed.

#

I havenโ€™t tried replicating their velocity variable directly yet, as Iโ€™m not home right now, would that be the way to do it?

#

Also asking the server to do this every frame wouldnโ€™t be an issue would it?

chrome bay
#

velocity already is replicated if you're using Replicated Movement

vagrant saddle
#

Well Iโ€™m asking cause we set up a custom way of calculating velocity, but I think I may have figured out what my issue was

#

The way it calculates velocity is reliant on what the current inputs of the client is and I wasnโ€™t sending that to the server when I asked it to calculate the next velocity

#

So those axis values were probably just staying as 0 when I asked the server to do stuff

#

I really wish I were home to test it lol

low helm
#

Is there any event that fires on client to signify a tear-off occurred and the client now has authority?

fluid flower
#

hey all, I got beacons working somewhat, but now wondering: if I run multiple instances of a server on the same machine, will the beaconports also have to be unique? if so, what is the commandline for it or is there another way?

wanton tulip
#

Ok, I now started my Game first and then my Dedicated Server and then happends what sonicphi discribes, the client joins and get instantly kicked, because the UID not matching, because Client uses Steam and Server NULL. So I try to run my Dedicated Server on my laptop with another account.
Seems to work, but only, when I am hosting on my PC an joining with Laptop. I think, because my Laptop uses the Windows defender. Thanks for your help ๐Ÿ‘ (Zlo and sonicphi)

zinc garden
#

I'm using a Character, and I want to set a custom world rotation for the Mesh component that it has by default. That worked with just an additional cube staticmesh component that I added, but for the default skeletalmesh component, it seems like it's not working

#

I'm guessing maybe it has something to do with the prediction code of the CharacterMovement component?

#

Actually, I was being half-stupid. Stupid because I hadn't set "Component Replicates" for that skeletal mesh component. But only half-stupid because it reverts to 0 rotation as soon as I move. So I guess the prediction issue is still valid.

chrome bay
#

@low helm yes in C++, in BP probably not

#

@zinc garden The rotation has to be the default property

#

CMC will rotate it back to the default rotation for network smoothing

#

Also you don't need to mark that component as replicated

#

Wouldn't do anything in that case anyway

zinc garden
#

@chrome bay Alright, thanks. Yeah this is in BP. I'm going to try and figure out a hack to get around the issue. Like add a second skeletal mesh that I'll use instead. ๐Ÿ˜›

chrome bay
#

You can just set the rotation in the details panel

#

It just has to be the default rotation for that class

zinc garden
#

Hmm... what do you mean? For the default mesh?

#

That's what I tried, but it resets it to 0

analog rover
#

Is there a way to send an RPC to just one client without routing it through a client owned actor?

bitter oriole
#

No

#

Well yes - make that actor client owned

analog rover
#

Hmmm

#

In that case I might just route the calls through the player controller

livid holly
#

has anyone ever had a problem where you put two player starts in the level, and when you run a multiplayer game, sometimes the game only spawns 1 of them?

#

I think the game is sometimes trying to target the same player start to spawn the 2nd player, and failing

#

while sometimes it works and each player goes in a diff start

#

I get a LogSpawn: Warning: SpawnActor failed because of collision at the spawn location for BP_Pawn... yeah but shouldn't you try another player start?

#

ok I found an overridable game mode function, InitNewPlayer, where you can pass a string param that will be a tag for the player start... this should be standar dbehavior IMO though

strong vapor
#

good to know!

#

i agree

grim lintel
#

I also had to learn that the hard way recently.

faint seal
meager spade
#

where is the multiple pistols

faint seal
#

the pistol pointing right, there are two front sights. In the firing animation you can see one of the front sights staying still

meager spade
#

cause that last screenshot doesn't really show multiple pistols

#

yeah but you shoulda moved them slightly or highlighted them ๐Ÿ˜„

#

and with that little bit of code, nope

faint seal
#

yeah lol, i'll try to get a better shot

meager spade
#

need to see more of your flow

#

if you are spawning them beginplay

#

then you are likely spawning two copies

#

cause you are doing a server rpc

#

so client and server both ask to spawn a weapon

faint seal
#

Yeah it's begin play

meager spade
#

BeginPlay runs on Server AND client

#

so use HasAuthority node

#

and choose a direction

#

tbh server should just spawn it

#

no need for the RPC

faint seal
#

So use the authority and just go straight to the function?

meager spade
#

yes

faint seal
#

Worked like a charm, Thanks!!

#

I didn't know that begin play called both.

lucid vault
#

Can I get the player controller from the player state on the server?

meager spade
#

sure..

lucid vault
#

in bps ๐Ÿ™‚

meager spade
#

yes

lucid vault
#

how?

meager spade
#

PlayerState owner is the PlayerController

#

so PlayerState->GetOwner->Cast PlayerController

lucid vault
#

oh, lol. That makes sense

livid holly
#

is there a delegate / a function / any way for the game mode to know that the game state has spawned in clients and can multicast there?

#

I'm starting the match at PostLogin, when the right number of players have entered. Then, from the game mode, I'm calling a Multicast function in the game state... but it only executes on the server

#

if I give a delay (2 sec), it executes in both sides... however delay is not a good way to handling netcode

meager spade
#

what are you multicasting?

#

the proper way is to NOT start the match till criteria is met, then you call StartMatch

livid holly
#

a custom funciton to kick off the match, the game state will do broadcasts and handle some initial states and allow the match to begin

meager spade
#

players all connect and wait, once gamemode says, yep all players connected, then it starts the match

livid holly
#

yeah I'm doing this on Post Login after I've ensured all players connected, but aparently I need the game state to exist in clients as well

meager spade
#

ofc you do

#

but why a multicast?

livid holly
#

as in, right after Post Login it's too soon

meager spade
#

why not just send a Client RPC to all players?

#

if they need to do something

#

you can do that at any time if the RPC is on the client.

#

err PlayerController

livid holly
#

I could refactor indeed, it's just bc I put some "general state" logic in the game state, while the players handle more their own things

#

is there a built-in function or delegate or trigger for the game mode to know that the game state exists in the client?

meager spade
#

no

livid holly
#

yeah, probably I'll have to change the logic to use the PCs then... or make the client game state communicate with the server game mode...

#

thanks

radiant jolt
#

I went to two players and multiple things broke and I cant figure out why

#

Can clients not use event dispatchers?

winged badger
#

because you're using level blueprint

#

its not Owned by the client's PC

#

so it can't send a Server RPC

#

only MCs from Server are allowed for non-owned Actors

#

Owned = PlayerController, PlayerPawn, PlayerState, their Components + anything that had any of them set explicitly as Owner

lucid vault
#

Is player controller[0] always the local controller server-side with a listen server?

winged badger
#

yes, you should get into a habit of not using that function though

lucid vault
#

why is that?

winged badger
#

people mostly use it to create ridiculous cross-wiring bugs in their netcode

#

there are other ways to get the PC

#

simplest one is via c++ GatGameInstance()->GetFirstLocalPlayerController()

#

from Pawn its GetController(), from PS its GetOwner cast to PC...

#

from HUD its GetOwningPlayerController... etc

radiant jolt
#

Why is it that when I possess on the client the server also possesses?

winged badger
#

if that happens to you

#

you used GetPlayerController[0] hooked into a Server RPC

#

@lucid vault my point just made for me

lucid vault
#

haha

radiant jolt
#

im in bp tho theres no first local PC

#

what do i do lmao

winged badger
#

@radiant jolt whatever is hooked into a Server Event, executes on Server - meaning GetPlayerController[0] is evaluated on Server, and it doesn't return the same thing as when its evaluated on Client

radiant jolt
#

ok that makes sense

#

so how would I go about replicating this then

winged badger
#

you send a pointer to Clients PC as an input on the Server Event

#

or better yet

radiant jolt
#

im in bp tho

winged badger
#

you send the RPC through the PlayerController

#

which is where it belongs

radiant jolt
#

ok

winged badger
#

doesn't matter

#

you can add inputs to Server/Client/MC eEvents in BP

radiant jolt
#

ok could you explain a little more im new

#

sorry

winged badger
#

its the same as for non-networked events

#

click the red node, goto details panel on the right, Add Input

radiant jolt
#

yes

#

I get that I just dont understand what im inputting lol

radiant jolt
#

so basically I want to get only the client PC

#

wtf I cant move now after the possesion on client or server

#

@winged badger I still dont understand how to fix my problem

#

oh nvm i got it

#

ty so much!

peak sentinel
#

so in a function if I calling GetPlayerCharacter(0); I should always replicate it to client if I want to get clients character?

#

because ue4 crashes when I call it on dedicated mode

twin juniper
#

Would anyone know why a connection would timeout when connecting to a server?

#

NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT.

gleaming niche
#

ports not open?

#

behind a firewall?

twin juniper
#

port is the default port 15000

gleaming niche
#

default port is 7777

twin juniper
#

this is for my game.

#

i am just trying to connect to the server.

gleaming niche
#

yeah well,if it's not connecting, there's only 3 reasons for why you'd fail to connect: 1) port isn't actually open (from router pointing to the server) 2) there is a firewall in the way, or 3) the address is wrong.

#

there may be a fourth, but i can't think of it at the moment.

#

i guess #4, could be that you're trying to connect on the port, that the server is not actually listening on.

twin juniper
#

I have my ports forwarded to 20150 and 7777

#

and the firewall one is interesting? I am slow in the head do you mean my own firewall or do servers have firewalls?

gleaming niche
#

anything can have a firewall, it depends on where your server is.

twin juniper
#

the address being wrong is plausible. but the address of my server when printed on the server logs returns my IP address which makes sense.

gleaming niche
#

ah right #5; the server is running locally on the same machine, and you're trying to connect to an external ip address.

#

locally on same machine / or on same network

twin juniper
#

yeah.

gleaming niche
#

some routers can intelligently forward that

#

so they redirect the public ip to lan ip

#

it's easier if you have a domain name you can use, because then in windows for example, you can modify the host file, and redirect the name to resolve to a lan ip

twin juniper
#

Okay thanks.

worthy knot
#

@twin juniper are you trying to connect to a dedicated server machine?

#

and yes i get the same timed out connection too

gleaming niche
#

if you're locally on the same network, and trying to connect to a public ip, ie: your actual internet address, this will fail.

#

unless you have an uber intelligent router, that magically can redirect public ip, that every machine on the network shares, to redirect to a lan ip

worthy knot
#

@gleaming niche So i have a windows server machine ready, and i copied and pasted my packaged project into it through remote desktop, i launched the server .exe shortcut log , and now i try to join the server machine by putting both the public and local IP with port 7777 but it wouldnt connect, Then i accessed the server machine through direct VPN, i then launched the server exe of the game through that, then put the VPN ADDRESS into the join domain info of the game , it joins, now i dont know if this is the correct thing happening, cause all the steam games join their servers via public IP i believe

#

my firewall is disabled btw

gleaming niche
#

if you're using steam, you should be using sessions. then it will connect via steamid, and deal with the NAT traversal through the steam sockets, and then you don't have this problem.

twin juniper
#

@worthy knot have you resolved your issue?

gleaming niche
#

with the exception, of not being able to host a dedicated server on the SAME pc as a client, as usual.

worthy knot
#

@twin juniper No regarding the timeout no, i need to look into that, but as of now i cannot join the server hosted game via IP

twin juniper
#

shitty. that's where im at.

worthy knot
#

Do you have your game folder inside the server machine ?

twin juniper
#

Yeah.

worthy knot
#

ok and you ran the server .exe shortcut ?

twin juniper
#

pretty sure we tried all the same things you have.

#

that you described earlier.

worthy knot
#

oh

#

i think this could be some port forwarding problem

#

do server machines have use different port?

gleaming niche
#

did you disable the firewall on the windows server machine?

#

or add exceptions, so it can open ports?

worthy knot
#

i did it right now and i will test

gleaming niche
#

it's been a while, but from what I can remember, windows server doesn't do the popup like normal windows does, so if you didn't explicitly modify the firewall, you'll get no indication that it needs to be

worthy knot
#

Do i need to put some other port number other than :7777?

gleaming niche
#

it would help to know what Oline subsystem you're using

#

as well.

worthy knot
#

im using the default UE4 one

twin juniper
#

I am using steam

gleaming niche
#

then no, only 7777 by default

#

steam is different

#

steam needs 27015 for the query port (to show up in session lists)

#

and then 7777 base port for actually connecting

#

you can of course change all of it on command line.

twin juniper
#

๐Ÿค”

gleaming niche
#

with steam it's super easy with sessions

#

cuz you just query, and join

#

and it will use the steam ports

#

and doesn't matter if server is on same network, cuz it can do nat traversal.

#

(as ong as it's not same pc)

#

since steam itself is running, it will connect via lan automatically

bitter oriole
#

No port setup is needed with Steam AFAIK

gleaming niche
#

it is for dedicated.

#

but not clients / listen server.

bitter oriole
#

Ah, alright.

gleaming niche
#

dedicated needs the ports open for whatever range you happen to be running, if you're going to run more than one DS on one machine / vm

worthy knot
#

Ok so i disabled firewall and joined via LOCAL IP , joined successfully

twin juniper
worthy knot
#

now heres whats confusing for me, Is Local IP or Public IP required to join dedicated servers?

gleaming niche
#

depends on where the server is lol.

#

if it's on your network, you need to connect with lan ip.

#

if it's a different public ip, you connect with public ip.

worthy knot
#

its not on my network, its a VPS

gleaming niche
#

and then it depends on if they are forwarding ports for you.

#

steam just makes it all easy lol

twin juniper
#

"easy"

worthy knot
#

haha

gleaming niche
#

if you use the sesions properly, it takes 10 minutes, i dunno what your problem is beefy, beecaue i don't know how you implemented anything.

#

or how you're trying to connect.

#

or how you're defining this different port of 10000

worthy knot
#

so this means i gotta see what port the server machine is using? then use that port with its public IP?

gleaming niche
#

for steam dedicated severs, it's as simple as
yourbinary.exe -port=7777 -queryport=27015 for first server
yourbinary -port=7778 -queryport=27016 for second server on same machine, etc.

#

and then you just find sessions in the client

#

and join session

#

and just make sure all the ports are open in the router.

#

for the server itself.

worthy knot
#

in mine and servers?

gleaming niche
#

and it will work over lan and internet

#

because steam will do the resolving for you.

worthy knot
#

I have yet to integrate steam sessions in my game and set the IP address of the server on steam, i will look into that asap, but before that i must test and confirm it the basic way of joining via public ip

gleaming niche
#

your issue is going to be because of ports not being forwarded to the machine, via public ip. if you can now connect to the thing over your VPN, then you can just proceed, and do the steam sessions and you should be fine.

twin juniper
#

I used GetResolvedConnectString

#

and pass it to the client.

#

then call joinsession

gleaming niche
#

this is called AFTER joining the session

worthy knot
#

you sure steam will recognize all the ports and join via public IP without an issue? cause i havent ever looked into this stuff before

twin juniper
gleaming niche
#

ah, you're using beacons, instead of just sessions.

twin juniper
#

Yep

gleaming niche
#

and your server is on the same network

#

so you're trying to connect via public ip

#

which won't work.

twin juniper
#

Well i've tried from a dedicated machine and that gave the same connect timeout error

gleaming niche
#

and was it forwarding the ports, on that dedicated machine? lol

twin juniper
#

How would i know that? lol

gleaming niche
#

well there ya go.

#

if you don't even know that, then i'm willing to bet that's the reason.

#

forget beacons and just use sessions, and your life will be happy.

#

lmao.

twin juniper
#

Obviously. We had it working before i included beacons.

#

and then i tried doing initclient

#

and its failing.

worthy knot
#

@twin juniper you are using steam sessions ?

#

@gleaming niche Tell me if i should proceed with a steam integration tutorial , are there any specific ports that i need to provide?

#

I just want the server IP to be up on the steam server list and when i search sessions, it should show the active server IP and i should be able to join it without a hassle ๐Ÿ˜…

peak sentinel
marble gazelle
#

I suggest to not use GetPlayerCharacter if you know your character ๐Ÿ˜‰ use GetPawn() on a controller, and cast it to your character class, way less error prone.

#

and check you actually have a pawn of course

chrome bay
#

+1 to both

#

Answered the Q anyway

worthy knot
#

Do i need my game uploaded on steam to get an app id for testing?

gleaming niche
#

you need an app before you can upload.

worthy knot
#

an app? like my packaged project?

gleaming niche
#

no.

#

a steam app + appid.

#

you need that before you CAN upload.

#

since depot is tied to the appid / steam application

worthy knot
#

by a steam app you mean the steam desktop application or some app inside steam like another game?

gleaming niche
#

and you have an app, on the site?

#

with an appid?

#

if so, then you can upload.

worthy knot
#

yeah i am logged in

#

not sure what you mean by "app" application or a game

gleaming niche
#

yup.

worthy knot
#

Okay i got the sdk

#

So what am i supposed to do with this now? does it give an app id in it?

chrome bay
#

You need to login to the Steam backend, sign up as a partner and create an App. It's not free though.

gleaming niche
#

sorry i didn't pay attention to your red line

#

i mean i would think it's obvious, if your intent is developing a game.

worthy knot
#

Oh i need to sign up all the tax info and stuff just for the app id

#

$100 to create a new app, this can be used as my first video game title right, because thats the fee to publish every new title

chrome bay
#

yep

worthy knot
#

@gleaming niche Just a recap to the port openings, I need to add 7777 in one of these?

gleaming niche
#

Yeah under forwarding.

worthy knot
#

port mapping or port trigger?

#

I believe port trigger

gleaming niche
#

mapping.

#

you need external public IP to FORWARD -> lan ip

#

for specific port

worthy knot
#

its showing a few things

gleaming niche
#

wow huawei sucks.

worthy knot
#

why? is something missing?

gleaming niche
#

the ability to actually define a port

#

and not just pick from a list.

#

maybe you need to enable "advanced" mode or something in the router.

worthy knot
#

ill check if there is a setting

#

hmm no advanced setting

#

what router are you using?

gleaming niche
#

i have a few different ones. asus, cisco, etc.

worthy knot
#

and they allow to define a port?

gleaming niche
#

yup.

worthy knot
#

Lucky

#

i dont think the server machine needs port forwarding, cause i tried accessing the router homepage it wont load up ( well its a server machine so yea )

#

just my end that needs it

verbal gust
#

what is the best way to setup vr replication (so that users can see others) [tracked controller, teleport location, etc]?

urban palm
#

@verbal gust if you want a quick start to it, the VR Expansion Plugin by Mordentral has pretty much all the networking already figured out for you

verbal gust
#

thats annoying, just spent a week pondering over things i didnt need too, ty for pointer

gleaming niche
#

imo, that plugin is the best for VR stuff.

verbal gust
#

will have a look cheers

zenith wyvern
#

Can anyone tell me why get mouse position returns 0,0 every other tick on client in multiplayer?

#

its fine on server

#

Turns out get mouse position was returning false every other tick on client. can branch around it, but wondering why that would happen

fleet raven
#

are you running multi-PIE? if so, each PIE window is going to be ticking independently (obviously) and your mouse can only be over one window at once, so the others are going to fail to read mouse position that tick...

unkempt tiger
#

is using the DrawDebug___() functions serverside going to network the debugging call to the clients so I can see the serverside debug information?

#

for example DrawDebugSphere() etc?

meager spade
#

no

unkempt tiger
#

oof, any good way of networking it then?

#

a plugin or some other alternative?

meager spade
#

make a client RPC in the PlayerController

#

to draw them?

unkempt tiger
#

i suppose so, yes! :D

#

smh tho

meager spade
#

that is how i have to do it

unkempt tiger
#

should have come ready with the engine

meager spade
#

well you can use Gameplay Debugger

unkempt tiger
#

what's that?

meager spade
#

the Gameplay Debugger lol

#

google it

unkempt tiger
#

ah right, thanks, will do

meager spade
#

you can make your own category

#

and draw anything you like on screen

unkempt tiger
#

sweet

#

thanks for this!

meager spade
#

though that custom GD stuff

#

is old

#

i did have a tutorial on my blog (but i lost it) to create a new category

#

but its fairly simple

#
{
public:

    FMyCustomDebugger();

    static TSharedRef<FGameplayDebuggerCategory> MakeInstance();

    virtual void CollectData(APlayerController* OwnerPC, AActor* DebugActor) override;
};```
#
FMyCustomDebugger::FMyCustomDebugger()
{
    bShowOnlyWithDebugActor = false;
}

TSharedRef<FGameplayDebuggerCategory> FMyCustomDebugger::MakeInstance()
{
    return MakeShareable(new FMyCustomDebugger());
}

void FMyCustomDebugger::CollectData(APlayerController* OwnerPC, AActor* DebugActor)
{
    AMyCustomPawn* MyPawn = Cast<AMyCustomPawn>(DebugActor);

    if (MyPawn)
    {
        MyPawn->DescribeSelfToGameplayDebugger(this);
    }
}```
#

that is the basics ๐Ÿ˜„

#

then in GameInstance Init just do IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get(); GameplayDebuggerModule.RegisterCategory("MyCustomDebugger", IGameplayDebugger::FOnGetCategory::CreateStatic(&FMyCustomDebugger::MakeInstance), EGameplayDebuggerCategoryState::EnabledInGame, 6); GameplayDebuggerModule.NotifyCategoriesChanged(); and voila ๐Ÿ™‚

unkempt tiger
#

oh neat

meager spade
#

then your custom pawn can show anything to the Gameplay Debugger

unkempt tiger
#

good stuff! this will come handy for my lag compensation scripts

meager spade
#

ye

#

lot simpler than that UE4 doc version

unkempt tiger
#

thanks a bunch, ima dive in

#

๐Ÿ‘Œ

zenith wyvern
#

@fleet raven was in standalone

lucid vault
#

What's the cleanest way to replicate num players

#

Is there a better solution than creating a duplicate replicated variable?

winged badger
#

not replicate it at all

#

but instead check the PlayerArray in GameState length

lucid vault
#

What's a good way for widgets / BPs to subscribe to changes in the playerarray length? I need some function that runs client-side when the playerarray changes, so I can use an interface to let everyone know

#

With replicated variables in the game state, I use onRep which in turn get's every actor/widget and calls an interface function to let them know of changes to that variable

winged badger
#

overriding Add/RemovePlayer in GameState and adding a delegate broadcast to it

#

is the cleanest way, c++ only

lucid vault
#

Is there any benefit to using a delegate over an interface?

#

I plan on moving my code over to C++. I've just been prototyping quickly in BPs

chrome bay
#

delegates are portable, anything can subscribe to it

#

interfaces considerably less so, and you somehow need your gamecode to be referencing UI widgets which is also not great

winged badger
#

and by "which is also not great" he means you'll regret it ๐Ÿ˜„

chrome bay
#

yeah ๐Ÿ˜„

#

Nothing less fun than trying to redesign a UI that has spiderweb code all over your project ๐Ÿ˜ฆ

peak sentinel
#

Hey Jambax, i replied your reply on answers, can you check it out if you are avaiable?

#

nvm i misread it

#

solved now

lucid vault
#

Is it bad practice for the player controller to conditionally render widgets depending upon the game mode? Originally I had multiple player controllers for each gamemode, but the player controllers are mostly the same apart from widget rendering.

winged badger
#

yes, you have HUDs pretty much designed to do that

lucid vault
#

I was thinking about using the HUD class, but everyone kept saying it was outdated

#

I guess I could use a widget class called HUD

#

So, you would add a generic HUD class that is responsible for looking at the gamemode? Or you conditionally add HUDs based upon the gamemode in the PC?

winged badger
#

its not outdated

#

and it performs its function well

chrome bay
#

yeah treat the HUD as a convenient manager for widgets

lucid vault
#

Should the HUD conditionally render based upon the game mode, or do you typically have separate HUDs for each gamemode?

chrome bay
#

different HUD for each gamemode, since the gamemode defines what HUD class is used anyway

#

But, I suspect most of the gamemodes still share a lot of common elements

lucid vault
#

I see, that makes sense. So, it probably makes sense for the HUD class to be the one that interacts with state, and it can pass the state variables down to it's widgets

chrome bay
#

Well not necessarily, widgets can grab info from the game too

#

But the HUD is a convenient place to store all your widgets and instantiate/manage them, since it's closely linked up with the player controller

#

But there's no need to route information through the HUD into widgets, if widgets can just grab the info themselves

#

E.g. our scoreboard might be stored in the HUD, but it updates itself

lucid vault
#

I guess I'm just coming at it from a React web dev perspective, where the display elements only get passed data and never directly read from the state

#

For instance, if a scoreboard widget wants to be re used for different game modes, it can't really get the game state directly

chrome bay
#

If you have a common gamestate it can, most scoreboards will likely be showing the same thing

#

E.g, a list of players, possibly sorted into teams, etc.

#

the advantage of widgets manging their own internal elements and what they display is that you can put them wherever you want and they "just work" without any dependencies on some other class

#

If your widgets are totally dependent on the HUD to function, then it becomes a pain when it comes to redesigning stuff, or if you want to reuse a widget elsewhere etc.

lucid vault
#

I didn't think about having a super class for the hud. That makes more sense now

chrome bay
#

Sorta depends really. I don't have any webdev experience tbh, I just go with what works for general game level stuff in UI too

#

I just tend to keep UI as separate as possible from the game-code. HUD/Game might control what is visible and when, but widgets control their own appearance and grab whatever info from the game they want to display. Avoids a lot of nasty tangling of code.

rich ridge
#

I have been watching this video.https://youtu.be/QuuRUzZcmGE

So I m very much interested how is this even possible to do even though fortnite has AntiCheat.

HACKERS STILL EXIST IN FORTNITE!! And your favorite Fortnite streamers are still getting trolled by them!

โœ‰๏ธ Submit Your Clips - Get Featured!
https://fortnitelegion.com/

โฌ‡๏ธ Creators Featured in this Video โฌ‡๏ธ
(Please support our content creators! ๐Ÿ’–)
โค๏ธ Chap - https://www.tw...

โ–ถ Play video
#

If I know how to hack then I can code to prevent this.

#

But I couldn't think of anyway to hack

#

And most of the hacks are from current season

lucid vault
#

Someone wants to make some hacks ๐Ÿ™‚

rich ridge
#

The hacker were able to bypass collision, twist the physics

#

Some of the hackers were like Barry Allen- The Flash

fleet raven
#

anti cheat is not infallible

chrome bay
#

Be amazed what people come up with

fleet raven
#

the vast majority of what EAC does is pattern matching

#

it will upload the signatures of everything people inject

#

if any of those are later verified to be a cheat -> all of them banned

chrome bay
rich ridge
#

This is ridiculous

chrome bay
#

MP is just a barrel of fun

rich ridge
#

Do you believe these hackers do have good knowledge of Unreal engine??

fleet raven
#

better than all of us here

rich ridge
#

Ohh

chrome bay
#

Problem with UE being "open" source, is it gives people a lot of shortcuts too...

fleet raven
#

there will be some gods who develop the cheats

#

and thousands of people using them

chrome bay
#

yeah

rich ridge
#

Hmm, so it's fair to assume whatever game I m making now won't be immune to hack

chrome bay
#

you can garauntee it

fleet raven
#

unless you are exclusive to stadia

#

then people can still use neural network aimbots on the video stream...

rich ridge
#

Yes right

chrome bay
#

some dumb stuff like you see in that video you can protect against, we missed some pretty basic things at launch

rich ridge
#

All these hacks are from current season of fn

chrome bay
#

ah I meant the one I linked.. but yeah no idea with FN

#

I mean you would assume Epic has done everything they can at the game level to prevent obvious exploits, but you never know

rich ridge
#

So how did you solve your hack??

#

Curious to know and might come handy for me

chrome bay
#

The teleporting one was our own fault. the hit-reg verification was just a dot product.

#

So hacker could teleport a pawn to their location on the client end, shoot them, then send a hit to the server and it'd would be like "you're looking the right way that's fine"

#

So obvious when you look at it now

#

funny really

winged badger
#

that particular cheat is fairly common

rich ridge
#

Ok understand

chrome bay
#

yeah. really easy to protect against, but so common. Doesn't help that a lot of shooters are using the shootergame template as a starting point which has a less-than-ideal implementation

fleet raven
#

that cheat is only common because doing hit detection so badly is common

winged badger
#

it is ridiculously simple, just teleport the target infront of a gun just as it fires

fleet raven
#

overwatch is the only one that did it right

chrome bay
#

the fast sprint was because we put out a dev build with all our console commands exposed. ๐Ÿ˜„

#

GG WP

fleet raven
#

it's too hard to do it like them

chrome bay
#

Didn't they do a talk about their anti-cheat approaches? Like doing crazy memory stuff and whatnot

fleet raven
#

they do full server side hit detection and since they have fixed ticks and deterministic logic they can actually do latency compensation perfectly

unkempt tiger
#

lmao @chrome bay that video is golden

chrome bay
#

Ahhh right, yeh determinism helps a lot I guess

rich ridge
#

@chrome bay I get the problem statement of your hack, so how did you prevented it. I still didn't understand

chrome bay
#

Solution was to simulate the bullets on the server too.

unkempt tiger
#

I'm working with a fixed tick and deterministic logic, Im funnily enough just now setting up a hit detection script

rich ridge
#

Ok ok

winged badger
#

even a common sense check on _Validate would prevent most of it

chrome bay
#

yeah

rich ridge
#

Right

winged badger
#

like, is the Target hit location anywhere around where Server thinks the Target is?

chrome bay
#

We do fancier stuff now, but looking back it's comical how easy we made it for people

#

So obvious when you look at it

rich ridge
#

Does GAS handle all these validation ??

#

Or do we need to handle ourselves

winged badger
#

no, they are game specific

fleet raven
#

you have fixed ticks in unreal?

#

@unkempt tiger

rich ridge
#

Ok

unkempt tiger
#

yeah

#

I do, but its only for my custom player character

fleet raven
#

assuming that's a custom system

unkempt tiger
#

it is yes

fleet raven
#

epic should finish their new network prediction plugin br_omegga

#

it has proper fixed tick systems

unkempt tiger
#

what are its features?

winged badger
#

4.29-4.40, its just around the corner

chrome bay
#

fixed-tick chaos and everything

fleet raven
#

well chaos is the least interesting part

chrome bay
#

yeah true

unkempt tiger
#

so whats the most interesting part?

fleet raven
#

it gives you a proper framework for predicted, fixed tick simulations

chrome bay
#

..unless your doing a lot of physics stuff, in which case very big news ofc

fleet raven
#

handling multiple objects and everything

rich ridge
#

And they are integrating it with GAS too.

unkempt tiger
#

oh man

#

what am i doing with my life spending months of work getting my shit to work

fleet raven
#

they are also making properly working physics prediction based on that and chaos

unkempt tiger
#

when that plugin is around the corner, and can solve all my problems

fleet raven
#

you can see it in the new fortnite season, vehicles are using it

unkempt tiger
#

link?

fleet raven
#

don't have one

chrome bay
fleet raven
#

ye

chrome bay
#

Dang that's from July

#

wonder how far along it is now

rich ridge
#

@fleet raven you mean fn using prediction plugin already??

fleet raven
#

yes

#

what do you think why this exists

#

they are making it for fortnite

#

the predicted physics vehicles is already live

rich ridge
#

Yes they told it's for fortnite, but I didn't expect to go in production soon

unkempt tiger
#

this looks like some advanced stuff

fleet raven
#

yeah the boilerplate in that video is big egg

unkempt tiger
#

like how does one even go about making a generic prediction system

fleet raven
#

but that's because the chaos API isn't quite there yet

#

he said it won't be like that

unkempt tiger
#

so

#

am I wasting my time trying to do this myself (well not exactly this, but my own private case of it, so less generic) for a game I plan to work on for the next 3 or 4 years?

chrome bay
#

The idea eventually IIRC, is to just determine what input and outdata there is, and the simulation itself

#

Without having to worry about how the netcode works

#

So unlike the horrific approach CMC takes where netcode is heavily interlinked with the simulation

#

And it's a pain to change anything

winged badger
#

even when it starts working, you'll have to be intimately familiar with netcode for anything but the 2-3 basic scenarios

#

its like that every time with unreal

unkempt tiger
#

is there a place I can read more about this prediction plugin btw?

chrome bay
#

sauce is on github

#

But that's about it atm

fleet raven
#

if you don't have a deadline then yes you are wasting your time

unkempt tiger
#

smfh

rich ridge
#

CMC emits a lot of bytes and eats up alot of network bandwidth

unkempt tiger
#

hmm

#

so as to physics prediction

#

whats actually preventing us from using substepping and our own custom rewind/rollback solution for prediction?

lucid vault
#

Non deterministic physics

#

@fleet raven Will the new prediction system be that much better?

unkempt tiger
#

physics can be deterministic if we give it a fixed deltatime value though

fleet raven
#

yes

#

it will be good

#

they're also making a new character movement based on it from scratch and throwing the old mess away

unkempt tiger
#

so basically it comes down to our inability to manually call Engine->TickPhysics(Time)?

lucid vault
#

I've always wanted to enable players to push around physics actors. But it breaks with more than 50 ping, especially when multiple players are pushing on the same object

#

Is this new net code coming in UE5?

unkempt tiger
#

that scenario will probably always break

lucid vault
#

yeah, I wasted a ridiculous amount of time trying to get it to work

unkempt tiger
#

what were your approaches?

lucid vault
#

I disabled replicate movement and tried to apply impulse nudges to keep the physics synced up, but it never ended up working good enough

#

The best theoretical solution that I ended up deciding on was to locally simulate the physics actor on the nearest player, and to use replicate movement when more than 1 player is near that physics actor

#

I haven't implemented that yet though

#

With the first solution, I used a fixed timestamp and send along previous transforms of the actor, that way corrective nudges could be made

#

Didn't work out too well ๐Ÿ™‚

fleet raven
#

this scenario will work fine with the new physics prediction system

#

chaos can do selective re-sim

#

fortnite has no issues with multiple predicted player controlled vehicles colliding

unkempt tiger
#

how tho? if the local player is still some ticks ahead of simulated proxies?

peak sentinel
#

Whats a "fixed tick"?

#

Fixed tick == asynchronous game engine?

signal lance
#

@unkempt tiger the local client is predicting other players around it by simulating ahead with their last known input.

#

most likely

cinder tartan
#

followed it exactly and got bulk errors even after using code samples

signal lance
#

this puts the simulated proxies in the same "time frame" so it can properly simulate collisions

cinder tartan
#

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "IDamageInterface.h" ForsakenAndForgotten C:\Users\Ty\Documents\Unreal Projects\ForsakenAndForgotten\Source\ForsakenAndForgotten\ForsakenAndForgottenCharacter.h 7

#

and a bunch of others

lost inlet
#

please don't randomly DM people

radiant jolt
#

how do I set variables to replicate?

lost inlet
#

in code or BP?

radiant jolt
#

Code

lost inlet
#

UPROPERTY(Replicated) above the property and then override virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override; to include the property, don't forget to call the Super

radiant jolt
#

ty

#

do i need an include at all?

faint dock
#

#include "Net/UnrealNetwork.h"

radiant jolt
#

ty

#

wait now when I try to use something that replicated i get an error saying attempted to access missing property?

#

nvm its a bug reloading editor fixed it

lost inlet
radiant jolt
#

ty

unkempt tiger
#

@unkempt tiger the local client is predicting other players around it by simulating ahead with their last known input.
@signal lance Yeah, tho I still don't see how prediction can work in that scenario, since its fundamentally different than other scenarios (each client can affect every other client when everyone is pushing the same prop, the net latencies alone just make it seem impossible without solving the case manually with specialized netcode, I may be wrong though)

zinc garden
#

Hey, I have a hard time figuring out how to structure my BPs to get something to work. What I want to do is:
Player connects, becomes a spectatorpawn and gets a widget where they can enter their name. When submitted, that name is saved in their player state so that others can see it in the scoreboard. - So far, okay.
Then I want to spawn the character and have the new player possess it. - This is where I'm stuck

#

I can't talk to the gamemode directly from the widget, because the widget is clientside and the gamemode only exists on the server.

#

If I fire a serverside event on the playerstate, it's gonna happen for all players, so it will spawn a character for every player currently connected instead of just the player who submitted their name.

zinc garden
#

Fixed it ๐Ÿ™‚

signal lance
unkempt tiger
#

correct me if Im wrong (I havent played rocket league myself so I can't tell for sure, although I did see videos): there are two differences between rocket league and what @lucid vault described though, (which is a scenario where several players are actively pushing against the same prop). the first is that in most cases, rocket league's car-to-ball interactions are single events rather than a continuous dynamic system (I may be mistaken here, so please correct me) and this can make accounting for in the net code easier, and the second more important part is that usually, not more than one car is actively pushing the ball at a time, right?

#

im thinking out loud here more than anything else

#

so the pushing car has all the data it needs to know where the ball is going next, upon impact

#

Oh, there we go

#

He explains that this doesnt work very well with other cars

lucid vault
#

The ball also seems much more predictable

winged badger
#

they do have only a few physics objects

#

so they can go overboard with custom code

analog rover
#

Re: network prediction, has anyone here used it for anything outside of the examples?

#

I was mostly digging through the mock simulation examples out of curiosity, since trying to implement anything with it in my project would probably not be worth it

unkempt tiger
#

are you talking about the current prediction solution ue4 provides atm?

analog rover
#

Nah, the new Network Prediction plugin

bitter oriole
#

Some people have been using it here though it's still experimental

analog rover
#

I saw someone mention that FN is using the plugin for their vehicle sims though

#

Oh neat!

#

I guess I was wondering how experimental it is, though according to the update notes it seems like the API is mostly set for now and most core features are done

bitter oriole
#

That's probably true

analog rover
#

I'd definitely be interested to see if they provide some more fully-featured examples/documentation with the full release or whenever they merge CMC functionality into the plugin (whatever year that ends up being ๐Ÿ˜…)

bitter oriole
#

Provided they actually do that

analog rover
#

You're thinking they won't change the CMC?

bitter oriole
#

Yeah

#

It's an immensely complex feature that you can't really change much since like 90% of UE4 projects use it

#

Probably including Fortnite itself

#

Definitely including every shooter under the sun

analog rover
#

Yeah, that would definitely be a big change. I know they stated a desire to replace CMC (I think that might even be one of the main goals) with it at some point, but I suppose we'll have to wait and see if they actually do

bitter oriole
#

I think a generalized Pawn movement with network physics would be incredibly more valuable tbh

analog rover
#

Yeah, I can see that

#

I didn't actually realize they were working on generic networked physics

bitter oriole
#

Chaos is very much meant for network

#

Right now you just can't have server-authoritative vehicles in UE4

analog rover
#

Are the networked vehicles coming in 4.26? Or is that just single-player vehicles?

#

(I saw Chaos vehicles listed on their Trello for the 4.26 release)

meager spade
#

they seem to be tested well in Fortnite

#

so im hoping they release something

#

also i spoke to a few people and got told the CMC is not going to be removed/changed, but a more generic framework will be useable including a new client movement system. Hopefully this is more encapsulated, and not needing to be hardcoded to use the PlayerController/ACharacter to do everything

analog rover
#

So just something new alongside of the CMC, but keeping the old one for legacy purposes?

sweet robin
#

I'm having an issue with the Steam Subsystem where once 2 people are in a session, the session can no longer be found. On the NULL subsystem I can have any number of people join, no issue. I've got my NumOfPublicConnections set to a good number.

The issue also arises if someone joins, leaves, then tries to rejoin. It's like the session can't be found after the first connection.

unkempt tiger
#

by CMC you mean character movement component right?

analog rover
#

Yeah

steel vault
#

I would hope that whatever solution they end up coming up with would be easily usable in place of/with the existing character classes so that you don't have to incorporate a Pawn instead or rebuild everything to get your characters working with the new stuff.

#

Would be nice if it had an easy way to replace the CMC if you so wish

#

I for one, am super amped about Chaos and properly simulated net physics because my game is supposed to have a ton of destruction and physics in it.

lucid vault
#

Why is this ๐Ÿค”

sweet robin
#

I found my problem:
LogOnlineSession: STEAM: Updating lobby joinability to false. Any idea where the steam interface would be doing this?

sweet robin
#

I found this:

// Auto update joinability based on lobby population
            bool bLobbyJoinable = Session.SessionSettings.bAllowJoinInProgress && (LobbyMemberCount < MaxLobbyMembers);

            UE_LOG_ONLINE_SESSION(Log, TEXT("Updating lobby joinability to %s."), bLobbyJoinable ? TEXT("true") : TEXT("false"));```

But I'm curious why that bool would become false? Obviously it thinks I'm hitting the MaxLobbyMembers. But when I create the session I'm setting my NumPublicConnections to a decent amount.
ripe lotus
#

Hello guys. I have a replicated actor that i need to move on a dynamic patterns that changes over time.
The actor is not a pawn (nor character).
So i resorted to overuse the SetActorPosition (and some VInterpT and RInterpTo) but the replication is super weird, jumps back and forth all the time.
Is there a better way?

prisma crescent
#

There's the movement component and InterpTo components you can use

#

Haven't used them myself

steel vault
#

Usually if you have jumping that means the client position does not match the server position

unkempt tiger
#

I for one, am super amped about Chaos and properly simulated net physics because my game is supposed to have a ton of destruction and physics in it.
@steel vault What are your planned alternatives for Chaos?

#

or rephrased

#

assuming chaos net physics isnt a thing, how do you plan on networking your physics?

steel vault
#

I have purposely held off on creating destructible actors and replicating the movement of a lot of actors on screen for this very reason because I was hoping to have a plug and play solution like chaos. That being said, I currently have a handful of movable actors on screen that when I impulse follow pretty closely to what happens on the server so I would probably implement a very generic/basic interp of the location and rotation client side on a slower frequency to eventually match what the server sees. Albeit, not the greatest solution. Or I did read something about lock stepping that might work better.

vagrant saddle
#

would you use the client's frame time when calculating it's velocity on the server?

unkempt tiger
#

whose velocity?

vagrant saddle
#

character you're controlling

unkempt tiger
#

character velocity should be independent of frame time

steel vault
#

I believe the CMC on the server provides that value for you

unkempt tiger
#

it should be frame-time-integrated when simticking though

vagrant saddle
#

I'm not sure what frame-time-integrated means or simticking but I'll look into it

#

its just the way we originally designed the movement was framerate dependent

#

and I'm really not sure how to translate that to a server

unkempt tiger
#

why do you want to calculate the character's serverside velocity on the client?

#

calculate it based off of what?

prisma crescent
#

It does not look like Chaos destruction has any networking in it.

vagrant saddle
#

when the player gives it an input it makes an acceleration vector that's used to calculate the characters next velocity, like how they do it in source and quake. So, our movement calculates this every frame and it was frame rate dependent to keep it consistent, but now I have to get this to work with networking and I'm not sure how the server should be handling this

ripe lotus
#

Thanks guys, i've avoided the interpto movement because i need to reset the target each frame.
i have the feeling the jumping is due to that. by changing the target each frame, the interp steps on its previous interp. or maybe is the clients prediction.

prisma crescent
#

Server shouldn't have to do any prediction. That should all be handled client-side.

vagrant saddle
#

Sure, but I'm afraid of doing this client side because wouldn't that mean the client has to send the server what it thinks its next velocity should be, giving way to cheating?

unkempt tiger
#

@vagrant saddle "and it was frame rate dependent to keep it consistent" makes no sense, frame rate dependent code means keeping things inconsistent

ripe lotus
#

@prisma crescent yup i'm talking about client prediction. the movement on the server is fluid, but on the client its like jumping back and forward quickly

unkempt tiger
#

but anyways, it seems like your problem is your application of velocity += acceleration and position += velocity is not properly time integrated @vagrant saddle

#

those should always be integrated

vagrant saddle
#

What do you mean by integrated here?

unkempt tiger
#

it'll explain things better than I could

#

but in a nutshell - you integrate your motion so that your logic is framerate independent - the better the integration method, the more independent it is

#

if you're doing what source did, then you should fix your time steps

vagrant saddle
#

I'll read up on it, but I wish I could explain why I made it frame rate dependent lol

unkempt tiger
#

you probably made it frame rate dependent because its the easiest way to go about things when prototyping shit

#

you just dont have to worry about integration and all that stuff

#

unless you had another reason

vagrant saddle
#

I just felt that it made sense that the time it should be calculating with would be the time between each frame since it's being calculated on each frame

#

because that's literally the time difference

unkempt tiger
#

that is perfectly sensible for a lot of applications

#

but not very sensible at all for multiplayer games, or competitive games that need to run at fixed speeds, etc