#multiplayer

1 messages · Page 535 of 1

spark fossil
#

I'm guessing something's changed in the engine between .23 and .24 which is requiring the networking to be more stringent?

grim pelican
#

Why is my multicast executing late on my clients after the server?

tall pine
#

cause server need to send out the call to client, but immediately call the multicast on itself

grim pelican
#

That makes sense, but when I revert to an older version of the project, it's instantaneous

#

The logic in the multicast hasn't changed at all

#

And it's called from a server executing event

tall pine
#

well, you shouldn't depend on the call being instantaneous, cause you'll have lag in real life anyway

#

your logic should work, or at least prepare for lag

spark fossil
#

@grim pelican Is your older version using the same engine version?

grim pelican
#

yes

#

well, you shouldn't depend on the call being instantaneous, cause you'll have lag in real life anyway
@tall pine It's a five second delay, I plan to kick players with 5000ms ping, It's also a dedicated server in-editor

tall pine
#

your multicast is 5 seconds delayed? Hmm, there is something wrong then

#

does onrep have the same issue?

grim pelican
#

Yeah

bitter oriole
#

Maybe you just have a lot of other stuff to replicate

grim pelican
#

One of the variable it uses is also very delayed from when it is set

spark fossil
#

@grim pelican It seems like a lot of replication stuff has been changed in the engine between 4.23 and 4.24, if that's applicable to you.

grim pelican
#

Ugh yeah I’ll try it. I was using some .23 plugins :/

spark fossil
#

If your RPC's are marked as "reliable" try changing them to "unreliable" if possible. That was causing problems for me when I switched to 4.24

rose egret
#

@grim pelican is your actor net relevant on the client side ?

grim pelican
#

I believe so

kindred widget
#

I think I'm missing something obvious again. How are we supposed to use the inherited variables in the PlayerState? I can't find anything on setting their values, everything I'm finding is about creating new variables to use.

#

For example, I'm just trying to access and set the Score variable. There's no way to set it anywhere, either in the PlayerState directly, or through getting the array of PlayerStates in the GameState, and I don't see any overrides anywhere.

spark fossil
#

@kindred widget Isn't the score a public variable?

#

PlayerState->Score = 1;
or
PlayerArray[0]->Score = 1;

#

from within the gamestate for example

kindred widget
#

Unfortunately I'm using Blueprints. I can get the Score variable from anywhere I want, but I can't set it anywhere. Greyed out.

spark fossil
#

Ah ok, score is BlueprintReadOnly. Making your own derived PlayerState class is probably the way to go. Then you can add your own variables, or if you're in c++ you can write blueprint enabled set methods for existing ones.

kindred widget
#

@spark fossil Gotcha. I'll get to that then. Thanks!

grim pelican
#

So I've tracked it down I think...an array element being set by the server isn't updating for the client until a few seconds after, is there a better way to handle updating the value?

spark fossil
#

Not sure if your situation would allow for it, but you could have your array non-replicated. Then use an RPC call when an update is required, doing any maintainance on the array locally?

grim pelican
#

Don't think so, they drop their weapons on death

spark fossil
#

what's in the array?

grim pelican
#

The weapons the player is carrying

spark fossil
#

You can use a multicast RPC when a weapon is added/removed to update the array on the other machines, then locally add/remove from the local, non-replicated array. Not sure if that's a good idea, but it's doable.

grim pelican
#

I'll check it out, thanks

odd iron
#

Hi Guys ,
How can i make the players when the joining the server spawning in the lobby individually
the issue im getting each time player joining server all players will go to lobby

last grail
#

Do it to the specific player controller/character?

odd iron
#

im doing that using the new controller from postlogin

heady delta
#

does mp origin rebasing documentation even exist?

spring ingot
#

@heady delta I don't think so. I went looking for it recently and couldn't find much, but there are some comments on the code, and there's actually not a lot of it involved.

#

Just search for multiplayerworldoriginrebasing

eternal anchor
#

how to correctly leave sessions as client, so it can connect to new session, and reconnect the session it just left ?

chrome bay
#

End and Destroy the Session, then you should be able to join the new one.

eternal anchor
#

thanks, just found in docs,

#

was confuesd there was no something like Leave session

#

😄

rose egret
#

is it normal to do 25,000 line trace in server every tick?

#

not complex trace btw

chrome bay
#

no, that seems pretty extreme

rose egret
#

I want it for AActor::IsReplicationPausedForConnection

chrome bay
#

Yeah.. don't do that

#

Because that will run for each instance of that actor, for every connection.

rose egret
#

yea . but I want to disable the replication of occluded characters

chrome bay
#

But 25,000 line traces? Probably better off just dropping the update rate

#

If you have that many players, consider using replication graph instead.

odd iron
#

Goodday guys

#

in this function when the player postlogin he moving all the exist players
i want just the logged in player who is moving to lobby i've tried to delete the loop but nothing is happening

#

and when im getting a reference from the new controller from postlogin node its showing me an error Spawn actor
Edit : Fixed By Friend Help thanks ❤️

rose egret
#

@chrome bay huum you are right I can drop update rate. is AActor::IsReplicationPausedForConnection called every tick or based on NetUpdateFrequency ?

#

do you know what's the best way to find out whether a box (character bound * 3) is fully occluded or not.
surely one line trace to center of it is not enough.

chrome bay
#

IsReplicationPausedForConnection() will be called everytime that actor is considered for replication on every connection.

#

Well we used to build a list of points surrounding the player and trace to all of them. If any were not occluded, we don't pause.

#

Also, sort of falls apart when you show player nameplates, or something like that in the UI.

#

Or when you want to hear footsteps of players on the other side of a wall etc, unless you add a distance to the equation as well

#

At which point it all becomes a bit pointless tbh

#

You'll get a bigger benefit using rep graph.

rose egret
#

I added distance as well. so enemies who are nearby are replicated anyway. but for far enemy characters I do the line trace cause the game has sniper long range rifles and the map is outdoor. max view distance is nearly 900m 🙂

#

I waned to switch to RG but it seems a little complicated. I will wait for new version of UE4 cause I wanna learn Rep graph and push model at the same time.

#

😂

chrome bay
#

RG is a pretty major architectural change but is worth it IMO.

#

Both RG and push model are about saving CPU overhead though, they don't reduce bandwidth or anything (at least not intentionally).

#

But RG has a nicer way of prioritising actors that are closer to you.

rose egret
#

🤔

#

then gotto go see shooter sample RG.

chrome bay
#

Shooter one is a good starting point. I've used RG on a couple of projects now, it does things a bit differently but it makes more sense in the long run.

rose egret
#

btw I found another solution. instead of multiple LineTraces I simply do a SeepSphere from Character location to the near of Target humm ?

#

it seems better in my mind

#

oh wait. not it doesn't work

bronze arch
#

anyone know to fix incompatible_unique_net_id with -nosteam in dedicated server?

chrome bay
#

-nosteam means it's using the null subsystem IIRC so the connecting player would have to be using that too

#

i.e. a steam player couldn't join a non-steam server

bronze arch
#

i dont use much steam things so i dont mind to connect non-steam servers. because always connecting with ip:port

#

it was work at 4.20, until 4.24 was changed it seem. how i can make custom gamemode for custom prelogin like 4.20 system?

bronze arch
mint monolith
#

The default movement of the ue4 mannequin in the 3rd person template is replicated, right?

In this case I am confused as to why the player is not moving on the server even though I haven't changed the movement script.

fading birch
#

@bronze arch why not just use the advanced sessions plugin?

bronze arch
#

this was happened on advanced steam session plugin too

#

just need to deactive steam subsystem on dedicated servers

quaint coyote
#

hello everyone, Im having some troubles with my mulitplayer project. For some reason whenever one player starts a listen server and tries to change maps to a lobby map the host does change to the lobby map but then immediately goes back to the Main menu. The Multiplayer session is still on going but its in the main menu map. I cannot figure out why it is doing this, if its a map travel or multiplayer bug. This also only happens in the packaged version of my project not the in the editor version of the project. If someone could help give some pointers that would be awesome

tardy orchid
#

anyone got a free 5 minutes to hear out my problem?:D

#

well long story short, I'm trying to make a pawn's component rotate every tick (set relative rotation), I tried with the Run On Server event but it's laggy this way, works fine in Singleplayer tho

ocean geyser
#

@tardy orchid is it something that has to be controlled server sided? any reason it cant run on the client?

tardy orchid
#

I want others to see that the thing rotated

#

And other characters should be able to step on

ocean geyser
#

well other players will see the object rotate. what i would do is use interpolation and not run it on every tick, for example on the server have it replicate via OnRep an FRotator. that FRotator will hold the value of the new rotation that the object should rotate to. on the server have a timer run that sets the new rotation every X milliseconds (or seconds however long you need) to that OnRep FRotator. inside the OnRep event have the objects rotation use interpolation to rotate smoothly to that new rotation. that way the server has authority and it should be smooth rotating on clients

tardy orchid
#

Ok interpolation is the new keyword I see here, I'll look into it, thanka

#

Thanks*

spark fossil
#

Does anyone happen to know why a client would take so much longer to load than the host when playing in editor? My host game is loaded immediately, but the client takes around 10sec before any input/networking/ui etc. is ready. It was only taking around 2secs in 4.23, but is now 5x as long after changing engine version to 4.24. The pause comes right before this warning (which was also present in 4.23):

LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)

grand lance
#

@spark fossil i keep getting that oo

#

too

#

does anyone know how to disable steams net driver while still having the overlay? i tried this
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bUseSteamNetworking=false
im trying to host on gamelift but be able to have steam clients connect to it
i keep getting the incompatible_netid error

#

LogNet: Warning: Network Failure: PendingNetDriver[PendingConnectionFailure]: incompatible_unique_net_id

spark fossil
#

@grand lance I'm not sure if the warning is causing any problems or if it always comes up if PIE while trying to use an online subsystem, and we maybe haven't noticed it before since we weren't looking.

grand lance
#

well i get that warning you posted, when i disable steam. run gamelift local. run my dedicated server and have clients connect to it. but i can still run around and what not

#

@bronze arch if you disable steam on dedicated, you need to disable on client as well.

bronze arch
#

yeah but i cant disable on client without use auth and steam functions except steam Multiplayer system.

#

u can try my method that i overrided it

#

works well

spark fossil
#

@grand lance I just made a fresh first person template project, ran it as PIE with 2 windows and I'm getting exactly the same warning. I think it's just that onlinesubsystems/sessions aren't getting used because it's PIE and we haven't noticed the warning before.

grand lance
#

i dont use PIE

spark fossil
#

I don't think it's related to either of our problems

#

ah ok

grand lance
#

@bronze arch what method?

grand lance
#

@bronze arch thanks ill try that

bronze arch
#

u dont need to add uelog it was testing

#

also for .h file from gamemodebase just add PreLogin line. others differ

grand lance
#

cool thanks man

bronze arch
#

yw

grand lance
#

weird. my server is using steam and my client using null. but i get the steam overlay on my client

#

my server crashes if i use -nosteam on it lol

bronze arch
#

same thing happen on me. when trying to get steam id, its returns 0. try disable all online subsystem plugins except steam (null,googleplay,etcetc useless things)

#

for crashes, idk i didnt get any crash yet.

grand lance
#

hey that worked

#

i checked if the unique net id is null and allow to connect

#

thanks a lot @bronze arch

bronze arch
#

no one helped to me so i did my best. youre welcome peepoLove2

#

even i was newbie in c++

#

lmao

quaint coyote
#

Im having trouble getting a client to join a listen server. I have it successfully join session but should I also do a ServerTravel command so that the client goes to the map the listen server is on or will that not work

spark fossil
#

@quaint coyote Yeah, afaik you would need to travel the client

#
                    FString URL;
                    bool bSeamless = false;
                    if (Sessions.IsValid() && Sessions->GetResolvedConnectString(MyPlayerController->PlayerState->SessionName, URL))
                    {
                        MyPlayerController->ClientTravel(URL, ETravelType::TRAVEL_Absolute, bSeamless);
                    }```
#

Been using that, seems to work

quaint coyote
#

gotcha thanks

ebon nimbus
#

Any thoughts why this doesnt disable player input? Done inside Gamemodebase, controlled pawn and controller values are correct.

#

it is called after the controller is stored via OnPostLogin and has possessed a player character

spark fossil
#

@ebon nimbus Is your event being called?

ebon nimbus
#

yeah its being called, hence the correctly populated values

upper marsh
#

Currently having an issue where my server browser is pulling results from everything but my game running on another computer, haha

#

These are results from what I can only assume are other people developing using the space wars steam id

twin juniper
#

evening! it seems to me like BeginPlay isn't called for other players' pawns on a client that joins a map late. Is that correct?

ebon nimbus
#

@spark fossil what are your play test settings on. To me that looks like a single player implementation.

#

@twin juniper who’s engine play? If it’s the game modes begin play then that is correct it will run the one time as there is only one instance

twin juniper
#

aha so its because im running in engine?

ebon nimbus
#

If you’re talking about the begin play of pawns that are already spawned into the game before the client joins then those will not execute an additional time. Begin play is in respect to the actor

#

Not the player

twin juniper
#

and yes that is what i am talking about

#

how I reason was that when a client joins those pawns need to be spawned in that client's world

#

I wanted to do some configuration there

ebon nimbus
#

It exactly how it works

#

Those pawns exist in the game already

#

It is the job of the server/listener to communicate their existence and the state of the game in general to the client

#

The client doesn’t make its own versions of them

twin juniper
#

is there another event that is called for the client when the actors are 'created' there?

#

or loaded i guess

ebon nimbus
#

In your game mode there is an even called OnPostLogin that is called when someone connects

#

You could keep track if your game is in progress(let’s say you have a countdown etc)

#

You could then send a message via an interface inside of onpostlogin

#

Actors that you want to do this special logic with whenever a player joins after a match has started can then implement that interface and handle the message

#

So on post login-> send message Cheer to all actors that implement the cheer interface

#

Those actors would then execute a cheer event every time a player joined mid match

#

Sorry for bad format, on mobile

twin juniper
#

hmm, but what I want is to trigger something on the client that joined

#

not on everyone

#

but I can do that there as well I guess

#

thanks

ebon nimbus
#

That’s fine too it would be similar as anyone can implement an interface if it’s an actor

#

But if that’s all you want to do make an event in your players character blueprint

twin juniper
#

I could use begin play on the new client's playercontroller maybe and send message there

ebon nimbus
#

Call it after the player has possessed a character

#

And just do an RPC that runs only on the owning client

#

Tons of options for you

#

Really depends on the scope of your work

#

Some more details could help

twin juniper
#

nah I think I can figure it out 🙂

#

I just thought BeginPlay would do it for me

#

thanks for your help!

ebon nimbus
#

No problem just remember that the onpostlogin is in the game mode and there for exists on the server

twin juniper
#

yup

spark fossil
#

@ebon nimbus, just as I said. It's just a fresh project with First Person template and 2 PIE windows.

shut gyro
#

Does anyone know how the load/unload process work on clients? In other words, how does a level using level streaming load on the clients or does the server handle the call for seamless loading/unloading?

ebon nimbus
#

Then that feedback feedback has the same value as your player controller index

shy kelp
#

Is sql integration possible in visual scripting alone? I rather not buy an additional plugin for only sql integration since I can just use c ++, but is it still possible in BP?

meager spade
#

is there a way to set an actor net name stable without modifying actor classes?

#

that is spawned at the begining of the game?

wise atlas
#

can anyone help me with shooting other players, because when you kill another player everyone dies or nothing happens

spark fossil
#

Hi all. I'm having some trouble with variables not replicating properly after updating to 4.24. I have a bool value on a character that is not updating on the client. The OnRep function is also not being called. Any ideas what could be causing it?

shy kelp
#

can anyone help me with shooting other players, because when you kill another player everyone dies or nothing happens
@wise atlas are you using event damage to execute this? have you specified which actor the projectile or ray is hitting?

queen flower
#

completely new to multiplayer. Just got 2 players to join the same game form 2 seperate cities lol. very happy about that

#

but right now, a joining player takes away the hosts ability to drag select.

#

2nd problem is the joining player RMB>move to for selected units returns errors (I think it has something to do with aicontroller being on the server only)

#

I dont know how to make the client tell the server to execute the moveto for the aicontroller

#

which is issued from the PlayerController when the RMB release

#

just like starcraft or most rts games.

#

@ me if anyone has ideas.

kindred widget
#

@queen flower Did you ever solve your AI issue?

queen flower
#

No I haven't. Watching the fundamentals on multiplayer, again lol, right now

kindred widget
#

@queen flower In short, the only thing you need for that is to understand RPCs or Remote Procedure Calls. Which.. took me three times reading through the RPC page before it mentally clicked that they're nothing more than events that get sent to a different machine. I set up a little test with three clients, An AI that is nothing more than a character class with the default AI controller, make sure you have a NavMesh set up, and then run something like this in the player controller.

#

You can change Q and E, I was already using mouse buttons elsewhere. But simply put, Q and E run on the client. One gets a reference to the aipawn under the mouse, the other sends an RPC to the server telling the server to make the AI move.

queen flower
#

This is beautiful. I just didn't have the confidence to fumble through it but I do have everything exactly like you do, except it's not split into the 3rd custom event with run on server enabled, which is exactly what the video linked above is covering right now.

#

Navmesh is set, they do move to, as long as it's the server player.

#

Image is saved and I will try it out. .. tonight .. right now actually. Was going to bed defeated but now excited. Thanks a lot

kindred widget
#

I'll be around for a while. Just woke up here, so feel free to ping me later if you need any help.

queen flower
#

Thanks a lot.

elder badge
#

Hey , is there anyone who know python programming and English really well. Please pm me.

fleet raven
#

so I've been investigating what push model actually does

#

and it seems like it's not great?

#

it maintains dirty lists, but it does not use them well... it seems like they've integrated it into FRepLayout so it will use the list to get which properties need replicating

#

what's missing is the most important piece, entirely skipping objects that have had no changes

#

so with push model we are still processing tons of objects per tick only to then find out they have had no changes

#

rather than maintaining lists of objects that actually need replicating

#

this is quite the disappointment

bitter oriole
#

Isn't push model meant to reduce replication bandwidth raher than CPU use ?

fleet raven
#

no

#

the entire purpose of it is to reduce cpu usage

bitter oriole
#

Oh, alright

fleet raven
#

rather than
MyReplicatedProperty = 5;
and the rest being magic

you now do
MyReplicatedProperty = 5;
MARK_PROPERTY_DIRTY_FROM_NAME(AMyActor, MyReplicatedProperty, this);

#

which is a fantastic start

#

but they only implemented half the thing

bitter oriole
#

Magic is cool, to be honest

fleet raven
#

magic is slow

bitter oriole
#

Shady macros, are not cool

fleet raven
#

what it should be doing is

  1. set dirty flag for the property
  2. add object to must-replicate set

what it does is

  1. set dirty flag for the property
#
  1. is the most important step, it allows us to only process objects that actually have changes each tick...
bitter oriole
#

Alright

fleet raven
#

so right now, push model significantly overcomplicates using replication, since you have to put the macro everywhere you change things, without giving you the benefit that would make this worth it

#

conclusion: br_egg

winged badger
#

it does help the bandwidth a little

fleet raven
#

it changes nothing about the bandwidth

winged badger
#

but not worth it

fleet raven
#

you replicate the same properties

winged badger
#

you don't have to update the entire actor

#

with the same sfrequency

fleet raven
#

it would change your bandwidth usage if you forget to mark properties dirty

#

this whole "frequency" thing is mostly nonsense

#

the only reason you need that is because of the lack of must-replicate sets

#

since you can't check every object every tick

winged badger
#

i know

#

managed to saturate the servers CPU just fine

#

😄

#

and when one designer gave trash mobs net priority 100 by "accident"

fleet raven
#

so yeah, push model is significantly less cool than they made it seem in the big header comment

winged badger
#

it took 2 seconds for shit like grenades to panic enough to replicate

#

so, we are adding some randomization to a multiplayer map

#

we got the client and server to spawn exact same actors, with exact same names on server and client

#

as a result, NetGUIDs are mapped correctly and net addressing works just fine

#

now i would love to hack unreal to allow server to turn the replication on post randomization pass

#

and not have it spawn another actor on clients as a result

#

but instead to just act like they were loaded from the package

fleet raven
#

what's stopping you from doing that?

winged badger
#

its not cooperating, so far

#

every time we turned the replication on, we ended up with 2 actors one ontop of another

#

i think the Bunch doesn't have the flag for GUIDs that must be resolved before its processed set correctly

#

its a lot of code, so hoped you might had poked around before

#

by correctly i mean to true

chrome bay
#

Is there a way you can force them to take the same path as pre-placed actors in the map?

fleet raven
#

have you overridden both IsNameStableForNetworking and IsFullNameStableForNetworking to return true?

chrome bay
#

Not sure on the specifics of that, though.

winged badger
#

that part works just fine

#

i can interact with my lockers, and such just fine, meaning my client sends the correct NetGUID over in a server RPC

#

i just can't get any feedback that the state of the item has changed

#

now i can make a ManagerActor for each Actor class involved

fleet raven
#

it uses the IsFullNameStableForNetworking to determine whether it's a dynamic object that should be spawned on the client

#

rather than looked up

#

also have to make sure the outer is the level and not the transient package

winged badger
#

make a FastArray+Item to match it, with weak pointer to Actor

#

and leave the Actors participating in randomization entirely not replicated

fleet raven
#

yeah, but you should be able to get actual replication on them to work just fine

winged badger
#

i know... failed so far though

fleet raven
#

did you try those 2 things?

winged badger
#

setting the outer, no? i mean both of them are spawned in exactly the same way

#

will check

#

might try to add a RF_WasLoaded too

fleet raven
#

you need IsFullNameStableForNetworking to return true basically

#

here is what happens if I just call that on two arbitrary actors, one being in the level, and one being a player controller

#

(the 1/0)

winged badger
#

nod

#

went to try without modifying the Actors first

#

as not to end up doing 3 days of fixes just to be able to run a quick PIE test

#

not all levels are procedural

#

so first attempt had to be to contain all changes to the module that does the randomization

fleet raven
#

it does check the RF_WasLoaded by default

#

so maybe the whole thing will be solved by just setting that flag

winged badger
#

manager actor is not a bad solution here, get a working push model

#

wanted a "quick" proof of concept tho

#

all Actors in question implement one of two interfaces

#

so i'd need to implement just 2 manager classes

fleet raven
#

if only they made real push model br_egg

winged badger
#

having all replicated actors inside a prefab replicate instead through 2 fastarrays is good, been meaning to do that anyways

#

as it drops the number of networked actors on the map by half or so

fleet raven
#

yeah seems nice

winged badger
#

and with each prefab having its own manager, can still use those with replication graph or relevancy

rose egret
#

cant we just set all the shit in one actor and write our own replication in it

#

🤔

fleet raven
#

not really

rain coral
#

I have an issue I've been struggling with for a week or so:
My character is in state x, then presses down to go out of state x. Server corrects the character, says: go to state x - and then very rarely, the 'down' input is not restored from PrepMoveFor. Just not detected, so it doesn't get resimulated to go out of state x, until it happens on the server and is corrected again. I don't understand how this can happen, given that I've handled the input in SetMoveFor and PrepMoveFor. This is quite out there, but if someone recognizes the issue, please let me know ^^

thorn spade
#

Hey, y'all,
I have a problem, I would like to define the skeletal mesh of my players, in a game it can have a maximum of 4 players and each player has a randomly defined character it works that for the server, all the clients only see the basic skeletal mesh
The problem is that only the server sees the other players with their characters but the client only sees the basic character.

the first image corresponds to the BP of my gamemode.

rain coral
#

@thorn spade For the last image, clients cannot get a reference to the game mode, as it exists on server only, so that cast should fail on a client

thorn spade
#

ah how could I do that then?

kindred widget
#

@rain coral Just curious are you using reliable RPCs for the state change event?

rain coral
#

@thorn spade If I understand it correctly of course. It looks like the ReturnRandomIntTepNotify should be setting the mesh itself. What does Set My Character do?

@kindred widget No, the input is sent unreliably to the server, but it still registers on the server. I'm actually not sure why the correction happens in the first place, but I assumed it was more to do with resimulation. Hmm.

thorn spade
#

@rain coral SetMyCharacter defines the skeletal mesh

#

My character sends the skeletal mesh reference to the Gamemode

rain coral
#

@thorn spade Ok, I think I understand now. So the last image, the one in your Character, is the request you want to make to the server to give you a random skeletal mesh, right? In that case, I would just not put that functionality on the game mode, but on the character

#

The client can't interact with the GameMode, but it can interact with the GameState, PlayerController, and of course the character itself

thorn spade
#

That's exactly right.
So I have to do the same thing but in character?

#

I'll try that THANK YOU 🙏

#

I didn't know the client couldn't communicate with the game mode

kindred widget
thorn spade
#

Yes, thank you.

#

It works wonders, everyone sees themselves as they should.
But there's a new bug, in the screenshot there are two players who have the same character, how can I avoid that?

And thank you again for everything

thorn spade
twin juniper
#

I'm trying to make a wall that player can go trough only if they meet some requirements.
I want a player that meet the requirements to not be blocked but the wall should still block the players that aren't.
Does anyone have some kind of clue of how I could achieve that in Blueprint? 🙂
Thanks!

thorn spade
#

@twin juniper You could use a boolean variable

twin juniper
#

Yes but how I would manage with the collision client and server side?

thorn spade
#

By making Custom Events for example

#

You can tell for each CustomEvent if it is running on the server or the client

kindred widget
#

The easiest way would just be custom collision profiles. One that's just like the default pawn but cannot interact with a custom collision type which the wall would be set at, the other which is just like the default pawn, but can interact with the wall type. Set the collision on the pawn capsule for the server and clients based on your parameters.

west niche
#

guys, how do you let more than 1 person work on a unreal project

bitter oriole
#

Source control

#

Perforce, Git, SVN...

west niche
#

yessir

#

I understand but

#

how do I do it

#

do I need to download something, buy something, put blueprintns

#

prints*

chrome bay
#

There's a guide

#

Probably the wrong channel for this though

west niche
#

ok thanks JamBax

hoary lark
#

(I don't think that guide is safe to use anymore, perforce has guides on their site to set it up, but yeah you should go to the right channel)

bitter oriole
#

Also Perforce might not be your first bet

rain coral
#

In the case that I have a conveyor belt with lots of non-replicated actors moving along a spline, what do I do if I don't care about which exact actor the Character is standing on? The location of the character can be predicted fine etc, but if the conveyor belt isn't in sync, the character teleports to the actor the server version is standing on, even if that actor is at a totally different location on the client

kindred widget
#

I can go find information, but can someone point me into the direction of how I can easily 'disable' AI that are not currently near the players? My use case is top down, but I'm sort of looking for something resembling ARK where player character distance hides/shows the AI in range and anything not in range stops being simulated until it is. Is this a default thing that I can change settings on? I tried messing with the net cull distance, but that just made them invisible. Or is this something I need to work on myself with custom checking and spawning/destroying?

thorn spade
quaint coyote
#

Im having some trouble when im using the advanced sessions plugin. I have the client search and find a server and I send the session result data to a join session node but the client stays in the main menu and the session state just stays on Pending. I dont know if Im missing something or if its a bug

twin juniper
#

Hi,is managing character respawns in the game mode a good idea?which functions should I use to implement this idea?I'm new to unreal and I'm a bit disoriented

chrome bay
#

@twin juniper yeah, seems reasonable to handle respawn logic there. Usually is tied to the rules of the game.

trim dirge
#

Hello, I started making multiplayer feature in my game using blueprints and following the tutorials by unreal engine channel on youtube, but i am stuck here... When i launch the standalone mode of the game and I host the game (LAN or INTERNET [Steam]) the game launches for a second and i am back to the main menu, but when i launch the game through the editor and host the game it works fine... only when I launch the game in standalone mode the game starts for a second and im back to main menu...

kindred widget
#

@trim dirge I don't know how standalone works, but with packaged you need to include the map names in the project's packaging area to use more than the default map.

trim dirge
#

@kindred widget Oh okay, Thanks, I will do the packaging the maps and try to run in standalone again 🙂

kindred widget
trim dirge
#

@kindred widget Hehe, Thanks!

#

Trying it now

#

@kindred widget Nope, still having the same issue, Thanks anyways 🙂

twin juniper
#

It's my opinion or unreal doesn't have a really complete documentation about c++?

bitter oriole
#

It doesn't, though the most common classes do have a lot of documentation

winged badger
#

@fleet raven IsFullNameSupportedForNetworking and IsNameSupportedForNetworking overrides worked, only it has to be able to figure it out from the CDO, anything set on instances is too late

#

and not all our levels are randomized, so we have to subclass the Actors in prefabs with an extra boolean for it set to true

#

did not help we had a... tiny bug in the randomization itself this morning, too

tall pine
#

hi guys,

When we replicate an actor, does that also replicate all the UPROPERTY() inside that actor?

jolly siren
#

Just the ones marked to replicate

#

Does anyone know how 6357106 is less than 70? Or have an understanding of net field exports?

winged badger
#

handle is greater then num there

#

which is the condition you have @jolly siren

jolly siren
#

right, it doesn't hit the second breakpoint tho

#

It thinks it's <

#

I'm assuming the value the debugger is displaying is incorrect for handle

#

I am delaying processing bunches with a system that queues them to be processed later. However, I'm hitting this ensure in ReceiveProperties_BackwardsCompatible_r for some reason

#

if (!ensure(NetFieldExportHandle < (uint32)NetFieldExportGroup->NetFieldExports.Num()))

#

As well as this ensure

#

if (!ensure(Checksum != 0))

#

This code is to check backwards compatibility for replays. I am literally recording and playing a replay from the same code so of course it's compatible

winged badger
#

what type is NetFieldExportHandle?

jolly siren
#

uint32

spark fossil
#

@tall pine I think it's just the UProperties marked as replicated

tall pine
#

awesome thanks

keen thorn
#

hi anyone here tried to implement a more deterministic Physics engine in ue4 like Bullet or used fixed point arimethic in ue4 for determinism? I need some guidelines to make physics on multiplayer

glad wharf
#

Hi everyone, do you know how an actor placed in level can replicate its variable to clients? Is it even possible? Thanks 🙂

tall pine
#

you mark the actor as replicated, and then mark the variables as replicated as well

glad wharf
#

that's what I did but the rep notify function is called only on the server

#

and there is no replication condition, I wonder if this is because I'm testing on uncooked

glad wharf
#

well, I ended up using a multicast as a workaround but it won't work with reconnecting player.

queen flower
#

Curious about this too. Having general issues with multiplayer, replication, and variables. Im really struggling with testing to find sources of where a variable is getting lost between server and client.. and still unsure about how to make sure a Boolean is being seen or set in both spaces.. or even if the client setting the boolean in the server... And how to do it.. how to confirm that I am doing it right even. Oy lol. Will be at it tomorrow (in about 9 hours) all day if anyone wants to school me lol

#

I need to talk to someone and try what's explained for this to click if anyone's willing. PM me if you've got the time.

tall pine
#

@glad wharf : you can totally test in editor, and onrep should work

#

maybe you can post some code?

queen flower
#

I have multiplayer working.. I have 2 players in the same level telling aicontrollers (units) where to go with move to, and both players can see it. Just having issues with the client/joining player. Sometimes drag select just won't select all units, and sometimes they don't moveto with right click.. everything works fine for the server player, and some stuff breaks for the client.

glad wharf
#

actually I'm currently rewriting everything to be sure the code is crystal clear and I'm not missing something (well it's in blueprint). But about the replicated variable, it sure was set on dedicated server (print string) and the onrepnotify was called on server and not on client (print string).

keen thorn
#

I have multiplayer working.. I have 2 players in the same level telling aicontrollers (units) where to go with move to, and both players can see it. Just having issues with the client/joining player. Sometimes drag select just won't select all units, and sometimes they don't moveto with right click.. everything works fine for the server player, and some stuff breaks for the client.
@queen flower If you just started doing networking/multiplayer then I dont think its a good idea to make RTS style, better to try make some shooter game since ue4 networking more naturally translate to this type. For RTS you need to be solid with networking and know stuff like Deterministic Lockstep etc... (different replication schemes)

#

because if you dont use lockstep you will quickly experience bad performance with just a dozen of units

rose egret
#

why dedicated server is not calling AActor.IsReplicationPausedForConnection ? should I config something ?

#

😰

rose egret
#

I checked the source 'NetViewers' is empty. sounds weird. 🤔

surreal idol
#

hey guys, maybe someone can give me some insights, because I'm struggling for some weeks now to nail this issue. I have a heli player pawn (currently controlled by the listen server) and a turret player pawn who is attached to the heli (client 1 for now). Now I'm trying to achieve a smooth movement experience for the simulated proxy (i.e. client 1), but also I need accurate replication of transform (and especially the relative transform of the turret). Any hints?

twin juniper
#

Hi,how can I get the current game mode from a player and Call methods in it?

surreal idol
#

I tried interpolation on the simulated proxy however it had some unsatisfying jitters when rotating or when the heli pilot quickly taps the thrust. Now I am trying to simulate the whole moves from the input, but when trying to correct the deviations from the simulation, I some ugly jitters.

#

@twin juniper the game mode is only accessible on the server. game state is replicated to every player though

twin juniper
#

Mmh,I forgot,I change my question, how can I spawn a player after "his death" using a method in game mode or in Player state?or what should I do to respawn it?

surreal idol
#

@twin juniper There are a lot ways to do this. For example, have your player controller run a server RPC on the game state to request respawning. GameMode can react to this and use its built-in RestartPlayer()

twin juniper
#

Oh,ok Thank you a lot @surreal idol

keen thorn
#

I tried interpolation on the simulated proxy however it had some unsatisfying jitters when rotating or when the heli pilot quickly taps the thrust. Now I am trying to simulate the whole moves from the input, but when trying to correct the deviations from the simulation, I some ugly jitters.
@surreal idol hard to imagine without video

feral tendon
#

Hello everyone!

I have more of a conceptual question.
I am trying to create Voronoi split screen camera system in a multiplayer game based on this tutorial here - https://mattwoelk.github.io/voronoi_split_screen_notes/

How would you appproach it?
My main questions are

  • as player spawning takes place on server side (in GameMode class), should I also spawn the cameras along with the players?
  • where should I update camera locations and player locations on screen - so the information would be accessible for both server and client. If I'd do it in GameMode class, how to make it accessible to clients and not only for server?

There are more questions, but I don't want to throw a bunch of questions here - I want to start a discussion.
Thank you in advance!

surreal idol
#

@surreal idol hard to imagine without video
@keen thorn I’ll post a vid later, taking a break right now 🙂

timber laurel
#

Hello! i try to replicate the opening of a door but is not work do you have a idea???

peak star
#

@timber laurel not sure. Which class are you calling the functions from and to?

#

Hey everybody, I need help. I got LAN create session to work amd find session then join session from another instance of the game to join that on the same Windows machine.
BUT for some reason, find session does not work between windows and android in either direction. I will try it between two androids soon but I need help figuring out what I am doing wrong. This is using built in basic session stuff and I have had it working on another game project in the same engine version so I am quite confused right now.

#

What is the magic setting I need to change and where is it located? Or better than that, how can I troubleshoot and diagnose the cause of the problem for myself?

timber laurel
#

@peak star i don't understand

meager spade
#

Server RPC's cant be called on a normal actor

peak star
#

@timber laurel i mean is your bueprint screenshot from a plauercontroller or a.gamestate or something else?

meager spade
#

so if client can't open door

#

that is why

peak star
#

Exactly

timber laurel
#

from the door and it is a actor

peak star
#

Has to be a connection owning actor

meager spade
#

you can only call Multicasts from a non owning actor

rancid ibex
#

Hi, I am a really dumb guy and I have a really basic question, I am familiar with steam and client hosted games, but could someone explain in a very high level manner, how would I go about game working on dedicated servers? I mean so anyone could run it? Is it doable with UE4 or I need to write some kind of back end service separately from engine? Maybe there is some docs or tutorials? Sory for this type of basic question and thanks!

meager spade
#

Server RPC's require the actor to be owned by an actor with a owning connection

#

So that might work on the server just fine @timber laurel, it will never work on a client

timber laurel
#

I have to change what to make it work??

meager spade
#

the players controller needs to ask the door to open

#

how are you opening the door

#

by pressing a button?

timber laurel
#

Yes

#

ok thanks i will try

meager spade
#

so instead of calling Door > Open

#

you call Controller -> OpenDoor and pass in the door to open

timber laurel
#

ok i understand

meager spade
#

normally this is done with a interface

#

InteractionInterface or something

#

then you have a generic system for interacting with any object

#

via one server rpc in the controller

peak star
#

@rancid ibex I've never done it before, but from what I've read, you do have to create your own back end service

#

Can anyone help me with my question?

#

I am unable to progress without help, and in my experience, this sort of thing takes days or even weeks of trial and error to resolve.

#

I mean it should basically work the same as everything else right? Arent all onlinesubsystems (including null) just a way to broadcast IP addresses and watch for them, then connect to them?

#

And if the same approach works in my old project shouldn't it work in my new project of the same engine version?

oblique mountain
#

Just a basic question. If I have a funktion that does for example return a random number where can I create this funktion that I can access it from different places like from different characters so that I dont have to create the same funktion for every character? In this case this is just an example, the funktion would be much more complex oc

surreal idol
#

@keen thorn I fiddled a bit more with the heli pawn interpolation and this is as best as I could get. It's still jittery (however it is not as noticeable in the video due to the framerate). Jitter is kinda strong when rotating and not so strong in steady flight.In this version I am simulating a single movement on replication and during tick I Lerp the position and SLerp the rotation.

#

any hints would be greatly appreciated!

queen flower
#

@keen thorn I have a 3rd person shooter I am practicing on. But yea the rts is small in scope. Doing it one step at a time. And right now it's just having 2 players be able to move units. If you have any videos or simple ways of explaining a concept, cool. Someone told me an rpc is just a fancy way of saying Server/Client Event which really made that concept click. How would you explain multicasting, or how to confirm a variable is being replicated?

#

Right now 2 players can move units, but if the other players has selected the unit, that same unit sometimes behaves unexpectedly. I have a Selected boolean, and have toggled replicated for it a few times.. with no changes as far as I can tell.

twin juniper
#

evening! I'm putting team scores in GameState with RepNotify. What is the best practice way of triggering updates in Player UI (PlayerController) from there?

#

GetPlayerController(0) will that work?

stoic pebble
#

Is there a way to have the World Outliner show the state of the server (Listen Server) so it shows all Player Controllers of all connected Players? (Im using the Number of Players Option for testing)

queen flower
#

my understanding so far is no, since you have to test in standalone or new editor window. I could be wrong.

#

Maybe you can populate your own list of world object and show it as a widget?

fleet raven
queen flower
#

what does that do?

fleet raven
#

pick the world shown by the world outliner

queen flower
gritty pelican
#

Do I need to call this?
Sessions->StartSession(NAME_GameSession);

#

Wouldn't a session start if you create one?
OS->GetSessionInterface()->CreateSession(0, NAME_GameSession, Settings);

quaint coyote
#

Im having trouble getting my packaged multiplayer project to simply open a level. I have the maps inside the "List of maps to include in packaged build" but for some reason the project cant open the map with a simple Open Level node

glacial hamlet
#

@gritty pelican Start is usually different than Create. Create creates a named online session in the session interface to track any operations related to that session (by name) that will occur. Start might do more. What OSS are you using? Null?

gritty pelican
#

Steam

#

@glacial hamlet

glacial hamlet
#

Sessions is IOnlineSessionInterface right?

gritty pelican
#
{
    if (OS->GetSessionInterface().IsValid())
    {
        FOnlineSessionSettings Settings = FOnlineSessionSettings();
        Settings.NumPublicConnections = NumPublicConnections;
        Settings.bIsLANMatch = false;
        Settings.bIsDedicated = true;
        Settings.bAllowInvites = true;
        Settings.bShouldAdvertise = true;
        Settings.bUsesPresence = false;
        Settings.bAllowJoinInProgress = true;
        Settings.bAllowJoinViaPresence = false;
        Settings.bAllowJoinViaPresenceFriendsOnly = false;
        Settings.Set(SETTING_MAPNAME, FString("Average"), EOnlineDataAdvertisementType::ViaOnlineService);
        OS->GetSessionInterface()->CreateSession(0, NAME_GameSession, Settings);
        UE_LOG(LogTemp, Warning, TEXT("REGISTER STEAM DEDICATED SERVER: SUCCESS REGISTRED"));

        GetWorld()->GetTimerManager().SetTimer(StartSessionTimerHandle, this, &UABYSS_GameInstance::StartDedicatedServerSession, 5.0f, false);
    }
}```
glacial hamlet
#

with Steam, FOnlineSessionSteam::StartSession looks like it do a set recently played with based on players registered to the session and more importantly, sets the session to in progress (some things will require that). Otherwise it doesn't do any real backend work to progress the session forward.

latent basin
#

if i were to make a level selector for my multiplayer game

#

thats in the main menu would i have to replicate it?

glacial hamlet
#

@gritty pelican yea that should work okay. Timer approach may not be the best for when to start it. Probably want to "start" after your dedicated server gets into the new map if its going to travel, if its already in the map then that should be ok

gritty pelican
#

It works well, I tested

glacial hamlet
#

bAllowJoinViaPresence may be required for steam, can't recall (for allowing friends to join)

gritty pelican
#

I just thought maybe this function is superfluous

glacial hamlet
#

It kinda is... if you get burned somehow in a weird way, check for anything that checks if the session is InProgress state. Some things do care

kindred widget
#

@latent basin That is a very vague question. Do you know of any examples that you're trying to make the main menu like?

latent basin
#

not really, all i need it image with text and i made a button with 0 opacity, when its clicked it loads up a level

#

but im saying would that work for multiplayer

#

or would i have to replicate it

#

@kindred widget

glacial hamlet
#

@gritty pelican Looks like you can't "End" a session that hasn't started, which will flush leaderboards and do a FOnlineAsyncTaskSteamEndSession, so thats gonna be important I think.

#

UOnlineSessionClient::EndOnlineSession wraps up some of that too.

gritty pelican
#

Well thank you

kindred widget
#

@latent basin Only if you want other players to see it, like if they're all looking at the same main menu like Apex Legends team lobby before queing.

gritty pelican
#

If it tue, will invite work? bAllowJoinViaPresence = true;?

latent basin
#

Oh i see

glacial hamlet
#

This also seems critical for session joinability, so if it hasn't started (still in PENDING) then users may not be able to join it (as a dedicated)

#

I think you do need it

gritty pelican
#

Ok thanks, you really helped

latent basin
#

Because im making a fps multiplayer game and soon im gonna make it a little test with friends too see if it works, so i made a mai nmenu and map selector, only question is that if we went in the same level would we see eachother if i hosted a server

glacial hamlet
#

@latent basin Generally the UI isn't replicated but it sounds like you're maybe looking for a lobby like experience? For multiplayer your host would click that button and enter a joinable session they host (if listen server and not dedicated). Then clients would have to do session search to get to it

#

through something like a server list etc. That "search" would give clients data to populate their UI

latent basin
#

ah

#

I need to make a server list then

glacial hamlet
#

if you'r ein a lobby, you're all connected in some way, this flow is usually tricikier but you could make beacons work (ugh) to accomplish this in some way.

#

yea, check out shooter game

#

has a nice server list in it

restive lintel
#

Does anyone know of a full multiplayer game example in UE4? Other than the Shooter Example, which is great, looking for something more blueprint based

queen flower
#

i do have one i could send you

#

id have to build it and upload to gdrive

#

it is an fps shooter I made purely to get multiplayer working and learn multiplayer

#

I used their project given to us 2 months ago. It wasnt ready for multiplayer unfortunately.

#

so I had to follow this:

#

and eventually got it working to where players from other wifi connections, even other countries, could play with me in the same game.

restive lintel
#

@queen flower super cool! I'll look through these! Thank you

queen flower
#

welcome. good luck on the journey lol.

rich ridge
#

In my level I have 18 PlayerStart, so how do I tell GameMode to spawn any pawn at specific PlayerStart?

gritty pelican
#

can i add MAXPLAYERS parameter in run options? for dedicated server. For example

ebon nimbus
#

How do you disable input in a dedicated server setup? I’ve used disable input, set ignore look/move input on both the server and the client. Valid data is passed in(the correct controller and character) and nothing. Also, a friendly reminder that I’m asking this in the multiplayer section so please no single player responses.

ocean geyser
#

@latent basin im working on a tutorial series that shows this. what i did was use beacons. when the player wants to connect to the host he connects via beacons. once connected i have a struct that i have replicated in the beacon that holds the lobby info (map name and image and such) and an OnRep event. when the lobby info updates it fires the OnRep event for the clients connected via the beacon and that OnRep event calls a blueprint event in the widget that updates the map image/name and all of that so the connecting clients see the info (such as currently selected map and such)

latent basin
#

ahh okay

#

notify me when it releases x)

ocean geyser
#

well its going to be awhile before it releases and even longer before it gets to that point lol so your better off going ahead and getting started, i can lend a hand if you have questions though

bronze arch
#

does anyone know; how i can choose automatically to connect to the nearest server?
I have multiple ue4 dedicated server so have multiple ip adress and ports. everything is ok so far. but I dont know there no possible to do PING ip with ue4, and cant get current location.

ocean geyser
#

@bronze arch make your own ping using beacons (not sure of another route). have the client beacon connect to the server beacon and fire an RPC on the client beacon that just connected. in that client RPC get the current time, then make an RPC call to the server that makes another RPC call to the client, in that last RPC call get the current time again, then just get the difference in time in milliseconds and theres your ping?

bronze arch
#

oof i really hate this, anyway i will make interface to choose region server.

#

thank you

ocean geyser
#

its not as bad as it sounds

bronze arch
#

but.. im very bad at draw interface

ocean geyser
#

well you could make it a tad easier by just going via region by storing the region of the server in something like the gameinstance of the server. then when a client connects via the beacon just have the server send a client RPC that contains the region of the server (the variable in the game instance) if you dont want to go by ping if your going to choose the region

bronze arch
#

ty

ocean geyser
#

nice, what route did you end up takin?

bronze arch
#

uhh i didnt

#

i saw some C# codes that i can ping a server

#

and i saw some dllexport nodes that can ue4

#

so im using dllexport xD

ocean geyser
#

well dang i will probably end up switching to a similar soulution like that lol

bronze arch
#

yea limitless idea WeSmart

#

even im using multiple dedicated servers for break limits that ue4 can handle max players lol (because after 100 player it starts jittering)

#

With custom CMC replication it can handle 200-300 players in same server i think, also with replication graph to stop listening other players by distance. then it will up to 500-700 in one ue4 dedi server PepeYikes

ocean geyser
#

damn

queen flower
ocean geyser
#

@queen flower the point of that was?

queen flower
#

is there anything im obviously failing to mention here?

#

anything i should add?

ocean geyser
#

@queen flower show how to host and test outside of the editor via batch files to launch and host/join games with since the editor can do some wonky things sometimes

queen flower
#

by "outside of the editor" you mean a package or build?

#

no idea what batch files are.. is that somehting noobies need to know in order for multiplayer to work?

ocean geyser
#

not packaged or built, they dont need to know what it is for multiplayer to work, think of it like a simple programming language to execute commands that you write in notepad. i use them to launch instances of the game as both client and server for testing. ill show you an example i made a video on it
https://www.youtube.com/watch?v=_XW9oI36kTE

In this video we will simply be creating a dedicated server to be used for testing our code in a multiplayer environment.
Host Server:
"C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\Win64\UE4Editor.exe" "C:\Users\YOUR USERNAME\Documents\Unreal Projects\TutorialGame\Tutor...

▶ Play video
queen flower
#

so this is good if you want to test the project without opening the entire engine, and if you dont have a build?

ocean geyser
#

if you want to test outside the editor in genera. sometimes testing inside the editor with multiple clients can be finicky and ive had issues doing so so i always do a final test outside of the editor. this also saves you from having to package/build the game to test outside of the editor

queen flower
#

cool

gritty pelican
#

in UE 4 there is an admin? or Rcon

#

?

ocean geyser
#

you can make one

spark fossil
#

Anyone know if it's possible get the latest input values from a CharacterMovementComponent?

ebon nimbus
#

How do you disable input in a dedicated server setup? I’ve used disable input, set ignore look/move input on both the server and the client. Valid data is passed in(the correct controller and character) and nothing.

slender yarrow
#

disable input on player cont. So make an event in pc that calls the disable input node. then call that event from wherever. forces the client input to be disabled (all that really matters)

#

is it possible to have every other players time dilation to be slowed, while yours is normal (1.0). While at the same time on their client they are all normal to each other and you appear faster? Like relative time. I know this is most likely impossible but I want to see theres even something remotely close to this that can be achieved. Whether through heavy c++ modification or just using the time dilation BP nodes.

gritty pelican
#

Does anyone know how to add a password to a Steam session?

#

i use steam dedicated server

thorny saddle
#

hi guys

#

i have 1 question 🙂

#

i change some structure in client

#

and when i print it on server i can see that change

#

why ?

#

if client use cheat to change this my server accept this cheat if this work like this

#

is this true?

#

can anyone help me plz ?

spare glade
#

Is there a blueprint for checking if a player state is your own?

peak star
#

What do I need to do to get the Android build of my able to see Windows build's sessions so it can join them?
I thought I did everything that made that work on my other project in the same Unreal version (4.23)

#

But it's not seeing them

queen flower
#

did you fix up redirectors?

#

also made this for anyone getting started in multiplayer. I'm not an expert. Just wanted to provide a project that had multiplayer working.

ocean geyser
#

@thorny saddle then you set it up wrong. the struct must be replicated and only changed on the server. the client shouldnt change the struct and have the server set it (if its something that gives an advantage with cheating)

peak star
#

@queen flower yeah Fix Up Redirectors didn't do anything, I guess there were no redirectors to fix up

#

@queen flower does your example project work for games to find each other over the same Wifi router with NULL online subsystem?

#

for LAN?

queen flower
#

LAN works

#

Not sure about the null, but it is the entire project. Can be tweaked if for some reason is doesn't work. But LAN worked for me with how it is setup

#

I have a PC and a laptop and was able to join the same game over a shared wifi

peak star
#

Cool man. Maybe it's just my Android being weird. But it worked on my other project so IDK

#

Here's something else, I tried open 192.168.50.49 (the IP address of the host PC), and the Android game joined it just fine!

#

So LAN is working between PC and Android, but the Find Session is NOT.

#

Maybe it's my router 😮

#

Maybe my router is blocking the session from being broadcast between devices.... that would explain why same pc instances can see each other.

#

I guess I better try it on two PCs to see if it's a device specific problem. If not, it's probably the router being stupid

#

In which case I'm doing nothing wrong, just my router doesn't like us.

#

But that removes the whole ease-of use thing I was hoping for other people to use my game easily over the same WiFi, if their WiFi routers act like that too

#

(I mean without having to use an online subsystem or service, just play with people in the same house)

#

Thanks for the project. Maybe it'll help to compare

queen flower
#

Might need to set your IP to static

#

@ @peak star

#

They mention possibilities of playing with PC and Android super minorly. Maybe they mention something

peak star
#

Thanks for helping me. Youre the first person to try this much to help in 2 weeks of me trying to figure this out and asking around

#

I just tested pc to pc on same Wifi and they cant see each other either

queen flower
#

With my project or yours?

#

Than you'll know if it's settings

peak star
#

My project

#

I will try yours now

#

Actually I gotta go to bed now and I have to get v4.24 first to build yours

queen flower
#

Ok

half jewel
#

i wonder about that too, how would a game say on steam work to be "play" compatible with people on android etc ?

queen flower
#

Not sure if steam specifically works that way. I think the project I provided above uses other online stuff built into unreal.

#

Which means that it should work for the PC to phone, as long as both have the same exact build and redirectors have been fixed.

#

Make sure you watch the network fundementals I linked above

#

Again, it might mention something about how to connect PC to phone for lan or network multiplayer

bitter oriole
#

@peak star You probably won't be able to have sessions working from phone to PC

#

Unless you find, or create, an online subsystem that supports both

#

Steam OSS does not handle phones

#

Multiplayer may work, but sessions are usually tied to the platform you sell the game on

#

The built-in NULL OSS only ever works on LAN

peak star
#

@bitter oriole I am only using it for LAN wifi. No steam or online. I have gotten it to work between android and PC on another project as long as it is dev build (for some reason it doesnt work in shipping build but maybe that is because of changing the Wi-Fi router rather than anything else)

brittle sedge
#

Does anyone have experience with replicating the movement of many actors? When I have around 200 actors the movement begins to stutter. Even when the networkprofiler says its only using around 7kb/s. I feel like there is some limit on the amount of actors that can be replicated at the same time, but I have no idea where or how to change it.

twin juniper
#

I'm not understanding how I could call a gamestate function from a player with rpcs,anyone can help me?

brittle sedge
#

@twin juniper I usually use the player controller as proxy since you know its owned by the player so call on server is allowed.

oak hill
#

Hey guys, is replicating FText a good idea? Let's say I have predefined messages that the server send to clients, do i need some sort of map from ID to FText or does the replication send only a reference to FText?

brittle sedge
#

@oak hill I wouldn't replicate FText if the client already has the text. I would just replicate a number using some map as you suggested.

oak hill
#

@brittle sedge Thanks. So does direct FText replication send the whole text instead of an ID or reference?

#

I mean localized text

kindred widget
#

Having a little trouble understanding the best way to handle first person pitch movement replications. Since replication works on the server, the server character works fine if I use a replicated component. In this case, the camera that the hands are attached to. How do you handle that with clients usually? So that the server/otherclients see what direction the other players are looking at(This is for pitch mostly, since rotation is ran from charactermovement component and seems to work fine.)

peak star
#

@kindred widget in that case does it work to send from the co trolling client, a server RPC every nth of a second, to update the component on the server, thereby repli ating it to everyone?

#

Or is that too frequent an RPC? Maybe it doesnt need to be reliable

kindred widget
#

@peak star It's already set to replicate I mean I could try updating it's transform every tick, but I was really hoping for something different. I'd love to see how the ShooterGame in the learning tab handled this stuff, or even just use that as a base class, but unfortunately I can't seem to find the class file in my project folder despite the player character inheriting from it.

oak hill
#

@kindred widget AFAIK the pitch isn't replicated automatically to other clients. If you look for example at the function APawn::GetActorEyesViewPoint, that in turn calls APawn::GetViewRotation, and it tries to get the controller to return the control rotation. This works if you are the owning client or the server, but in simulated proxies this will faild and return only the actor rotation, which in a normal character will have the pitch setted to zero

odd idol
#

Hey, has anyone here experimented with the DisableReplicatedLifetimeProperty set of functions?

kindred widget
#

Yeah. I'm slowly going through some of the CPP files for the ShooterGame. Trying to understand how that class extends from Character to do what it does, since it's working great in that example.

oak hill
#

I should either when I'll have the time. At the moment I'm also replicating yaw in the tick, it works but I'm not sure it's the best solution

kindred widget
#

Ugh. I have really got to take a week and just learn CPP. Knowing LUA is not helping me much here.

spark fossil
#

Hey all. I'm trying to get a value for the amount of turning in place a character has done since the previous frame, to use for a turning blendspace, but without using replication. The issue I have is that the character movement component seems to not be updating the rotation every frame so the difference in yaw is sometimes 0, resulting in jittery animation on non-authority characters. e.g. 3 degrees, 0 degrees, 3 degrees, 0 degrees etc... so the turning animation is flickering on and off. Any ideas would be much appreciated.

queen flower
#

could just be solved on the local player with lerping?

spark fossil
#

@queen flower I'm not sure - what did you have in mind? it's kinda being lerped by the blendspace already, but because it's alternating between standing still and turning, every frame or so, the turning animation never really gets going.

#

It's like if you open a 1d blendspace, hold shift and wiggle the mouse left and right

queen flower
#

Well if i understand the problem correctly, its that a players turning is not happening smoothly.

#

but you are not replicating it.. so the players turning rate is limited to local anyway

#

so I was wondering if you could compare yaw values, one stored a frame earlier and one current, and lerp between the 2.

spark fossil
#

Sorry I don't think I explained this properly. The character is replicated, so the CMC is turning the character on connected players' machines. It's just the turning animation that's jittery because I don't want to replicated a variable for the latest amount turned, if at all possible. I was replicating it, and it worked fine, but it seems like needless replication every frame for every character.

#

So I was comparing the yaw value of the CMC locally, to the value from the previous frame, and using that to drive a 1D blendspace for turning in place.

#

So say, the value is -1, we play turn left, 1 is turn right, and 0 is no turning animation.

#

Works fine on the host or local machine, but for simulated proxies the CMC isn't rotating every frame, so some frames the difference in yaw is zero, so the value used for the blendspace is constantly flickering back to 0

queen flower
#

right

#

replicating the turn is smooth though? even though you dont want to replicate, is turning smooth that way?

spark fossil
#

It is, yeah

queen flower
#

is it possible that youre worried about optimizing somehting that isnt that costly?

#

no idea how much bandwidth youre saving by skipping the yaw value

spark fossil
#

I'd just rather not replicate it since it's every frame for every character to every other character in a game which could have up to 80+ characters at any one time. Each simulated proxy version of a character has the data available already from the CMC so I figured it's best not to replicate it.

#

Tried ignoring 0 values for the latest turn, until it's been 0 for x frames in a row. Works smoothly but wouldn't be very reliable in practice I guess

twin juniper
#

If I want to male a fps multiplayer game,how should I organize my classes?(Everything with his class,ok,but)where should I handle my Player input?where health and its functions?where guns functionality and properties?(In Pawn class?Player Controller?Actor?Character?)

I'm struggling understanding the sense of Player Controller class when all input can be handled in Pawn or Character classes

spark fossil
#

@twin juniper I'd recommend taking a look at Epic's "ShooterGame" Sample project on the marketplace. It'll probably answer most of your questions.

twin juniper
#

Didn't know there is a sample,I was reading unreal tournament sources but is huge,thank you

#

evening all! I sometimes seem to have problems with PlayerStarts being blocked by other players, preventing respawns. These prevented players just end up as spectators on (0,0,0). I'm using my own overridden FindPlayerStart in order to find a random PlayerStart for a specific team. Is there some way to check if that PlayerStart is blocked?

spark fossil
#

@twin juniper np! It has everything in there for a multiplayer fps. Good luck 🙂

#

@twin juniper Is the Actor's Spawn Collision Handling Method "Try to Adjust Location, But Always Spawn" any use to you? Not sure how that fits with your own derived class.

twin juniper
#

im using ignore collision, always spawn

#

I haven't derived a PlayerStart class

spark fossil
#

Ah ok, so you want to know if the playerstart has a player already standing on it?

twin juniper
#

yeah exaclty @spark fossil

#

I noticed it has a capsule component, but I can't figure out how to access it

latent basin
#

quick question, whats the difference between using a dedicated server and not using one?

bitter oriole
#

Well a dedicated server is, dedicated

#

It's a separate program that usually runs on a server somewhere in a datacenter

#

Not using a dedicated server means one of the clients also runs the server code on his game

#

So other clients connect to him instead

latent basin
#

Oh i see

#

Thanks

quiet fjord
#

Hello guys

latent basin
#

anyone ever made a server list / hosting blueprint where u can join friends over the internet?

#

Where people can host their own server

#

and others can join

#

i tried my own version out with the steam plugins, there is about a 10% chance it worked

spark fossil
#

@twin juniper You could add a sphere component (or maybe just use the capsule if you don't need it to be a certain size for anything else) then set OnComponentBeginOverlap and OnComponentEndOverlap events so you can do something whenever a player enters or leaves.

twin juniper
#

so make my own subclass then?

spark fossil
#

Yeah

#

Or you could make a new actor BP with a player start and a trigger volume in it. There's a bunch of different approaches.

twin juniper
#

will look it up, thanks!

spark fossil
#

@queen flower Found a workaround for now using a minimum time threshold between zero values. Not perfect but will do for now. Thanks for your help anyways 🙂

queen flower
#

Alright masterchief! let me know if you ever find out how much bandwidth that saves you. wondering if the effort was worth it

spark fossil
#

haha will do

lusty salmon
#

Hi guys, Im building a mmorpg, I've done a login system with php and json supported but I'm facing now problems after the Login is sucessfull a new level is open, but I lost the control of the camera on the new level. If someone help me I can help you in any kind of php/mysql problem and write the output u need

shy kelp
#

when trying to use a sql database for security, should i only do it to the player stats? Do i also need to secure things like AI enemy health and stuff, or is that fine?

meager spade
#

SQL should never be in the game code

#

all stuff should be a request to a webserver

peak star
#

Yes make cliemt side requests to the server. Server interprets request into safe parameterized Sal queries. Otherwise you give client ability to Inject harmful sql

shy kelp
#

@meager spade is it possible to use sql with only bp?

meager spade
#

you shouldn't have any SQL in game

#

unless its all local

shy kelp
#

sorry, i meant is it possible to request/send sql data via bp

meager spade
#

check VARest plugin

shy kelp
#

@meager spade i thought varest only allows requests

meager spade
#

no

#

well that is what you are doing

#

you are requesting data from the server, or requesting the server to do something with the data

shy kelp
#

i also need to save new information gathered, so i need to send as well

meager spade
#

never used VARest

#

but it should support sending JSON requests

#

with your payload

shy kelp
#

kk

meager spade
shy kelp
#

@meager spade i red this lol, terrible documentation

meager spade
#

yh

lusty salmon
#

Bivze here how I use the get request from varest plugin

#

u dont need the cast , and the brunch for testing propuses the url the full url with paramters

#

this is the simplest way, also the most unsecure use it just to test plz

#

be sure your php file output have something like this: {"result":"sucess","username":"teste","gold":"117700"}

#

just follow up the same logic for receiving the json object values

#

@shy kelp that php output make me 1 day long because i write some html tags in there xd, the output can only be json object( encode from phparray function) like this: echo json_encode(array('result' => 'sucess', 'username' => $username, 'gold' => $gold)); just replace all variables or add more

shy kelp
#

@lusty salmon thank u so much, I have some knowledge in php and sql even though I made no practical applications with them using ue4 before so this rly helped

lusty salmon
#

Yeah event the knowledge make all this work is a little hard xd but don't give up: but after getting those blueprint work u can make everything else

#

I've done the login system work, will do the register then. I came to unreal engine for a week, trying to understand all of these, so any doubts more about this blueprints, va rest plugin and widget tell me, if i know answering i will. We have to help each other. Altought that is the basic so u can figure out all with all your php and sql knowledge. I reccomend save all variables in a GameIstance to keep like url and parameters as well as inventories, health, game currency and so on

#

use get for simple things like adding exp after kill enemies, and post for login register and sensitive data

#

The requests comes in ms time, very fast even for blueprints it's suprised me

ocean geyser
#

any idea where i can create ALobbyBeacon classes? i dont see them inside UE4. im going to bed so if you know please @ me

stray gull
#

anyone active that can possibly help?

fleet raven
#

no

stray gull
#

ok

bitter oriole
#

Ask questions

#

Don't ask for people to ask you to ask them

rain coral
#

Hmm, I just realized that when getting corrected by the server and doing resimulation in the CMC, any logic that uses GetWorld()->TimeSeconds > SomeValue will fail.. since the time isn't rewinded. That's a lot of refactoring. Does that also mean that any game logic using time comparison must use not GetWorld()->TimeSeconds, but a saved time value that is restored each resimulation? I've never thought of this issue. Perhaps someone here has dealt with this?

unique kelp
#

Is there any built in way to get the acceleration / input vector of a simulated character?

#

I could compute it myself, but would rather not if there is already a way

rain coral
#

@unique kelp I think the input is never sent out to the simulated proxies, only the velocity, position etc. I think acceleration is computed from the input vector only on the server and autonomously and will otherwise be 0

unique kelp
#

Yeah that's what ive seen so far

#

thanks

#

ill just derive it myself then

hybrid zodiac
#

Hi everyone, does anyone know which function is called if a client crashes or alt-F4s from the game rather than disconnects elegantly? I have an issue currently where if a player is disconnected suddenly in this way, the pawn is destroyed but any items they have equipped remain floating in mid air

#

I've been digging through the game mode and game session code, but I'm not sure where we should be handling the spilling of inventory items other than OnLogout()

unique kelp
#

you might be able to use AActor::EndPlay and handle it on server

#

or wherever you want really

hybrid zodiac
#

Is EndPlay called right before it's destroyed?

#

I know there is a separate function called PreDestroy() or something like that, but trying to do it there caused crashes

unique kelp
#

Actually endplay might not be the right function here, now that I look at it

#

does AActor::Destroyed not do it?

hybrid zodiac
#

Let me take a quick look

chrome bay
#

There is no callback for that no

#

You just have to handle it like any other spontaneous logout

#

You'll get the same issue right now if they timeout or drop connection

#

Dropping inventory sounds like something to be handled by the pawns destruction, or on end play yeah.

#

gamemode and online code shouldn't really care about inventory

hybrid zodiac
#

Thanks for the pointers 🙂

hazy siren
#

Any thoughts on how to handle diablo 3 style multiplayer, where players are in the same session but not necessarily the same level? Streaming levels so they are all in the same level, or do an unreal server instance per zone and handle all the other stuff in some external session management?

stoic pebble
#

pick the world shown by the world outliner
@fleet raven Nice, thats what I was trying to find.. thanks!

hybrid crown
#

Hello got a little issue with networking, i actually in event tick check the angle of my player to disable sprint if he try to sprint with a bad angle. (Using charactereMovement for replication). The fact is i can get some movement jiterring thanks to authorative server movement correction, i think it's cause i constantly set max speed walk in a event tick, so there is some latency between client and server, and this lead to some movement error.

I think checking the input of the player on the server, Then set the max speed is the best way to do. The issue is, i'm forced to use RPC everytime the player press forward/left... or can i directly get something like input the server receive and will apply ?

ocean geyser
#

@hybrid crown why not do that checking in your input events/functions?

hybrid crown
#

@ocean geyser it's actually what i'm trying to do, but i was hoping for a cleaner solution, like the possibility to get the input who gonna be consume by the autorative server

ocean geyser
#

you can check the angle of your player in that event as it fires on both client and server (i believe) when input is added so your client and server should sync up without having to do any rpc calls

hybrid crown
#

there is no event.

#

i mean, there is an event

#

but not on the server, as input are local event.

#

and this exactly what i want to know, if there is the possibility to have, with a blueprint, movement input on the server.

rose egret
#

UE4 network uses delta compression for snapshots yea ?

scarlet cypress
#

My character replicates their visibility even tho the event is only happening on the client, i am testing with "New Editor Window" and use 2 Players. What is going on?

scarlet cypress
#

Can someone help me real quick please?

#

replicate movement is on, does that also replicate visibility?

kindred widget
#

@scarlet cypress How are you setting visibility?

lime scarab
#

Can anybody recommend me a video to make a dedicated server with node.js??

#

For UE4 shooter

fading birch
#

@timid pendant you may have better luck in #packaging

peak star
#

@queen flower Hey I installed UE 4.24.3 and tried to open your project, but it says it can't open it without disabling the "AdvancedSessions" plugin because I don't have that plugin. I'm not sure where to get it. It doesn't show up when I search for it in the Marketplace

tidal venture
#

Does someone have tried making a lock-on system here? I'm having a system in place but as soon as the character to follow move, it produces strange jitter (when I use set control rotation)

peak star
#

@fading birch thanks

#

@tidal venture lerp to the replicated location rather than snapping to it

tidal venture
#

I already tried that and unfortunately it doesn't work. Maybe I would consider it if it was doing better, but it's not the effect that I want to achieve

#

@peak star Do you have another suggestion?

queen flower
#

@peak star make sure you read the readme lol

stray gull
#

in my game when someone hosts a server on lan people are able to join successfully but are unable to move and the ui doesnt load. it seems the player is loading but takes a considerable amount of time for very small maps and not alot going on

restive shale
#

is there any documentation on how to begin a client to server multiplayer connection?

lusty salmon
#

Advance session

peak star
#

@tidal venture Sorry I can't think of one at the moment

#

@queen flower OK got it. Same as the wall-o-text

#

Hope this works as I'm not using Steam for my project

queen flower
#

Let me know how it goes

atomic pelican
#

Any ideas how to attach AActor to a other actor's component once it has been spawned?

#

if I try multicast, the spawned actor is still nullptr

#

and cant find any delegate to bind "OnSpawned" or something like that

chrome bay
#

attachment is replicated so as long as you are replicating movement, so you don't need to multicast

#

Just attach it server-side.

atomic pelican
#

I did, and the spawned actor is marked as replicated

chrome bay
#

Should be all there is too it then

#

Make sure Replicates Movement is checked too

atomic pelican
#

hmm let me check

unique kelp
#

Should I not be using "DefName="GameNetDriver"" ? Every Steam integration guide i've seen so far has it, but my clients get a ton of warnings about it being out of date

chrome bay
#

Multicasting that kind of thing isn't really very reliable, because you won't be able to handle late-join or network relevancy.

#

Anything state-based should always be done with replicated variables.

#

RPC's are for one-shot events

atomic pelican
#

okey I did put replicated movement on, but still wont work :/

#

here's what my attachment looks like SpawnedActor->AttachToComponent(OwnerUnit->GetMesh(), FAttachmentTransformRules::SnapToTargetIncludingScale, Socket);

chrome bay
#

Is the actor you're attaching it to also replicated, or available to the network at least?

#

You may have to debug it

atomic pelican
chrome bay
#

Looks fine to me. I'd step through the code and find out why it's not attaching

#

You're not attaching the character are you?

#

Attaching to the character right?

atomic pelican
#

I'm attaching other skeletal mesh to the character's mesh

#

also tried with default cube and did not work

chrome bay
#

Hmm odd. Should work, may just have to step through and find out why it's not replicating

atomic pelican
#

I'll try to simply spawn something locally for client and attach that, then at least I know if the attach function is working

plush lagoon
#

So I have players connecting to my server but for some reason, it automatically spawns them without allowing me todo any setup or anything else. Does anyone know how to make it so that I can control the spawning of a Player once they join the game?

chrome bay
#

You need to override HandleStartingNewPlayer()

#

The default implementation calls RestartPlayer() which spawns them instantly.

plush lagoon
#

ahh ok. I thought it was PostLogin

#

AHHHHH

#

XD thank you very much @chrome bay 🙂

atomic pelican
#

hmm I kinda of found the issue but not sure if this will mess the gameplayabilitysystem spawn logic. When I changed SpawnActorDeferred to SpawnActor it will attach the component

fleet raven
#

did you forget to call FinishSpawningActor after SpawnActorDeferred?

atomic pelican
#

no, I do the attach function inside finishspawningatctor

#

it seems it will be called even if I use SpawnActor

dry turret
#

i'm trying to make the players enter a lobby where they can vote for the next map after a match has ended (lobby is the server's default map) but the lobby widget is not initialized (it initializes on PostLogin which doesn't trigger after restart) and newly connected players enter the lobby with the wrong controller. any ideas how to solve this?

#

also this warning likes to show up in the server log: Warning OSS: No game present to join for session (GameSession)

fading birch
#

That particular log warning is just because you're not setting up a session, shouldn't impact what you're trying to do

#

where is that blueprint taking place? @dry turret

dry turret
#

thats the master game mode bp, however the lobby map uses a separate one (not a child)

lone python
#

Anyone knows how many players maximum could connect to my ue4 game in the same map ? (if you ask about performance, each players can't move, they just can "watch" something in the same map)

kindred widget
#

@lone python That really depends a lot on your networking and the server you're hosting it on. If everyone has the same 'something', and you're just telling the clients to play it locally, you can probably handle quite a few connections. The more and more things you need to replicate and do with each of the clients connected though, just lowers the count.

lone python
#

that make sense. Basically, what I want would be 300 players watching somebody talking like a TED talk, on a scene. So, on performance I think it wouldn't be huge

kindred widget
#

Well, generally the only thing you'd need is a few RPC calls. Play, Stop, Seek to video time, that stuff. Maybe a replicated float to have clients check the server's play time and seek to that time if they're too far behind. Hard to say though. You could optimize that pretty far with just a video playing.

lone python
#

@kindred widget this would be in fact a real person talking with a microphone. People would be in their own chair and watching that guy on scene. But after some research on forums, I think 300 players is a lot for one map...

rain coral
#

@chrome bay I'm trying to solve a small physics related networking issue (shudder, I know). Is it possible somehow to run physics in a for loop? I fear that it's not, without ticking the entire physics world simulatenously. I'm just thinking if someone has 150+ ping, resetting the object to the server's state will cause a bad loop of never getting back in 'real time', however inaccurate it is destined to be

#

Maybe extrapolate based on its velocity and the client's ping? Then move it with 'Sweep' checked and hope for the best?

chrome bay
#

It's not possible to do that no

#

You can tick the physics scene sure, but that will run everything along side it, including generating callbacks, and the entire scene will be simulated

#

You can't simulate just one object in the scene

rain coral
#

Yeah that's what I assumed

jolly siren
#

Has anyone heard of the term "flash count"? I have never heard this terminology before.
Sentence it was used in
As you've mentioned, the best way to get around having to force high record rates in the replay would be to use multicasts, or to track the 'missing' state updates via some other method (like a flash count).

chrome bay
#

sounds like a burst counter, similar to shooter game

jolly siren
#

ahh okay that makes sense, that would just be relying on a different replicated variable tho. Currently our weapon state replication is sometimes not recorded in replays at a recording rate of 60hz

chrome bay
#

Ah I'm not sure how replays work.

jolly siren
#

Thank you tho, that was helpful. I think you are right about the burst counter

chrome bay
#

Will DM you something

peak star
#

@dry turret Remember OnPostLogin fires when the GameMode detects that a Player has entered the game. I'm not sure what you mean by "restart" in your description of the problem, but that might be why it's not happening: maybe all the Players are already in the world.

chrome bay
#

PostLogin() won't be called after seamless travel, the player has already "logged in" so to speak.

dry turret
#

i'm not worried about that part actually, i want to know why new players enter with a different controller, even though the first time they join everything is fine. by restart i meant servertravel to lobby

peak star
#

@queen flower I finally got it to build (after adding AdvancedSessions plugin to the UE4/Engine/Plugins folder) to Win64 and put that build on 2 PCs on the same Wifi.

PC 1 Hosted with LAN checkbox = true, and Sessions checkbox = true.
PC 2 Join with LAN checkbox = true, and did not find any sessions. Maybe this means that my project is okay but my Wifi is messed up

#

Or that PC 2 is blocking Unreal because it is my work computer haha

#

I have to try on another one in case that's what it is

queen flower
#

Were you able to join with the checkbox for LAN being unchecked?

#

just for troubleshooting sake.

#

also make sure you click the refresh button

woeful ferry
#

Any way to get this to fire on server side? The controlled pawn returns as null when I set this on begin play in player controller on the server

twin juniper
#

send playerstate to the server

#

you can access pawn via playerstate as well

#

I personally always use playerstates for interacting with players

woeful ferry
#

This is just for player controller to access the pawn it's possessing

twin juniper
#

controlers are not replicated

woeful ferry
#

I know

twin juniper
#

it cant access its data

#

so try player state

plush lagoon
#

What would be the best way to Pass Data too a Dedicated Server? Example, player is joining I want to send a token validating the player's account.

twin juniper
#

well there is post login

plush lagoon
#

I tried to to expose the OnPreLogin to a BlueprintNativeEvent but it refuses to appear.

twin juniper
#

you could go with beginplays maybe

plush lagoon
#

I need to beable to get the connection Query Options that are sent.

twin juniper
#

ooh

#

you could try cpp

#

I saw some ppl overriding onprelogin

#

maybe blueprint version is a bit different

lusty salmon
#

What would be the best way to Pass Data too a Dedicated Server? Example, player is joining I want to send a token validating the player's account.
@plush lagoon I would suggest VaRest Plugin to be able to send get/post querys from a phpfile and return values in a json object

plush lagoon
#

Yea i'm looking at how todo it now.

lusty salmon
#

in CPP no idea xd

plush lagoon
#

@lusty salmon I know how to pass stuff to a HTTP Service, i'm looking for how to parse and grabbing all the Options and such from the PreLogin Event so I can validate their connection

lusty salmon
#

add to pre login event that http service request

plush lagoon
#

once i figure this out, i'll make a tutorial @.@

#

there should really be a tutorial for this.

#

😦

lusty salmon
#

they are outdated

plush lagoon
#

Yea, need updated. LoL

lusty salmon
#

do u have a channel for tutorials? try these is updated

plush lagoon
#

I just have a playlist I use on youtube XD and abuncha them spread across Websites and the forums.

lusty salmon
#

just add these to the prelogin event and change all the variables, make that also more secure xd

plush lagoon
#

Eh. I don't use VaRest. :

#

😛

lusty salmon
#

it's very helpful

plush lagoon
#

I make my own BlueprintAsync HTTP Functions

lusty salmon
#

too advanced for me kkk so when u know that drop the video link plz xd

plush lagoon
#

Example of a Blueprint Async function

bronze arch
#

and

plush lagoon
#

are you just inheriting off a normal GameMode?

bronze arch
#

aka params

#

just create a gamemodebase c++ in project

plush lagoon
#

ok Does that now

#

hay lets go to Private Chat @bronze arch

bronze arch
#

no later

#

im eating rn

plush lagoon
#

ohh LoL kk

#

whatcha eating?

#

Now i'm thinking about food ARHGH

timid pendant
#

Hello on linux server I get these errors when connecting from a client and disconnects me from the server. On a windows server however it works fine.

LogNetPackageMap: Warning: GetObjectFromNetGUID: Network checksum mismatch. FullNetGUIDPath: [31]/Game/ProjectFury/Blueprints/BP_ConquestGameState.[29]Default__BP_ConquestGameState_C, 3929889644, 652759256
LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object from path. Path: Default__BP_ConquestGameState_C, Outer: /Game/ProjectFury/Blueprints/BP_ConquestGameState, NetGUID: 29
LogNetPackageMap: Warning: GetObjectFromNetGUID: Network checksum mismatch. FullNetGUIDPath: [35]/Game/ProjectFury/Blueprints/BP_CQ_Gamemode.[33]BP_CQ_Gamemode_C, 3799029371, 96497645
LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object from path. Path: BP_CQ_Gamemode_C, Outer: /Game/ProjectFury/Blueprints/BP_CQ_Gamemode, NetGUID: 33
LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object. FullNetGUIDPath: [31]/Game/ProjectFury/Blueprints/BP_ConquestGameState.[29]Default__BP_ConquestGameState_C
LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor. Unresolved Archetype GUID. Path: Default__BP_ConquestGameState_C, NetGUID: 29.
LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor Unable to read Archetype for NetGUID 6 / 29
LogNet: Warning: UActorChannel::ProcessBunch: SerializeNewActor failed to find/spawn actor. Actor: None, Channel: 5
LogRep: Error: ReadFieldHeaderAndPayload: Error reading RepIndex. Object: BP_PlayerState_C /Game/Levels/Alaska/Alaska_Ver_1.Alaska_Ver_1:PersistentLevel.BP_PlayerState_C_2
LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = NetChecksumMismatch, ErrorString = GetObjectFromNetGUID: Network checksum mismatch. FullNetGUIDPath: [31]/Game/ProjectFury/Blueprints/BP_ConquestGameState.[29]Default__BP_ConquestGameState_C, 3929889644, 652759256, Driver = GameNetDriver IpNetDriver_0

timid moss
#

@plush lagoon y did you make your own system when there is already varest

#

is it slow or something

plush lagoon
#

@timid moss o.o because I created a Procedural Tool to take Web SDKs and convert them to Unreal Engine SDKs automatically.

#

:p Did that before VaRest was a thing.

#

so been suing it since, I just add a few things to a Json, and boom fully done c++ in plugin form for whatever web api I need it for.

timid moss
#

whats your youtube channel? That tutorial your thinking about making sounds interesting

plush lagoon
#

I'll put a Link up once I have it 100% figured out and working.

#

I just finished writing a tutorial for Getting a Dedicated Server working, Locally, then on the Cloud with all C++ Changes in current 4.24 and 4.25 XD

#

Just havent did a video on it yet.

timid moss
#

So your taking web SDKs and convert them to Unreal Engine SDKs? What exactly does that mean ?lol

plush lagoon
#
"LoginUser": {
    "name": "LoginUser",
    "fnName": "loginUser",
    "exporttype": null,
    "scenario": null,
    "description": "Enables User log in.",
    "returns": "LoginData",
    "type": "function",
    "request_type": "normal",
    "inputs": {
      "user_email": {
        "type": "string",
        "name": "user_email",
        "description": "A User’s email address."
      },
      "user_password": {
        "type": "string",
        "name": "user_password",
        "description": "A User’s password."
      }
    },
    "query": {
      "name": "loginUser",
      "text": "mutation loginUser($input: LoginInput!) { loginUser(input: $input) { accessToken, expires, refreshToken } }"
    },
    "data": {
      "input": {
        "email": "user_email",
        "password": "user_password"
      }
    },
    "prerequisites": []
  },
#

Convert that to c++

#

which was a output of the file i put in the Gist

#

🙂

timid moss
#

oh.so it like makes a c++ model from a json?

plush lagoon
#

yes

timid moss
#

o thats really cool. is it a struct or class?

plush lagoon
#

depends on the data type it'll generate structs for each json export.

#

so its always valid.

tall pine
#

Hi guys,

I'm dealing with the problem of replication. Say I spawn a mine on the server that will replicate down to client. The mine will spawn in, ticks for n seconds, and explode.

The problem here is a mine just activate on client (or coming back in after net relevancy), but on the server it has gone through a bunch of spawn, explode, respawn, etc. So on the client it just blow up, spawn, and blow up again immediately.

What would be a good way to handle this? Should I not rep if the event has happened really long time ago on the server?

winged badger
#

for effects that don't depend on state

#

multicast

tall pine
#

when you say state, which state do you mean? The state of the mine?

#

the effect does depend on the state of the mine

peak star
#

@queen flower Hey I noticed in an answerhub post that they had to disable Google Play stuff to make their Android work on LAN.

queen flower
#

good to know

#

did it work?

trim flare
#

does anyone know if the server and clientside copies of a sublevel BP can actually replicate to each other in a dedicated server setup? I'm struggling with this.

I want a serverside-configured value in Engine.ini to get replicated to the clientside version of the level BP and from there be used to display those config values but I'm struggling to figure out where it's going wrong

orchid pollen
#

Does anyone have any experience replicating character rotation?

I'm getting some stutters on the client with the following setup

bitter oriole
#

You need smoothing.

#

Client and server will have varying framerates

#

Also, you can't do this while replicating the rotation back to the owning player, since you'll always teleport him to ping time in the past.

orchid pollen
#

yeah i was going to try a replicated variable with skip owner next

#

was just kinda hoping i didnt have to

bitter oriole
#

You will, and much more than that really

tall pine
#

@bitter oriole : do you know a good way to deal with replication situation where the client will receive all the changes from the server in rapid succession?

Say I spawn a bomb on the server, and replicate the state of the bomb. The bomb goes from Spawning -> Ticking -> Explode -> Invisible

Now if the bomb on the server goes through all that, but the client bomb hasn't got net replicated, then later when it does, it will get all those replication in rapid succession. This cause the bomb to spawn and immediately explode.

What are some ways to deal with that, besides doing multicast? Or is it pretty much the only way?

bitter oriole
#

If the client cannot get replication updates in that time, there is nothing you can do anyway

#

I've actually done something like this

#

I evaluate the lag on clients, and offset the timings to ensure the bomb (in this example) explodes simultaneously

#

But of course it only works if you have a long ticking time

tall pine
#

My problem is more of this: on server the bomb spawn, tick, explode, in some remote area that the player hasn't got to yet.
On the client, when the player get to that area, the bomb get net replicated, and replay all the state change from the server that happen in the past. What it should do is just do nothing, since the bomb on the server already exploded long ago

bitter oriole
#

That's weird, replication should only replicate the current state of a variable

tall pine
#

oh, I see the problem. I have two different struct to control the spawning and destroying event for replication.
So I should consolidate them into one structure, so the moment the client becomes relevant, it only replicate that one state

twin juniper
#

hey pls help me with a really simple problem Pl0x 😄

#

I have guy making attack and its the server. it works and client can see it. When I do the same on client, the server cant see it.

#

input action Attack -> Custom event reliable replicated to all -> play montage

#

clients cannot call multicast

#

so i have to make 2 custom events?

#

yup

#

one that goes to server

#

than multi

#

if this attack is spesific

#

to a player

#

then you need to send who attacks as well

#

so you animate it on everyone

#

it freaking works 😄

#

you are the god 😄

#

thanks a thousand times 🙂 ❤️

#

yw

plush lagoon
#

@bronze arch did you ever try to validate any data using a 3rd party service within the PreLogin Phase?

sullen kernel
#

Is it normal when testing as a client ("Run dedicated server" option checked) for there to be a slight stutter when you first start the game in the editor?

#

The stutter isnt there when I don't have that option checked (playing as server). Is it normal or probably something in my code causing it?

plush lagoon
#

You just trying to test your multiplayer Game?

sullen kernel
#

yes, just hitting the Play button in the editor

plush lagoon
#

I had that issues as well

#

I learned todo this 1 sec

#

Startup Server (Batchfile) .bat

"<Directory to UE4Editor>\UE4Editor.exe" "<Directory to Project>\<ProjectName>.uproject" NameOfMapHere -server -log -nostream

Connect Client to Server (Powershell Script) .ps1

$ip = (Test-Connection -ComputerName $ENV:COMPUTERNAME -Count 1).IPV4Address.IPAddressToString;
"<Directory to UE4Editor>\UE4Editor.exe" "<Directory to Project>\<ProjectName>.uproject" $ip -game -ResX=800 -ResY=900 -WinX=0 -WinY=20 -log -nosteam
#

Make those files on your compy, then open up a shell directory to where they are. And Launch them each in their own window. Server First, then Client.

Make sure you replace the data with the Proper Directories and Levename.

#

like mine look like this:

"E:\UE_4.24_Source\Engine\Binaries\Win64\UE4Editor.exe" "E:\WolfpackManor\NetworkingBase\ThirdPersonNetworked\ThirdPersonNetworked.uproject" TestMap -server -log -nostream
$ip = (Test-Connection -ComputerName $ENV:COMPUTERNAME -Count 1).IPV4Address.IPAddressToString;
"E:\UE_4.24_Source\Engine\Binaries\Win64\UE4Editor.exe" "E:\WolfpackManor\NetworkingBase\ThirdPersonNetworked\ThirdPersonNetworked.uproject" $ip -game -ResX=800 -ResY=900 -WinX=0 -WinY=20 -log -nosteam
#

Works really well. :3

sullen kernel
#

ok thanks. so you also noticed the stutter when the "Run dedicated server" option was checked while testing in the editor? I guess it is normal then?

#

maybe it has to connect and that is the reason for the delay

plush lagoon
#

From my understanding, It doesnt work the way its suppose too.

sullen kernel
#

i see.. so you dont test in the editor anymore. you just keep those command prompts open and run the commands yourself to start server/connect clients

plush lagoon
#

yep.

#

right now i'm working on stopping people from joining the server during the PreLogin event DX

#

not so easy

#

LoL

sullen kernel
#

thats interesting. i wonder if others avoid testing in the editor and do it that way as well. i only noticed the stutter so far which is a minor problem

timid moss
#

I know what studder think Murk is talking about

#

When i package my game its not there

odd iron
#

Hello Guys
The Savegame is not working for clients its getting 0 value
what is the wrong with replication can anyone tell me please ?

plush lagoon
#

I think i'm going to have todo something like this...

Player Launches Game -> Player Logins to MasterServer -> Master Server Responses with Ip:Port & Key for Server.
Game Client -> Connects to Game Server passing Key -> Game Server validates Key exists in Memory -> Lets Game Client Connect. 

Master Server -> Notifies Game Server of User, with Key
timid moss
#

I've noticed testing multiplayer things in the editor sometimes doesn't produce acurrate results. I don't know about you guys but for my project ive noticed that. Like for some odd reason for instance, certain events weren't replicating to all clients but in the packaged version it was fine

plush lagoon
#

yea so have I @timid moss

timid moss
#

o youve experienced replication issues too? or are you talking about the studder in the beginning

plush lagoon
#

events not triggering when they should be

#

sometimes values aren't replicated when they are set.

#

but if I start it in server mode, no issues.

#

ever.

#

so yeah.

#

😛

odd iron
#

Anyone Can look please

plush lagoon
#

How are you referencing the character's data to be stored and retrieved?

#

I see you referencing the current player's controller but that will always be new.

#

o.o

odd iron
#

Im getting the set of the character class into the controller and sending it to the Gamemode when the actor spawn

#

And im calling the save game when the player postlogin

#

its loading and setting after that

#

it's loading just for host but the clients will get just 0

timid moss
#

@plush lagoon Do you not have to specify the file path to the map when launching the server from the terminal? I thought you had to do this /Game/Maps/NameOfMapHereI'm looking at your StartupServer.bat and you just have NameOfMapHere

plush lagoon
#

as long as the Maps folder is in the parent directory of content its fine.

#

If you have it in a special directory then yes @timid moss

timid moss
#

So if my Maps folder is inside my content folder then I don't need to specify the path? is that what you mean?

plush lagoon
#

yes

timid moss
#

Thats nice to know thx

plush lagoon
#

Does anyone know how to Open a Port in UE4 C++? O_o

shy kelp
#

is using an event dispatcher for saving the game,(when player switches tab, or closes game)a good idea, or can this easily be abused, if so, what is a better idea.

stray gull
#

My steam subsystem isn't working, i have advanced sessions and my DefaultEngine.ini looks like this.. the plugin is enabled in the engine aswell

#

it does work on an empty project that i tested with