#multiplayer

1 messages · Page 417 of 1

hardy cape
#

using the authority pin

winged badger
#

have the server print its location

#

it might not be actually falling, it might be just the client thinking it is

hardy cape
#

it snaps to the right location but it falls due to gravity afterward

winged badger
#

i am just guessing here, but i doubt gravity scale is replicated

hardy cape
#

oh i see what you mean

red ledge
#

projectile movement should be replicated tho

#

so the server should override the location I think

hardy cape
#

yeah the server would correct its position either way id think

manic pine
#

ys, every few frames

winged badger
#

unless that is optimized away

manic pine
#

but inbetween those, client would simulate gravity

winged badger
#

so it saves bandwidth unless its moving under its own power

#

again, guessing, but i learned not to assume anything 😄

red ledge
#

yeah

#

@hardy cape maybe try to turn off the simulate gravity option on both but set the location and velocity on server?

hardy cape
#

@winged badger you're right i have it print the location on both, and the server has the correct location

winged badger
#

and its not autocorrecting for some reason

hardy cape
#

got it to work by setting the gravity scale in a multicast event

#

thanks @winged badger and @red ledge

#

lol multicasting is solving other problems i had, i love the snowball effect of solving one problem

manic pine
#

multicasts are kinda dirty though

#

technically, if a player joins immediately after your multicast

#

your behavior will fail for that client

winged badger
#

or walks in from outside net relevant range

manic pine
#

and that, ye

#

thats why replicated properties are preferable for important gameplay-related stuff

winged badger
#

what you could do is replicated that boolean, placed

#

with RepNotify

#

and set velocity and gravity scale inside OnRep

hardy cape
#

I think I get it. Only use multicast if its okay for a client to miss it. In this case, its not.

winged badger
#

its good for stuff that is fire and forget

#

play sound, play animation, open some widget for players in area

hybrid cypress
#

Has anyone attempted or researched doing something like having transition “tunnel” type map sandwiched between two world maps and having trigger volumes at either each end of the tunnel map for background loading of the world map that the player is about to enter? Isn’t this more or less what vanilla wow did?

unique thunder
#

@hybrid cypress sounds like level streaming

#

pretty sure you can do multiplayer level streaming, don't know much about it though

#

how is this handled in a multiplayer scenario?

#

I tried getting the 'Controller' of the owner but getting null errors

#

(testing locally)

manic pine
#

its not(handled in multiplayer)

#

client also doesnt have access to other clients' player controllers

thin stratus
#

DamageCauser and InstigatedByController is something for the Server

unique thunder
#

Ah,

thin stratus
#

The node is also only for Servers to call

#

@hybrid cypress Well you can Seamless Travel

#

That gives you a Transition Map

#

But it's still a bit of loading involved

#

LevelStreaming is more for the current Map to not load everything at once

#

So if you move between two worlds/maps, it's not used for that

#

Specially since Instances of Maps (like WoW's dungeons) are their own Servers

#

With UE4 you need to have a DedicatedServer per WoW Dungeon Instance

#

And connecting to them will be through a HardTravel

#

So loading screen

#

You could maybe workaround this by not using UE4s Replication code, but using a ThirdParty system

unique thunder
#

like this?

#

I still get null errors but im assuming its because I'm using 'Controller' and testing locally, let me know if it looks right (takes 30-40min to deploy the ded servers for actual testing later)

thin stratus
#

Well, you already spawn on the Server

#

So the Grenade will exist on everyone.

#

You can easily start a Timer or so on BeginPlay (SwitchHasAuthority!) and let that TimerEvent call the ApplyRadialDamage

#

No need for a ServerRPC if you already are on the Server.

#

And when spawning on the server you should also have a valid controller (if the pawn is possessed)

unique thunder
#

to confirm, if something is spawned on the server & is a replicating actor then BeginPlay executes on the server by default, correct?

manic pine
#

everywhere

unique thunder
#

kk ty

thin stratus
#

It's not a Multiplayer concept. Spawning a replicated Actor on the Server will cause it to spawn them also on the Client

#

They are all their own instances, just linked via a NetID

#

And each of these instances calls BeginPlay

manic pine
#

its best to see servers and clients as running completely different games, with the only connection being replicated stuff

unique thunder
#

also it looks like the damage radius isn't in the same units as most things in unreal?

thin stratus
#

It is

#

It' all cm afaik

#

so max radius of 200 is 2 meters

hybrid cypress
#

@thin stratus thanks for the info! I was more thinking of a way to split up my large world map (8x8km into managable chunks mostly for navmesh purposes, and having the seamless transition between maps feel like the players weren’t really loading but still in the same world. Perhaps this is more complicated than just level streaming though.

thin stratus
#

It's a different concept alltogether

#

Level Streaming: Loading and Unloading Sub-Levels, while keeping one Persistent Level.
Seamless Travel: A specific way of ServerTraveling in which the Clients stay connected, waiting on a Transition Map (which is usually way smaller so it loads fast) until the main map is loaded and then to follow the Server.

#

For NavMesh stuff and one big map you use the levelStreaming stuff

#

While the NavMesh has to sit in the Persistent Level and needs to be set to dynamic or whatever the name is

hybrid cypress
#

Ah ok gotcha I’ll try to read up on setting a dynamic navmesh for a large open world multiplayer environment then and see what I can find. Thanks!

random thunder
#

Hello. Did anyone get the Vehicle Advanced content to work in multiplayer reliably?

#

It kind of works, but after a very short time of driving, location and rotation of the vehicle are very different on the client and on the server.

#

Only problematic from Client to server, driving on the server replicates fine to clients

zinc zealot
#

dunno

#

any tip to why this is wrong ?

#

im pretty sure its done well

#

for some reason

#

this is what the client with the pistol sees

#

the other client doesnt see the animation nor the pistol

#

and the server sees the pistol but not the animation

winged badger
#

i find your blueprints exceptionally unreadable

zinc zealot
#

why ?

winged badger
#

can't see most of the wires

zinc zealot
#

wait

winged badger
#

that MakeTransform looks like it belongs to DestroyActor bit

#

but it doesn't

zinc zealot
#

ye sry about that XD

winged badger
#

that is not sufficient to replicate a pistol draw

zinc zealot
#

why?

#

i just want it to spawn.

winged badger
#

its not replicated that i can see

zinc zealot
#

where ?

winged badger
#

the pistol

zinc zealot
#

the spawn ?

#

i can replicate that ?

winged badger
#

the pistol actor itself

zinc zealot
#

what do you mean ?

#

how do i replicate that

winged badger
#

you set it to replicate

#

still haven't read the Compendium, huh?

zinc zealot
#

.. :-:

#

sry...........................

#

i ticked replicates

#

isnt working

#

but i suppose i need to read the compendium ._.

#

it says all clients see if it replicates but only if the server spawns it

#

but the server is spawning it isnt he ?

#

it*

#

well i got the pistol to spawn 😃

#

got it to work 😃

bleak lily
#

the timer works on the server but the numbers in the widget dont show for the client

bleak lily
#

well what is the specific issue I would look for in it

#

I already tried RPC's

#

and it didnt work

#

its a widget replication issue I think

winged badger
#

widget replication issue is that widgets do not replicate. at all.

bleak lily
#

oh

#

then I guess its not that then

#

since it shows up for the first person

#

yeah it shows some of the widget but not the things that change

#

since its a countdown

#

could this be an issue

#

its in the widget bindings

winged badger
#

GameMode doesn't replicate either.

#

read the compendium

bleak lily
#

a playercontroller will though right

#

so should i just paste it in a player controller

winged badger
#

which playercontroller?

#

😛

bleak lily
#

I only have one

winged badger
#

no, you have at least 2

#

to rephrase, which instance of the PlayerController?

bleak lily
#

well I kinda wanted it to be for both of my characters but they share the same player controller

#

actors*

#

I have two actors

winged badger
#

you have 2 viewports, a host and a client

bleak lily
#

oh

#

yeah

winged badger
#

so you have 2 players

bleak lily
#

yeah

winged badger
#

so each has a playercontroller

bleak lily
#

oh I get what you mean now

#

the one that was having the issue was the second one

winged badger
#

and if you add another player?

bleak lily
#

I should try that

winged badger
#

then you'd run the counter in 2nd and 3rd controller?

#

what about 15 other players?

#

not the way to go

bleak lily
#

yeah the only one that works is the first one

winged badger
#

because for that one, the GameMode exists

bleak lily
#

ooooh

#

I guess the only other choice is

#

a gamestate

winged badger
#

which is replicated, and everyone has one

bleak lily
#

oh cool

winged badger
#

all of this is in the compendium, btw

bleak lily
#

should I do gamestate base or gamestate

#

oh sorry

winged badger
#

gamestate is derived from gamestatebase

#

and contains the match logic

bleak lily
#

crap

#

I made it a gamestate or whatevs and it is a little different

#

no hud now shows up for the other player controllers now

#

the first one it does

#

but the other ones dont get one

azure karma
#

Hello, I am trying to get a dedicated server running with steams server browser. The only problem is, that the server only shows up on the lan tab in steams server browser and I can't get it in game. I read that the reason for this could be that I need to run Server and Client on a different machine but this does not fix it. I also forwarded 27015 and 7777 on my router and windows firewall 😦 Does anyone have an idea what else I could try?

winged badger
#

turn off Presence, i think

#

on the Session

azure karma
winged badger
#

if you're doing it in BP AdvancedSessions Plugin (free, download from forums) will expose what you need

#

untick presence

#

i think it even tells you to if you hover the node

azure karma
#

Okay I will try 😃 Thank you

bleak lily
#

yeah but now that I put it in gamestate the widget wont show up in general for the other player controllers

#

before it would not show only certain parts

#

oh shit it worked

unique thunder
#

I'm trying to make sure the playerstate is valid on server join but this sometimes works, other times does not. What's an efficient way of making sure it does?

#

This is where that boolean is set (since the chain before it is mandatory)

#

In the PlayerState BP

sonic frigate
#

hi, do you know working playfab project, from what i can rewrite my unreal multipalyer project ?
Or any other soltuion to create a multiplayer game( and if host leaves , dont stop the match ? )
I have tried gamespark, but i dont know how to make all movement and weapon handling , tutorials, or any help would be nice

elfin shard
#

I have a trouble with the camera rotation, it seems not be replicated on Client-Server

#

The Client camera looks locked on Z axes

elfin shard
#

Left: Server, Right: Client

winged badger
#

@unique thunder OnRep_PlayerState in c++

#

@sonic frigate Unreal will offer you no help whatsoever in achieving host migration

#

@elfin shard not enough information, no idea what your camera is attached to, what is moving it, anything really

cloud ledge
#

@elfin shard that's because your controller only updates yaw of your actor

#

You need to update camera manually probably, taking full controller angles instead

#

Since you probably don't want pitch to rotate the entire actor

#

You can get control inputs from the players controller on the client and use those angles for that

elfin shard
#

I resolved it

#

Thank you anyway

versed socket
#

@elfin shard Can you share what you did to fix it?

fierce haven
#

first take a multiplayer, anyone have any clues as to why my damage can damage himself but not my client?

#

i have the delete key bound to a function that calls TakeDamage(25.f)

#

when i press delete from server player the health goes down and player 2 can see players 1 health going down

#

but if the client (player2) presses del the function does get called cause i can see me UE_LOG in the output log, but health stays at 100 and doesn't get subtracted

sharp pagoda
#

@fierce haven You need to run an RPC from the client to tell the server to apply damage since the health variable is replicated. The server is able to damage himself since it is the authority already.

fierce haven
#

thats what i thought

#

but

#

"RPC functions can be very useful and allow either the client or the server to send messages to each other over a network connection.

The primary use case for these features are to do unreliable gameplay events that are transient or cosmetic in nature"

#

would damaging a player really be considered an unreliable gameplay event?

sharp pagoda
#

No, that's a strange definition for RPC, no idea why the "primary use case" would be for cosmetics

fierce haven
#

damn. unreal docs have failed me. okay so i should be using an RPC then

sharp pagoda
#

You use RPCs for anytime you need the client to communicate with the server

#

Check out the networking compendium, it will do you better for a beginner than the docs

#

It's pinned in this channel

fierce haven
#

okay but right now the player his damaging himself from a keybinding, so that makes since for the client to tell the server to damage himself

#

yea i'm reading the copmendium atm

#

but

#

in a real world scenario

#

player 1 would shoot player 2

#

would player 2 call the RPC to the server

#

or player 1

#

like is player1 saying "hey server, i hit player 2"

#

or is player2 telling the server "hey player 1 just shot me"

#

if that question makes sense haha

sharp pagoda
#

Well that's if you want client side server authority shooting, which is a bit harder especially for a beginner. A better approach for starters is to run the entire bullet simulation (trace or projectile based) on the server and the client, and if you're the server running the simulation then apply damage to the hit actor

#

And it would be Server I hit player X

fierce haven
#

got it. thanks! @sharp pagoda

#

Is there any pros cons to the 2 methods mentioned above? @sharp pagoda

#

Like why would anyone waste time doing client side server authority shooting if it was harder to implement if it didn’t have any advantages

sharp pagoda
#

@fierce haven Yes, client side server auth is what games like CoD and Overwatch use to make the shooting more responsive on the client. Con of this is it's possible to cheat, so you have to be careful about how you design your hit rejection system. With server side shooting, if the client is lagging, some of the shots will appear to hit on the client (aka local particle affects and what not), but not actually hit on the server. Pro to this is if implemented properly you can't cheat it.

fierce haven
#

Alright I think I get it, thanks aha

#

thanks again*

#

Which method does pubg use so I know what not to do? Lol, jk

sharp pagoda
#

I would guess client side server auth projectiles

fierce haven
#

When you say client side server authority that means client calls the RPC which the server executes?

#

well. Client side server authority meaning, the trace spawns on both server and client but only the server actually deals the damage and replicates it

#

But if the client is lagging it could appear they hit the player (particle effects) but from the servers perspective it’s actually a missed shot

#

As opposed to server side shooting meaning, ray trace is only done on the server which then tells the client it’s a bit, server applies damage, and tells client to spawn particle (blood splatter)

#

it’s a hit*

sharp pagoda
#

No, it means the client runs the bullet simulation and when the client thinks he hits a player (locally), he asks the server to verify the shot, if it is verified the shot is replicated to all clients and the damage is dealt

fierce haven
#

Ahhh

#

And this is more or less prone to cheating as opposed to server side shooting?

sharp pagoda
#

More prone

#

But better gameplay for the client player

#

There are other systems you can implement too though, such as lag compensation

fierce haven
#

If I call a regular function (not an RPC) that I’ve defined inside my character class then that will only call on the client right?

sharp pagoda
#

Not necessarily, it will call on the local instance, which would be the server if you were playing as the listen server.

lean river
#

TMap replication still not an option?

fossil spoke
#

No

unique thunder
#

@winged badger OnRep_playerstate is in blueprints as well but it produces the same results, only sometimes works (that method actually works less often). Maybe the state is valid but my variables aren't replicating fast enough ..

random thunder
#

Anyone know how to get the blue man vehicle physics plugin working in multiplayer?

random thunder
#

@signal lance : you got some documentation on this or a forum post?

scenic tangle
#

anyone know how to quickly test a steam dedicated server? launching from command line doesn't seem to work. Unless there's some special setup that's required?

rose egret
#

seamless travel changes the game mode or keep the old one?

plain flume
#

Hello! Wanna ask a quick question. If I set replication Condition to be Initial only and change value many times. Then later when I client joins, does the client get the last replicated value and always stays with that, or does the Initial value mean the first value that was set before the server started to change things?

manic pine
#

its not 'initial value', its 'initial packet'

#

current value should be used

#

so clients can end up with different values

unique thunder
#

what's an efficient way of updating everyone's local UI/widget without desync? I'm multicasting the logic right now and for some reason everyone's out of sync (sometimes it doesn't even update for some people)

manic pine
#

your widget could bind a delegate on gamestate, then gamestate does a repnotify whcih fires it

unique thunder
#

I have an actor that decides when the widget should update, so its never triggered inside the widget initially

#

it is only told when to update itself (textrenders)

manic pine
#

so youre not sending information, just notification?

unique thunder
#

right now, the actor sends a float value to the gamestate, the gamestate then sends the float value to all widgets via multicast (triggered inside a repnotify), widget fires a local event updating the textrenders locally

manic pine
#

wat... a float value to widgets via multicast triggered by a repnotify?

unique thunder
#

float value = team score
repnotify = updates value for new players
multicast = I assumed to tell everyone's widget to update itself locally since widgets don't replicate

#

i can simplify and send the value to widgets directly from the starting actor, but how exactly? repnotify a reference to the widget, triggering a local event updating the float?

manic pine
#

hmm, you understand how repnotify works?

#

im confused by your use of both repnotify and multicast

unique thunder
#

i guess not 😂 from what i understand its something that is relevant for everyone, including new joiners

#

so im mainly using it in cases like this:

#

new player joins, sees correct character selection/skin on other players because the skins were set via repnotify

manic pine
#

not exactly

#

you have a replicated variable... this is replicated to clients, but normally they won't be told the value has been updated(though they can still read the updated value)

#

with repnotify, a function is run on that actor on every client, informing it that the value was in fact updated

#

so repnotify is essentially like saying "hey, i just updated this value for you, what do you want to do now?"

unique thunder
#

so when I run logic inside the repnotify that sets skeletal meshes & materials to a player, the repnotify updates everyone else telling them what logic ran so they can see the update themselves?

manic pine
#

no, the repnotify is the update

unique thunder
#

what's the difference between that and a multicast then?

#

they sound very similar

manic pine
#

repnotify relates to a specific variable

#

multicast can be 'missed'

#

if you call a multicast on an actor and then 5 seconds later a new player joins, he wont receive that multicast

#

repnotify also cant have any function arguments

unique thunder
#

so in the case of the score, how should I be updating the widgets? its tricky because widgets are local only so im not 100% sure.
in the actor that initiates the score update > ?

manic pine
#

its just informing the client that server sent a variable update

unique thunder
#

well, if the repnotify triggers a custom event, wouldn't everyone still see the event itself?

manic pine
#

yes, it would run on all clients

unique thunder
#

how would you tell every player's widget to update via repnotify (since new players need to be updated with the actual value)

manic pine
#

you can either find the widget from the RepNotify function, then tell it to update

#

or you can create a delegate which your widget subscribes, then on repnotify you fire that delegate

unique thunder
#

how will the initiating actor know which widget's delegate to fire off if the actor is replicated & widgets are local? or will it apply to all of them because of that

manic pine
#

this is local... RepNotify runs on the clients.. its a client function(though i think the blueprint version runs on server as well, bit unsure there)

unique thunder
#

I'll try this, thank you

manic pine
#

there's also the brute force approach of course, where you simply set the value on widget's tick

#

which is fine if its a simple UI, but becomes costly if its more complex

unique thunder
#

it's a few text renders, that's about it

#

(that update)

manic pine
#

in that case you might save yourself some work by checking if the score has changed on every tick, and updating the text renders if it has

unique thunder
#

@manic pine when you said "delegates" in the widget, did you mean event dispatcher?

winged badger
#

that is what blueprints call delegates

unique thunder
#

we can't use delegates to pass floats though, so would the widget have to reach out to the actor to get the values manually?

winged badger
#

why not? you just add an input to them of float type

#

same as you would for a function or an event

plain flume
pallid token
#

I'm learning as I go and creating classes that I plan on using in the final product. Should I learn how to run from a dedi before I do this? Will there be a lot of changes that I have to make to these classes for a dedicated server to work? \

worthy oak
#

This has probably been asked a thousand times... but are the default session nodes bugged for steam or is it just cause im using the "spcae war" game app id?

#

the nodes dont seem to work but I can join games manually through the consol command "open steam"

rose egret
#

after seamless travel to a new world, game mode, player controllers, player states and game sates will be replaced ? am I right?

#

but I feel UE4 doc says something else :))

lusty portal
#

2:41 AM] eezstreet: hi....i'm having some inexplicable issue with a postprocess component
[2:42 AM] eezstreet: i have some dynamic material instances that are added to it as a blendable. and i have parameters that are being changed on it. however when i am in a multiplayer game, only the first person to get affected by it will have the effects show up at all !!
[2:42 AM] eezstreet: and i've checked. it's a client function
[2:42 AM] eezstreet: and being executed by the right client
[2:43 AM] eezstreet: or, the server is only affected or the client is not affectd
[2:43 AM] eezstreet: or vice versa
[2:44 AM] eezstreet: it's pretty random actually

#

no idea why it's happening. just straight up doesn't work

#

this is a PIE session btw, not standalone. maybe that matters?

dense citrus
#

who knows a solution for Overhead Playernames visible for own team? Playernames and all i have but can´t figure out how to filter the visibility only for same team

winged badger
#

pull the Names off PlayerState, as well as TeamID, and set widget visible if (your) PlayerState.TeamID == (target) PlayerState.TeamID

#

@lusty portal PIE doesn't affect it, and with the information you provided best guess is you misused GetPlayerController[0] or GetPlayerCharacter[0]

lusty portal
#

@winged badger i didn't use either of those; i have a blueprint with a camera component and a post process component on the camera. in beginplay i create a dynamic material instance and add it to the renderables on the post process component. all of the parameters are zeroed out on the material by default, so it doesn't show up.
then, when i want to show it, the server calls a client BlueprintImplementableEvent which is responsible for setting parameters on the postprocess to make it visible. i can confirm that the client function is getting called and i can confirm that the renderable is getting added and that everything is right. it just physically doesn't show up except for one client.

winged badger
#

you have a single... CameraActor for everyone?

#

or does every client have its own, non-replicated version?

#

any LogNet warnings in the OutputLog?

lusty portal
#

one camera actor for each client

#

not seeing any lognet warnings

#

well its not a camera actor actually. its' a camera component on their Character but still

#

my theory is that it's an engine bug

#

in the renderer

#

it's the only thing i think it can be

mellow cipher
#

Can you set multiple owners to an actor

plain flume
#

Anybody here player with the net Dormancy? How does is actually works? If the default setting is "Awake" and tooltip says that "game code tell when it's dormant" what does this mean? Is is code under the hood? What about if the dormant mode is Dormant Partial "Actor may want to go dormant for some connection".. Who or what tells that actor will go dormant in specific moment?

manic pine
#

you do

#

net dormancy pulls the actor off the list to check for replicated property updates, and also disables client->server rpcs on that actor(but not server->client or multicast)

plain flume
#

Yes. I read about that part, but haven't found info about when actor goes to dormant.

manic pine
#

when you tell it to

plain flume
#

Oh.. Right.

#

I just don't undestrand that if we can use the SetNetDormancy(ENetDormancy NewDormancy), what is the difference between "Never and Awake" settings. If both of them are awake from the beginning and you need to call the SetDormancy function to change it.

manic pine
#

not sure, but id expect that you cant actually change it if you set it to Never

#

would need to look at the code to confirm

plain flume
#

hmm, that would sound logical

dusty halo
#

Hi. Anyone can tell me how to disable replication or set it to owner see only for charachter? I need to set it up for welcome screen. If I untick replicate, it still replicates

plain flume
#

// If not dormant, flush actor from NetDriver's dormant list
if (NewDormancy <= DORM_Awake)
{
// Since we are coming out of dormancy, make sure we are on the network actor list
MyWorld->AddNetworkActor( this );

        NetDriver->FlushActorDormancy(this);

        if (MyWorld->DemoNetDriver && MyWorld->DemoNetDriver != NetDriver)
        {
            MyWorld->DemoNetDriver->FlushActorDormancy(this);
        }
    }
#

this is the SetDormancy function. It seems to Check if values is Awake or smaller.. That should include the first one on the list also (never)

#

But oh well.

manic pine
#

yeah, not finding a single reference to DORM_Never in the engine

#

maybe its something that was never implemented

#

so its treated just like Awake

rose egret
#

can I use RPC in my cheat manager class or should I move everything to PlayerCOntroller?

shy idol
#

Does a USTRUCT property need to be UPROPERTY(Replicated) to replicate, or simply just be a UPROPERTY()?

red ledge
#

@shy idol it has to have the (Replicated) property

#

@dusty halo what is your welcome screen and how do you show it?

manic pine
#

ustruct properties are replicated by default and must be selectively excluded from replication using NotReplicated

shy idol
#

Cool, thank you ^

graceful cave
#

is there a way to allow the client to manipulate their own character movement variables without the need for the server to set it too?

#

im aware i probably need to edit the engine source or create a child component and override things but ideally id only like the server to move the client when the server sets the client location

#

seems like unreal is a lot more strict with character movement replication than other engines

dusty halo
#

@red ledge it's player creation lobby. But already in a server

red ledge
#

@manic pine that is if the struct is replicated right?

manic pine
#

right, if the struct is a var that's a replicated uproperty

#

then all uproperties inside it are set to replicate by default

red ledge
#

oh okay I though that he meant that the struct is replicated just because it's a UPROPERTY

#

@dusty halo I still don't know how you show it where is the code for that or from where do you call it?

dusty halo
#

@red ledge So after they join map, they should create charachter. And then I teleport them ti game map. ( can jon enytime, no nees to wait for round end etc). Anyway. As they all are on server already, the 2 players create charachters at the same time, they can see each other.

red ledge
#

@dusty halo so you want the players not to see each other?

dusty halo
#

Yes, these specific charachter, becouse after player create their charachter( press connect) parameters are saved, these charachter gets destroied and spawn actual game charachter

red ledge
#

you can just tick off the "Only Relevant to Owner" option under the replication setting in the charater blueprint I think

#

or on begin play check if the character is locally controlled, if not, just hide the mesh or something

dusty halo
#

@red ledge Relevant to Owner is not working. Will check that other option

slate veldt
#

When a gameplay session starts, does it stop advertising (subsystem Steam)

#

On Machine A I've got a match running, waiting for a second player to join before starting (game mode is in waitingToStart) on one machine with Steam Account A

And on Machine B (with Steam account B) I'm searching for sessions, but coming back with 0 results (or at least 0 valid results that can be parsed because I'm using the default App ID so I think that means other game servers come up from other developers that don't parse)

#

How do I see where a session stops advertising/ensure it continues to advertise once the host has travelled to their own listen server session

winged badger
#

it does that by default

#

if you want to stop it advertising you need to do that manually

slate veldt
#

It does which by default sorry? Stops advertising or continues to advertise?

winged badger
#

for me (listen server) hot join worked out of the box

#

and i disabled it 3 minutes into the match

slate veldt
#

Okay, yeah I thought it should continue to advertise, is there anyway on my host to easily tell if I'm still advertising?

winged badger
#

from session settings? i don't remember and don't have editor on

slate veldt
#

No problem

pallid mesa
#

usually you'd get a warning on the client trying to join

#

or request the server

#

if the server is registered at all

#

for example, you can get a warning related to the queryport not responding

slate veldt
#

And would that be in the client's log?

pallid mesa
#

[2018.08.29-21.18.03:719][386]LogOnline: Warning: STEAM: Failed to respond IP:x.x.x.x

#

yes

slate veldt
#

Currently the host server is not showing up in the Steam session results so don't think it's that issue

pallid mesa
#

that's exactly the issue

#

the clients not being able to see the server

#

so when you look for it it will refuse to retrieve information about it

#

which means the server exists but it couldn't retrieve the proper information

slate veldt
#

Well this is what the client log gets: [2018.09.02-23.07.05:272][814]LogOnline: STEAM: Found 6 lobbies, finalizing the search [2018.09.02-23.07.05:272][814]LogOnline: STEAM: Search result 0: LobbyId=Lobby [0x1860000013069CF], LobbyId.IsValid()=true, CSteamID(LobbyId).IsLobby()=true [2018.09.02-23.07.05:275][814]LogOnline: Warning: STEAM: Removed incompatible build: ServerBuildUniqueId = 0x0000011a, GetBuildUniqueId() = 0x0040486f [2018.09.02-23.07.05:276][814]LogOnline: Warning: STEAM: Unable to parse search result for lobby 'Lobby [0x1860000013069CF]'

#

Basically, 6 x those last 3 lines

#

then finishes with

#

[2018.09.02-23.07.05:280][814]LogOnlineGame: Verbose: OnFindSessionsComplete bSuccess: 1
[2018.09.02-23.07.05:280][814]LogOnlineGame: Verbose: Num Search Results: 0

#

I'm guessing those lobbies are all other UE4 steam games using the default "SpaceWars" app id

pallid mesa
#

the last two warning seem really relevant, you could check on the engine where they are getting triggered

#

if you are using spacewars appid, you might have your own issues with listen servers

#

try booting up a server with -nosteam

#

and joining through open + ip

#

if that works then you can roll over with it. Just make sure the simplest things work.

slate veldt
#

Yeah, I'll take a look, almost certain it does work normally though (LAN games used to work in subsystem null, and if I just host a session on the main menu without joining the session as host, the session appears in the search results for the client)

pallid mesa
#

ports opened?

#

27015 and 7777

#

there are some ranged

slate veldt
#

I'll check now, but I've never had issues with port forwarding on this network before

pallid mesa
#

👍 main thing in the top of my head is search in the engine those warnings

winged badger
#

if its the same subnet

pallid mesa
#

and maybe that might help you to determine what is happening

winged badger
#

port forwarding doesn't come into play at all

pallid mesa
#

I assumed it is not, right?

slate veldt
#

Yeah, literally at home with a normal Router (BT Home Hub)

winged badger
#

you using advanced sessions?

slate veldt
#

Is advanced sessions a plugin? If so, then no

winged badger
#

i remember that LAN checkbox was better left unchecked when using Steam

#

on CreateSession node

#

even if it is LAN, not sure if it was my specific case or not

slate veldt
#

Yeah, Steam don't support LAN (you have to do that through subsystem null if you want it I believe)

#

I'm doing it all through C++, but obvs using the same functions pretty much

pallid mesa
#

btw @winged badger if you are not booked currently, I mentioned you on a thread that you might be interested: https://twitter.com/Element808/status/1036096481726353409

Any of my contacts beasts at @UnrealEngine 4 Multiplayer implementation? Might be looking to bring an additional person of this skillet on board, to help finish this feature in our "fully funded" mobile game project #UE4 @iveytron @UnrealAlexander #multiplayer #indiedev #g...

#

yes, it doesn't really matter, the main thing is that when doing sessions, literally a lot of things can go wrong

slate veldt
#

Aha sure thing, I've got a few more things I'm going to look into, and if I've still got problems I'll shout

pallid mesa
#

post here if you don't mind, that will help others with similar problems

#

I am currently trying to fix a query port problem on ue 4.18 on dc servers

#

the surroundings seem fine, probably a miss configuration or something else

slate veldt
#

Yeah, playing around with sessions is fun, it's basically a case of "Here is a robot with many moving pieces. why is that bit not moving as anticipated...." Pokes wiring "okay... not what I wanted but now I know what that does" haha

#

It's a mythical beast we need to tame

scenic tangle
#

are you guys using dedicated servers?

slate veldt
#

I'm not (not for the foreseeable future at least)

scenic tangle
#

so you're using two different computers to test right?

slate veldt
#

Yes, 2 different computers with 2 different steam accounts

#

1 thing I'm just about to test, noticed my code never specified a max number of search results in session search settings (boosted it up to 20 for now, it's currently returning 6 results, none of which are our game)

scenic tangle
#

20 is too low

#

try changing that to 1000 or something

slate veldt
#

Oh really? That many

scenic tangle
#

I couldn't find mine on 100

slate veldt
#

I've been able to find mine just fine on whatever it was already on haha, it normally pops up on search result 5 or so every time, it's just since I've started actually making the host go into their session rather than just creating it that I've been having an issue

scenic tangle
#

that app id is really weird.. I had a friend who could never find my sessions. I think it's region locked or something too

#

ah ok, what do you mean by "go into their session rather than just creating it"

slate veldt
#

Potentially, I wouldn't be surprised if it's locked to EU, US and Asia

#

So my testing this week has mostly been setup of the Lobby system (Plugins/OnlineFramework/Lobby). Whilst that is mostly finished, I've put it on hold and decided to op for a "Host Game" button which instantly hosts the game with default session settings (Listen server, map, game mode, non-LAN).

So the host goes straight into their map and game mode upon hitting host game

Prior to this (earlier this week) I've been creating a session on the main menu, but not travelling to it as it's been on the main menu (and the client can find this session and join it's "lobby beacon") The last stages to setting this all up properly is adding some settings to the lobby state for sharing host's UI selection for map etc, then when the host clicks "host" it will update the session before telling all client beacons to join.

So I know the session stuff works normally, or at least has been, I've never had a problem finding a session. But it's just now I've done this bypass of my lobby stuff that it's not been appearing in search results

#

The game mode the host is loading into is set to a delayed start, so it doesn't actually begin the game mode until a second player joins. I know that used to work with subsystem null LAN games

scenic tangle
#

hmm ok, I'm not sure then sorry.

#

can you post your session settings?

#

and the session search

worthy wasp
#

Hello all - we've encountered a problem on our live game - that i'm not quite sure how to handle..... the only information i've been given is that:

When an EU player joins our NA hosted server (NewYork) - the ENTIRE GAME for all players EXCEPT the EU player is lagged extremely bad.

When a session is established iwth only NA based players - the game runs fine.

I dont see this being a code relateed thing... i think its more so on the hosted server side - but i wanted your guys input..... anyone have any experience in this field maybe can consult our company for this?

slate veldt
#

Well... not sure I've actually changed anything, but it's finding the session now... I think there might have been a few things wrong

So in game, it wasn't showing up in the UMG as a reference recently changed meaning a code based event had changed itself to a custom event with the same name (now fixed), but that doesn't explain the lack of search results found in the log (Which is where I was primarily looking). I'm wondering whether one of the machines wasn't logged into Steam properly, although both logs showed they were doing things over Steam (which I don't think they would if they weren't logged in)

scenic tangle
#

haha ok glad you got it working 😃

slate veldt
#

Now to investigate why it won't join the session successfully!

#

Just looking through logs, it appears to be connecting but it thinks it needs to connect to the main menu map when it connects to host, which it is doing, but Host isn't on main menu map...

Eugh this is a problem for tomorrow morning, thanks everyone for your help! Sounds like something isn't being replicated properly in the Session information, I think the default map is main menu, so that's where to look tomorrow!

scenic tangle
#

yeah also check your ServerTravel function when you create the session

slate veldt
#

Yeah shall do, just shutdown desktop (where I sent last message) and about to shut down laptop (host machine) and just checked log... It has the correct map name in the log print of session dump, which is weird
I'll check server travel first thing tomorrow, cheers

scenic tangle
#

np, good night 😃

solar halo
#

Error: LoadMap: failed to Listen Any ideas?

unique thunder
#

im unable to replicate a custom enum state change in my animBP

#

in my characterBP, I set a reference to my animBP and then use that to set the enums in the animBp

#

but I can only see the enum changes on my client

#

I'm changing the enums in the characterBP through a repnotify using the animBP reference

#

?

plain flume
#

@unique thunder Are using RPC to tell server to change the enum?

unique thunder
#

@plain flume repnotify > cast to animBP > change enum

#

no RPC

plain flume
#

Hmm. So the client only changes the variable? You need to tell server to change the variable if you want all the clients to run OnRep function.

#

Otherwise only the one client sees the change ( the one who changed it)

unique thunder
#

I did try this as well:
server RPC > repnotify > cast to animbp > set enum

#

didn't work, though.

#

(im not casting to animbp, i set a reference to it on beginplay and im using that)

plain flume
#

Could you paste a screenshot of your repnotify function and where you set the variable?

unique thunder
#

Sure, here's the set-up:

#

That's it. Then the animBP uses that enum to switch in realtime

#

(Sorry, I added in the 'is locally controlled' just now, ignore that)

plain flume
#

Yes. There is the problem. That function "GestureFilter" only runs locally and changed the RepNotify locally

unique thunder
#

the 'is locally controlled' was just added in but I think it's running locally either way

#

how should this be done? server rpc > bool checks > repnotify > cast to animbp > set enum?

plain flume
#

Server doesn't know anything that values has been changed. Create another Custom Event like "Server Change Enum". Pass your end enum as parameter. and then let the server set the new enum

#

that should do the trick. Other logic can be as it is

unique thunder
#

by 'end enum', you mean the repnotify itself?

#

or a server RPC triggered inside the repnotify that sets the enum

plain flume
#

No, Repnotify seems okay

#

but for now, for example the LeftHandState is set only by client. So create a new custom event and set it to run in server. Let the server change the enum.

unique thunder
#

ah yeah, that worked!

#

thanks a lot

#

was running this on tick in the animBP before so it'll save performance for sure 👌

plain flume
#

Aah good!, I was just creating a simple example, but seems you don't need it anymore 😄

rose egret
#

what Actor.NetLoadOnClient actually means?
I have placed some actors to my level by editor. but they only replicate to one client if NetLoadOnClient is checked

red ledge
#

@slate veldt I have used steam sessions before and I was able to connect with someone from the US while being in Egypt so I don't think it's region locked, unless they changed something in the newer versions because that was in 4.15

#

I used regular sessions and a very dirty code but here is it if you wanna check it out, I used to travel to a server first and everything worked normally

#

might be the worst online code you will ever see

digital current
#

I can see the server from the client and the client from the server, so I am sure I am replicatng

slate veldt
#

@red ledge Hey, I think everything is mostly working fine now, there were a couple of bugs - A) screwed up a UI thing which explains why the result never showed up in game (although it wasn't showing up in the log either). B) One machine might not have been "logged in" to steam, which I thought they were but perhaps not
Sessions works fine now, apart from the fact that it's loading the wrong map, just about to look through the code now and determine whats up 😃

thin stratus
#

@unique thunder Are you really using a Switch to then set the Enum of the AnimBP?

digital current
#

could I get some help
When I use the virtual joystick ( default touch) on my server, the server recieves the input and the server moves, but when I use it on my client, still the server moves and not the client.

#

I found out something
normal axis inputs work for the client
but not the virtual joystick
any idea how to dix this
fix*

red ledge
#

@slate veldt ah okay that's great good luck!

chrome bay
#

@unique thunder yeah... why are you using a switch for that haha?

rose egret
#

how Ue4 get view position in mutiplayer? position of pawn in server?

#

I am moving My APwn on client side only by AddActorWorldOffset

mighty rover
#

Just joined this discord, to try and get some help solving a few multiplayer requirements I have for my latest mobile game. Trying to get the multiplayer done right for my game, so I'll be throwing a few questions at you smart folks :) first question, can an Android device act as a host for a 2-player game against an iOS device, and vice versa? Not local network, but online over the net. If so, what's that implementation like?

winged badger
#

i don't see why it wouldn't work

#

and the implementation should be same as if you connected 2 Android or 2 iOS devices (for android and iOS respectively)

slate veldt
#

Hi all, think I've found my issue with the wrong map loading:
It appears that during the construction of FURL it's getting the protocol back as unreal when I'm guessing for Steam it should be something else.

                {
                    Map = UGameMapsSettings::GetGameDefaultMap();
                }
                else
                {
                    Map = TEXT("");
                }```
#

I think that's my issue right there, is that protocol is coming back as default protocol (unreal) so it's setting my FURL Map value to default game map, where it should be setting it to blank

I think I just need to correct a setting in my DefaultEngine.ini under the [URL] region

#

This is the engine default:

Protocol=unreal
Name=Player
SaveExt=usa
Port=7777```
But I'm guessing in my project I should be overriding it with something like:
```[URL]
Protocol=steam
#

Can anyone confirm that for me?

chrome bay
#

I've never had to mess with that before

#

the only stuff I've had to set is just the platform service / usual setup stuff for steam

#

looks like wiki is still broken -.-

slate veldt
#

Yeah wiki is still broken, I've reported it on the forums haha

#

I had most of those settings, there were 1 or 2 that were missed out on a previous guide I read, see if it fixes it...

#

I swear if this fixes it, I'll be so annoyed at whoever posted the other guide I found online, pretty sure it was in the forums too

mellow cipher
#

This is probably a wayyyy to specific question, but can you make the server change a client's control rotation?

slate veldt
#

@mellow cipher I'd assume so, Assuming the server has full authority, I don't know specifically how you'd go about it though, perhaps just calling SetControllerYaw on the relevant PlayerController?

#

Still getting my problem with Steam sessions:
The travel URL is constructed as steam.15238493185165:7777//Game/Maps/MainMenu_Entry
(note: just added random numbers in example steam address above with example map name)

I still don't understand why my travel URL is being told to use the default game map rather than the map name in the session settings under NAME_MAPNAME key
Has anyone else had this problem before?

rose egret
#

how do I pause my server so that all AI controllers and .. don't call tick and ..?

drifting plank
#

Hello !
I don't understand why but my dedicated server didn't show in the internet tab of the steam server list.
I follow many tutorials about how to setup the server and every time, the server didn't show up in the steam server list.
I have opened my port and add the inbound rules 7777 and 27015 in my firewall and it still doesn't work...

My server is correctly built from the ue4 source and it works...
I detect it in the "Lan" tab but not in the internet tab :/
Anyone can help ?
thanks in advance 😉

slate veldt
#

Hosting your session on LAN?

#

That sounds like the problem, as you can see it on LAN

#

Also, are you hosting your session in blueprint or c++?

#

Also, Steam doesn't support LAN I don't think, so it sounds like you might be using SubsystemNull instead of SubsystemSteam

drifting plank
#

No Lan is disabled

#

I use too the advanced session plugin
And when I create my session, I have unchecked the lan option

#

My config engine ini is correctly setup too with the lines :

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=false
bUsesPresence=false

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
#

Maybe I miss a line in that ? -> I will try to add this line : bIsLANMatch=false

mellow cipher
#

You'll have to follow one of the guides on wiki

#

Steam dedicated server doesnt work out of the box with onlinesubsystemsteam

drifting plank
#

Really ?

mellow cipher
#

Yep

#

Welcome to the Steam dedicated subsystem hell club

drifting plank
#

What is the solution then ?

#

I found a lot of deprecated wiki, a lot of different informations. I'm a bit confused with all that stuff

mellow cipher
#

Not sure sorry, I never got it working with the subsystem

#

Hopefully someone here has had it working

drifting plank
#

And Do you know how to do it "inside the box" x) ?

#

We use the app id 480 but we see others server which use that app id in the internet tab but maybe it's not for UE4 games 🤔

slate veldt
#

In terms of seeing other servers with the same app id - ignore those, other devs will be using the same app id for their ue4 game development (such as me -hello!) but it will never be deemed a successful search result as their servers lobby/session settings won't parse with your own game's

drifting plank
#

Oh I found it ! I just misscase the STEAMPRODUCTNAME and the STEAMGAMEDIR and I was filtering with "Spacewar" so it didn't fount it :/

mellow cipher
#

Its working?

slate veldt
#

Where does a Steam client set their map to load?
Still trying to debug this damn bug, every single time I connect to the host (who's session settings information is correct, with map name etc) it's still deciding it want's to travel the the hosts steam address, but with the main menu map

#

I'm assuming that the Steam Session should be getting the map name from the Session Settings (SETTING_MAPNAME) but it just isn't full stop currently

wise depot
#

prelogin has the options string for passing stuff to the server when joining, however there isn't a player controller or state here so how am I supposed to use this to set up player data?

#

owait, InitNewPlayer, found it

dense citrus
#

still need help to find a way for show Overhead name only for teammates, right now everybody see all names and healthbars , who knows a way in Blueprints?

mighty rover
#

@rough iron yoo dude, it's Jordan

rough iron
#

Hi mate!

#

Describe your issues here and I hope we can between all of us get to something ^^

#

Also check the pinned items, they are a good starting read for MP base stuff and concepts

mighty rover
#

Will do. Let me go through those shortly. Was running on 36 hours of brain uptime, before I crashed out for an hour. Might try to grab a few more z's before starting on the grind again 😄

rough iron
#

Yeah no prob ^^

thin stratus
#

@slate veldt That stuff is located in the NetDriver

#

Are you using the correct one (defined in your ini)?

#

I had issues with Oculus NetDriver sending me to the MainMenu before

#

Was a fault on their end though

#

@mighty rover Hey (: got your mail but totally busy, so might take a bit till I can answer that

slate veldt
#

@thin stratus Going to double check it all now (I actually came across your Oculus thread online where you slowly uncovered it being their fault!)

#

So I've got these net driver defs in my DefaultEngine.ini

!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
+NetDriverDefinitions=(DefName="BeaconNetDriver",DriverClassName="/Script/OnlineSubsystemSteam.SteamNetDriver",DriverClassFallback="OnlineSubsystemUtils.IpNetDriver")
#

and I'm using Steam subsystem, when I've been stepping through code I've seen it go into Steam Net Driver classes

#

If I check the host log, I am successfully connecting to the session as far as I can tell, it's just that the client is loading the wrong map, and then times out after about 1 minute

#

potentially because I've taken my headset off

#

On client I'm also getting Steam P2P socket details dumped into log every now and again

slate veldt
#

@thin stratus Any idea what the problem with Oculus' Net Driver was before? Wondering if I can try and diagnose the Steam Net Driver in a similar way

thin stratus
#

Eeeehm, I think there is a function to resolve the URL

#

And that is implemented through the NetDriver

#

As each Subsystem does that differently

#

And Oculus did something wrong or didn't update fast enough or so

slate veldt
#

Yeah, I've come across it today, Steam does it with just an IP and port number in the URL

So you get like steam.123456789123:7777

#

Which is perfect for resolving host connection, but then during the Browse function of... engine I think, it decides that it's going to make a FURL from that string above, and change Map member variable (Which was nothing) to DefaultGameMap

So the client connects to the host successfully, but just the map load is incorrect

#

Okay, so no matter what subsystem you use, the return of GetResolvedConnectString works on the basis of returning <ContextualIPAddress>:<Port>

#

So for some systems that's a raw IP followed by a port, for steam that's the "steam" prefix, followed by the steam user id number, and the port, and for Oculus is oculus user id. "Oculus" suffix, then port

solar halo
#

Error: RepLayout->ReceiveProperties FAILED: PlayerState wat do

zinc zealot
#

sooo

#

im pretty sure i did it right

#

is there something i did wrong this time ??

#

clients cant see

#

only the server (listen server) can see

#

its making the players ragdoll

#

weird

#

it wasnt working now it is

slate veldt
#

Weird... so my problem earlier on (client wouldn't load into host game)
If I host a session, and then type "open <mainmenumap>" then "open<gameplaymap>?Listen", then attempt to join via our server search results, the client joins instantly

thin stratus
#

How did you do it before?

#

Usually it's: Host->CreateSession->OpenLevel with listen
Client->FindSession->JoinSession->ClientTravel to URL

slate veldt
#

Yeah, I set it up in C++ almost identical to ShooterGame's code

So I construct a URL "<MapPath>?game=FFA?Listen" and then pass it into GameInstance->HostGame, which calls into GameSession->HostSession, and then eventually there is a call back from session creation that triggers the ServerTravel to the travel url

#

Same as ShooterGame pretty much

next falcon
#

Does anyone know a workaround for Big arrays to replicate them?

winter harness
#

Your gonna have to provide more information than that @next falcon but in general don't do that. Only replicate what is actually necessary or changed. I think UE4 already handled only replicating the changes in aTArray

sharp pagoda
#

Having some troubles with setting up a dedicated server. I've opened the required ports and setup rules in the windows firewall, but haven't had any luck connecting via IP. Netstat shows that port 7777 isn't even listening either, which is a concern. I've found that I'm able to connect via open steamid in the WAN though.

lean hornet
#

Anybody has a efficinet and simple way to get max and current players ingame ?

mighty rover
#

@thin stratus no worries :)

#

@rough iron @thin stratus if I go with the method of one of the mobile devices hosts the game between themself and an opponent, that eliminates the need for a server, correct? If so, what's the main technique for allowing a client to connect to the mobile device host?

rough iron
#

It depends on each service, game sparks has it's own

pallid mesa
#

Actually gamesparks provides a framework to "network" your game. Not sure if many people in this server have experience working with that framework since its specific to its own. But you can define what you want to use gamesparks for specifically and discard some features you dont need. You can checkout GS documentation for hosting and matchmaking.

mighty rover
#

We have gamesparks as a back end, but we are doing game matching, points, etc... but we are wanting to do replication for objects that both players will take turns controlling

winged badger
#

the replication after the client is connected has nothing to do with service you are using

mighty rover
#

Correct

winged badger
#

that is internal UE networking

mighty rover
#

Which is what I was asking about lol

#

Because its internal with UE4, would the mobile device host implementation remove the need for a dedicated server for hosting the level and replication

winged badger
#

you can use listen servers, its even a little bit simpler

#

one player hosts, the other joins

#

you would enable the host to cheat that way, if its a consideration

mighty rover
#

Awesome, thanks. So what is that implementation like for the one joining? Would I just need public ip and port for the joining portion? Does it still require the session nodes?

winged badger
#

the direct connection via IP:Port requires some form of NAT punchthrough

#

it depends on the service, also

mighty rover
#

Is there a better way other tha direct connection via ip/port? Or would that just be the dedicated server method?

winged badger
#

dedicated servers are typically not hidden behind a router

#

the problem with vanilla open IP:Port connection is that client gets the host's information from some session/match advertising service

#

and can send a connection request, but host's router doesn't know that it should listen for an incoming connection from that client's IP

#

so it just flat out ignores it

mighty rover
#

Would that have the same issues over a mobile network? Or just when phone is connected to wifi?

winged badger
#

i am not familiar how mobile IP addressing works these days

mighty rover
#

Fair enough, thanks for the info :)

winged badger
#

there are usually service specific ways to get around the NAT

#

steam sockets for example, it goes through the NAT just fine

mighty rover
#

Would you recommend steam for their server services? Pretty easy and straight forward to implement? I'm a gameplay guy, networking is not my for-tay

winged badger
#

steam can handle all network traffic for the game, but that is mostly redundant, as unreal's replication system is far easier to work with

#

i only worked with steam, so i can't give you a comparison with other services

mighty rover
#

Unreal replication would be in use for the direct ip/port method though right?

#

Also, what types of cheating would be a concern? Lag switch type of issues?

winged badger
#

after you are connected and GameMode goes through its PreLogin/Login/postLogin events

#

your server and clients are in direct connection and unreal replication takes over

#

well, any 13 y/o with basic computer literacy could use a program like CheatEngine to lock his health to Max

#

or some such

#

just finds a memory address of a variable, and manipulates it directly

#

if you haven't done any unreal networking yet, i recommend you start with Cedric's Compendium (Pinned on this channel)

#

advantages of dedicated servers are 1 - you can prevent cheating and 2 - they are far less likely to drop out/ragequit mid game

#

disadvantages are obviously - costs money to maintain

mighty rover
#

Thanks for all the info. Familiar with basics of general networking, just not in the game dev sphere. Downloaded Cedrics docs last night, and started going through them a little while ago. My game has no health, only points based on flipping caps. Not sure if you're familiar with POGS, but that's the game.

#

Just got context

#

*for

winged badger
#

you'll probably want to go easy on the level blueprint

mighty rover
#

Maybe, not sure anywhere else to spawn the stack. Cant be player controller or pawn.

winged badger
#

you have GameState

#

good place to start

mighty rover
#

Gotcha, makes sense cause it can be replicated

#

Same with the hitter then too

winged badger
#

as it is turn based, you do get to avoid pitfalls with mixing physics and networking

#

since you can take your sweet time replicating the hit results

mighty rover
#

Will make it easier in game state for turns as well

#

Yup

#

Greatly appreciate the help @winged badger 🤙🏼🤙🏼

winged badger
#

yw

#

PlayerStates to keep the scores

#

GameState has an array of them, replicated out of the box

thin stratus
#

@mighty rover You might want to read my compendium

#

It's pinned to this channel

#

That might answer a lot of "Where does what go?" questions

#

For Mobile you'll have to check if your Mobile Subsystem (google, ios) supports Sessions.
You don't need a DedicatedServer if you don't care about cheaters.
ListenServers have Authority and can cheat if they want (that's why DedicatedServers are and should be used whenever no player should be allowed to cheat).
In case you use DedicatedServers, you could easily use a Service like GameLift (not free) to dynamically launch your Server and tell Players via GameSparks to join it.
In case you use ListenServers, you can tell one of the players that were found in Matchmaking to host, while the others should join.
As previously said, you either need a service that does nat punchthrough for you or make sure that you do it, OR hope people open their ports.
In case the Subsystem you use does do this for you, it gets a bit easier.

#

I doubt you need ServerLists, as you do matchmaking via GameSparks. So I'll skip that part.

rough iron
#

+1 on @thin stratus

#

xD

drifting plank
#

Hello I have some troubles with my router, I can connect correctly in LAN to my dedicated server but with my public ip, I can't.
I have correctly forwarded my port 7777 and add the rules on my firewall but still doesn't work

I have these logs :

[2018.09.04-11.28.37:592][340]LogNet: Game client on port 8888, rate 10000
[2018.09.04-11.28.37:653][344]LogHandshake: SendChallengeResponse. Timestamp: 195.579590, Cookie: 037018058229173249158088188224090134205053236091015109011003
[...] Same during 60 seconds
PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.09.04-11.29.37:607][ 61]LogNet: Warning: Network Failure: PendingNetDriver[ConnectionTimeout]: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: <our_ip>:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.09.04-11.29.37:607][ 61]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: <our_ip>:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID'
#

We have tried with a cloud server and it works. Why our router doesn't work 😦 ?

wise depot
#

are you trying to connect from the same network? if so your router could just be shit and not support hairpin connections

drifting plank
#

Ok so from an outside connection of our router. It works fine

wise depot
#

snap

drifting plank
#

From the same network, we can only connect from lan

wise depot
#

that'll be it then, your router won't support Hairpin NAT

drifting plank
#

Ok ...

#

So we can connect from outside with the public ip and from inside with the lan ip. All is fine 😃

#

Thanks for the help in any case 😉

wise depot
#

if your router security has "Filter WAN NAT redirection" in the settings somewhere you can try turning that off, that might work

drifting plank
#

It seems that it's not possible with our internet supplier router.

slate veldt
#

Hi everyone, just to update you all on my bug I've been encountering recently: It turns out that when I host session like ShooterGame, the session is created just fine, and the host joins. However, the client cannot join properly until after the host then issues a "open MapName?game=FFA?Listen" command

I'm not sure why this get around fixes it, obviously I'm only using this as a temporary measure and want to resolve the issue totally. I'm not sure why the game breaks for clients when hosting session with URL
/Game/Maps/MapName?game=FFA?Listen?Bots=0
but as soon as I've loaded in as host and then execute:
open MapName?game=FFA?Listen?Bots=0
works just fine

#

Without the open command, clients connect just fine without any failures, but are told to open the main menu map (default map) and then time out after 60 seconds
WITH the open command, clients connect and load into the game as expected

zinc zealot
#

after all my thing isnt still working

#

isnt working

slate veldt
#

@zinc zealot what's your thing? Can you link me to your original post?

zinc zealot
#

dunno how to do that but its pretty simple

#

Basically

#

when the event triggers

#

the player is supposed to ragdoll

slate veldt
#

Let me check my code version of this, see how it lines up with the blueprint screengrab above

zinc zealot
#

something is wrong...

#

weird

#

for the owning player (of the knife , its random) they are ragdolling when stabbed

#

for the server and other client (its a listen server and i mean when the server doesnt have the knife) they dont see it

#

when i stab

#

it isnt triggering the break point

slate veldt
#

So in this situation there are 3 players, player 1 (client) calls the function and ragdolls, player 2 (client) and player 3 (listen host) don't see this?

zinc zealot
#

hmm wait

#

ok now there it is the full code

#

if a player enters the coillision

slate veldt
#

No I think I see the issue

zinc zealot
#

it casts to third person character..

#

its because im casting to third person character ?

#

and it has to be the player controller ?

slate veldt
#

wait...

zinc zealot
#

ok

slate veldt
#

Well first of all, you don't want to cast to player controller as they don't exist on all clients, a client only has their own player controller, and then the server has all of them

zinc zealot
#

oh ye xD

#

but

#

if i run it on server

#

doesnt it run on all clients ?

#

i mean in thirdperson character

#

and with that i mean

#

everyone is just checking if they have been stabbed

slate veldt
#

The other clients won't be seeing it because:

  • Client who dies -> Tells server to do ragdoll, and then also does it locally
  • Server receives event, and does it locally but never tells other clients to do it through a client RPC
zinc zealot
slate veldt
#

That knife collision check should only be happening on the server side

zinc zealot
#

so this is nothing ? xd

#

wait

slate veldt
#

Hop into the general voice channel if you want, easier to explain

zinc zealot
#

you mean this should be ran on server

#

ok wait just a second

unique thunder
#

how do I get the playercontroller inside an actor owned by the local client?

#

pretty sure index 0 would be either the server's playercontroller (ded) or probably not the correct client's

magic crest
#

Hey. Does anyone have an idea why an impulse added to a StaticMesh via C++ wouldn't propagate in multiplayer, but when added thru BP on BeginPlay, it does?

#

So, what I'm doing is spawning an actor in C++ and add it an impulse in the direction i am looking. When i do it from the client, the server sees the object fly. However, when doing it from the server, the client just sees the object spawned and then it falls to the ground. no throw force is applied.

#

If i do this, then both client and server see the object fly (i.e. throw force is applied)

thin stratus
#

Well BeginPlay and after Spawning are two different things

#

BeginPlay calls on Server and Clients

#

Your Spawn Code hopefully only on the Server

magic crest
#

It is, yeah. it gets spawned properly. its just that the force is not applied

thin stratus
#

Move the Impulse code into the BeginPlay of your Class

magic crest
#

I will spawn it rotated where i look, then add the force via begin play -> actor forward vec * force

thin stratus
#

Instead of into the Spawn function

magic crest
#

ok

#

So, basically, adding an impulse immediately after spawn is too soon?

thin stratus
#

Yes and no, it also only calls it on the Server

#

And impulses aren't replicated

magic crest
#

I see. I thought it would work fine with replicate movement on the component. Alright., thnx mate

thin stratus
#

It would need ReplicatedMovement and also ReplicateComponent

#

that could work

#

But not sure

magic crest
#

i tried. doesnt 😃 that's why im here

#

heheh

#

BeginPlay solution will suffice.

thin stratus
#

fml. i don't want to read through the cmc -_-

magic crest
#

Thanks cedric. Worked like a charm.

thin stratus
#

Okay before I start doing that, is there any known code repo somewhere that has some good basic knowledge about having a networked movement component that does NOT have 10411 lines of code?

#

@chrome bay Please answer this with yes

manic pine
#

most of the code is just for actually moving the char though

#

the network communication part isnt all that big

thin stratus
#

I would be happy to know where to start in that thing though.
As in what function is the first one to look at to the follow through everything

#

Guess tick?

manic pine
#

component tick should do it ye

#

it branches based on net role

thin stratus
#

Uff, alright

chrome bay
#

@thin stratus I'm building a plugin atm to ease this pain we go through

thin stratus
#

Can't wait on that sadly

#

Have to dive into it on my own then

chrome bay
#

No worries dude, not sure when I'll be finished with it atm. Hopefully however this will make it easier for people to write net movement stuff in future...

zinc zealot
#

rip xD

chrome bay
zinc zealot
#

soooooo

#

any tips to why this isnt replicating ?

chrome bay
#

Anim Blueprints don't replicate anything

#

Regardless of whether you mark the property as replicated.

#

You need to drive it from a replicated property from the pawn itself

#

(Whatever it is you're doing)

zinc zealot
#

i want to add rotation to the bones

chrome bay
#

Replication doesn't work for animation blueprints, so you'll have to get a replicated property from the character blueprint itself

zinc zealot
#

something like

#

basically the same thing but

#

in the thirdperson character

chrome bay
#

jesus lord

zinc zealot
#

ok ill solve it myself sry for bothering xD

chrome bay
#

No not that, it was more in reference to what's going on in that BP

#

reliable RPC on tick = rip

zinc zealot
#

thx 😃

#

what i dint know this existed xd

#

well i knew but

#

thx

misty stirrup
#

does anyone know of a deterministic physics engine thats already implemented as a plugin

slate veldt
#

@unique thunder not sure if anyone already answered, but in networked games, Controller index 0 is always local player on a local machine (unless you have splitscreen)
Serverside is a bit different as it has all controllers in it's world, but on client side they only ever have their own

#

Ooo my, I'm a long time VAX user, and wasn't aware they added an update so you can right click an RPC in header and create implementation and validate functions 😍

Was that in that large update a month or 2 back?

#

I've been a fool and writing them myself because it used to just make a function of the same name and you had to tweak the name for implementation and validate manually, and change the return type on validate

modest dock
#

How would I subtract health from a character in multiplayer?

winged badger
#

simplest way: you do it server side and variable is replicated

thin stratus
#

@chrome bay Ah, awesome, I'm sure it helps (:

modest dock
#

How would I store it server side? Like where would the data be stored

thin stratus
#

Character

#

In most cases at least

modest dock
#

Sum it up: So I would call an event from the player character for when the character takes damage and select the event to multicast? Then I would set the health in the character?

thin stratus
#

No

#

You call ApplyDamage on your Character, which all needs to happen on the Server already.

#

In your Character, it will call AnyDamage event in which you reduce the health variable by the incoming damage.

#

The Health Variable needs to be marked as Replicated

#

That's it

modest dock
#

I understand everything except for one thing. What do you mean happen in the server already? Should I use AWS to store data or do I make a blueprint class just to store data and make an event and cash to server?

#

Cast to server*

#

By cast to server I mean setting event replication to server

thin stratus
#

Why do you need AWS to store health?

#

You want Damage to be applied on the Server

#

Otherwise Clients can cheat

#

So what ever deals damage needs to happen on the Server

modest dock
#

Ok thanks

unique thunder
#

Will this branch prevent the 'play sound at location' inside that function from playing on clients other than the local?

ruby tendon
#

Hello Guys, i have one questions its bigs have patience

#

I'm trying to create a dedicated server to test my knowledge, but some problems do happen

I'm using version 4
20 and downloaded the source code from github
https://github.com/EpicGames

I downloaded the branch release so far, is this correct?

Then in sequence I executed the files: Setup.bat, then in sequence GenereatedProjectFiles, as visual studio community use 2017 I placed -2017, then in sequence I opened the solution in visual studio

Still calm?

As I already had a project created, I opened the same created a class in C ++ so I made the switch unrela version for the source code, I changed some basic configurations like the default = null of the OnlineSubsystem and created the files of server.target however execute project it shows some errors like these

LogWindows: Failed to load 'aqProf.dll' (GetLastError = 126)
LogWindows: File 'aqProf.dll' does not exist
LogWindows: Failed to load 'VtuneApi.dll' (GetLastError = 126)
LogWindows: File 'VtuneApi.dll' does not exist
LogWindows: Failed to load 'VtuneApi32e.dll' (GetLastError = 126)
LogWindows: File 'VtuneApi32e.dll' does not exist

I already looked on the internet some ask to delete the intermediate and saved folders, but this did not solve, I found another that asked to uninstall the hd graphics video driver did and nothing. Does anyone have any help? I have already followed several videos from the internet to try to create more, all end up in mistakes - 'somebody recommends some way for me to follow, what are the orders of the factors

sharp pagoda
#

@unique thunder It will only play for the local client who initiated the multicast. (Or OnRep, not sure what you're using)

#

Assuming the target of IsLocallyControlled() is the actor that is playing the sound, not some actor that's different per caller

unique thunder
#

@sharp pagoda this is executed in a projectile OnHit

#

so server-side I believe

#

but it's casting to the hit player and playing a local function inside the player only 'if locally controlled'

#

I'm hoping it only triggers the function & plays the sound inside the function for that player that was hit.

sharp pagoda
#

So since you're not using a client rpc, when the server version of the object hits the player no sound will play, but when the client's copy hits, the client that was hit will hear the sound

unique thunder
#

hmm

#

that confused me haha

#

should I run the event 'on owning client'

#

or will this set-up work as is?

mighty rover
#

@thin stratus brah, your document is amazing. Thank you for making it 🤙🏼

thin stratus
#

@mighty rover Cheers!

mighty rover
#

I'm having to really rework how I structured my game though, to prepare it for MP. I made everything single player prior to implementation of multiplayer (this is first multiplayer game for us as a company), so most of the logic fell within the Pawn/Controller. Loading the shared objects within the Game State is really a different method I'm not quite used to yet lol, but slowly I'm piecing things back together

versed socket
#

@mighty rover Yeah, Single Player allows you to cut a whole bunch of corners in how you design the programming and whatnot. It sucks having to transition, so in general when I do stuff I always try to program it as a multiplayer-ready game even though it's probably not going to be (i.e. for game jams).

mighty rover
#

The document is helping tremendously though. Cleared up quite a bit of confusion about certain aspects of the different pieces of a game project, made me a bit more confident in building a new plan of attack in making these changes required

#

@versed socket for real! lol it's a whole new world at the moment

mighty rover
#

Where's the best location to implement which player's turn it is? Should it just be a bool within each Player State, or should GameMode or State handle the check and switching of turns?

chrome bay
#

IMO GameMode, then have a playerstate ref in the Game State

#

Bools in each playerstate will be subject to race conditions

mighty rover
#

I'm sorry, can you expand on the race condition in this particular situation?

#

I know what race conditions are, I just don't see how there would be one, unless you're talking about if each individual bool between both players tries to get updated information on itself from GameMode/GameState at the same time, rather than letting the GameMode/GameState tell which player's turn it currently is.

#

If I were to use an integer referencing player number instead stored within PlayerStates - so they know which player number they are - then have GameState flick between those, shouldn't that be less likely to have a race condition?

timber flicker
#

Anyway, its easier to manipulate player's turn in gamemode or gamestate. And then you will be not required to have player's index in your player state

versed socket
#

@mighty rover What I would do is make the GM decide whose turn it is, and then it manually sets a bool bIsMyTurn variable via a multicasted event on the player's PS

zinc zealot
#

@chrome bay one thing about what you told me yesterday

chrome bay
#

@mighty rover The problem is, you can't guarantee replication order or when updates will be received - especially between different actors. If you use something like bIsMyTurn in the PlayerState, some other player state may still have that set to true - perhaps even for a few frames.

#

By determining whose "turn" it is in one place, you can't have scenarios where two players think it's their turn - even if temporarily.

#

And to counter jfaw, I wouldn't use a Multicast event - it's adding unnecessary overhead. Determine whose "turn" it is in the GameState, and fire an OnRep when it changes if you need to drive an event. You could for example grab all PlayerStates from the GameState, and call an "OnTurnUpdated()" function or some such.

pallid mesa
#

didn't read that last part 😝

chrome bay
#

😉

#

A big chunk of hard-to-reproduce bugs that occur in MP are nearly always down to replication race issues.

pallid mesa
#

the majority of them, basically

chrome bay
#

Yep. And too often people will code in workarounds. Most of the time it's better to slightly redesign the system in the first place and remove all the headaches.

#

And in this case, it's cheaper too

pallid mesa
#

I remember my manual buffers back when I started on MP... bad bad bad

mighty rover
#

You guys are badass! 👊🏼 thanks for the thorough explanation 👍🏻

zinc zealot
#

hey...

#

am i doing something rly stupid and dont know it ._. ?

#

its a pistol

#

but when i shoot

#

sometimes it doesnt

#

in the server

next falcon
#

is there something like cached replication?
Like for big arrays ?
example:
it saves index 1 to 10 and than 11 to 20...

unique thunder
#

would this work in a multiplayer, dedicated server scenario to get an actor's owner's playercontroller?

winged badger
#

yes, both on client and server @unique thunder

#

@next falcon you have been at this for what, 4 weeks now instead of redesigning the system not to require to replicate an array of 30k integers?

unique thunder
#

why does he need to rep so many?

next falcon
#

@winged badger i think since 4 weeks about a solution but i can't find any

#

not only of replicating a big array

winged badger
#

there is always another solution

next falcon
#

i am currently watching into minecraft source code for the Big chunk data

#

They did it and i want it too

winged badger
#

so, 30k ints are procedurally generated?

next falcon
#

what ?

winged badger
#

they are some random numbers representing the terrain?

next falcon
#

yes

#

but that doesn't replicate

#

i need to replicate the terrain changes

winged badger
#

so you replicate a random stream seed at the start

#

all clients will generate the exact same 30k random numbers

#

as they are not really random

next falcon
#

jeah i know i already did that
but if i change the whole grass into stone i can't use it anymore

unique thunder
#

is this basically to create a minecraft Creative mode

winged badger
#

you can use RPCs to keep everything synced

#

cache changes somewhere on the server

#

so you know what to send to late joiners

next falcon
#

so if i change my whole world and someone joins my server i need to tell him all changes ? like 10284978142 blocks ?

winged badger
#

depends on the size of the data

#

you can also cache the changes with a timestamp

#

send the state of the world before their game is loaded and pawn is spawned

next falcon
#

jeah thats one way but i think its a bit too complicated

winged badger
#

well, you might had noticed there is no out of the box solution for keeping changing, procedurally generated world in sync over network

unique thunder
#

having a hard time getting the PlayerController inside an actor that is owned by a specific player/client

#

I tried casting to my custom PlayerController class & using Get Owner in the object reference (since the actor has the owner set to the player when picked up)

#

But no luck.

manic pine
#

if thats not working then youre either not setting the playercontroller as owner, or owner hasnt replicated to the client yet, or youre on the wrong client

unique thunder
#

@manic pine I'm setting owner on the actor by running "Get Owner > Set Owner(NewOwner)" when picked up

#

So 'GetOwner' should have the right playercontroller associated with it

thin stratus
#
  1. You need to call "SetOwner" on the Server.
#

A client calling that function will have no effect.

#
  1. If you use the PlayerController as an Owner, be prepared that Owner will only be valid on the Server and the Client who's PlayerController you used.
marsh gate
#

Does every player have a copy of every playerstate?

#

I'm doing a repnotify on whenever a variable on my playerstate gets updated. But On Rep Notify for clients gets called 9 times for 3 players and 4 times for 2 players

#

So that means it would be 25 times for 5 players which is crazy

#

Maybe it's because of arrays and storing playerstates in arrays?

#

I do that

zinc zealot
#

hey can anyone help ?

chrome bay
#

@marsh gate Rep Notifies are only called when the client gets the update / change. Might be that not all of the changes are going through.

marsh gate
#

@chrome bay What do you mean? The changes I think are definitely being set. It's just, repnotify gets called A LOT of times. Like if there are 2 players, it gets called 4 times. This is for variables in playerstate

chrome bay
#

It'll get called for each playerstate on each client

#

So that makes sense

zinc zealot
#

so youre saying that each player can see all the player states right ?

chrome bay
#

Each client has a player state for every other client and itself

#

Yeah

zinc zealot
#

eh

#

TheJamsh can you help me ?

chrome bay
#

Maybe.. depends what the problem is

zinc zealot
#

im pretty sure its easy..

#

you see like yesterday i think i asked for help

#

but the original problem had nothing to do with that

#

im gonna explain

#

One player is assigned randomly

#

and is set to true a boolean called IsDetective

#

ill show the rest with blueprints

#

but basically the player who is the detective has a pistol

#

for some reason when i shoot

#

it always works locally

#

but "glitches" sometimes

#

on the server

#

and with that i mean

#

sometimes when shooting the other players dont see it and when shot dont die

#

or they dont see it and they die

#

or they see it and they die

#

sooo ye

#

its kinda random

#

any tips XD

#

i can show you the BP's

chrome bay
#

tbh it's pretty much impossible for me to help with that lol, depends on so many things.

zinc zealot
#

but isnt it simple supposedly

chrome bay
#

All I can suggest is studying one of the Epic examples to see how they handle shooting / damage. The Multiplayer Shootout one is probably a good place to start

zinc zealot
#

thx ...

marsh gate
#

Wait so you're saying, if there are 100 players in a match. Every player has 100 playerstates, and now there are 1.2676506e+30 player states in a fortnite match?

chrome bay
#

There are 100 player states in Fortnite, and each client has it's own copy of each one

marsh gate
#

2^100

#

so that's a lot of copies no?

#

so there are 100 * 100, so 10,000 copies?

chrome bay
#

The Server only has 100 also

marsh gate
#

ah okay

chrome bay
#

1 Player State for each player, each one replicated to every client.

marsh gate
#

okay

zinc zealot
#

I dont think multiplayer shootout has the weapon firing

#

you rly think you cant help me ?

chrome bay
#

Not with something that random, it sounds more like you need to experiment a bit and learn some more about MP before going any further

zinc zealot
#

i've been trying new things for like 4 hours xd

#

but okay ill try more

grand kestrel
#

Building good authoritative yet responsive shooting code is seriously involved and exceedingly advanced

#

Should know ue4 networking inside out before attempting

chrome bay
#

Yeah it's not straightforward at all.

grand kestrel
#

I haven't seen any good examples. Gotta study how games achieved it and come up with own solution

chrome bay
#

UT has a good lag compensation system but it's very spread out, and UT source code is a nightmare to navigate at the best of times.

zinc zealot
#

dint know

#

what is UT btw

#

anyway

#

if anyone cares

#

its actually come out to be weird and interesting

#

the server is ok right

#

but the client

#

its like its out of "sync"

#

when it shoots it says

#

the server wich is a player had collision

#

when it actually hits it works

#

but that is a fail

#

it has to be in sync

#

its like the server is trying to use it before it actually exists

marsh gate
#

@chrome bay about what we discussed earlier on, so does this mean for a game with two players, Event BeginPlay on PlayerState would get called an exact total of 6 times?

#

Cuz that's what happening to me right now

#

counting all clients and the server

#

2 for each player, and 2 for the server

zinc zealot
#

I think i got it working 😄

#

wow

#

as soon as i tested again failed XD

zinc zealot
#

...

#

i might be getting crazy but

#

when the Server see's the pistol dude or is in a certain range of him the pistol works otherwise it doesnt

fringe dove
#

is there any way to "peek" at reliable reliable rpcs that are held back from a packet drop inbetween, rather than waiting on ack round trip and filling in the dropped packet?

#

TCP is stream based and the thing could be split up anywhere, but unreal is message based and knows if it has the full RPC right?

distant pier
#

Hey guys and girls,

I have an issue with replication. I have some properties that replicate only to owner via COND_OwnerOnly, but when the controller possesses the Pawn (essentially when the owner changes), the properties are not replicated to that player yet. (The properties are replicated when they change, but that is too late)

Is there anything I am missing here?