#multiplayer

1 messages ยท Page 397 of 1

agile lotus
#

what could be happening?

fleet raven
#

why does connecting to an ipv6 address not appear to work? it just reports a network error PendingConnectionFailure

agile lotus
#

I guess a better question would be how do I check who is calling for the construction of a playerstate?

agile lotus
#

Why would my Post Login be called multiple times by one client

fossil spoke
#

It shouldnt

agile lotus
#

I know that, but it is

fossil spoke
#

Splitscreen?

agile lotus
#

Just one screen

fossil spoke
#

But is it an coop game with multiple players

agile lotus
#

its a listen server and a client with only one player per

fossil spoke
#

So its coop

agile lotus
#

coop is kind of a weird term for it but yeah

severe widget
#

client as in not-the-listen-server right

agile lotus
#

yes

severe widget
#

That is odd

agile lotus
#

the client is spawning 3 extra player states as well

#

all with bad unique ID's

fossil spoke
#

Very odd

#

When you mean bad

#

What exactly do you mean

agile lotus
#

I'm printing them and it says "BAD UNIQUE ID"

#

was trying to see where they were coming from

fossil spoke
#

The PlayerStates Displayname is BADUNIQUEID?

agile lotus
#

the playerstates Unique Net ID

fossil spoke
#

Im assuming this is in BP?

agile lotus
#

Yeah

fossil spoke
#

Not an C++ game

agile lotus
#

both

#

but the states are BP

fossil spoke
#

Your not using HR are you?

agile lotus
#

probably not what is HR?

fossil spoke
#

HotReload

agile lotus
#

nono

#

you taught me thats a nono a few years ago lmao

fossil spoke
#

Oh ok good

#

lol

agile lotus
#

you know what

#

in my main menu

#

I create 3 extra players for local play

#

is it possible they are coming with the client

fossil spoke
#

Well i was thinking that

agile lotus
#

they dont come with the listen server though

#

which is the weird part

#

I'll remove the logic just to see

fossil spoke
#

Im not sure what an best practices scenario is for migrating local players

agile lotus
#

I dont want them to migrate so I can move the logic to a different section

#

in theory

#

success

#

it was putting the local players in

#

๐Ÿ˜„

agile lotus
#

in case anyone looks back on this I just moved the creation of local players to the local character selection and remove them upon leaving that screen

#

which I probably should've done in the first place

fast ivy
#

I have an RTS game-Blueprint. I'm trying to set network relevancy to the AI pawns instead of the location of the pawn itself. I'm curious if this possible in blueprint? Essentially maybe filtering the multicast based on a collision sphere on the AI units or something to that effect. Anyone have any idea?

#

location of the Player controlled pawn

winged badger
#

The only way i am aware of to fine tune the network relevancy is overriding AActor::IsNetReleavantFor() function

thin stratus
#

^

sturdy tulip
#

I am slighty confuse with the listen server vs dedicated server.

The switch HasAuthority behavior is different if you are a dedicated server or listen server

If I want to spawn something on all clients but not on the server, it seems like I need to add this extra blueprint logic everywhere :

if (isRemote or (hasAuthority and isNotDedicatedServer))
{
// do some stuff on the client side
}
Is that correct or am I missing something ?

balmy kindle
#

hey guys, i just followed the UE4 Steam multiplayer tutorial series and that worked well except for one little problem. We tested it with 3 people and the weird thing is My Computer can Host and others can join with no problems. Each of the other 2 guys can host themselves and join each others session. But if i want to join them i do not find any sessions.... Everyone has the same project file. My firewall is also not blocking anything from Unreal or Steam. And i also have no problems with joining in varios steam games...Maybe anyone has a idea where the error might be

thin stratus
#

Might be steams location stuff

#

are you using your own appID

#

Or 480?

balmy kindle
#

480

thin stratus
#

Cause 480 can give these results due to the amount of other sessions you find that aren't for your game

balmy kindle
#

everyone german region

#

hmm

thin stratus
#

I wouldn't worry that much. Get yourself an ID and it should work

slim holly
#

480 doesn't always find sessions

balmy kindle
#

ok, i guess i have to move on then^^ thanks for the answers ๐Ÿ˜ƒ

agile lotus
#

How do I prevent a timeline with setactorlocation from being jittery on clients

thin stratus
#

Interpolating instead of just setting

agile lotus
#

I am interpping

#

what I mean to ask is should I be doing it on the server vs client or multicasting

#

I use setactorlocation for some movements and the default character movement component for other movements so I get confused when dealing with the two of them network wise

thin stratus
#

Well set actor location isn't interpolating afaik

#

So if you use that, you need to provide the interpt locations yourself

#

Usually via OnRep of a Vector

agile lotus
#

ohhh I see

#

will check it out in the morning thanks exi

#

๐Ÿ˜„

meager spade
#

works find on the listenserver

#

oh would i need to send the server the value via from the client like ServerSetUltTarget

#

fixed it

slim holly
#

^if it's socket transform based projectile spawning, you need to force skeletal animations on dedicated servers

burnt meteor
#

What is afaik?

wary willow
#

As Far As I Know

burnt meteor
#

Ohhhh thanks @wary willow

wary willow
#

IIRC = If I Recall/Remember Correctly

#

Think those are the only two big abbreviations I see around here that people just assume people know.

proper olive
#

heya folks, quick question for ya if anyone has a moment...

#

What's the very first class to load on client-side so that I can create a "Connecting" widget immediately?

#

after entering the multiplayer map

#

would it be the map's beginplay?

#

followup question: I'm currently comparing the pawn's character name to None to see when my player info has laoded - is there a good way to tell when all of the other instanced actors have finished network replicating in, without using level streaming?

#

loaded*

#

instanced probably isn't the right word there, just other actors in general

calm hound
#

I believe your first class is the Controller, then the Map

#

possibly Map then Controller

proper olive
#

ok cool

#

I had it on the Game State begin play, long lag in between loading in and seeing the menu

#

I'd even hear ambient sounds first ๐Ÿ˜„

#

and see the ocean and stuff, so I put a post process volume

sharp pagoda
#

Should be map first since there always has to be a map loaded

calm hound
#

Yeah, you want to use Controller/PlayerState for that probably

wary willow
#

Depends on pie or package btw

calm hound
#

GameState is later in the chain

proper olive
#

if I just throw it on Map begin play, will it only happen for each client individually when they log in? How can I tell it which controller to assign to

#

@wary willow how so?

wary willow
calm hound
#

Huh. I never knew that

proper olive
#

that's weird

#

doesn't seem to be accurate tho

wary willow
#

It is

#

Been like this forever

proper olive
#

why is the level loading before game state begin play then?

wary willow
#

Go ahead and google it

proper olive
#

is it loading just not hidding begin play?

#

hitting*

calm hound
#

wel BeginPlay() isn't a "I'm done loading" function

wary willow
#

Ah, let me rephrase

#

These are the BeginPlays / Init

#

For each class

proper olive
#

aah

#

ok that makes sense then

#

thanks for the clarification

#

hmm I guess packaged is more importanrt, but the game mode only exists on server

#

so where I have it is the best it can be?

calm hound
#

What are you trying to achieve?

#

a "Loading Map" function?

proper olive
#

as it is, the camera loads in to before a pawn is even created/possessed, at 0,0,0, then it snaps to the "Player Start" location and depending on how much map stuff there is to load in, might hang there for a bit before the Game State loads in a widget to cover the screen with a "Loading" style screen I made / player login screen

#

so right now I have those two areas masked with post-process volume

#

but this is all PIE so maybe it's fine for packaged game?

calm hound
#

I feel like this should be done inside your Controller. There is no camera view until the controller begins as far as I know

proper olive
#

a follow up to that would be, if I throw it on begin play in the controller, a controller only begins play at the beginning of the game, right? even when I destroy pawns and possess things, it won't be firing off again yea

calm hound
#

inside controller you can do a GetcameraManager()->StartFade() and that'll turn the camera to black even

#

which then you can overlay your connecting widget on top

#

and it'll show the UI

#

BeginPlay() should only be on the initial entry.

#

but, if you swap between maps. I believe the Controller is persistent. So you'd have to manually call your screen fade/widget during those instances

proper olive
#

right, testing it out now

#

what about being able to tell when all replicated actors have finished loading in on clients?

#

or at least those in close proximity

calm hound
#

Not sure that's possible. Stuff is always trying to replicate

proper olive
#

What about just knowing it's there to begin with

#

like some sort of large sphere trace on server, and compare all actors there to all actors on client until the # is the same?

#

or something

#

large meaning like 1,000 units or something

calm hound
#

I have no clue how to check it. The Server updates if it thinks the client is dirty, but as far as I know it doens't have a list of every client and every variable to see if it's wrong.

#

so it can send updates based on the last time the player got an update, and it'll ensure certain things like variables eventually make it

#

but I don't think it has access to know, so I don't think it has the ability to check to see who's matching and who's not

proper olive
#

yeah was thinking of just doing a timer by event every second or so, sphere trace on server, get all actors of Building type (the only one that matters in this case), then pass that # through to a Client RPC that does the same sphere trace and compares the # until they're the same?

#

cause that essentially worked for my "pawn loading"... just keep getting the pawn's name until it's not nothing ๐Ÿ˜„

calm hound
#

In theory that should work. But it seems like a network heavy solution, that, for players already lagging, will cause more lag

#

that's spamming the network when it's trying to already send all the data about the world initially over. So it'll be rough

proper olive
#

true

#

I appreciate the concern ๐Ÿ˜„ but I think it's at least worth it so players don't load in to nothing, run around, and inadvertantly fall off a cliff or into somebody else's base ๐Ÿ˜„

calm hound
#

well there should be a function that tells you when the level gets streamed in?

proper olive
#

yeah I'm not using level streaming tho, since it's just P2P networking, not dedicated server

#

In theory I could, of course

calm hound
#

level streaming is a local thing. Doesn't realy matter?

proper olive
#

nah it doesn't, this would be the only benefit tho

#

I'll try this out and see how it impacts performance just doing it like once a second or so

#

only while logging in

#

I figure with a small enough sphere trace and just an integer to pass through, it shouldn't be too costly

#

tbh I haven't built any map yet besides landscapes so I might end up doing level streaming, have to do more research ๐Ÿ˜„

#

from what I remember, basically everybody would have every streaming level that has anyone loaded into it when doing P2P, yea?

#

not as advantageous as dedicated servers where each client only loads in their own region? It was a while ago tho any correction would be great

calm hound
#

I'm not sure about that to be honest. As far as I know level streaming does have that, but only relevant data is rendered.

proper olive
#

I'm using culling on pretty much everything. I've enabled a "creative mode" to let players build infinite stuff. Gonna test it this weekend. I'll let you know how it performs ๐Ÿ˜„

calm hound
#

But I'm not sure if that happens to clients or just the person playing as the server

#

if you're hosting, yes, all data has to be hosted.

proper olive
#

right

calm hound
#

but the other clients, I believe it's only the levels they're using

#

so it's the same concept. But as a Dedicated Server running, you're not playing and running the server on the same machine

proper olive
#

and just to clarify for anyone else who might know, we're talking the difference between P2P and Dedicated Servers when using Level Streaming

#

I think my original reasoning was.... if the Server still has to have everything loaded in for P2P

#

then for performance/optimization, I need to consider that as my limit

#

so like, if I use level streaming, eventually, the server's gonna be unplayable

calm hound
#

Yes. That part should be true

proper olive
#

unless I restrain myself basically

#

now I make more sense to me

#

thanks ๐Ÿ˜„

calm hound
#

That's why a lot of games use a "You can't go X amount of feet away from your partner" in co-op games

proper olive
#

oooooh

#

if I need to make this more of a D&D style campaign game, I could totally cheat with that

calm hound
#

because it keeps the host from loading 2 maps at any time

proper olive
#

that's been my backup plan

#

good call

#

gotta run but thanks for the tips!!

calm hound
#

No problem! have fun

fleet sluice
#

@thin stratus I remember you and I talked about sessions so just a heads-up: I updated UWorks to V11, with sessions. There is definitely room for improvement here and there, but it's been stable so far.

thin stratus
#

Awesome. Thanks for the notification!

meager spade
#

UWorks?

fleet sluice
#

@meager spade A plugin I'm developing, to make Steam integration as painless as I can.

meager spade
#

does it support party beacons etc?

agile lotus
#

I own both Uworks and Steam Parties on unreal marktet and they are both super easy to use

#

they both have their own support discords too which is great

high heart
#

so I'm spawning actors on client and suddenly I'm getting this all the time on the server:

Warning: UPackageMapClient::InternalLoadObject: Unable to resolve default guid from client

I'm pretty sure I'm not sending any client actors over rpc's so I'm not really sure what this is about. Should I be concerned?

agile lotus
#

So the if I want to replicate this movement function I use for abilities, I would need to vinterp through an OnRep Notify right?

high heart
#

@agile lotus that's probably not an ideal solution. you'd be better off making your own character movement component so it works with the prediction system

agile lotus
#

It's only for attacks though

#

I use the character movement component for normal movement

high heart
#

it moves the character though, right?

agile lotus
#

yeah

high heart
#

setting actor location in your pawn is going to cause weirdness if prediction kicks in

agile lotus
#

is there a way I can disable prediction during the timeline ๐Ÿ˜ฌ

#

or is that a nono

high heart
#

maybe? probably not an airtight strategy. I have a feeling what you're doing is pretty similar to the "Boost Dodge" described over here: https://wiki.unrealengine.com/Authoritative_Networked_Character_Movement

anyways if you don't care about that and you really want to do through the pawn (you probably don't, it will be buggy) you basically just want to make sure it starts at the right time. a NetMulticast RPC would probably be faster/more reliable than waiting for a variable to replicate

#

the prediction system is dependent on it having all the needed information to predict the location and velocity though, so you'd do best to do it right.

that being said, I do things like teleporters in my pawn and it works just fine, you might not have any issues if it's something very simple that doesn't meaningfully affect player location

agile lotus
high heart
#

the attack?

agile lotus
#

the movement of the attack and other attacks like it

high heart
#

well for that one in particular it looks like you could just use a LaunchCharacter. it's the same function as jump, and already works on a network

agile lotus
#

No it needs to be pauseable

#

as in

#

If an opponent is hit

#

the timeline is paused for a second

#

then continues

#

and it needs to go left, right, down, up, diagonals

high heart
#

LaunchCharacter accepts an input vector, and if you launch in the exact opposite direction you're moving you should stop moving... there may also be a networked function for stopping movement. maybe StopMovementImmediately

agile lotus
#

The problem is launch character is a one time thing

#

This happens over frames

#

Unfortunately it's just not an option, we used it in the past and it caused all sorts of problems

high heart
#

like constant velocity? did you try turning gravity off and/or switching to Flying mode?

#

Flying mode actually might get you what you want, though you won't have gravity

#

In my game I basically added a custom movement mode that works like walking but does not chop off the Z component of the input vectors. works great and takes full advantage of prediction

agile lotus
#

Leaving flying mode causes our pawns to go through the landing process though

high heart
#

ah, that's unfortunate

agile lotus
#

Yeah theres some moves that use the movement on ground

#

so in those cases flying wouldnt work but I can see how it would work for the above example

high heart
#

a custom movement mode would probably be your best bet then. something that works like walking but allows flight

#

if you set it up like that you can just add input vectors client side and you'll be golden, no lag on clients and perfect prediction

#

would probably require a c++ person though

agile lotus
#

my c++ person went MIA a couple months ago ๐Ÿ’”

#

now it's up to me

#

but its something I can look into

#

thank you Slime

high heart
#

no problem, good luck

agile lotus
#

Thank you for that link I'm reading it atm ๐Ÿ˜„

high heart
#

here's what I'm doing if you're interested:

bool UProxyWarFlyingMovementComponent::IsGliding() const {
    if (MovementMode == MOVE_Custom) {
        switch (CustomMovementMode) {
        case EProxyWarCustomMovementMode::MOVE_Gliding:
            return true;
        default:
            break;
        }
    }
    return false;
}

bool UProxyWarFlyingMovementComponent::IsFalling() const {
    return Super::IsFalling() || IsGliding();
}

falling now is true if i'm in my custom movement mode, so landing/physics works properly

agile lotus
#

So I could just have a custom move like your Gliding but have falling set based on when I need it

high heart
#

then I override ConstrainInputAcceleration so that we keep Z components during glide

FVector UProxyWarFlyingMovementComponent::ConstrainInputAcceleration(const FVector& InputAcceleration) const
{
    // walking or falling pawns ignore up/down sliding
    if (InputAcceleration.Z != 0.f && (IsMovingOnGround() || (IsFalling() && !bWantsToSprint)))
    {
        return FVector(InputAcceleration.X, InputAcceleration.Y, 0.f);
    }

    return InputAcceleration;
}

and for a little extra control I disable input scaling as well so I can pass in 1:1 velocity vectors instead of normalized ones. this part requires some other changes to basically override max speed

FVector UProxyWarFlyingMovementComponent::ScaleInputAcceleration(const FVector& InputAcceleration) const
{
    if (IsGliding()) {
        return InputAcceleration;
    }
    return GetMaxAcceleration() * InputAcceleration.GetClampedToMaxSize(1.0f);
}
#

that last part might not be totally kosher (it's definitely more heavy than the default) but I personally needed to be able to basically have infinite acceleration based on current velocity because it's a vr wingsuit

#

anyways yes, you may be able to get the behavior you need just by overriding IsFalling()

#

while in a flying mode

vital steeple
#

anyone experienced hitching when spawning actors on the server? i spawn 8-10 resource nodes (fairly small and low poly ones) that aren't very complex actors, but the server seems to hitch when they spawn. players dont experience it, but if im running the dedicated server on my machine and playing on it OR running it in PIE, its very noticeable.

agile lotus
#

I experience all kinds of problems with PIE

#

discrepancies between PIE and a packaged build thats for sure

severe nymph
#

@vital steeple are you delaying a frame between spawns?

#

Sometimes it like night and day with just a .1

vital steeple
#

well, there is no real delay i guess. they are spawned by individual parents that manage each "field", some have different spawn rates, so they would be offset in that manner

#

each node has a range of seconds to spawn in (spawns every 18-22 seconds) or something

#

but they arent forced to spawn at different times, they just get a delay from a range

#

no real offset delay, i should say*

#

and yeah ive noticed PIE is very strange. i get lots of weird results from the gpu profiler that dont exist in a packaged build

high heart
#

@vital steeple i've experienced stuff like that when spawning bots, I've found that there's less lag if you do it from C++ for whatever reason

#

possibly blueprint node introduces some overhead

fossil spoke
#

Anyone here used GameLift?

#

Wondering how easy Integration was and getting off the ground with it is.

vital steeple
#

ok cool, thanks guys! ill nativize the blueprints and see if that helps

fleet sluice
#

@meager spade Kind of the wrong question format, but yes. You don't need beacons to make parties. The term "lobby" in Steam's terminology is a bit different than in UE4 terminology. Lobbies are persistent and users can belong to any number of lobbies at the same time. What you do with that is "limited by your own imagination". I use lobbies internally for sessions and some of my customers have already made their own parties with it, some even with voice chat. I'm probably going to add a "standalone" party example in the next version.

#

@agile lotus Thanks! โœ…

fringe dove
#

without the replication graph stuff coming in 4.20, there is no way to send a multicast RPC to only a subset of clients right?

humble zealot
#

hey

twin juniper
#

hi

humble zealot
#

So ive got the Steam SDK

#

so im able to upload through cmd

#

steam cmd

twin juniper
#

okay good

#

do you drm? because you should

humble zealot
#

whats drm

twin juniper
#

drm wrap your binary game file using the steam drmtoolp on their end. basically your game binary gets uploaded to valve server, they run their drmtoolp, and you download it again and you manually replace the file

#

this adds a small layer of piracy protection

#

its small. minor obfuscation only, but it prefvent some piracy

humble zealot
#

ahh im not worried about piracy as its only friends that i trust that have it

twin juniper
#

path to\steamcmd.exe +login steamuname steampwd +drm_wrap appid "path to\gamebinary.exe" "path to \gamebinary_DRM.exe" drmtoolp 0

#

ok just so u know

#

might use it in a few yrs ๐Ÿ˜›

#

(path to \steamcmd.exe) +login uname pwd +run_app_build (path to\steamworks_sdk_142\sdk\tools\ContentBuilder\scripts\app_build_782640.vdf) +quit that's as simple as my .bat file is

#

i just run my .bat every time i want to upload a build, then go to steam pipeline page and activate it.

#

then you can tell your friend to restart steam and try to dl or try to manually dl it if he has it already. i usually ahve to restart my steam before a hot update will work like that

#

if he doesnt have yet, he can just dl it.

#

hope that helps

humble zealot
#

thanks

high heart
#

@fossil spoke i haven't used it but here's a plugin

#

might be helpful

humble zealot
#

@twin juniper hey

#

so its just uploaded to steam, its still giving me a problem, do you want a key so you can see what i mean

twin juniper
#

working on a material rn. can you wait a few moments please

#

you can try to just have the user download it and for the host use create advanced session and user uses join session

#

that is create sesssion you can use find sessions to get array of sesion, and then join session for the one you want

#

sorry, working now. i will have to brb

#

make sure to use that make literal node for servername so you can use custom server names for your ganme. it's helpful

humble zealot
twin juniper
#

looks good, only th ing i can think of changing is private connections to like 100

humble zealot
#

Okay

twin juniper
#

what happens when you try it

humble zealot
#

just goes back to main menu

twin juniper
#

make sure the open level node has an actual level in it that you added to packaged levels

humble zealot
#

oh wow im so dumb

#

ill add the lobby map now

twin juniper
#

cool

humble zealot
#

Thanks for the help dude i appreciate it

twin juniper
#

np

potent prairie
#

do I need to keep building the server in VS or is it something I only need to do once for a projejct?

#

like if I update the game, new package. Do I need a new server build as well?

agile lotus
#

Does anyone have a blueprint example of replicating SetActorLocation with Vinterp and timelines

worn nymph
#

@potent prairie it all depends . sometimes it will work fine other times you may encounter strange behaviour it all depends how much code has changed and which classes you edit.

although its a pain in the bum its always best to rebuild it. after the first build subsequent builds and packages go faster anyway

zenith yarrow
#

After getting session results from IOnlineSessionInterface::FindSessions(), is there a way to check for expired sessions in search results array that I get...

Basically, if I get sessions from findsessions, but the host destroys the session. The session is never cleared from a client, so the client can still try to connect to the session. I basically wanted a way where I could check if the session is still advertised, I found two functions in online subsystem null but both have been hardcoded to return default values. One was FindSessionById() which returns true and gives a empty result and other was PingSearchResults() which does nothing but return false.

Has anyone come across a method that can be used to determine if the session is active before joining it ?

#

For lan matches I was thinking of getting the IP from GetResovedConnectString(), and doing a ICMPEcho to the IP address, if the result came in a reasonable time only then should the client be allowed to join it, else the session is inactive and the user is informed that the session expired.

Does this approach work? or is there a better alternative ? I sure can't use this for steam sessions though, would have been great if there was something that worked for both...

fleet sluice
#

@zenith yarrow There aren't alternatives. I recently went through the same thing with my plugin, integrating Steam. My approach consists in implementing a custom communication protocol using Steam's ISteamNetworking interface (the host always listens for queries and responds if it's alive or not, while the client does a quick query before joining).

zenith yarrow
#

@fleet sluice Thanks for replying, my colleague just made me realize that the ICMP echo thing wont work as the pc could respond but that does not mean the session is on...
I guess for lan i'll just have to do as my colleague suggested, keep refreshing the sessions and whenever I get updated session results I pass that to UI.

Again thanks for replying at least now I now what i'll have to do to make this work...

fleet sluice
#

For LAN you can use UE4's sockets with the PLATFORM_SOCKETSUBSYSTEM macro because LAN isn't affected by NAT techniques. It's the easiest and most straightforward thing, other than frequent queries.

agile lotus
#

I'm using an unreplicated event that calls a replicated on server event which calls a replicated multicast event to a switch has auth ->server to a setactorlocation with vinterp and a timeline. How can I improve this to prevent clientside jitter on his pawn

neon violet
#

How do dedicated servers work

fleet sluice
#

They just do #wokeuplikethis #nomakeup #allnatural

#

That's so vague even if I wanted to help, I wouldn't know how

neon violet
#

Um like what does that mean. Is it like a seperate comouter that handles all clients? Do u have to buy one? Im so stupid

fleet sluice
#

UE4 dedicated servers are a regular game packaged with a particular configuration (they don't need rendering, audio etc.) so they're a separate [YourProject]Server.exe. They can be hosted on the same machine or on a separate machine. Most people go for virtual machines (VM) managed by Google/Amazon etc. It's like installing any other program and whether you install it on your laptop or on Google's virtual machines, it's your choice.

#

And yes, most providers, like Google and Amazon, charge a bit in order to let you install your UE4 server on their virtual machines. Sometimes, people refer to these VMs as servers as well, but that's just a terminology thing. VMs and UE4 servers are 2 totally different things.

bitter oriole
#

Yeah, there is the server "hardware" (computer, either physical or virtual) and the UE4 server software

#

You can have client-hosted players (one player is the server for the game), or dedicated servers which require you to pay for server hsoting

hasty adder
#

Depending on your game and worries about cheaters you may not need a dedicated server.

#

A coop game for 4 ppl for example, who cares if they memory hack and ruin there fun. But something competitive you may want a dedicated server out of there hands to mess with

neon violet
#

Thnx guys. Im starting off with a 4 player horde mode but want to make my game competitive in the future. Anyone know howm much google charge?

fleet sluice
#

Most of Google's stuff is free up to a limit

#

Then it's usually a pay-per-usage model

#

I don't know about VMs in particular

tawny parcel
#

Anyone know of a guide to replicate pause in multiplayer? I'm trying to achieve a triggered cutscene for all players in a dedicated server environment. It needs to pause, play the scene, than unpause for all players.

meager spade
#

@tawny parcel in multiplayer i think your best to iterate through all controllers, and set the input to ignore and maybe adjust time dialation to slow the game (if that doesn't affect the cutscene)

tawny parcel
#

Yea I was taking that approach but it seems glitchy since server and clients get a bit desynced with time dilation. My current variation is to disable input, movement and gravity which gives a pause feel and replicates more consistently

#

And like you mentioned shouldnt affect the cutscene as much

calm hound
#

There should be a pause function built in

meager spade
#

or have a bool which gets set, called say bInCinematic, and you can test various things against that

#

@calm hound don't think it works on multiplayer, unless you get the server to call Pause on all clients..

tawny parcel
#

Ive tried the pause function but it doesnt appear to be working in multiplayer / dedicated server,

#

When I run the node in any form, mlticast, on server/client it does nothing

meager spade
#

but i think a bool called bInCinematic, you can put checks wherever you don't want things to happen

tawny parcel
#

cool ill check in to that

#

i know on the sequencer object you can chk return state but that hasnt worked either

meager spade
#

but to just disable movement/look you could iterate through all controllers from the server and set them to ignore

tawny parcel
#

yeap, i am using an iteration of that right now and it looks promising, with adding gravity scale to 0 to pause anyone in the air

calm hound
#

if it doesn't work in multiplayer, couldn't you just make an RPC Multicast call that the server uses to call it on clients machines?

winged badger
#

iirc GameMode has to be Pausable for pause to work as well

tawny parcel
#

yeap it is

twin juniper
#

Hi everyone i'm a french 3D designer, so if you need i can do some 3d file for you, contact me

solar stirrup
#

@twin juniper

proper olive
#

@calm hound I did it ๐Ÿ˜„

agile lotus
#

I have an issue where my background art is jittery when parrallaxed on clients

#

is it because both client and server are sharing a camera

calm hound
#

@proper olive Just did a big replicated loop?

#

looks like it worked pretty well though

proper olive
#

๐Ÿ˜„ yep!

severe nymph
#

@fleet sluice do you know if the hosted vms are capable of running steam advanced sessions plugin?

sharp spire
#

Hey guys I have a question, I didn't notice until now that my movement isn't working properly in an advanced session. the server moves and rotates the character, but when I create a session and join it, my character only rotates..

#

Literally thought I understood multiplayer lol

#

I have a server executed event with an input of location that goes straight to a Simple move-to node. Suggestions?

meager spade
#

how do i replicate Gameplay Tags?

wary willow
#

@meager spade waht do you mean?

#

Same way you do for other variables

meager spade
wary willow
#

?

meager spade
#

i was trying to do that in anim blueprint

wary willow
meager spade
#

but only the client and listen server get replicated

#

i thought the ability system was fully replicated including tags

wary willow
#

I would ask in there

#

But, they aren't replicated by default in BP

#

Because I definitely have to toggle on replication on them

meager spade
#

yeah i will dig through the GA code and see what it does

#

thanks anyway

agile lotus
#

How do I make sure I'm grabbing the Character Movement component of the client

#

and not the server

wary willow
#

IsLocallyControlled should work @agile lotus

#

Client not Server though, SwitchHasAuthority

#

Now that I reread your question

#

Remote

#

But I think you really want locall

#

Not Remote

#

But who knows

agile lotus
#

Thanks victor appreciate it!

#

was getting jitter on clients when changing their speeds

wary willow
#

Ah, yeah

#

You want IsLocally

#

I do my charmove stuff locally

agile lotus
#

What I was doing was an event that changes their speed that isnt replicated and one that is replicated to server but I wasnt checking for isLocallyControlled

wary willow
#

I do all movement locally

#

all changes locally

#

CharMoveComp will rep correctly

agile lotus
#

Oh

#

so what I'm doing is pointless

#

with the server event

wary willow
#

I wouldn't worry too much about "cheating"

#

Right

agile lotus
#

Yeah I'm just focused on making it smooth first

wary willow
#

Just do IsLocally

#

and then change it without repping

#

CharMoveComp will do its thing

agile lotus
#

This means I shouldnt have addmovementinput on any replicated events then right?

unique thunder
#

Recommendations on ded server providers that would work well with Unreal?

agile lotus
#

Amazon

#

I hear is pretty good

agile lotus
#

what would cause the clients pawn to move jittery but only on listen servers screen

twin juniper
#

i had jitter in mine, i had to update to predictive replication

#

unfortuantely i dont understand the c code that the guy wrote, but suffice to say i used a code plugin that had the prediction written into it

#

i dont see jitter anymore, and if i do it's quite infrequent

#

i did have a serious jitter problem for a while though in my early builds

#

when i did, i had replicates movement turned on and physics enabled

#

im assuming that since the code plugin i am using predicts the movement, there's less need for checking and changing location to correct location because prediction accounts for it? not really sure. ๐Ÿ˜ƒ

agile lotus
#

I don't suppose you'd be willing to share that plugin?

#

๐Ÿ˜ฌ

twin juniper
#

sixdof

#

on the marketplace

#

its like $15 or something

#

worth it

#

my game is a 6dof shooter lol. so for me it's really worth

#

you're doing like a side scroller or something right?

agile lotus
#

Yeah

twin juniper
#

yeah wont work for u

agile lotus
#

rip me

twin juniper
#

lol

agile lotus
#

everytime I think I understand unreals replication

#

i realize I don't

twin juniper
#

honestly i don't really get it either lol

#

i just tried a bunch of different RPCs until it worked ๐Ÿ˜›

#

now i get it a little better

#

i use multicast for firing guns and exec on server for movement, that's basically it

agile lotus
#

right now my movement goes Custom Event (Not replicated) > Server Event (Replicated on Server) > Multicast Event (Replicated on Multicast) and all the movement stuff is in this one

#

but the clients only jitter on servers screen

twin juniper
#

i used to multicast movement.. not anymore

agile lotus
#

maybe thats my mistake

twin juniper
#

just use switch has auth to determine if it's a server or client

agile lotus
#

When I do that only client or only server can move

twin juniper
#

has auth -> client (then run on server) has auth -> server (exec movement) turn on replicates movement for both client and server

#

yeah but you gotta turn on replicates movement for the character pawn as well

#

unless you're not using a normal pawn

agile lotus
#

I have it enabled

#

using default character movement

twin juniper
#

replicates and replicates movement are both enabled?

agile lotus
#

yes

#

and Net Load on client not sure what that does tho

#

it was on by default so I didn't touch it

#

hold on lemme see if I understand correctly

twin juniper
#

here's my old code for movement before i got sixdof which replicates automatically

#

so i guess if has auth is remote - you would do the movement locally , AND exec on server. the server would broadcast to other clients - instead of using your current multicast

#

try that

#

look at my code and try that out , might help ya

agile lotus
#

so this in theory would be the setup

twin juniper
#

here's my current code for all ship movement using that code plugin. lol code plugins make the world go round. (and it has prediction and latency compensation built in :):))

#

try only doing add movement input to remote

#

and change the auth to server exec

#

make it similar to how i had in my second from most recent pic - try that

#

you might consider bunching your movement input stuff into a function too

#

so that the function can be called on remote and from the bottom custom event server RPC's output

#

will save some space and tidy it

#

here's an example of the movement function i use

#

or USED to use before i got my plugin

#

as you can see everythign is bunched in there for movement and all the transform stuff

#

saves space

#

and your movement input should have an axis input - and you plug that into your server exec call or function call from remote - as i had in my pic earlier

agile lotus
#

Right I do I just made that quick to see if I understood how to layout the switch has auth

twin juniper
#

ok

agile lotus
#

attempting to lay it out with my actual movement now

twin juniper
#

yeah only diff is on auth it's still a server rpc call, but no local call

#

so you'd just have to remove the add movement input from the auth output pin

#

your way may work too just depends on your resulsts

#

i know my way worked for me but i did have VERY slight lag

#

it was very minor

#

my lan pipe was saturated

#

thats probably why

#

anyway my code plugin prediction stuff solved it for me ๐Ÿ˜›

#

sorry to brag about that so much lmao

agile lotus
#

if only there was a plugin that did only that

#

lmao

twin juniper
#

haha

agile lotus
#

so calling your Ship Thrust and ServerShip Thrust on Remote doesnt do double the movement?

#

or didnt

#

The part circled in green

twin juniper
#

@agile lotus - didn';t do double

#

when i ran it

#

if i didn't do a local move on the remote, the ship would only move on server if i did the server RPC only

#

and not on the client

#

so i had to add that in in my case

#

keep in mind i once had multicast movement like u

#

but i moved it over to server movement

#

and now to the plugin but when i had server movement, it needed to exec on client too so i added that local call before the server rpc on remote for the has auth node

#

make sure y our pawns are set to replicate and replicates movement (like you earlier said) and disable any replication for any child component as well. (any child componment in the blueprint for the char that has component replication, ddisable those)

agile lotus
#

What about Character Movement Component

#

it has its own Replicates checkbox

twin juniper
#

are you talking about the default unreal 3d char movement with the 3d biped thing?

#

that grey thing?

#

i thought taht guy did auto replication

agile lotus
#

Has the icon of the stick man right?

#

yeah

#

it has a checkbox for Replicates

#

even though theres a Replicate Movement option

#

and Replicates on the character pawn

twin juniper
#

i realy never used so i can't speculate on that one. but in my example i only had it on the absolute root parent of the blueprint i use my character on . the uppermost parent

agile lotus
#

Oh okay

twin juniper
#

you shoulda try it and see

#

if it works out

#

you can see my flags on the right, i had net load on client on as well

#

i only set rep for the uppermost parent

#

the pawn itself

#

then for the ship mesh and actual meshes and stuff, like arrows, i turned component replicatesa off

#

i DO have replicates movement on.

#

so you might need to experiment with your char movement component

#

you might need rep on for that actually

#

i had that on for my plugin

#

just checked.

agile lotus
#

Thanks for the help, theres the tiniest bit of jitter on the client pawn in server perspective but its alot better then it was before you showed me your movement from before plugin

#

I think I'm not setting movement speed properly for running/walking

#

but its progress

#

๐Ÿ˜„

twin juniper
#

hello guys, i'm getting ready a plugin for photoncloud, any interested people here?

agile lotus
#

I would be in the future when I look into dedicated servers @twin juniper

#

thats what its for if I remember right?

twin juniper
#

it's multiplayer realtime cloud centered server

agile lotus
#

in that case yes

twin juniper
#

cool

worn nymph
#

my experience with unity and photon it was terrible but that was years ago . it might be better now

twin juniper
#

why was that @worn nymph ?

worn nymph
#

always bad movement issues , lag desync etc

twin juniper
#

ah, well, that depends on a lot of things, obviously the number of clients, the region, type of sync

#

photon is not easy to adjust with a lot of people

#

and not cheap either

worn nymph
#

yeah thats when i switched to unreal almost 4 years ago i think

unity network was garbage and from what i hear still is . i tried all the thirdparty alternatives. photon, raknet etc and was disappointed and at exact time i saw a demo of unreal video with 2 characters running around all movment networked synced and they dropped the monthly engine subscription so i switched and have never been back lol

twin juniper
#

hehe

#

i can understand

#

i was hired to do a moba and they used unity and appwarp, then they switched to photon

#

i checked that the c++ sdk for photon is much faster than the unity plugin for that

#

so i did a plugin for photon cloud using shiva engine and after that, the port for unreal

turbid hatch
#

Hi Guys

#

I have a weird problem

#

I have a multiplayer game, normal first person stuff

#

When the host looks left/right, it works just fine, for the host

#

but the rotation is for some f*cked up reason flipped

#

so when turning left/right, the clients see the host turning right/left

#

the host sees the clients turning left/right correctly

#

@here does anyone have an idea why that could be?

turbid hatch
#

Just got weirder

#

I found out rotation is replicated correctly when the character is jumping

turbid hatch
#

anyone?

jolly siren
#

Has anyone seen issues with steam sessions where some players can't find the session for a while after it has been started? It doesn't have anything to do with location, because we were all in the same city.
We were testing with 4 players and 2/4 could see the session right away and 2/4 couldn't for a long time after it was started.

This is with a dedicated server.

There were 2 other sessions up at the time and they could find those. But the one that I had just started they couldn't.

#

Hmm it looks like Advanced Sessions might have ran into this too

#
Made FindSessions AllServers option search twice, once for client servers, once for dedicated, and merge the results.
(This fixes a bug and also ensures that steam works correctly, if you want to avoid the longer search time before showing results you could
search one first, fill in results, and then search the second and add them in when it is complete instead).```
#

I wonder what that bug is

winged badger
#

i don't know how the ISP situation is where you're at, but here, same city could easily mean 4 different providers

jolly siren
#

One of the players who couldn't find it was on the same provider as me and I could find it.

winged badger
#

nod

neon violet
#

Is unreals dedicated server better than photon? Im making my game but dont know if i can matchmake and chat using the dedicated server as eadily as photon

jolly siren
#

@heady merlin Do you recall what that bug was that causes you to have to search twice for steam sessions? Is it in the ue4 issues tracking system?

heady merlin
#

nothing to do with what you are seeing

#

it fixed a bug on my end

jolly siren
#

ahh okay damn

#

One thing I didn't know about was SEARCH_DEDICATED_ONLY, not sure if that will help

heady merlin
#

not if you are unable to find it after a period of time

#

you sure you aren't updating the session with broken values at some point?

jolly siren
#

I do call UpdateSession to update the session info with the appropriate map/gamemode names.

#

But most players can find all sessions all the time. It's really only after starting a new server that some players can't. It is rare, but it is annoying.

#

It's like it takes a while to advertise to certain players for some reason.

heady merlin
#

its dedicated?

jolly siren
#

yes

heady merlin
#

that isn't super unexpected

jolly siren
#

really? So there is going to be different advertisement times per player?

heady merlin
#

how long are we talking here?

jolly siren
#

Yesterday we played at least 5 minutes of a match before one of the players could find it

heady merlin
#

and was that player in the same relative geographic location?

#

though 5 mins is a bit much

jolly siren
#

yes

#

We are all based in the same general city

heady merlin
#

mmm

#

what was their download region

#

the same?

jolly siren
#

I'm not sure what that is

#

you can find that through steam settings?

heady merlin
#

yeah in downloads

#

it literally changes your listed region

#

you can bypass region lock in app 480 with it

jolly siren
#

ahh okay, yeah we are on our own app id and not using presence since this is dedicated

heady merlin
#

I don't know steams server setup for how they dole out instances

jolly siren
#

I'll check their download region

heady merlin
#

I know they use a master server list, and that is refreshes periodically, I just don't know how they propagate to users in different parts of the world.

twin juniper
#

so i have 2 player characters, how to get a reference of the other character that is not yourself (enemy in a 1v1), for both client and server, i need to use their locations to show them on the minimap

#

anyone pls help?

#

and i have the enemy variable in my character and widget accesses it from character

jolly siren
#

@heady merlin Yeah we are all on US - Detroit for the download region

gleaming bobcat
#

For interpolated smooth movement from A to B of player character should I use FSavedMove_Character ?

ripe raptor
#

Is there any possible way to replicate movement of an actor placed in the level?

#

It's not a pawn, just an actor with bReplicates and bReplicateMovement turned on

#

I know it has to have an owner, correct?

#

Is it enough if I set the owner to the player pawn or some such on BeginPlay?

twin juniper
#

hey how can i set an enemy player character as a variable?

meager spade
#

@twin juniper you need to store there location in GameState and pull from that as you won't be able to access the other players position

#

plus GetPlayerCharacter will only return your player at index 0 (first player) if you are not host.

#

so you need each player to update the GameState with there current position, and you can just pull the results from there.

twin juniper
#

i could do it by adding get all actors from class inside the game state

#

and it would store array of 2 locations

prisma ore
#

having an issue with movements and possessing a pawn ..

#

well, our scenario is an fps game, where we can use an helicopter or a boat but we seem to always get some kind of network lag.

#

we are possessing a pawn for boat and same for helicopter

#

would we need to make some sort of CopterCharacterComponent or something of the kind ?

#

i mean, instead of possessing a pawn ?

gleaming bobcat
#

For interpolated smooth movement from A to B of player character should I use FSavedMove_Character ?

humble zealot
#

Guys, can anyone help, me and 3 others are from the UK and 1 of them are from the US. When we are in the game its so laggy. It shows a person running into a wall when that person isnt. Any help on reducing lag?

#

I'm using Advanced Sessions plugin

burnt meteor
#

@humble zealot i can help you but can you please screenshare

humble zealot
#

@burnt meteor What do you want me to show

twin juniper
#

@humble zealot hey! glad you were able to get your steam game working online. if you want to reduce lag, you'll need to use movement prediction / latency compensation. it comes with the char movement component by default, but you'll want to disable replicates movement in many cases to prevent abundant network lag. instead of using replicates movement, you'll want to properly use RPC calls to get movement working. i posted a recent example in #blueprint for another friend i was helping that details how i did my early movement for my 6dof game for my ship before i transferred the movement to a code plugin i bought for a good price. you can try something similar in your movement code - use has auth and server RPCs.

lucid flower
#

ive took a break form ue4 for some time, is it possible yet to replicate a TMap ?

loud mountain
#

hah no

ember needle
#

what do you guys use to introduce latency when testing your mp on local?

twin juniper
#

you can just spawn several objects that are replicated to add simulated latency

fossil spoke
#

Or you can use the Net family of console commands.

#

NetPktLoss

#

NetPktLag

#

Etc etc

#

@ember needle

#

@twin juniper

ember needle
#

never used those, will see how they work

#

thank you Devils

#

hopefully it is easy to isolate the processes you want to slow down

fossil spoke
#

No worries

twin juniper
#

ah cool didnt know that

ember needle
#

Does someone have a good place to start for throwing grenades & syncing them.

#

I currently grab the input from clients -> Run on Server spawn grenade

#

that grenade is replicated

#

at launch, an impulse is added to throw it but it corresponds to the data on the server which is incorrect for the player due to lag, so I'm not not sure how to add authority there...

#

things go sideways from there

#

I was thinking to disable physics except on server

winged badger
#

i think that will result in a grenade accelerating mid air on clients

ember needle
#

what kind of approach would you have?

raven holly
#

The game mode is never on the client right?

thin stratus
#

yop

raven holly
#

I'm trying to do a black screen fade with just UMG, but the map loads too fast for the player controller

#

On server join

#

What would the earliest place I can spawn the UMG to prevent this?

#

I know you use slate for this @thin stratus, but is there a way to do this with umg?

ember needle
#

Do many of you use uPNP for MP?

versed island
#

A quick question, I really need to create my own online subsystem for online games? or can I use null and implement my own game session?

bitter oriole
#

You don't

#

Use Steam if you're on Steam, use PS4 if you're on PS4...

#

If you're not using any online service then yeah you need one for matchmaking

#

But you have bigger problems than the game side if that's the case

versed island
#

Understood, thanks @bitter oriole

thin stratus
#

@raven holly Not really. The easiest is really just hooking into the Map Loading delegates

hollow pulsar
#

Ok Super Noob question but how Do I get an event to run on server and all players?

twin juniper
#

@hollow pulsar use multicast RPC

hollow pulsar
#

Multicast is not replicating to player 2.

twin juniper
#

here's an example using multicast. you'll need to use has auth, as well. i am firing a laser here. if the exec flow is a remote auth user, it execs on server and passes that into a multicast rpc that spawns out the laser. if it's auth exec flow, it automatically goes to multicast, since it's execing from server. multicast is only called from server.

#

clients cant call multicast RPC

#

so that's why you have to have an additional RPC to get it to multicast from the server, if it's a client.

#

hope that helps!

hollow pulsar
#

can I see whats left to switch authority?

#

Im a bit confused

twin juniper
#

so i have a event, fire laser

#

i have conditiosn in my game if the laser can fire.,

#

if the laser can fire, then i go thru that server logic based on which weapon is selected in my weapon selector.

#

you'll need to write your own logic for whatever you want to do in your game prior to has auth.

#

the logic block i gave you in the first pic is the paradigm for using multicast though.

meager spade
#

@hollow pulsar in simple terms, Client can't use Multicast but server can, but client can send request to server, which can then run the multicast. the has authority makes sure we are not the server. if we are not authority we ask the server to send the multicast for us, but if we have authority then we can just send the multicast.

twin juniper
#

^

#

from the unreal doc page There are 3 primary types of replicated functions: Multicast, Server, and Client. Multicast functions should be called on the server, where they are executed, and then forwarded automatically to clients. Server functions are called by a client and then only executed on the server. Client functions are called by the server and then only execute on the owning client.

#

so since our clients can't say - oh look at me i wanna do a multicast i wanna make all the players do something, it's like this because it's a breach of security.

#

so

#

we have to make sure to use our server to do a multicast RPC

#

for security reasons

twin juniper
#

get it?

hollow pulsar
#

Not really my event just doesnt seem to be going though should I send a screenshot?

twin juniper
#

yep alt prtscr ur bp and send it over by ctrl v ing in here

hollow pulsar
meager spade
#

hmm right

#

Death should not be executed on the Server

twin juniper
#

yeah

meager spade
#

it should be kept local

twin juniper
#

first thing i saw is death should not be exec on server like he says

#

notice how my my fire left in my pic is local?

#

you exec on server only starting at certain points in your exec flow

#

unless you want everything to be exec on server

meager spade
#

probably not what he wants, also is this script on an AI?

#

or a player

hollow pulsar
#

AI

#

Should I explain what im trying to do and what isnt happening?

meager spade
#

I am sure all AI Controllers are owned by the server

#

yeah please do because i am lost ๐Ÿ˜„

hollow pulsar
#

When the Zombie loses all of his health I want him to die for all players

#

currently he dies only for the player who shot him

meager spade
#

right, then you are doing something wrong, cause the server owns the AI Controller which owns the pawn. If he is set to replicated, then when he die's he should be dead for all players

twin juniper
#

are you setting your AI pawn to replicated?

hollow pulsar
#

I have replicates and and Replicate movement on

meager spade
#

how is the AI Dying?

hollow pulsar
#

set life span

#

Should I use destroy actor?

meager spade
#

so you are not tearing him off or removing his controller?

hollow pulsar
#

I guess not

meager spade
#

not sure if you have too, but i do with my AI

hollow pulsar
#

Yeah but my print strings arent coming out at all either

meager spade
#

what his lifespan set to once he is dead

hollow pulsar
#

3 seconds

meager spade
#

think i need to see more of the blueprint to understand

hollow pulsar
#

uno momento

meager spade
#
{
    auto AiController = Cast<ASPECAIController>(GetController());
    if (AiController)
    {
        AiController->CleanUpPendingDeath();
    }

    bReplicateMovement = false;

    GetWorldTimerManager().SetTimer(TimerHandleDeathAnimStop, this,
        &ASPECBaseAI::DetachFromControllerPendingDestroy, 0.1f, false);

    /* Disable all collision on capsule */
    auto CapsuleComp = GetCapsuleComponent();
    CapsuleComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
    CapsuleComp->SetCollisionResponseToAllChannels(ECR_Ignore);

    SetActorEnableCollision(true);

    SetLifeSpan(20.f);
}```
#

that's how my AI dies

#

@hollow pulsar we can make use of the bool you set

hollow pulsar
#

Whats the idea?

meager spade
#

make your dead variable replicated

#

with notify

#

make that

#

then inside OnRep_Dead

#

give it a try

hollow pulsar
#

They die on screen but are alive on the server still

#

Sorry for pestering but this is just very confusing

twin juniper
#

you have to replicate all the vars where you have enemy AI health.

#

so that everyone knows the health=0 when it's called.

#

that's basically what i do.

#

except i dont use ai pawn, i use this on my main pawn. i don't currently have coop for my game.

#

just single, and multi with other ships (no ai)

#

so just try setting your vars to replicated.

#

thats how i handle death for my main pawn

#

notice the shield var is repped

#

i dont use notify for mine, but you can try what works for you. just keep trying things i'm sure you'll get it.

hollow pulsar
#

Yeah Ill just keep trying ๐Ÿ˜„

fleet raven
#

how can I force disconnect a player with a message?

meager spade
#

@fleet raven i suppose you need to send remove player but just before you do pop a widget on there screen with the reason

fleet raven
#

how's that supposed to work though

#

closing the connection would prevent sending anything else

meager spade
#

depends how you are disconnecting them

#

there is a an override in PlayerController which you could override and check for a message which has been set by the server for the reason of disconnect

#

just before they logout

#

that might be too late tbh

fleet raven
#

gamemode is server only though

meager spade
#

how are you forcing the disconnect?

potent prairie
#

hmm why would a dedicated server on my own pc have fewer bugs than a dedicated server remotely?

#

I setup a remote dedicated server and it's got several bugs that weren't appearing at all running the server locally

#

makes testing really difficult

static lynx
#

I'm trying to figure out how to call a RPC on a client that I'm looking at through blueprints. So client 1 tells client 2 to execute function x. Any tips?

fringe dove
#

@static lynx on client 1 call a server RPC on an actor its player controller is net owner of, then when server receives have it call a client RPC on actor that client 2 is net owner of

sharp spire
#

Hey guys what's the best way to go about MP movement without a local stutter on clients?

#

Is it a simple auth check and if remote, let the server know then local movement? Or local then let the server know

#

Or none of the above

verbal wave
#

@sharp spire MP movement prediction is very complex. you'd better just use CharacterMovementComponent to handle that

errant vapor
#

i want to tearoff an actor and then destroy it on the server, but clients seem to receive destruction before the tearoff replicates... is the only way around this to delay the destruction on server?

meager spade
#

how are you destroying the actor?

errant vapor
#

atm im doing

TearOff();
ForceNetUpdate();
FlushNetDormancy();
Destroy();
#

im assuming destroy ticks before replication... or replication checks for pending destroy and cancels or some such

glossy vessel
#

Whats the best way to debug why my Dodge in my Custom MovementComponent and Replication doesnt work on a dedicated server?

next osprey
#

AddOnScreenDebugMessage

#

everywhere

#

thats usually how i do it

#

just print so much stuff that half the screen is flooded with debug info

#

@glossy vessel

glossy vessel
#

@next osprey thanks, i'm doing that already ๐Ÿ˜„

next osprey
#

then you must just need more prints

glossy vessel
#

and i still have no clue why he doesnt move if i press the button

next osprey
#

solves every problem

glacial lotus
#

ok, time to add multiplayer. Where should I start? The game will be 4 player cooperative game versus lots of bot enemies .

meager spade
#

what do you mean where to start?

glacial lotus
#

I mean, any recommended tutorial for what I want to do? 4 coop players vs. bots

meager spade
#

blueprint based or c++ ?

#

or the proper way, mix of both ๐Ÿ˜„

#

jk

glacial lotus
#

blueprint

worldly sundial
#

does anyone have any recommendations on what i should use and what tutorials i should follow to get a matchmaking system like paragon

#

and will i suffer from performance issues if i leave the matchmaking all to blueprints

full bane
#

how can I connect to a specific port?

#

using open + ip works

#

but how to connect to specific port? ๐Ÿ˜ƒ

worldly sundial
#

is gamespark not up to date for 4.19?

balmy kindle
#

hi, i have a triggerbox that creates a widget if a specific player enters it. But the widget is displayed for all players. What do i have to change that only the player who enters the trigger sees the message?

balmy kindle
#

got it. In case you come to the same problem. There is a "IsLocallyControlled" node.

agile lotus
#

I'm having an issue where a timeline is starting a second late on servers perspective

#

on clients pawn

fierce oriole
#

Any way to single out the first player connected OnPostLogin on a dedicated server? I want to set a var on only the first player state connected. I'm so close!

agile lotus
#

Check if its the first one in the index of player arrays

#

If I have a function that is called on Event Tick that I use to do AnimNotifies for Paper2D should I replicate it?

potent prairie
#

are mouse release inputs buggy on servers? I notice that sometimes the server doesnt catch my release event. Never happens when I test in the editor though

fossil spoke
#

@fierce oriole Just use an Gate?

#

Or just an simple bool?

sharp spire
#

Oh jeez.. are there any mobile solutions for wind? Speedtree and SimpleWind aren't mobile supported

fierce oriole
#

turned out it was mostly a timing issue! The variable I was setting on the first player did not replicate by the time the other clients checked for it. Once I accounted for that (by moving the nodes a little further on) the gate and checking array worked

glossy vessel
#

Do we know if Fortnite uses the standard UE4 movement component replication or one similar to UT with changes to how the replication works??

kind bay
#

@fierce oriole have you checked that it also worked when players have higher latency? If not I would test that to make sure your fix still works. (Net PktLag in console to simulate)

arctic willow
#

Hi! Im currently working on a two player endless runner and wanted to start the Round with a Countdown, so i created a Timeline for it and when the Timeline ends, enable the Movement of every player. But somehow only the Server does start after 3 seconds. The client is starting after ~ 1/2 seconds. Can anyone help me? Do i correctly get the Players Controller?

gleaming bobcat
#

Hey. For interpolated smooth movement from A to B of player character should I use FSavedMove_Character ?

tender gale
#

Where in the engine source code is the core networking layer for player input, etc. located?

arctic willow
#

This doesn't work for the clients only for the server. Can anyone explain this to me?

#

This is in the BP_Character.
I could use another BP and iterate through every player and disable the Movement, but this should also work doesn't it?

#

actually it also doesn't work when iterating through

meager spade
#

i think you also need to set it on the server

#

not just the client

#

for that client

#

@arctic willow ^

arctic willow
#

so from the server (like the gamemode) iterate through every player and disable movement?

meager spade
#

you can do that if you want or just do a server call from beginplay

#

setting your movement mode

arctic willow
#

how do i do a server call from beginplay?

meager spade
arctic willow
#

ah interesting, thx alot @meager spade !

thin stratus
#

Why the server rpc

#

Ah nvm

#

But still, if the actor exists on the server, it will call BeginPlay on the server too

#

Would only really make sense of you filter with switch has authority or?

wary wyvern
#

Hey guys. I need to move and/or rotate my character from server, manually using Tick function.. What nodes should I use? SetActorRotation does not work, as well as AddMovementInput.

fleet raven
#

is replicating an FTransform going to send the full size thing?

bitter oriole
#

Nah, there's a compressed version

slim holly
#

hold on, I think it might

#

cuz there's a serialize function

meager spade
#

@thin stratus i never really checked, i just figured that's why it wasn't working, but maybe there was more to it than that

fleet raven
#

@bitter oriole how do I use the compressed version? FTransform seems to have no NetSerialize method so I assume it replicates the quat and 2 vectors separately... which don't compress by default?

bitter oriole
#

Well, I thought there was a _NetQuantized version like FVector

#

But nope

fleet raven
#

use case here is an actor that always interpolates towards a target transform that can change

#

replicate movement looks like garbage, so I replicate the interpolation target manually and do the same on a client

bitter oriole
#

Yeah, replicate movement isn't nearly useful

hollow pulsar
#

Hey guys quick question how would I replicate an Interface?

meager spade
#

why would you replicate an Interface?

hollow pulsar
#

I have an interface for dealing damage and I need to replicate it.

meager spade
#

you don't replicate the interface, interfaces are interfaces, they are like contracts. the define what the class that implements the interface MUST have.

#

there should be no logic that needs to be replicated in the interface

#

so @hollow pulsar explain what you are trying to do, because it sounds like you are doing some weird stuff if you need to replicate an interface

hollow pulsar
#

Im probably am doing something wierd 1second

meager spade
#

thats a class not interface

hollow pulsar
#

Im trying to pass the data from event take damage to the server

meager spade
#

so TakeDamage is the interface

hollow pulsar
#

Yes sir

meager spade
#

well TakeDamage is defined in the interface

#

how are you calling TakeDamage ?

hollow pulsar
meager spade
#

does TakeDamage ever get called?

#

ie if you put a print debug

hollow pulsar
#

Yep it gets called but not on dedicated server

meager spade
#

yeah that code will need to be executed on the server

#

a client can't call that code and expect it to apply damage to the zombie owned by the server

#

but the client can ask the server to apply the damage

#

unless that functions is called in a server executed event

hollow pulsar
#

So the client cant call take damage so how would I have the client ask the server to apply damage?

meager spade
#

a server executed event

severe nymph
#

@hollow pulsar from the client your event will either line trace or overlap or hit. These events fire on all clients and the server. You switch has authority then execute the logic chain. Then call a replication event on remote of the switch to multicast the sounds and visual effects etc

hollow pulsar
severe nymph
#

Client logic works on remote of switch and server logic is on authority

meager spade
#

no

#

where you call TakeDamage from

severe nymph
#

No

meager spade
#

that needs to be called from the server

severe nymph
#

Thatโ€™s overly complicated

#

The server will automatically call the take damage event

meager spade
#

@severe nymph no it won't cause he hasn't asked the server to call it

#

but he also doesn't need that in there

severe nymph
#

The server doesnโ€™t need to be asked

#

He just needs whatever event to exist on the server

#

Overlaps hits and line trace hit results already exist on the server

#

You just switch has authority and chain in the take damage

#

Having hit, overlap event that calls a rep that calls take damage is wrong

#

It causes replication race events

#

If you test in editor change your player count to 3

#

Then hit or overlap

#

You will see the print fire from all locations without multicast

#

This means switch has authority should be immediately called after those events

meager spade
#

@severe nymph i use this for applying damage, ```void ASPECInstantWeapon::DealDamage(const FHitResult& Impact, const FVector& ShootDir)
{
FPointDamageEvent PointDmg;
PointDmg.DamageTypeClass = DamageType;
PointDmg.HitInfo = Impact;
PointDmg.ShotDirection = ShootDir;
PointDmg.Damage = InstantConfig.HitDamage;

Impact.GetActor()->TakeDamage(PointDmg.Damage, PointDmg, MyPawn->Controller, this);

}``` and its run on the server, from a hitscan weapon

severe nymph
#

He is running blueprints

#

You are doing c++

#

Your scope is defined

#

He has to use the authority node

meager spade
#

yeah i get that

#

if HasAuthority->DoThis, if not ->ServerDoThis

#

type thing?

severe nymph
#

The has authority will allow him to decide what to do on both the client side and the server side but hit events in blueprint fire down the logic chain for all connections

hollow pulsar
#

When I run a dedicated server my linetrace is hitting the zombies

#

Its just the health is not being changed for both clients

severe nymph
#

Meaning on the clients it will print and on the server it will print

#

Do once is a good thing here too

hollow pulsar
#

Well Im still pretty confused on where I need to add the switch authority to.

severe nymph
#

Great place to start

#

Just remember when using blueprints that all overlaps and hits are fired on both the clients and the server

#

So if doonce isnโ€™t called or switch has authority isnโ€™t used the client and server state can become inconsistent

#

The client and server will execute the logic chain in parallel

#

So you need to decide up front that client that owns the object will have authority and replicate up to server what happens or the server will have authority do the logic and push state to clients

#

Rep events called from the client will only execute if they are owner of the actor and owner can only be set by the server

#

So the server basically passed authority to the client by setting owner and logic can be done client side and passed back to the server using rep. If itโ€™s damage actor nodes already on switch authority nothing special has to be done as that is server side and the take damage node on the client is already replicated

#

I know itโ€™s tough to get your head around but be patient and you will get it. Just keep testing and it will start to make sense.

#

So for a hit event on an actor I would literally do the following:

#

Eventonhit -> doonce -> switch has authority-> take damage

#

Elsewhere the on take damage event will fire

#

This is already server replicated and will affect that actor

#

On the remote branch call a replicatedserver event that calls a multicast event and in the multicast chain do particles and sounds

hollow pulsar
#

I hate to ask since this is pretty helpful but could I see a blueprint example?

#

Just a screenshot to put the words to

severe nymph
#

Let me see if I can dig one up off my phone as Iโ€™m not near a pc.

#

That a pretty simple example

#

Server authority eat and multicast

#

Hit events work the same way

#

You can call client logic on the remote branch if needed as well to eliminate lag and branch the multicast and not bool is locally controlled

#

That way multicast fires for everyone else since client already received the logic

#

Itโ€™s kind of up to you at that point on how responsive you want certain things to feel

hollow pulsar
#

Yeah Im gonna be honest I feel way in over my head here.

meager spade
#

@hollow pulsar it's not that hard once you understand the basics of replication

bitter lintel
#

Hey, anyone want to help a sibling out and test my plugin under basic circumstances in their multiplayer game? It's an object syncing plugin for whoever owns the object (client or server owned). I'm new to Unreal so I'm hoping I didn't just miss anything super blatant. I can return the favor somehow, playtest or look over all your marketing materials or something.
Easy add of a script to an object is how mine works.

severe nymph
#

Lol true that @meager spade just a bit of a bumpy road getting that foundation

twin juniper
#

@bitter lintel it a code plugin?

bitter lintel
#

@twin juniper Yes. But you can put it on a Blueprint. You just put it on whatever object you want to sync across the network. Whoever owns it controls the position.

#

Basically just replacing the Unreal movement replication with something that can be used for client owned objects also. As well as other features.

twin juniper
#

how would someone isntall that? i have a scr built game..

#

src*

bitter lintel
#

You would drop it in your plugin folder like you would for any plugin you download from the marketplace.

#

Like it would automatically do rather. Then you activate it like normal. That whole process is also one of the reasons I wanted a tester, lol. The plugin is veeerry strange compared to Unity's.

twin juniper
#

it on the MP already?

bitter lintel
#

No, I wanted to get someone who knew Unreal a bit more than me to drop it in their game and see if it works or if I just completely missed some obvious Unreal use case or something.

#

Before I submitted it. I just finished packaging it up today.

twin juniper
#

ah, where is it at? google drive? how do i get it?

bitter lintel
#

i probably should have done that already, one sec

#

You got anything you want me to playtest at some point or now, just message me.

#

Happy to return the favor ๐Ÿ˜ƒ

twin juniper
#

yeah i got a game on steam..

bitter lintel
#

sweet

twin juniper
#

we'll talk about it at some pt maybe

#

im stil finishing the levels. tons of placement and texturing etc.

wary willow
#

Just in case anyone ever has issues with ServerTravel , Seamlessly ( server travels but clients crashing).

Cases vary, but the fix for mine was to DESTROY all pawns before the ServerTravel call (this fixed all my crashes on clients)

If you handle spawning logic initially via OnPostLogin to get it working correctly post ServerTravel, you'll need to use HandleStartingNewPlayer instead since OnPostLogin only works once (since you only technically connect once to the game, you are only moving maps with server)

gilded olive
#

Hi guys, I need someone with deep knowledge of the charactermovementcomponent and the good will to help this poor coder. The thing is, I need to record the input that arrive in the server and then re apply it at some point to reproduce exact the same behaviour (more or less). I try to record the data which is passed when the server call Move Autonomous + the velocity and then re apply it but the result is not accurate at all. Anyone know something I need to take in consideration? or the best way to achieve this?

potent prairie
#

@wary willow so can I replace my OnPostLogin with HandleStartingNewPlayer basically on all my maps? I noticed I'm calling OnPostLogin in all my gamemodes haha

#

Should only be calling it on the initial map i take it

wary willow
#

depends on your logic. As long as you understand it's basically a DoOnce on connection @potent prairie ยฏ_(ใƒ„)_/ยฏ

#

But if you care about what happens everytime a player performs a ServerTravel, then yeah HSNP

potent prairie
#

Yeah I just replaced the onpostlogin with that Handle and it loaded fine

#

good stuff, learning new stuff daily

meager spade
#

I fixed that issue with my game few weeks back

hollow pulsar
#

Hey Kaos Ive realized what I need to do and I need a bit of help if you wouldnt mind

meager spade
#

@hollow pulsar okay sure

hollow pulsar
#

So the server receives the Take Damage Event

thin stratus
#

Couldn't you zoom in a bit more?

hollow pulsar
#

Sorry

#

woops

thin stratus
#

As far as I can see, it's a fire function in your Weapon

#

I assume you are spawning the Weapon in your Character?

hollow pulsar
#

Yes I am

thin stratus
#

Is the Weapon marked as Replicated?

hollow pulsar
#

Yes

thin stratus
#

When in the Character are you spawning it

#

(Need to prepare 1-2 things before we can move the fire function to the server)

hollow pulsar
#

Here is where theyre being spawned and selected

thin stratus
#

These RPCs should be ServerRPCs

#

Not OwningClient

#

You want to tell the Server, in your Character, via ServerRPC to spawn the weapons

#

Since they are marked as Replicated, they will also spawn for the Clients then

#

UE4 takes care of that for you

#

You can save the current weapon in a Replicate Reference Varaible to access it

#

Given you have done these changes, you would want to make sure, that when spawning the Weapon, you specify an Owner on the Weapon when spawning

#

So you can also perform RPCs in the Weapon

#

This can be done on the SpawnActor node

#

For the Owner you can use "Self" or "GetController"

#

Up to you

meager spade
#

@thin stratus he was having issue of client fire not damaging AI yesterday.

thin stratus
#

Once that is done, you can easily use the Replicated Weapon Variable, on the Client, to call "FireWeapon".
In "FireWeapon" you can then call a ServerRPC

#

Well he is not fully understanding the concept yet, as far as I can see with his ClientRPCs

meager spade
#

I tried to explain it needed to be run on the server

thin stratus
#

So tl;dr:

  1. Change your EquipWeapon function to "Run On Server".
  2. When spawning the Weapon in your EquipWeapon function, specify the "Owner" parameter (might be hidden in the little arrow at the bottom of the SpawnActor node) by passing "self" or "GetController" into it.
  3. Save the ReturnValue of the SpawnActor node into a Replicated Reference Variable to your Weapon.
  4. When Firing in your Character, use the Variable from 3. to call "FireWeapon" on the Weapon.
  5. In the Weapon, in FireWeapon, check with "SwitchHasAuthority" if you are the Server or a client.
    5.1. If you are a Server call the rest of the FireWeapon code to actually fire the weapon.
    5.2. If you are the Client, call a RunOnServer RPC (Server_FireWeapon) which then simply calls "FireWeapon" again.
#

@hollow pulsar

#

And before blindly following that list, make sure to ask when you aren't sure why one of the points is necessarry#

#

Otherwise you won't learn

meager spade
#

@thin stratus do you need to use beacons for a party system ?

wary willow
#

You should ask @chrome bay

#

He is the expert around here for Beacons ๐Ÿ˜‰

#

@meager spade