#multiplayer

1 messages · Page 343 of 1

civic belfry
#

hah character movement stopped replicating too. what in the hell now. it's smoother, so I know the positions of all of the rooms has to be happening client side, but something is clogging the freakng pipes again lol

#

the second they all stop moving, projectiles and character movement start working again

polar bridge
#

i think you can do a stat net

#

will show you how much is being transferred

#

i think you can also profile networking and see where exactly it's coming from

civic belfry
#

netstat looks pretty good really. probably wouldn't have looked good before doing the optimization above though. Showed me that I need to optimize my 750 doors opening and closing next for sure

#

that said, I don't think its bandwidth preventing other componants from replicating during the movement... I think its something to do with the C++ crap from the ShooterGame Template not liking what I'm doing in BP. Just a theory though

#

net profiler I mean, I used that standalone profiler

verbal slate
#

Has anyone ever worked out destructibles in multiplayer please?

#

I'm trying to implement simple wall/cover destruction mechanic but as UE4 physics is non-deterministic, outcomes are wildly different for host and client

#

I don't care for chunks or physics, I'm not looking for large scale destruction

#

Only thing I need 100% replicated are bullet holes/chipped chunks in/of walls

drowsy notch
#

I have something set up that's pretty simple, but it's just 2 states -> destroyed or not destroyed

verbal slate
#

How please?

drowsy notch
#

It might not be quite what you want, but it's a replicated actor with a DM component. The DM component doesn't actually have damage enabled, but when the actor takes any damage on the server it multicasts a destroy event with the vector that hit it, then that's used on all the clients to break the DM

#

I use it for glass railings

#

But won't work for chipping away at a wall or something

verbal slate
#

ok, so I should scale down destruction to just bullet holes if I got it right

drowsy notch
#

Yeah, you might be able to do something similar if you did hit detection on the server and replicated an event for every bullet hit but don't know if that's too much traffic or anything

verbal slate
#

I have no idea too, I'm still just toying with that idea but eventually I'll have to implement in at least some state as it's FPS in urban environments

drowsy notch
#

I reckon it'd be worth trying

#

it could work

pallid mesa
#

if you want to make world destruction, do not use destructible meshes

verbal slate
#

What should I use then?

severe stirrup
verbal slate
#

I already did and it's unusable as it still uses built-in physics system

severe stirrup
#

Any idea why when I call a function to open a door on the server, it seems that it only opens on clients? (movement glitches through where the door was originally). They only appear open on the clients because their movement is replicated, so I don't understand how they wouldn't be open on the server.

#

pretty much as simple as a door can get (script just runs on server, called from C++)

thin stratus
#

@severe stirrup You would need to show us the code that calls that

severe stirrup
#
{
    TArray<AActor*> FoundDoors;
    UGameplayStatics::GetAllActorsOfClass(GetWorld(), ADoorBase::StaticClass(), FoundDoors);

    for (int i = 0; i < FoundDoors.Num(); i++)
    {
        ADoorBase *door = Cast<ADoorBase>(FoundDoors[i]);
        if (door && door->Tier == TierNumber)
            door->Open();
    }
}```
#

called from HandleMatchHasStarted in ShooterGame

thin stratus
#

So you call this only on the Server and you hope it properly replicates due to Replication of the Door and the Components?

severe stirrup
#

Yeah

#

visually it appears to replicate properly

#

but when i run through the door there's a big glitch (I can stand either side of where the door was, but I get teleported through it/can't stand in the middle)

#

so I'm assuming somehow the collision hasn't changed on the server

thin stratus
#

Dedicated Server I assume?

severe stirrup
#

yeah

thin stratus
#

Well you have Debug Print Strings

#

where do they call?

#

Also on the Server?

severe stirrup
#

on the server

#

yeah, those ones in the screenshot above say they're on the server

thin stratus
#

Hm okay.
Would you mind printing the Relative Location on Tick (DeltaSeconds into Time so it doesn't spam)

#

And see if the Server prints the correct stuff?

severe stirrup
#

good idea, will add that now

#

yeah, positions are the same/change on both

#

client and server

#

hmm just noticed a warning

PIE: Warning: Mobility of /Game/FPSPrototype/Maps/UEDPIE_2_Arena1.Arena1:PersistentLevel.BP_Door_11 : Door_1 has to be 'Movable' if you'd like to move. ```
thin stratus
#

Then it's a different problem

severe stirrup
#

Door_1 is the frame though.. I'm not trying to move it

thin stratus
#

You sure?

#

That you don't move it by mistake?

severe stirrup
#

yeh, the whole blueprint is above

thin stratus
#

Also, next thing to check would be if you actually collide with something

#

You could set the collision of the doors off

#

And see if you still get that issue

#

If yes, it's not the doors

#

Maybe the frame has a box collision?

severe stirrup
#

yeh good point, try now

thin stratus
#

Auto Created on import

severe stirrup
#

it works as expected with collision off on the doors (no glitch)

thin stratus
#

Including frame?

severe stirrup
#

collision was still on on the frame

#

trying the opposite

thin stratus
#

I mean, there is like 2-3 things that can happen.
Doors didn't move properly: Busted
Frame has collision and blocks you: Still open
Doors have collision which don't move with the doors: Still open

severe stirrup
#

yeah, it still occurs with the frame collision off

#

so it must be the 3rd possibility you mentioned

thin stratus
#

Collision is set on the Mesh itself, or?

severe stirrup
#

the shape is set up in the mesh, yeah

#

collision on the mesh component

#

I set the frame to movable which gets rid of the warning

thin stratus
#

Can you maybe implement the hit and overlap event in your character

severe stirrup
#

but doesn't help the issue

thin stratus
#

and print the component you are hitting/overlapping?

severe stirrup
#

yeah ok, will try

thin stratus
#

Just trying to find the cause

severe stirrup
#

not sure if they'll fire on the server?

thin stratus
#

They fire for every instance of the character

#

So clients and server

severe stirrup
#

so it's hitting on the client

#

so maybe i'm thinking about it backwards.. the server is teleporting me through it because there's nothing there and my client is trying to hold me back

#

using Show Collision it looks right though

sly kernel
#

is there a guide on how to BP-code SP game in a way that would allow adding MP later down the road in a least painful manner ?

brittle sinew
#

Quite honestly, the best way is just building it for MP from the start

#

If you set up the "backend" in a way that's built for MP, you should be able to pretty easily set up a "frontend" flow that uses that code with only one player

#

I use those terms loosely—it's not like a literal backend/frontend like web development, but it's about setting up the core systems in a way that can be used however you want

inner iris
#

Is using an interface to handle damage like this acceptable vs the standard anydamage call (assuming the interface call is being called on server from the weapon that is causing damage)?

brittle sinew
#

Sure, you might have to tack a little bit of extra code on to specifically set up the game for SP/MP, but that should really only be a precursor to the core gameplay systems that are agnostic to the setting they're in @sly kernel

#

At least that's my two cents on it :p

#

@inner iris well, I don't see how you would consider it 'unacceptable', but the main draw of the default damage handling system is that it's built-in to actors

#

If you're fine with using a separate interface since you need additional parameters, sure, I don't see why not

inner iris
#

Great, thanks a lot 😃 Yeah I can see the convenience of the standard one, but if I wanted to extend it further and also not worry about things like damage type, it seems the interface is the way to go.

#

Instead of a "can be damaged" check, I can use a "does implement interface" check, and just make sure any actors I want to be damaged have one

#

Also is the event AnyDamage essentially an interface?

sly kernel
#

@brittle sinew well, was told that if I make SP without keeping MP in mind, it would be impossible to add MP later. And I am talking about technical point of view, not gameplay design.

brittle sinew
#

I would agree with the first statement, generally.

#

@inner iris I mean, it kinda functions like one, but it's essentially just a pure virtual function that subclasses of actor override to implement their own handling

sly kernel
#

thus I am asking how do I make sure MP can be added later ?

#

I was reading eXi's compendium last night and while I understand more or less client-server design, MP programming and networking is something that goes over my head

brittle sinew
#

Like I said: building your systems for MP really is the best way. A majority of your systems shouldn't care whether there's 10 people or just one

#

Most MP code should be able to work in SP just fine, but it doesn't work the other way around.

sly kernel
#

So I'd rather make SP game with (with gameplay designed with coop in mind) and if successful, hire a programmer who knows what to do with networking to add coop

brittle sinew
#

Adding multiplayer support after the fact isn't just some "drop-in" type of thing...I imagine you'd be looking at a full system rebuild for some things

sly kernel
#

I am using plugin/template that is already made for MP. But I need to add weapon system, inventory, projectiles, doors, AI, etc. and I just wonder how to make those to work in MP (I already made some systems that are SP-only for my previous project)

brittle sinew
#

Well, I think that the whole premise of making things work in a multiplayer environment might be out of the scope of a little text discussion, haha, but the gist of it is always keeping in mind the gap between the server and the client

#

You won't be able to just 'use' some logic that doesn't take that into account in SP, but using MP-designed logic should, for the most part, work completely fine in SP

sly kernel
#

I see

severe stirrup
#

@thin stratus that's a standalone reproduction that does the same thing (with just cubes)

#

definitely something to do with replication.. if I call 'Open' everywhere, it works

worn nymph
#

how do you comepensate for packet loss lag etc to make it fair in multiplayer? like when i press crouch then simulate lag on one screen the crouch is instant on the other its delayed by the packet .

severe stirrup
#

maybe you can't replicate movement of components?

#

seems like a bug that the visual mesh updates on the client but the collision doesn't

#

since it's 1 component

thin stratus
#

Relative position should be replicate though

#

Maybe the move function does it wrong

#

You could try to use a simple timeline

#

And just set the relative location directly

#

@worn nymph You process the stuff on the Server

#

If Client B lags and sees Client A crouching too late, then well

inner iris
#

@worn nymph I also wonder about this a lot but I think in general you just have to wait for whoever dropped the packet to catch up. Then any damage that has to be done needs to look at what the server saw but if you are doing client side hit detection with dropped packets I'm not sure how it would work out.

thin stratus
#

You get 2 results

#

Client B hit the head on his end, cause Client A wasn't crouching yet.
Client A and Server say "You missed" because they have Client A Crouching already

#

It's up to you what you want to do with that

#

If you allow Client B to fight that, you could open it up for cheaters

#

I usually say: If packets are lost once in a while, it happens. If the player has a constant high ping, it's kinda his fault

#

So trust the server

inner iris
#

If a player drops a packet containing shot info, as long as it's reliable, will UE4 know that it was dropped and resend on the next update?

thin stratus
#

Reliable should be TCP

#

So it should get to the Server, one way or another

inner iris
#

And unreliable uses UDP?

severe stirrup
#

I tried set relative location too, same effect

thin stratus
#

Blindly guessing ,yes

#

I didn't look into the code

#

But I know for sure that a Reliable Tick RPC blocks most ofyour traffic

severe stirrup
#

I'll just run the function on both ends and stop trying to replicate movement on them.. just seems odd that I have to

thin stratus
#

to a degree that it doesn't spawn replicated actors anyore

#

@severe stirrup As said, try to set the Relative location via TimeLine

#

If that laso doesn't work, then yeah, do an OnRep function

inner iris
#

For games like PUBG with large player counts etc, I wonder if they increased the 10KB cap that's on my default by a large amount

#

There was one custom game mode that had about 80 player characters running on screen at once and it was super smooth- no hitches visible

#

Was surprised as I thought it'd be going well over the allowed limit or showing some signs of bandwidth being exceeded

#

Those players didn't have weapons though so I imagine if they all were able to fire, it'd be a mess

polar bridge
severe stirrup
#

@thin stratus using a timeline didn't help.. replacing the door component with a 'child actor component' (static mesh actor) did though

#

so I guess if you try and replicate movement on a component, the collision gets left behind

#

thanks for the help

umbral basin
#

So, I have a problem.

#

When I start my game normally, then open it, people can connect.

#

They can see everything I'm doing, but for me hosting, I can't see any changes besides their pawn just sitting there.

heady merlin
#

are you using characters?

umbral basin
#

Well, it's VR pawns.

heady merlin
#

if not then yea...it won't be doing anything

#

you have to replicate movements

#

and hmds

#

and controllers

umbral basin
#

Yeah.

#

Which I thought I was, since they can see me fine.

heady merlin
#

no

#

server always replicates down actors and components set to move replicate

#

clients never replicate up unless you manually do it

#

also server down isnt going to be fluid enough for tracked objectsd

umbral basin
#

So what should I do?

severe stirrup
#

that's not the case in the asset i uploaded above mordertral

#

the door visually moves on the client through replication, but the collision doesn't

heady merlin
#

?

#

yeah thats what i said

#

its server down

severe stirrup
#

yeah, it's moving on the server

heady merlin
#

@umbral basin you need to replicate tracked device location and rotations from client to server, who passes it back to all other clients then

#

then you are moving it on the server side

umbral basin
#

Okay.

heady merlin
#

@umbral basin and for movement, you need to either move the pawn on the server and accept the lag, or move on client and send to the server to duplicate the move

umbral basin
#

Hm, okay.

heady merlin
#

if you aren't doing anything complicated you won't need lag compensation

umbral basin
#

I'll try to look at how to do that.

mortal cipher
#

Do anyone have any exp with Amazon Gamelift Dedicated servers

obtuse forum
#

is there anywhere specific i should put Widget commands? Player State, Player Controller, or Player Character ?

#

in steam Multiplayer

pallid mesa
#

@thin stratus i just scrolled down, i know it's been a while since you said that. But Battlefield 1 solution is kinda dope. It might be open to cheaters if they wouldn't do server side verification for second scenario (based on positions and rotations on shoot methinks) https://youtu.be/YWJGowdcwOU?t=230

What I expected to be a straight forward and simple netcode analysis turned out to be a lot more interesting and (at one point) puzzling. Maybe their even is...

▶ Play video
worn nymph
#

ok so testing player movment under a simulated lag of 200ms when the player stops moving it teleports/slides them back a tiny bit is there any way to combat this ?

inner iris
#

@worn nymph would also like to know the answer here- also sometimes during movement there are slight corrections which can be perceived as "lag" or choppiness by the user.

worn nymph
#

its only happeing on the client whose moving the other guy seeing the remote proxy doesnt see the correction

eternal anchor
#

UFUNCTION(Client, Reliable)
void ClientSetCooldownHandle(FGAEffectHandle InCooldownHandle);

inner iris
#

Though Fortnite has these issues too so it might just be down to the way things are in the movement component

eternal anchor
#

calling this function from server

#

and it is only executed on server..

#

wtf ?

worn nymph
#

if you tick that box it fixes it because it disables the correction si it must be to do with the mvoemnt component

inner iris
#

So it's completely smooth but then the server and other clients have different positions of that player?

#

There are also tolerance values you can set

#

How far it should be for a snap to happen or a correction

worn nymph
#

yeah thats what im trying to find

#

but not sure what way to tweak it

inner iris
#

I wonder if setting them higher than usual would help since it'd be more smooth for the client

worn nymph
#

i dont want to turn the correction off completely otherwise cheating

#

but just make it less snappy

inner iris
#

Yeah exactly

#

But enough to make it smooth 95% of the time for the client

worn nymph
inner iris
#

Nothing is worse than that horrible feeling of choppiness

worn nymph
#

i think its these but not sure

inner iris
#

Yeah those are the ones I was thinking of

#

Will have a play with them later too and see how it is

#

I'd almost prefer sudden instant chops than lots of small jittery smooth ones

#

But again neither way is fully ideal

#

In Fortnite it's more noticeable on the jump than movement- seems to jitter quite a bit when jumping

worn nymph
#

mine only jitters on the crouch

#

which is wierd

inner iris
#

Mine mainly on sprint or jump. If you simulate 200ms ping with variance and a small % of packet loss and drop there are a bunch of noticeable hitches every now and then

#

Would love to be able to get it extremely smooth with harsh corrections when necessary

#

I guess that's how some other games have speedhackers- they don't have the server constantly checking positions and movement

#

But they feel great as a client

worn nymph
#

thats mine with the settings 200ms and packet loss etc

short island
#

hey guys, sorry for the super basic question

#

but i have a gameinstance drawing a debug line, and i cant see it in the viewport

#

i was under the assumption that any function called on a server would apply to the clients

#

its nothing complex at all -

#

DrawDebugLine(otherAVC_PC->GetWorld(), currPC_Loc, otherPC_Loc, FColor::Green, false, 1, -1, 5);

#

AVC_PC is a player controller

#

am i missing something?

obtuse forum
#

game instance is loaded ?

short island
#

yea 😃 i've got it printing out both currPC and otherPC vectors

#

it just inst drawing the debug line

#

can debug lines only be drawn clientside or something?

heady merlin
#

yeah I just actually put up a mention yesterday about how the simulated client smoothing has some bounce back

#

its because it predicts velocity out past the last update

#

so when it receives the last replicated move with a zero velocity, it is already out past that and the smoothing lerps backwards

#

the server doesn't predict velocity since it has all of the movement inputs already so it always lerps forward into the final pose with its smoothing

short island
#

oh...GameInstance isnt replicated, is it

#

bloody hell

brittle sinew
#

Nope, each client has their own instance

#

(that persists inbetween levels; replication wouldn't really make sense for the GameInstance)

short island
#

ill get there eventually

#

i feel like this is one of those areas where i'll just...get it

#

something'll click

#

@brittle sinew so what about Worlds? Im trying to draw debug lines, but the only ones i can see are on the authority

brittle sinew
#

No, the world itself isn't replicated

#

Things that are replicated to all clients are things like the GameState, PlayerState, and any other custom replicated actor you spawn

short island
#

so what would happen if i were to call GetWorld() on a replicated actor, a PlayerController for instnace

#

instance

#

would it only return the authority's World?

brittle sinew
#

Keep in mind the PlayerController is only replicated to the owning client, not all clients

tall grove
#

@wary willow Solved why steam overlay doesnt appear in shipping build , steam_appid should be on Name/binaries/win64

brittle sinew
#

But if you make a call on a replicated actor, it gets wherever that function is executed's context @short island

#

So, if you call a multicast function on an actor and get the world within it, you get each local client's world

#

If you try to pass the world that you get on the server as a parameter into that RPC, that won't work, as the world isn't replicated

short island
#

right, ok

#

one more question - if player controllers dont know about each other, does that mean i cant replicates a TArray of <APlayerController*>?

#

would they then be nullptr?

#

sorry for all the questions, just trying to get my head around these concepts

polar bridge
brittle sinew
#

@short island sorry, went afk for a bit, but yes, replicating a PlayerController reference isn't really a thing that's possible in the framework

#

The local PlayerController would probably be valid, but the rest of them would be null

#

Though that's fairly undefined behavior, so that's just a guess 😄

short island
#

yea it makes sense

polar bridge
#

it's probably best to replicate properties on the characters, not the controller. controller should only be known by the server, and the local player

#

character is typically replicated to all clients. i think it is possible to replicate the controller if you make it always relevant, but that's probably a really bad idea

short island
#

so let me get this straight

#

i cant pass around PC's, thats fine

#

what would be the best way to call a function on another PlayerController?

#

client to client, basically

#

i understand its got to be some kind of client -> Server -> client setup

polar bridge
#

yup

short island
#

im just unsure what class i'd do the serverside stuff on

#

what class has access to every PC?

polar bridge
#

every class, really

#

so long as it's on the authority

short island
#

so if i have a gameinstance running on the listen server

#

and a player controller running on a client

#

if i cast to said gameinstance, i can run my server functionality there?

polar bridge
#

pretty sure game instance only exists on the authority/server

#

i could be wrong on that one tho

brittle sinew
#

No, each client has a GameInstance, but they're not replicated

polar bridge
#

ah, regardless...game state is what you would want in that instance. local client could send message to game state back to server, and then it could send messages to the controllers

brittle sinew
#

On the client they have no real connection to the server at all—the GameInstance is really just made to be something unique to each client

short island
#

ok cool, so if i put stuff in my GameState, i can use that for all my PC to PC stuff, right?

#

again, so sorry for the noob questions guys

polar bridge
#

you can just use a playercontroller. but it can't be peer to peer

short island
#

yea of course, i meant use it more as a bridge

#

PC -> Call function on GameState that effects other PCs
GameState -> Do something to some OTHER PC

polar bridge
#

i believe so

short island
#

right, i'll report back in 15 mins 😂

polar bridge
#

it's "always relevant" which if i understand correctly, means it's always replicated on all clients

short island
#

incase you're curious, this is for a dev test

#

im an unreal dev, but have no mp experience, do mostly corporate confention games and the like

#

there's a studio that like my stuff, and know i have no MP experience

polar bridge
#

multiplayer is a whole 'nother beast heh

short island
#

so naturally they set this as my test

#

how nice

polar bridge
#

lol 😄

short island
#

nice guys

#

they also offered me the job, though :S i think they're just trying to get me to learn MP on the double

inner iris
#

@worn nymph ah yeah I see the sliding, so it's like the client predicting a bit too far. Did tweaking the values help at all?

pallid mesa
#

@worn nymph

#

If you guys could offer Zak M footage

#

It would be so handy

#

Since Hevedy seems a lil bit burn after trying that much xD

heady merlin
#

Hevedy didn't know what he was talking about

#

he thought there wasn't smoothing at all, and there is, it is just a faster lerp than simulating clients

pallid mesa
#

Smoothing of cmc on listen server was introduced on 4.12

#

Dedi seems fine but still those hickup corrections we are speaking about are kinda...

#

I told him about 4.12 feature, but speaking with Tom Looman he said the problem was persisting and even bigger on spectator mode

heady merlin
#

the smoothing is very basic both on server and simulated client side

pallid mesa
#

After 4.12 btw

heady merlin
#

i am somewhat concerned about the smoothing behaving differently between server and client as well

#

that is actually a big nono for a lot of games

pallid mesa
#

Indeed

#

Shooters

heady merlin
#

the servers smoothing lags the character model behind by a lot, which is why it is set to a much smaller time frame

#

but that end of velocity hitch on client side from velocity prediction is just as bad, they lerp back a step when stopping

pallid mesa
#

Do you have a project big enough to provide Zak M footage

heady merlin
#

you don't need a big project

pallid mesa
#

Or just being able to elaborate?

heady merlin
#

I gave hevedy duplication steps in that thread

#

the animation graph by default covers up the lerp a lot

#

if you turn that off and make the capsule not hidden you can easily see how the lerp behaves

#

actual hitching is a different thing all together

pallid mesa
#

Considered a bug?

#

Didnt get into it that much just observed the problem in the distance

#

Im just trying to get this reported to epic

heady merlin
#

yeah, but which is your problem? The bounce back? Or warping during movement?

pallid mesa
#

Well the problem i have is mainly the ruberbanding on the animations and the bounce produced by the corrections even in low ping

#

On higher situations like 150 ms ping i would understand a reasonable jitter...

#

Again i'm not very into this so i just say what i see visually

heady merlin
#

where are you seeing the jitter? Hevedy's complaint was root mesh smoothing

pallid mesa
#

Well, movement and animations

#

For example a reloading, on local client i can see the animation perfectly on tps

#

But on remote i see it frameskipped

#

Or jitered

heady merlin
#

you are seeing skipping frames during a reload animation?

#

i've never see nthat

#

that wouldn't even make sense

pallid mesa
#

Animations like turns in place where there is capsule movement and faked mesh root

#

Causes that kinda rubber aswell

heady merlin
#

wait

#

what do you mean faked mesh root

pallid mesa
#

Check UT turn in place implementation w/o root motion

#

Check aswell tom looman survival project, i think you can appreciate It aswell

heady merlin
#

i'm not going to download his entire project, i've read over the UT source and it didn't seem to really do anything special there

#

is tom using the default mesh?

pallid mesa
#

Tbh for me movement is more important then animations

#

Yes he is

#

The first person arms are not really relevant

heady merlin
#

i say this

#

because the third person template sets up the character incorrectly

#

so does the FPS if i remember

#

so if its based off of that, there would be issues

#

or maybe just the fps template does it wrong

pallid mesa
#

No, actually its based on shootergame and used the default mesh for the tps mesh

#

But yes if we could just... Report this appropiatedly

#

Would be cool =\

heady merlin
#

i'd have to see it first, haven't seen a standing rotation issue yet

pallid mesa
#

I could show it to you personally

heady merlin
#

aight

pallid mesa
#

But even though movement is more relevant, nor rotation

#

But tomorrow or whenever you'll have a lil time ill show you some footage

heady merlin
#

because I was going to say, the video that Hevedy used to prove the survival template had server smoothing issues was taken before server smoothing was added.

#

haven't seen a current problem yet

#

nor in public released ue4 games

#

but i may have just not ran into it yet

pallid mesa
#

Well tom looman said It persisted on 4.17 ~

#

I asked him for footage

#

He never replied

#

But i trust him

heady merlin
#

its likely there

pallid mesa
#

But yeah...

echo lodge
#

Hi guys, is anyone aware of a telnet (text server connection) client made in unreal? I have a telnet game server running and am hoping to make a graphical UI to go with it. Resources on making graphics with unreal are obviously easy to find but connecting to an existing server and just receiving text from it isn't as obvious. Something as simple as a chat room client done in unreal might work

pallid mesa
#

It depends on how you want to make the chat, if you want a match chat related, you wont need any external elements aside your playerstates sending information to each other

#

If you want a persistent chat you might need to create a php/node/golang/whatev lil application and get it connected with unreal.

#

If you want the easiest then go for VaRest since its a plugin which integrates the needed features on BP

#

I didnt see this video but a quick google search lead me into it, take a look

#

@echo lodge

echo lodge
#

thanks man 😄

pallid mesa
#

Np :)

raven holly
thin stratus
#

Sometimes

raven holly
#

This is a profile from the server, trying to debug some network issues

thin stratus
#

I mean, if you have an animation that moves your aim offset

#

Or things like these

raven holly
#

I assume these are bad values lol

#

I never knew these animbp functions run on the server

#

The server doesnt really need to be playing aiming montages

#

Nor does it need to apply yaw / pitch values

#

🤔

tired solstice
#

Heys, wondering if any of you can put an insight to something. With world composition and multiplayer, I know that when running the dedicated server, all the levels are loaded up on the server, which is fine and tiles streamed in on the client will have valid collisions for the player character. But I'm wondering what the uses of or whether or not it's working the bUseClientSideLevelStreamingVolumes flag is, as I want to attempt a similar thing but having a listen server rather than a dedicated server. Enabling this and running the listen server I get the usual world compoisition+listen server issue which is that the server isn't loading up the tile where the client is, thus the client falling through the world. On the dedicated server this boolean doesn't do anything whether if it's on or off. Hmm...is it even linked to world composition at all and it's just level streaming volumes in general? I've search every where for anything about it but I've not being able to get much. This is the last step before I delve into the code and look at the general level streaming volumes.

ruby epoch
#

Iam using set view target with blend

#

for other player can spectate teammates

#

but I have 2 issues

#
  1. Camera jitering, if I increase net update it became better, but still pretty bad
  2. I cant change FOV
dense tree
#

Hey Guys, I have been working on a multiplayer game and have set up a skeletal mesh with Animation blueprint that changes animations based on player speed. It is a walk run animation blend. However when I play the game in multiplayer the mesh doesn't show any animation. What could be the problem. Can anyone help?

raven holly
#

Your speed is not replicated @dense tree

#

What value are you using in the blueprint for speed?

dense tree
tall grove
#

Try to replicate on player character blueprint

#

instead anim blueprint

tacit hazel
#

"screenshots" XD

#

so how would I go about setting up a dedicated server for my game and adding a server browser so that people can join?

sly kernel
#

so, I was told that there is a networking issue with anims that have root motion

#

is it true ?

echo lodge
#

Hi guys, I'm reading that ue4 has to send data to a third party server as uint8*. I'm a newb to this stuff, is it possible for that to look like plain text or is there a place that shows me what the actual text of the message looks like?

severe stirrup
#

@echo lodge it's just a byte, so it could be ascii, etc

hasty adder
#

@GamingBacon97#8934 you need to make a form of master server. So dedicated servers report to it its up and clients ask it for server list

#

This is kind of outside the engine work, I use varest in engine to report to a web URL which updates a MySQL and another URL that clients get the list and generates widgets in game to click to join

raven holly
thin stratus
#

@dense tree Main issue here is that you replicate the Variables in your AnimBlueprint.
That thing isn't even replicated.
Replicate them in your Character.

#

@GamingBacon97#8934 I usually don't like telling people to google, but you can find a full guide on it easily.
To compensate the google stuff: You need to download the Source of the Engine from GitHub.
Compile it, then you get the Dedicated Server option in Visual Studio.
You package your game and put the compiled DediServer executable into the Binaries folder of your packaged project.

There are a few steps in between, but yeah, that's the google part and easier to read up on instead of me repeating it.

For ServerList you'll have to either code your own MasterServer, or use a Subsystem that has one (e.g. Steam).

#

Aaaand I can't tag again

#

@hasty adder I use a simple WebAPI that has "GET" and "POST" implemented.
POST for the Server, GET for the list.
MongoDB in the backend

#

@raven holly Wääh, I hope that's not appearing in my project

raven holly
#

have you upgraded to 4.17 yet @thin stratus ?

thin stratus
#

Yeah, but no new build yet

#

Still working on the milestone points

#

Is that only on packaged servers?

raven holly
#

Would be interesting to test, im trying to build a reprodction project atm

#

Yes

#

Packaged servers

thin stratus
#

I will try to tell you, but the build won't be up until next week I guess

raven holly
#

ahh ok

#

If it does exist, then your server will likely crash when a player jumps on stuff

#

Only fix is to use windows servers

thin stratus
#

Ah it's only on Linux?

raven holly
#

Yes

thin stratus
#

Hm then I can't help ):

raven holly
#

The GC issue is both though

thin stratus
#

Our servers are all Windows

#

oh

raven holly
#

oh rip

thin stratus
#

Yeah I mean the GC issue

#

That's both? damn

raven holly
#

Oooh

#

Yes the gc issue is

thin stratus
#

Is it happening in a totally empty project?

raven holly
#

I'm doing repro projects now

thin stratus
#

Okay, I would assume it might happen if you have a lot of actors spawned and destroyed

#

If yes, maybe pooling helps

#

But the nagain you said it didn't appear pre 4.17

raven holly
#

@thin stratus I do have about 1000 actors respawning every 10 minutes or so

#

But i disabled that, and it still happens

thin stratus
#

Yeah can't be it anyway

#

It would only clear them in on every 10+1 minute

raven holly
#

exactly

thin stratus
#

Also, I thought GC is down to 30sec

raven holly
#

default is 60

thin stratus
#

Hm, okay, thought they changed that

raven holly
#

im my project settings anyway

thin stratus
#

But okay, yeah try to see if an empty project does it

#

If not, then you got a lot of work to do haha

raven holly
#

<

#

Still.. didnt happen in 4.16

#

I wonder if there's a way to dump whats inside the garbage collection array

#

Maybe it's a plugin im using

#

Maybe it's a function with a large temp variable

#

but i changed it to every 1 second, and it still hitches

dense tree
#

@raven holly @thin stratus replicating in the character solved the problem! Thanks a lot!

raven holly
#

great

inner iris
#

Doing some movement logic like only allowing sprinting when moving forwards, not sideways, which brings up this question in my head. Is the character moving essentially sending the server multiple RPC's per second to also update the input in the same way there? In that case is it reasonable to check on the client if side velocity is greater than 0, send out a server RPC to stop sprinting? Then there's also the case of the sprint being stopped from sideways movement but the player is still holding down the sprint key, so it has to resume when the side movement is 0 again, which would be further RPCs being sent fairly rapidly if constantly moving side to side while holding down sprint key.

#

It all works right now but seems like a possible excessive amount of RPCs being sent, as the input events seem to run on tick (or is this where net update rate comes into play?) bottom line is I feel I should be handling it better

hasty adder
#

Prob hafta dig into source character movment to see how it rpc the info. Far as I can tell it's just direction and speed it wouldn't nec know which direction is forward relative to its mesh. Unless the rotation is being replicated.

inner iris
#

@hasty adder from the movement input float I can get that info ( 1 = forward, -1 =backward on forward axis) (1= right, -1 = left on side axis), so the client can easily see what the value of his current input is which is enough for me, the main question is if it's normal to rpc to cancel / resume sprinting whenever the side value != 0

hasty adder
#

Depending on how your sprinting I would just be replicating a bool change to then on server see if it's available and do and stop. Like shift run on server check can sprint then do sprint type work. Since the velocity will already be on server you can likely do the logic without other replication needs

#

Sorry if I'm not following right hah, on phone at work 😉

inner iris
#

That's what I had, however then when holding down sprint while doing side movement, the bool is set to false, but when side movement stops, you don't resume sprinting and have to press shift a second time

#

Most games have it flow nicely so if shift is down and you can sprint, it'll always resume sprinting

#

I probably have to redo the server side input code, possibly could have 2 bools- "sprint is held down" and "is sprinting"

#

Only "is sprinting" gets reset when side movement is active, but then a check can run after it goes back to 0 to see if sprint is held down

#

Not sure if that makes sense but I'll give it a shot 😄

hasty adder
#

Oh I see what you mean.

#

So the false state is stopping the sprint and you must retrigger it by pressing again

#

When desired you want it to slow down then resume Sprite when it's true again

#

Sprite lol sprint

inner iris
#

I want it so that any time the player is holding sprint, it'll resume sprinting when possible without having to press shift multiple times

#

So the side movement temporarily stops sprint but if the player is still holding the sprint button down after finishing side movement, it'll resume

#

What I have works right now but I'm having trouble understanding how often the input axis logic ticks

hasty adder
#

How is your speed changed? I am able to do something like a box trigger that changes a bool for inbox on a character and have this onRep change if true max walk speed and false change WalkSpeed to base speed

inner iris
#

As it would mean I'm sending a lot of RPCs per second if it runs through the logic frequently

#

The speed is just changed by setting the sprint logic to false

#

So it reverts back to normal walking speed

#

When moving sideways

#

But then I have to recall the sprint speed logic again if the button is still held down after

#

Which seems to require a constant check

#

And that doesn't seem very efficient

hasty adder
#

Something on how the change is happening is causing that. Sounds to me anyway.

#

And I'd be studying how it takes you out of sprint for the answer what condition is changed that it can't find its way back while holding the key like a one time check on the shift key to say it's possible vs not

inner iris
#

Agreed, however I'm finding it hard to see where a one time check is possible, as it seems all input events tick, so there'd be a constant check

#

I could probably make sure no RPCs get called unless there's a definite change though for sure

#

Right now it's basically constantly checking if the side movement is active, if so , it runs a constant sprint stop RPC

#

Gotta just turn that into a repnotify bool I think so it only triggers once

#

Thanks for the help 😃

hasty adder
#

O/

wintry cove
#

Anyone an idea? After a seamless travel the game is stuck in WaitingToStart? Tried turning off my ReadyToStartMatch with and witout delayed start, I made sure I call all parent functions, both gamemodes have seamlesstravel to true.

wintry cove
#

Oh nice gg engine

#

engine is drunk

#

told me there were compile errors in the log a bit higher

#

but in-engine there weren;t

#

not even after pressing compile a few dozen times

#

so I reboot and there are the errors

inner iris
#

Not sure if anyone is interested, but the same guys who did the popular UE4 C++ course on Udemy are in the process of making a new course specifically on C++ multiplayer in UE4. They have forums for suggestions which are quite empty overall which affects their enthusiasm to go more in depth than necessary (especially exploring integrating services like Gamelift.) Worth making a comment or two on what you'd like to see or add to the existing Gamelift thread if you are interested in that, as they said they'd only go further than Steam integration if they saw an interest: https://community.gamedev.tv/t/hosting-multiplayer-game-on-server/42368

#

Seems like a pretty good opportunity to get a pretty good MP course if we show that there's definitely demand- their general C++ course is quite good.

#

Don't want the Unity users to convince them to half ass this one and do a fully fledged Unity MP course instead!

wary willow
#

Gamelift should definitely be something way late

#

You don't need to overwhelm anyone with useless info if it's not needed in their games

inner iris
#

Absolutely

#

I mean to basically start slow, they usually divide their courses into multiple small projectgs

#

So Gamelift would be the absolute last step

wary willow
#

You said to use Gamelift as the main topic

inner iris
#

A big bonus if anything

wary willow
#

....

#

For the main game

#

Which is wrong 😃

inner iris
#

Nah, I mean to go through everything and then finally use Gamelift as a service to host for the final game example- it'd still need to use steam for all the actual social stuff, no?

wary willow
#

Well

#

First you need to know about Dedicated Servers and their logic

#

then Gamelift

inner iris
#

Yeah absolutely

wary willow
#

Babysteps

inner iris
#

Small things, one step at a time

#

I just mainly wanted to drive home that most tutorials go over setting up a single dedicated server instance then are like "ok great job cya"

wary willow
#

Well, it's not like Dedicated Servers are an overlycomplicated subject

inner iris
#

On paper Gamelift seems like a great service that'd scale nicely, but I'm just a noob that would like to see that in the course is all 😃

#

Not every game would need such a service for sure

wary willow
#

You do realize the costs of Gamelift right?

#

I think people think it's super cheap or free

inner iris
#

If they left it at steam, it'd be P2P? There'd always have to be a server provider right?

wary willow
#

P2P?

inner iris
#

Sure but the thing with Gamelift is you wouldn't have to spin up 50 servers

#

You'd spin up as many as needed dynamically

wary willow
#

Have you never built a Steam Online Game before?

inner iris
#

Nope just been connecting directly to servers

wary willow
#

I don't think we're on the same page 😉

inner iris
#

Like I said, I'm a noob

#

But steam doesn't provide servers, correct?

#

Just handles friends, invites and finding sessions

#

?

hasty adder
#

Right but you can use steam and your own means of server browser etc. and your own master server/matchmaking server. Game lift might be an all in one solution but you can still work with other services to spin up and scale. The cost likely is more in the long run as it's an all in one solution like gamesparks

inner iris
#

Got it, thanks for explaining 😃

#

The main reason I even made the reply was because they said they were planning on using Photon for the servers, and from all services that I'd been looking at, Gamelift definitely seemed the most appealing. They also said Amazon are eager to work with them on that, so why not! If the steam setup is fully explained and integrated, may as well go a step further for anyone who is interested in it!

#

I'd imagine it may take a lot more work/specific knowledge to get your own custom solution working, whereas Gamelift is marketed as doing a lot of the difficult work behind the scenes which I think fits in with a lot of UE4's strengths- you don't need to be a graphics programmer to use all of the rendering tools etc.

#

Anyway regardless of what anyone wants specifically, it seems like a great opportunity to get any suggestions in to them as it's not often there is a very comprehensive UE4 course made, and even more so regarding multiplayer!

hasty adder
#

Coolness 😃

neon mango
#

Hey guys for calling some value like GetAxisValue() how do I call that locally only without having other instances of the clients attempting to call it (since its really only worth calling locally).

#

Right now for example, the client side instance of the servers player will attempt to call that and cause a crash.

#

Is this as simple as wrapping it in a Role == Role_Authority?

#

I fear that won't really solve the problem for clients player instances of other clients?

merry tapir
#

guys quick question. I am pretty noob, but I was wondering do optimized vfx cause any lag during networked play? Its all rendered on the client, but do crazy particles ever cause issues with online play?

glad sedge
#

if it's just rendered on the client then it shouldn't have any latency issues.

merry tapir
#

ok sweet thanks

glad sedge
#

I'm not an expert however ! But it'd be really weird if non-replicated particle effects impact bandwidth in any form. It just shouldn't.

surreal prism
#

Hi, some one know why Linux Dedicated Server build as Single Binary ?

twin sorrel
surreal prism
#

One Executable file ~700mb, it is ok?

#

@twin sorrel 2 instances on server and two on client?

twin sorrel
#

oh

#

if i set the positions of a ccharacters camera and set active etc on a server event.. will it be replicated to the client?

worn nymph
#

@inner iris although the course was good they take the mick. The original kickstarter that we all backed included multiplayer to begin with and was the only reason I pledged so much money I already know pretty much everything they covered c++ wise in the course so was only interested in the multiplayer aspect which they deliberately used as a big selling point of the course . Then after we reached all funding goals they changed it to be as a stretch goal target which meant we had to pledge more money to get it which we then all funded to well over 100k+ . Then halfway through the course they realised they bit off more that they could chew and backtracked and said oh now we will make a separate course for the multiplayer and it will be free to all pledgers of this course . Then rather than making the course they decided to make the backers wait 3 years while they made a separate unity course on making an RPG . And now they are saying we have to PAY again for the new course which we already paid for. Not to mention half the stretch goals we funded they never did including VR. Same with the RPG course they left it buggy and not complete didn't give us all the goals .

wary willow
#

AWS... Per second charge...what... Save me some mint please

radiant crag
#

How do I stop the editor from auto-connecting to the dedicated server, I want it to go through a login process

#

I can't see any familiar options in the advanced settings to disable auto connect

eternal anchor
#

AWS even with per second charge, probabaly still more expensive than Azure

#

and Azure offers lots of nice frameworks to work with

radiant crag
#

How the hell do I disable the dedicated server autoconnect feature with PIE, I went all through Advanced play options, can't see nothin

worn nymph
#

@radiant crag it's in maps and modes expand some of the advanced option arrows and there is a tickbox

radiant crag
#

ok thanks

#

Project - Maps & Modes correct?

worn nymph
#

Yeah think so I'm not at pc

radiant crag
#

Hmm, don't see it, do you remember what it is called I can just search for it

worn nymph
#

Screen shot the settings window

radiant crag
#

The Play one or everything

worn nymph
#

The maps and mode

#

In project settings

radiant crag
worn nymph
#

Hmm thought it was there what about just project settings ?

radiant crag
#

Like all settings?

worn nymph
#

Editor Preferences > Play > Multiplayer Options, disable Auto Connect To Server

#

@radiant crag you find it?

inner iris
#

@worn nymph wow I had no idea they did that- I got the course much later after the kickstarter. Sounds really cheap to me... all the more reason to poke them with as much potential content as you can think of so they won't just do the bare minimum and stop there (but going by what you said, they probably will anyway)

worn nymph
#

@inner iris yeah . The thing is the course is actually very good and well worth the money and I recommend it to everyone the bit that annoys me though is the original course was already funded if they had stopped there no issues it's the fact they added stretch goals took more money and then didn't do as promised hopefully they won't make this mistake again on this next course and I wouldn't have pledged as much as I did if I knew it was only really going to be a beginner intro to unreal c++

inner iris
#

I got it for €10 and can definitely agree that it is worth it, but it's really shady that they added extra stretch goals and didn't even fulfil them. definitely hope they don't try to do the same thing here and do a super basic overview on replication + RPCs and try to finish it up there and go do another Unity course.

#

They said their effort is basically proportional to how much "pull" they get from people

worn nymph
#

I've been burned by them twice so I've lost confidence they will actually deliver on what I expect so I'm not going to invest any more money in supporting them . I will just wait until the whole course is out and then make a decision if I think it's worth it then

inner iris
#

Good call! Sam said that custom movement and client side hit detection / server validation are both two topics from his design doc, so we will see if they are actually implemented, could be pretty interesting if it's going beyond the basics!

twin juniper
#

can you make multiplayer with paper2d?

primal cypress
#

Hello guys, im in need of help!!! When i try to Add UI to viewport, only the server client adds it properly. Im calling this from the HUD class, so everyclient is calling this function.

tacit hazel
#

is there an easier way to make a dedicated server other than chaning files and lots of rebuilds? shouldn't there be a built in feature for this?

hasty adder
#

As far as I've done it involves having a server target ensuring both dev editor and server compile with source and then you can just use front end

wary willow
#

@Babybelly#5572 yes

tacit hazel
#

excep tmoving is extremly slow

tacit hazel
#

I must go, howveer if you can help please @mention me

twin sorrel
#

if someone can help me network a function that is not working for me, please DM me

radiant crag
#

@tacit hazel Which template did you use for your game?

neon mango
#

So I'm confused about the use of DeltaSeconds via networking. If I have a method that uses DeltaSeconds from the client when the client executes a move but the server is going to execute that action on their end then the deltaseconds is going to be different between client and server. Does that matter or am I overthinking this?

fossil spoke
#

You shouldnt be to concerned with DeltaTime in relation to networking. The DeltaTime is the time it took for the previous frame to be drawn on that machine. So every client and indeed every instance of the game will have different DeltaTimes based on alot of different factors. Its relation to networking is minimal. I dont think you should worry yourself to much.

neon mango
#

only concern is if deltaseconds is used to have a fluid movement then when the server actually does the moving of the client then the servers deltaseconds won't match the c lients and the movemen will feel off

#

I'm about to test some code out but this is a concern of mine.

#

I've implemented a new movement mechanic that needs deltaseconds

#

and It works great locally just trying to figure out how to get it replicated correctly

#

Also for USTRUCT Replication can I just do USTRUCT() or is it USTRUCT(Replicated) ?

eternal anchor
#

you don't replicate movement

#

you let server simulate it

#

and then there are two ways out

#

server is fully authorative and if client simulation deviate to much , server will override it

#

you can do it by interpolation or by just straight up teleporting actor to server position

#

or you can make client authorative, where server just accepts client position and then send it to other players

half fog
#

Its best to make the server authoritative, authoritative client will allow all kinds of cheats

#

I found this to be very helpful

plain flume
#

How does thw MP work in this scenario: I have a logic that allows pawn to grab ledges. When grabbed movement mode and enum variable is changed. Now I host a dedi server and some player is hanging on ledge when new player joins. I recall that variables arent replicated immediadely.. so how does the new player sees scenario? Will the pawn behave correctly or what?

#

because the default behavior would be that character walks, so he would fall down.

slim holly
#

initial replication should hold the ledge grab enum value

wide valley
#

I have a quick question about performance: I created a moving platform ( very simple ) and I have it replicating movement etc. Server it looks super smooth in its movement but the client windows seem to be very choppy. Is this something that can be avoided? It would be very bad for a multiplayer game experience to have this seemingly large frame loss.

slim holly
#

obviously it's updated on server at the pace of framerate

#

but clients don't get that location update that often

wide valley
#

is there a way to make them get it more often or have clients have more predictive locations so its smoother?

tall grove
#

@wide valley you can simulate on client instead replicate movement

#

like Custom event Called start movement with multicast

slim holly
#

trick is tho, how do you sync it

wide valley
#

Maybe when it changes direction ( in teh back and forth movement ) those messages come from the server

#

but the movement is just happening otherwise?

slim holly
#

assuming the end points are static, I would go as far as setting a waving lerp value for the movement

#

then replicate the float

#

and add interpolation on server side

#

then you could use non-reliable replication to keep it synced

wide valley
#

that makes sense

slim holly
#

just make sure it's bound to deltatime, you dont want framerate difference to mess up the location

wide valley
#

Thanks I will run some tests with this, I appreciate the insight ( sorry for the noobie quesiton ) only been at this a few weeks

plain flume
#

Can somebody explain this also.. I have a Tick. In Tick we are checking trace that tells us, if we are running the climbing function. Should I create the Multicasting just in case in scenarios like this or will it just overload server for nothing? I mean, i know the server has it's version of game and it will change the replicated variables without the sepeare command from clients to run that specific thing through server. So should I remove the server command in this case?

#

What I tested, everything works normally if the climb function is run after delay without anything else, but i'm not sure if it will cause problems when clients are joining with drop-in system

polar bridge
#

you have a tick calling a multicast?

#

probably not a good idea sorry to say, better off replicating a variable something like "bIsClimbing" then use a OnRepNotify

#

or just check that boolean on tick on both server and client, something like that

tacit hazel
#

Development @radiant crag

tacit hazel
#

so I just followed a tutorial for building a dedicated server, adn everything works fine but

tacit hazel
#

this function if (Value != 0.0f) { AddMovementInput(GetActorForwardVector(), Value); } works fine until I connect to the dedicated sever, then movement becomes extremly slow

tacit hazel
#

I serisouly cannot explain it, as soon as I type: open 127.0.0.1 the character spawns and moves extremly slowly

tacit hazel
#

can anyone help? or point me into some way I could find out whats casuing this?

jolly siren
#

have you verified your speed on the server?

tacit hazel
#

what do you mean "verified my speed"?

neon mango
#

If I'm writing code to change how a character moves, is it enough for the server to control that or do I have to do something else as well? I'm thinking if the server executes the command to move a person a certain way that would sync up with all the clients since the position is replicated. But I'm not sure.

fossil spoke
#

If the server changes an replicated variable then all clients will recieve that change.

neon mango
#

so client calls a method AirMove() and inside that I call AirMoveServer() which calls AirMove() in there but server side, then AirMove needs the input direction the Client pressed which I've attempted to replicate by Replicating an FVector and which the client sets when they call AirMove first. But debugging server side, the FVector doesn't seem to be getting synced up

#

@fossil spoke So what happens if the client changes the variable and I have DOREPLIFETIME set on the variablel?

#

It was my understanding it would update for the server if the client changes it. This not the case?

#

"Variables are only ever replicated from Server to Client, " well there's my answer

#

gotta use replicated function

fossil spoke
#

Variables are never replicated from Client to Server

#

You need to send an RPC from the Client to the Server with the values you require.

neon mango
#

Yea so I have a method client side call SetMovemetnDir

#

I guess that needs a server version

#

that takes in the values I care about, in this case an FVector

#

and I guess I have to pass the Actor as well

#

to know who to set it too

neon mango
#

@fossil spoke Made progress, works client side now but doesn't feel quite right and seems to induce lag at times.

#

Going to pass in the deltatime from the local client to the server as well so when the calc is done it hopefully will do it in terms that feels right to the client

#

As for the lag that may be because I'm calling the method onTick, so not sure what I can do there.

neon mango
#

Hmm managed to get Outgoign reliable buffer overflow

#

Guess I'm sending out more than what can be reliably sent

thin stratus
#

@neon mango Tick + Reliable RPC, is a nogo

pallid mesa
#

Lol noooo

#

Never reliable on tick

#

If you need to have a gameplay mechanic updated very frequently and it is indeed very relevant i would do it client side and do "corrections/verifications" on the server at a times lerping from the last position, ie: hard targetting system on MP

neon mango
#

So I've nearly solved how to replicate this Air Control buisness across the network. What i've done is on key press and release of A,S,D,W I send overr the axis values to the server so that the server can calculate the air control of the client. This seems to work but not 100% all the time. Do I need to implement some Client Side Prediction on top of Unreal's native CSP for the users position?

chrome bay
#

I don't suppose anybody has a nice way to send arbitrary binary data via an RPC do they?

#

UE4 doesn't support polymorphism for RPC's (or much else)

#

So I want to convert my 'struct' to binary, then just cast it on the other side.

#

Each class can then have a void* CastToType() function which returns the data properly

twin juniper
#

I was trying the exact same thing for hit detection in a personal project of mine but had 0 luck myself

#

clientside*

chrome bay
#

bugger. okay.. out of interest how were you sending the data?

#

I'm looking at FArchive

twin juniper
#

I was just using a regular ustruct I think

#

Couldn't cast it back on the client end, would always lose data (I think sometimes the data would even come out incorrectly)

#

If you do figure something out, lemme know! Haha

chrome bay
#

lame... okay I'll keep experimenting

#

all I can think of right now is havign a struct that contains everything i'll ever need, then overriding netserialize

#

but not sure if that'll work too well

dull jasper
#

mesh out of sync on late join is on the fixlist of 4.18

hasty adder
#

I've experienced that in 4.17

#

Mesh be like 3 feed behind its actual location haha

#

Feet

dull jasper
#

seems like its actually fixed in the preview

#

the mesh walked out of the capsule so it got really funky

neon mango
#

Alright guys, I'm assuming Unreal natively does Client Side Prediction?

#

And other position interpolations to make player movement feel smooth?

brittle sinew
#

The CharacterMovementComponent does smoothing, but AFAIK, it doesn't do prediction

#

The GameplayAbilities system does have some sort of prediction, but that's a very specialized-use-case system

neon mango
#

So in theory, if the position and rotation of a player feels great from Unreals native optimizations, then anything I do to manipulate player movement server side should work as good assuming I provide proper client inputs to the server?

brittle sinew
#

I'm not sure I'd be able to definitively say it will be as good; there are a lot of variables in play, but yes, I imagine it will still take advantage of that smoothing

#

Keep in mind the smoothing is on the CharacterMovementComponent specifically—not UE4 as a whole

#

(there may also be other things with smoothing built in, not super sure)

dull jasper
#

hmm just replicated 8k bullets with hardly any lag, last version it started to go all funky on 3k

cedar finch
#

So I was messing around and made a simple Golf game and was wondering if its extremely hard to make it multiplayer? I've read over and watched several tutorials on replication but I don't think I'm doing something right. I have my golf ball set to a Pawn and I set 4 player starts but when I play player 2 is sometimes in the ground and neither of them see each other move. So basically i'm just wondering if anyone can explain playerstarts and multiplayer?

timid pendant
#

How can I save the value of a variable in a dedicated server and keep it persistent until the server is destroyed

neon mango
#

@cedar finch I"m assuming the actors are set to replicate movement?

fossil spoke
#

@timid pendant Use the GameInstance class.

chrome bay
#

CMC does do prediction

#

Only for movement, of course

#

Also, if those 8K bullets are actors - forget about it in a real-world connection.

chrome bay
#

Anybody know how actor pointers are serialized?

#

Self-explanatory screenshot to show what i need to do...

dull jasper
#

it was a real world connection

dull jasper
#

they just dont do verry much atm 😛

thin stratus
#

Okay so, what are your prefered ways of testing steam stuff?

#

I do have a second PC, but really not looking forward to freaking port the game over to that pc after each change

#

Isn't there a dev mode in which I'm allowed to start two games with one account?

#

Or have 2 accounts on one pc

#

(without VM)

twin vault
#

theorically if my website has a ssl certificate, and im sending a post via ue4, its automatically safe?

#

not sure if i have to configure smth else

eternal anchor
#

Actor pointers are not serialized

#

the is underlaying net id, which is represented by GUId

#

when you send actor trough RPC, that actor must be mark as replicated

#

and what is send under the good is that GUID

heady merlin
#

@brittle sinew Character movement does Simulated Client prediction, only minimal though, it just projects with last known velocity.

twin juniper
#

my simple move to location results with following velocity values...

#

local client :0,0,0,17,0,34,19,56,38
remote client: 0,10,20,30,40,52,63,76,87
dedicated server: 0,10,20,30,40,52,63,76,87

#

notice how the local client is jerky... this jerkines screws up my idle/walk/run animation

#

anyone knows what could be the problem here?

chrome bay
#

@eternal anchor yeah that's what I need, so I can restore the pointer on the other end manually

#

I just want to serialize the GUID then get the actor again on the other end. Basically trying to hack my way around polymorphism

hasty adder
#

@thin stratus I think you'll be stuck using vm if you don't want to copy to another machine. 😦

#

Testing peer to peer?

timid pendant
#

How can I get the ip and port from a dedicated server? Is it possible in blueprints or c++

thin stratus
#

IP from a Dedicated Server is usually not the easiest thing

#

The Server itself doesn't know it's outside IP

#

It would need to ask a Service via HTTP Request to query its own IP.

hasty adder
#

Vejay you need this info for what mate?

#

I know how to get the port but getting the Internet address there are workarounds if your using on the receiving side of data if your aim is to get its ip for listing servers on a makeshit master

thin stratus
#
void APBGameSession_Base::RegisterServer()
{
    Super::RegisterServer();

    UE_LOG(LogTemp, Warning, TEXT("GAMESESSION - RegisterServer - START"));

    FHttpModule* Http = &FHttpModule::Get();

    FString URL = "https://api.ipify.org?format=json";

    TSharedRef<IHttpRequest> Request = Http->CreateRequest();
    Request->SetURL(URL);
    Request->SetHeader(TEXT("User-Agent"), TEXT("X-UnrealEngine-Agent"));
    Request->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
    Request->SetHeader(TEXT("Accepts"), TEXT("application/json"));
    Request->SetVerb("GET");
    
    Request->OnProcessRequestComplete().BindUObject(this, &APBGameSession_Base::OnGetPublicIP);
    Request->ProcessRequest();

    UE_LOG(LogTemp, Warning, TEXT("GAMESESSION - RegisterServer - END"));
}
hasty adder
#

😃

thin stratus
#
void APBGameSession_Base::OnGetPublicIP(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
{
    if (bWasSuccessful)
    {
        if (Response.IsValid())
        {
            int32 ResponseCode = Response->GetResponseCode();
            UE_LOG(LogTemp, Warning, TEXT("StatusCode %d | Content %s"), ResponseCode, *Response->GetContentAsString());
            if (ResponseCode < 300 && ResponseCode >= 200)
            {
                FString ResponseString = Response->GetContentAsString();
                FString RemoteAddress;
                ResponseString.Split(":", nullptr, &RemoteAddress);

                RemoteAddress = RemoteAddress.RightChop(1).LeftChop(2);
            }
        }
    }
}
hasty adder
#

Clever bounce it back

thin stratus
#

Was the only thing I found online: "Ask a Website via HTTP Request"

#

So i did

timid pendant
#

Im just trying to find a way to register my dedicated servers with their own ip and port to distinguish them from each other . I have the master server setup already.

thin stratus
#

I posted you above

#

How to do it

#

The Dedicated Server can't find out its own IP without something like that

#

I only knows his private ip

timid pendant
#

OKay thanks but if I have a couple of dedicated servers how would each be able to retrieve their own ip from the master so they distinguish themself

hasty adder
#

Meaning? Usually server reports itself and only need worry about itself

#

This is a Gamemode I use as the parent to my gamemode for as far as making an exposed bp function to get port from null oss

thin stratus
#

@timid pendant Every DediServer that performs this request gets the Public IP of the Router he sits on.
If you have multiple Servers on the same Public IP, they are using different ports.

timid pendant
#

I mean like how would it know its ip to query from the master

#

Oh okay thanks guys

thin stratus
#

For our game we had 2 AmazonServers, EU and NA.
They had 2 different public ips

#

And 10 servers running on them

#

Port 7777 to 7786

#

Or so

hasty adder
#

Master receives heartbeats it doesn't request them

thin stratus
#

Yup, Server tells master server "HI I'M HERE!"

#

You would do that in the GetPublicIP Response

#

I removed that part from the code above

#

So you need to know the MasterServer IP upfront

#

That's the only one that is kinda hardcoded

hasty adder
#

Think non reliable rpc event to update a timer from gamestate to all players is ok to run every second? 😃

thin stratus
#

Naaaaa

#

I would do an RPC that starts the timer

#

Clientside

neon mango
#

So I'm having a hard time figuring out how to smooth my custom air control. I've been reading online on methods to make the clients movement feel more smooth with latency but what is setting me back is this idea that Unreal must already be doing that for the player movement/position/rotation and thus why would I have to try to smooth it myself? Normal movement is already really smooth, so I figure anything that changes the movement would also have to be really smooth, no?

#

And anything I do come up with to smooth my AirControl would just come down to players position or velcoity which again Unreal is already handling.

#

And yet my Aircontrol suffers from 100ms ping client side. So clearly I need to do something...

hasty adder
#

How about people who join mid timer?

thin stratus
#

Didn't know you had join-in-progress

#

Well usually when doing simulated timers, I sent the UTC now time

#

So they can start the timer with the ping difference

#

I guess you could replicate a struct with UTC now time and a boolean or so, and start the timer in repnotify

#

That would also call for in progress joiners @hasty adder

hasty adder
#

Hmmmm

twin juniper
#

Hey when you create a component dynamically

#

if i just create it in the server in a Server RPC

#

its not even calling beginplay

#

on that component

#

am i doing this wrong?

#

lol

abstract aspen
#

KoS | poet - Today at 12:09 AM
Started a Project in third person mode, Then added Height maps for terrain during this i Added 2 player controllers and multiplayer launch but i decided to resize the height map and deleted the old player controller spawns and added new ones. When i hit play the character still spawns at old location and not at new location
https://gyazo.com/e2b28c43aac7b182dc63298100e7fbd9

https://gyazo.com/b62c474371ff9e4780d537cc62cde36e

https://gyazo.com/938eae9e14f632bf21cb475a702e020f

wary willow
#

Last image is useless

#

And use network spawn points

#

Otherwise actually write out the spawning logic if you haven't already.

neon mango
#

When attempting to lerp velocity from current calculted velocity on client to actual calculated velocity from server would it be wiser to adjust the position as well ?

cloud ledge
#

I would suggest avoiding direct adjustments to position

#

To prevent weirdness and jumpyness

#

In our game, instead we reset velocity to known velocity and then add an extra correcting impulse that pushes the object closer towards the true position

neon mango
#

I would prefer that as well @cloud ledge its just that a lot of the networking smoothing advice seems to deal with adjusting the position directly.

#

So what I was trying to do was lerp from the current calculated velocity client side to the actual replicated calculated velocity server side

#

But that causes a slowing down effect of the velocity

#

That is an interesting way to "correct" the velocity

cloud ledge
#

Ultimately (but it's not the kinda approach we use yet), it'd be velocity = velocity_from_networked_packed + correction_velocity + f(acceleration_from_networked_packet)

#

To compensate for both presence of presumed-constant acceleration and difference in position

neon mango
#

@cloud ledge but this pushing that you are doing is it push the server more towards the clients true position or push the client more towrads the servers true position?

cloud ledge
#

Push client more towards servers true position

#

In our case, it's presumed that the server or the data source (authority which may not be the server) has the true value

neon mango
#

and the correction value is calculated as just the difference between the servers velocity and clients velocity?

#

well that wouldn't make sense I guess because then it would just be like setting the value = to the servers velocity

cloud ledge
#

The simplest correction is computed as "factor*(server_pos - current_client_pos)"

#

The correction factor is computed based on difference in position (this represents an extra impulse or extra acceleration that attempts to bring the object back into its true position)

#

The velocity is set to velocity from server plus extra bit of velocity to try and correct the position errors subtly

neon mango
#

oh I see

#

@cloud ledge thanks for that tip

neon mango
#

@cloud ledge is factor here some arbitrary value that feels good?

cloud ledge
#

Yes

neon mango
#

ah alright

#

so it sounds like you are trying to add to the client velocity from what I read but I think it makes more sense to subtract it back to servers?

#

Oh I guess that is what you mean by push clilents to server, that would have to mean subtract it back

cloud ledge
#

Push positions as seen by client towards positions as known definitely by server

#

The velocity of objects on client are reset to velocity known to server, but this velocity is also modified to provide correction in position without resetting position

#

This is for objects not directly controlled by player (not players movement capsule)

#

But for player similar stuff works too

plucky mountain
#

Anyone know how to set up a follow spectator In MP? I tried using View Target but it movement was very jerky as the player being spectated turned left and right the camera would skip steps and snap into place.

wispy silo
#

TL;DR replication for MoveTo

timid pendant
#

Hello my dedicated server crashes from this code

#

[2017.09.23-14.07.51:641][ 0]LogWindows:Error: FPSTemplateServer.exe!AGameModeBase::InitGame() [c:\unrealengine-4.15\engine\source\runtime\engine\private\gamemodebase.cpp:70]
[2017.09.23-14.07.51:642][ 0]LogWindows:Error: FPSTemplateServer.exe!AGameMode::InitGame() [c:\unrealengine-4.15\engine\source\runtime\engine\private\gamemode.cpp:72]
[2017.09.23-14.07.51:642][ 0]LogWindows:Error: FPSTemplateServer.exe!UWorld::InitializeActorsForPlay() [c:\unrealengine-4.15\engine\source\runtime\engine\private\world.cpp:3347]
[2017.09.23-14.07.51:643][ 0]LogWindows:Error: FPSTemplateServer.exe!UEngine::LoadMap() [c:\unrealengine-4.15\engine\source\runtime\engine\private\unrealengine.cpp:10192]
[2017.09.23-14.07.51:643][ 0]LogWindows:Error: FPSTemplateServer.exe!UEngine::Browse() [c:\unrealengine-4.15\engine\source\runtime\engine\private\unrealengine.cpp:9495]
[2017.09.23-14.07.51:644][ 0]LogWindows:Error: FPSTemplateServer.exe!UGameInstance::StartGameInstance() [c:\unrealengine-4.15\engine\source\runtime\engine\private\gameinstance.cpp:416]
[2017.09.23-14.07.51:644][ 0]LogWindows:Error: FPSTemplateServer.exe!FEngineLoop::Init() [c:\unrealengine-4.15\engine\source\runtime\launch\private\launchengineloop.cpp:2538]
[2017.09.23-14.07.51:645][ 0]LogWindows:Error: FPSTemplateServer.exe!GuardedMain() [c:\unrealengine-4.15\engine\source\runtime\launch\private\launch.cpp:155]
[2017.09.23-14.07.51:645][ 0]LogWindows:Error: FPSTemplateServer.exe!GuardedMainWrapper() [c:\unrealengine-4.15\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
[2017.09.23-14.07.51:646][ 0]LogWindows:Error: FPSTemplateServer.exe!WinMain() [c:\unrealengine-4.15\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]

#

I believe its errors in my gamesession class and header

thin stratus
#

We need the top line of that crash log

timid pendant
#

[2017.09.23-14.07.51:637][ 0]LogWindows:Warning: CreateProc failed (2) ../../../Engine/Binaries/Win64/CrashReportClient.exe "C:/PROJECTFURYGAME/Workspace/ProjectFury/Saved/StagedBuilds/WindowsServer/ProjectFury/Saved/Logs/UE4CC-Windows-AE1D83CE485FB78DD30B3596894EB8B9_0000" -Unattended -nullrhi -AppName=UE4-ProjectFury -CrashGUID=UE4CC-Windows-AE1D83CE485FB78DD30B3596894EB8B9_0000 -DebugSymbols=......\Engine\Intermediate\Symbols
[2017.09.23-14.07.51:639][ 0]LogWindows:Error: === Critical error: ===
[2017.09.23-14.07.51:639][ 0]LogWindows:Error:
[2017.09.23-14.07.51:639][ 0]LogWindows:Error: Fatal error!
[2017.09.23-14.07.51:640][ 0]LogWindows:Error:
[2017.09.23-14.07.51:640][ 0]LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
[2017.09.23-14.07.51:641][ 0]LogWindows:Error:

#

Here is the top

timid pendant
#

The problem is with this code in my basegamemode.cpp file TSubclassOf<AGameSession> AFPSGameMode::GetGameSessionClass() const
{
return TSubclassOf<AGameSession>();
}

#

In the basegamemode.h file the code is virtual TSubclassOf<AGameSession> GetGameSessionClass() const override;

#

I did this so that my gamesession can be overridden to properly be set as the gamesessionclass and work on the dedicated server

brittle sinew
#

AFAIK the default constructor of TSubclassOf doesn't set the internal UClass*—does return TSubclassOf<AGameSession>(AGameSession::StaticClass()); work?

#

I know it's a little verbose, but I think that might fix the issue

#

@timid pendant

#

And actually, you might even just be able to do return AGameSession::StaticClass();, as it should implicitly call the correct constructor

#

Didn't think of that initially

timid pendant
#

The dedicated server works now but nothing from gamesession appears nor does it return the gamesession

brittle sinew
#

Okay, so I'm a little confused as to what this code is attempting to do then

#

Are you trying to use your own custom game session?

#

If so, even as you had it originally, that wouldn't use your custom one

timid pendant
#

Yeah im trying to use my custom game session. I thought overriding it would work

brittle sinew
#

Okay, so go return MyCustomGameSessionClass::StaticClass(), or get the UClass* from a property you set in-editor

timid pendant
#

I put this code in my gamemode.cpp so that it knows which gamesession to use and this didnt work so i tried override GameSessionClass = AGameSession::StaticClass();

#

okay

brittle sinew
#

Sure, but if you're just using AGameSession that's the default one

#

I thought that was what you were going for with your initial code sample

timid pendant
#

Ohh my custom gamesession set that as the public class to be called from anywhere. I guess i should change it to something else

ruby epoch
#

yo, Iam using set view target with blend for player spectating and on tick

#

first node for aim offset

#

second for replicate camera for spectator

#

and in spectator mode game stuttering

#

any ideas?

lilac egret
#

that create/find/join session system only works locally?

ruby epoch
#

not

#

you need to set up onlinesubsystem

#

like steam

#

or create your own

twin juniper
#

is it more developing then u want a lot players?
to have them logistically at the same time

ruby epoch
#

usually not

#

but you should try to avoid such things like get all actors of player class etc

twin juniper
#

ok

#

?

inner iris
#

My character movement component seems to be snapping the character back by a very small amount after moving under specific conditions. It only seems to happen when playing in editor as a client with the run dedicated server box checked in fullscreen / immersive mode + 200 ms simulated latency. When played in a smaller window, the snapping doesn't appear to happen. This isn't the smoothed server correction as I played with the settings for a long while but the snap was identical and always an instant or series of harsh but very small instant movements. It's so small that it barely updates the position of the pawn mesh (only a few cm), but is noticeable enough to the camera movement to make the game feel less smooth as it happens every time you stop moving. I guess the main question I have is- are quirks like this to be expected in PIE sessions? (assuming the answer there is yes and I'm not triggering something by having it in fullscreen mode). Will test on the server ASAP.

obsidian kelp
#

hello I've been doing the unreal 4 mutliplayer tutorial released by unreal 4. They set up a find a server functionality that randomly matches you with an avaliable server if one is avaliable. However I want a server list that instead displays a list of avaliable servers. Is there a tutorial for this?

timid pendant
#

@obsidian kelp You need some sort of online subsystem such as steam or you can use the null subsystem and code your own master server system to register and list servers

obsidian kelp
#

uh yeah I've figured out that part but I'm just talking about the front end display in a widget blueprint

glad sedge
#

Do animations replicate the same as everything else?

trail dragon
#

@glad sedge I don't think so. I think you need to replicate the variables to the client that the animation blueprint uses and have the client set them in the AnimBP

glad sedge
#

ah ok

#

Gee my mutli is a real headfck. I need to draw this out with flow chart

trail dragon
#

Welcome to network code

glad sedge
#

Yeah. I'm getting some really odd crashes too. Like the log saying that I have a property that isn't replicating because it's not a child of some class.

#

But none of that code has changed at all for weeks.

#

Obviously it's related to some animation stuff in some way but still, it's just weird.

glad sedge
#

So, if I try to set an animation variable (to run an animation on all clients) using netmulticast, it crashes .

#

I get this error specifically - Attempt to replicate property 'CastleKeepersCharacter.PlayerText' in C++ but class 'AbilityAction' is not a child of 'CastleKeepersCharacter'

#

I can only assume it's because i'm accessing varibles that should be replicated on the client, or something like that. I dunno.

neon mango
#

Diving into some source I found this comment. // If this is a client-recorded replay, use the mesh location and rotation, since these will always // be smoothed - unlike the actor position and rotation.

#

Does that mean Unreal smooths out network jitter by just smoothing out the mesh and letting the server just update the actor position and rotation as is?

abstract aspen
#

Also it seems to only happen on auto saves i can goto the issue and right click and save np

worn nymph
#

Have you accidently opend the editor twice?

glad sedge
#

@abstract aspen have perforce or source control at all ?

#

Could also be a permissions thing too

abstract aspen
#

looked in editor and im only seeing it once

#

where would i check the permissions?

fossil spoke
#

Navigate to the asset itself and make sure it isnt ReadOnly

#

Usually source control or having the editor opened twice is the culprit

abstract aspen
#

Both box's are unchecked in properties

glad sedge
#

yeah I have to checkout everything before I can save in Perforce.

abstract aspen
#

it has options for 2015 and 2017

glad sedge
#

Yeah dunno

neon mango
#

How different is UE4's player movement prediction and replication from UE3 ?

#

Think its more or less the same?

#

Oh I think I found how UE4 does it inside the CharacteRMovementcomponent line 1151

neon mango
#

Am I undersatnding the CharacterMovementComponent source, there seems to be alot of functionality like methods one can call to incorperate their network smoothing logic with any new movement logic you may come up with? Or am I not interpreting their source correctly? They have methods like OnMovementUpdate and ClientUpdatePositionAfterServerUpdate

#

I'm wondering if I can hitch a ride on these methods and just call them correctly when I execute custom code that moves the player

tacit hazel
#

whenever I connect to a dedicated sever in a packaged game my character moves extremly slow, can anyone help?

inner iris
#

@tacit hazel you’ve been testing in editor with “run dedicated server” checked, and have no slowdowns there? (Just checking to make sure you are definitely running as a client and not as the server)

tacit hazel
#

yes

inner iris
#

And listen server behaves the same way as connecting to the dedicated server, or as expected?

tacit hazel
#

from what I can tell yes

#

I followed this guide

#

and I move normal speed, until I do "open 127.0.0.1"

#

then everything seams to work fine, but my movement is extremly slow

#

that is the NET STAT I get

inner iris
#

It sounds to me like you aren’t setting something on the client as you are with the server- btw are you connecting to localhost or an actual server IP?

tacit hazel
#

localhost

#

when I connect two clients together, with one of them being the host everything works fine, and when they are by themselves everything works fine, but once I join the dedicated sevrer problems arise

inner iris
#

So the client connecting has no problems?

tacit hazel
#

he moves slow

inner iris
#

Hmm that’s strange- any issues I’ve had like that were just due to the server and client not having the same values set

tacit hazel
#

I do not understand either

#

I have been stuck on this issue for a week

#

and no values for movement are ever changed

tacit hazel
#

no values are ever changed for speed, but Stat FPS shows 62fps, and ping as 16ms

#

so I beleive it has to be some sort of net problem, but I don't know that for sure

obsidian kelp
#

can using the online steam subsystem be disabled for LAN play?

tacit hazel
#

i can confirm that the value never changes for movement speed, so I believe it must be a net saturation issue, can somoene please help me? I have no idea waht information you might need, but I can get whatever it is

neon mango
#

I need clarity on it

tacit hazel
#

AHA

#

I have a breakthrough on the issue, but not the solution

#

the function to move the player does NOT get called nrealy as often as it does when testing things

#

because I print the value everytime it is used I get between 30-40 a second during testing, but only 5-10 a second using the dedicated sevrer

#

here is the setup for the function to be called, on W pressed the PlayerController on the client calls Walk (Server) which calls a NetMultiCast function on the insatnce of the plaeyr itself whihc is sever owned, which is this: ```void APlayerControlledCharacter::Walk_Implementation(float Value) {
if (Value != 0.0f)
{
if(GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Cyan, FString::SanitizeFloat(Value));

    AddMovementInput(GetActorForwardVector(), Value);
}

}```

#

I think I am hitting some sort of network bottlneck over the dedicated sevrer, because this function does not get called NEARLY as often on the deidacted sevrer as it does during test runs via the editor

brittle sinew
#

Why aren't you just using the default UCharacterMovementComponent movement replication?

#

Or are you just calling it a character when it's not really a character?

#

(ACharacter)

tacit hazel
#

sorry, I'm just realy depserate I've been trying to figure this out for like a week now

#

im using a custom class that inherits from ACharacter

brittle sinew
#

Okay, so that just reinforces the original question

tacit hazel
#

I didn't know about it

brittle sinew
#

UCharacterMovementComponent takes care of all replication for you—smoothing, client-side proxy, etc.

#

You don't need to mess around with RPCs or anything

tacit hazel
#

how doi you use it?

brittle sinew
#

You should just be able to call AddMovementInput on the client version of your character

#

(as long as you have the ownership correctly set up on your pawn, which if it's spawned by the GameMode, you do)

tacit hazel
#

alright, well it seams its working, let me package the project and try again

#

and again Im sorry for postin in programming I was just really looking for asnwers

brittle sinew
#

It's no big deal, just try to refrain from it in the future

#

I'll be honest with you, I've seen your messages over the past few days, but there was just so little information to go off of that I didn't feel like I would be able to make any useful contributions in the time I had

#

It's good you eventually debugged it a little bit and saw at least the direct symptom of the issue, but doing that earlier on will get you a lot more help

#

Since you said you were using a character, I assumed you were using the built-in character's movement handling, and thought that the issue might be quite devious

inner iris
#

Does the server have its own player state instance when running in dedicated server mode? (Getting always an extra player state even when no pawns are in the level or spawned)

#

Getting this value from the Player Array in Gamestate

brittle sinew
#

The PlayerState is spawned by the controller, irrespective of pawns

inner iris
#

It's still returning one in simulate mode, is my controller still coming through there?

#

When I'm in the level on my own it returns 2

brittle sinew
#

Hm, I would assume so

#

I couldn't tell you why there's 2, unless there's a pawn being possessed by AI or two controllers

inner iris
#

I do have AI player states on

#

But there are no AI pawns or controllers being spawned as far as I can tell

#

No worries, I can filter out that extra result by changing the default team var, but just interesting to see where it's coming from

#

It seems a PlayerState exists in the world along with a Gamestate/Gamemode

#

On play

floral bison
#

whats the proper way to play a sound so others can hear it

#

i want my characters booster sound to play for others when he uses it

wary willow
#

@floral bison 😃

#

You gotta multicast it to your delight

hasty adder
#

Mmm delight of multicast

#

@floral bison don't forget to take good notice of multicast (if server) and save yourself some headaches later

tacit hazel
#

so @brittle sinew, how do I call AddMovementInput on the client version, if I have a playercontroller?

brittle sinew
#

...GetPawn() gets your pawn, which you can call it on?

tacit hazel
#

hmm, thats what I am doing but it seems not to be wroking, let me try something else ones ec

tacit hazel
#

yah, that doesnt move me at all @brittle sinew

rare cloud
#

@GamingBacon97#8934 , take a look to the Third person template

chrome bay
#

You don't use the player controller to set movement input on the pawn. Use SetupPlayerInputComponent in the character

#

And call AddMovementInput on the Character Movement Component.

glad sedge
#

Is this fundementally wrong? I'm only seeing an update on my PC after 2 or 3 clicks

zinc loom
#

Hi All, whats the best way to go about getting all of my client actors to react to changes to a replicated variable on the servers GameState blueprint?

glad sedge
#

@zinc loom probably an event of some description.

granite jolt
#

repnotify if im not mistaken?

zinc loom
#

so rep notify, ignore server if dedi, and then get all actors and do a foreach loop to run the casts / events ?

granite jolt
#

if the repnotify doesn't call on all clients, you could make an event dispatcher and use the repnotify to fire that event

zinc loom
#

do I make that on the actor or in gamestate?

granite jolt
#

excuse me if im wrong though. i need more mp practice

zinc loom
#

im really bad with ED's - I thought they were to just remap a call to a different event

#

like polymorphism in c++

granite jolt
#

I just see it as an Event that can be subscribed to as a listener really. (bind in this case).

zinc loom
#

oh, can I bind to another BP's ED?

#

AH HUH!

#

Thank you

merry haven
#

ED???

#

What the crappers is that

inner iris
#

@MiGint#7559 Event Dispatcher