#multiplayer

1 messages ยท Page 472 of 1

hasty adder
#

At work canโ€™t test so just askin ๐Ÿ˜ƒ

waxen crest
#

when server shoots it works great but then client shoots the bullet gets the z rotation but ignores the camera x and y rotation.

#

nvm attaching the camera to a spring arm fixed it

ember needle
#

All, on travelling clients I sometimes see this error:

[2019.06.25-16.07.22:682][ 79]LogWorld: SeamlessTravel to: /Game/Levels/Menus/OSA_Menu_Level_SlotSelection
[2019.06.25-16.07.22:696][ 80]LogOutputDevice: Warning: 

Script Stack (0 frames):

[2019.06.25-16.07.22:696][ 80]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2019.06.25-16.07.28:409][ 80]LogWindows: Warning: CreateProc failed: The system cannot find the file specified. (0x00000002)
[2019.06.25-16.07.28:409][ 80]LogWindows: Warning: URL: ../../../Engine/Binaries/Win64/CrashReportClient.exe "D:/Program Files (x86)/SteamLibrary/steamapps/common/One Step Ahead/OneStepAhead/Saved/Crashes/UE4CC-Windows-3BC8391748DF6CEA2D40F389FE6C0099_0000" -AppName=UE4-OneStepAhead -CrashGUID=UE4CC-Windows-3BC8391748DF6CEA2D40F389FE6C0099_0000 -DebugSymbols=..\..\..\Engine\Intermediate\Symbols
[2019.06.25-16.07.28:409][ 80]LogWindows: Could not start CrashReportClient.exe
[2019.06.25-16.07.28:409][ 80]LogMemory: Platform Memory Stats for WindowsNoEditor
[2019.06.25-16.07.28:409][ 80]LogMemory: Process Physical Memory: 3430.91 MB used, 3738.65 MB peak
[2019.06.25-16.07.28:409][ 80]LogMemory: Process Virtual Memory: 8234.42 MB used, 8681.43 MB peak
[2019.06.25-16.07.28:409][ 80]LogMemory: Physical Memory: 9552.30 MB used,  6515.66 MB free, 16067.96 MB total
[2019.06.25-16.07.28:409][ 80]LogMemory: Virtual Memory: 8732.49 MB used,  8379875.50 MB free, 8388608.00 MB total
[2019.06.25-16.07.28:409][ 80]LogWindows: Error: === Critical error: ===
#

any ideas where I can start looking...?

meager spade
#

well that wont help at all

#

do you have more? cause that is just saying it cant find the Crash report client

#

if its a deep engine crash (which it seems) you might want to debug inside visual studio

ember needle
#

this happens at the end of the game, when clients are travelling back to the lobby

random oxide
#

Hello everyone I am new on this server. I appreciate any help on this one, does anyone know how I can set overlap events on actors separately for each player ? For 1 player on dedicated server it works fine, but it is commonly set for all the other players. It is a racing game with checkpoints, and each checkpoint is an actor that I set to "Generate overlap events" to "false" when it is cleared, but it happens for every player. How should I approach this ? Thanks ๐Ÿ˜ƒ

undone girder
thin stratus
#

@ember needle You'll have to make sure that you package the CrashReportClient with the game

#

And also include the symbols

#

This isn't showing anything for us

ember needle
#

i understand, thatโ€™s the feedback iโ€™m trying to get

#

@thin stratus so i need to package the crashreporter (i guess itโ€™s an option), not sure about symbols (99.99% is just BP)

thin stratus
#

Symbols is also for Engine Symbols

#

Otherwise you have no idea if something of the engine caused it

#

And yeah it should be a setting

ember needle
#

ok thanks will do

copper mango
waxen crest
#

Oh, thanks @copper mango

#

Ill try to test it

copper mango
#

@random oxide what I'd suggest is don't turn off overlaps, because that would disable it for everyone. Instead you could store the current checkpoint and lap number in the PlayerState, and when the player hits a checkpoint you make sure it's in the right order...so if I'm on checkpoint 5 you only accept advancing to checkpoint 6, for example

random oxide
#

hey @copper mango thanks for the reply ! this is exactly what I am doing right now ! and I think it is less of code execution this way. I creted a variable activeCheckpointIndex in the playerController and setting the nextCheckpointIndex to that every time by checking some things first but very efficiently and without much code.

#

@copper mango I shall do all this in the player state, but let me ask you, is the player state common or it exists for each player ? If I set a variable in the player state will it be only for the particular player ?

twin juniper
#

I want upgrade my switchGate class (open / close gates). Now works only on server to client. But how can I make this code for client to client? If i set this functions on NetMulticast then dont work on client and on client to clients.

    void TurnLight();
    void TurnLight_Implementation();
    bool TurnLight_Validate();```
copper mango
#

each player has a separate playerstate, main reason you want to store that in the playerstate instead of the player controller is every client can see every other player's playerstate

#

lol oops

#

with player controllers, only the server and the owning client has an instance of it

#

but for example if you store it in player state, then each client could show on the UI where the other players are on their lap/checkpoint numbers, for example @random oxide

random oxide
#

yes ! ok you are an amazing man @copper mango this helped me a lot

#

I do all the checking server side, the client is just a puppet that executes what the server says in my code logic

copper mango
#

@twin juniper multicast only works from server to all the clients, you shouldn't let the client directly open the gate...they should tell the server "hey I want to open it" and then the server multicasts the opening to everyone

twin juniper
#

so I need have function where client tell server: "open gate", @copper mango?

random oxide
#

@twin juniper my current knowledge says that you call a custom event "on server" that will then call another custom event "Multicast", @copper mango can confirm or give a greater solution

copper mango
#

yeah, it'd be a server function, probably on player controller, that the client says they want to open, then the server does the multicast that actually opens (first maybe verifying the client's not cheating)

hasty adder
#

@little geyser answer here mate

twin juniper
#

so if I have void OnAction(); on character which interact with gate by clicke key E, then I need set UPROPERTY(Client, ..) on this function and next function do multicast? ๐Ÿค”

little geyser
#

@hasty adder First one is in my character blueprint, second one in my player controller
Will try in pie

meager spade
#

no @twin juniper read some guides on networking

#

you clealy dont understand it

little geyser
#

@hasty adder Doesn't work in Pie

hasty adder
#

My suggestion is to personally stay away from using the player controller from index I dunno others thoughts on that but I use in character the possessed event in character to get the controller and set a var

#

I believe itโ€™s an override event

little geyser
#

Will try this way, but I thought index dosen't matter in multiplayer... And matter in splitscreen cooperation

hasty adder
#

Ahh ok

little geyser
#

@hasty adder Ok, I fixed it, forgot to cast the player controller to my own version, thx for the help โ™ฅ

hasty adder
#

Cool

grand kestrel
#

You should never need to get player controller by index, it would mean you don't have a proper chain of reference and have done something quite wrong

little geyser
#

Ok ok... Good to know, tried with controller by index and didn't work, so @hasty adder wasn't wrong

small compass
#

Hey guys, it seems that when joining a session, theres something weird happening with controllers not being destroyed. is this something common?

#

(on level swap i use seamless travel)

jade gazelle
#

Is there a way to replicate a Sphere Collider radius down to client? I have a sphere collider added to my character in the constructor and have Component Replicates set to true, but when I call SetSphereRadius() on the server it is not replicating down to the client

#

Do I need to make a custom SphereComponent class with the SphereRadius float set to be a replicated variable ?

copper mango
#

probably easier just to make a replicated float on the character with an OnRep, and then call SetSphereRadius there

jade gazelle
#

Yeah I was thinking about something like that as well.

#

Kind of just curious though because Iโ€™ve run into similar issues with other components where certain things donโ€™t behave like I would expect them to

#

Like setting the mesh in a skeletal mesh for instance, I have a current workaround like you described where it changes on the server and then an OnRep triggers the change on a client

#

But there must be a way to make it more direct so that changing the mesh on the server immediately replicated it down to the client w/o the need for a middleman variable

copper mango
#

well, most of the components are not setup for replication, because it would be inefficient to replicate them and also in many cases not really viable to exactly synchronize them

jade gazelle
#

I guess, Iโ€™m sure thereโ€™s a good reason or five that are far beyond my knowledge level on why they arenโ€™t set up this way.

#

Guess Iโ€™ll just use a replicated float and OnRep like you mentioned

gleaming niche
#

yeah like your example of skeletal mesh; it doesn't auto-=replicate, because there are two things, and one relies on the other

#

ie: the anim instance relies on the mesh (and it's skeleton)

#

staticmesh on the other hand, is setup to replicate if the mesh is changed on authority

jade gazelle
#

Ahhh, well that makes sense

gleaming niche
#

and also as chalon said, because replicating the skeletalmesh AND the animinstance is.. well.. not exactly needed either way.

elfin creek
#

so i was making a lobby where players join and select their characters , they get spawned in the lobby level , after a set amount of time i want to move them from one level to another but with the same character they picked from the lobby, any idea how can i do that ?

worthy perch
#

Save it somewhere that persists between map changes. PlayerState has CopyProperties, there's also GameInstance which lasts throughout the entire lifetime of the program.

elfin creek
#

so the PlayerState should be containing a variable that holds the selected character and respawn it again on the new map ?

thin stratus
#

Is bUsesSteam=false; still enough to deactivate Steam on Server Builds?

#

Cause even though we have that inthe Server Target cs, the build posts about not being able to init Steam, which it should try to begin with

#

@elfin creek You need to use SeamlessTravel with your non-menu gamemodes, that then allows PlayerStates to copy over data via CopyProperties, as well PlayerController to copy over data via OnSwapPlayerControllers, located in the GameMode class.

random oxide
#

@elfin creek yes

ember needle
#

All, can multiplayer drastically reduce FPS? I've profiled everything in singleplayer and I have 70+ FPS. Yesterday in MP I had around 25 occasionally, and I don't understand whether that is related to network tick or others. The host did not have one of the best connections.

random oxide
#

FPS has nothing to do with network and this is generic IT not game specific

#

you must be doing something very wrong

#

while I should add that the connection from the video card to a screen is considered a network connection ๐Ÿ˜„

ember needle
#

I doubt that I'm doing something very wrong. Everything is profiled.

#

I will dig in more of course, though I'm trying to first have a grasp where to start from again.

#

thanks

twin minnow
#

When using server travel, will the default maps folder path "Game/Maps/NameOfMap" work in a packaged game?

ember needle
#

Path doesn't really matter AFAIK.

#

As long as you specify them correctly or you ensure that your maps use absolutely unique names

random oxide
#

@ember needle whether it is very or not very wrong, if the FPS drops so much it is not a "very" good thing

ember needle
#

will remember that. ๐Ÿ˜ƒ

random oxide
#

just remember that FPS and network are not related

ember needle
#

are you 100% sure about that.

#

for instance, on listening servers animations need the network tick to start.

#

I don't know the internal mechanisms, hence my original question.

random oxide
#

and what does this have to do with frames per second

ember needle
#

That said, fair enough, will dig.

random oxide
#

lag relates to network and indeed the animations may start with a delay

#

but since they start it's upon the client pc to play them not the network cable

#

for example I am sending a command from the server to the client to play a sound, this doesn't mean I stream the audio data to the client, the client will play the audio data from their own pc

twilit swift
#

I'm trying to spawn an emitter at location on a multicast, but it only spawns locally on each client (other clients can't see the emitter). Am I missing a step here?

#

Running dedicated server.

little geyser
#

So I'm struggling on this... I have 2 multiplayer spawns pointing each other. The thing is, the server camera is ALWAYS in the good direction (pointing to the arrow) and the client camera is always in the direction of the right spawn (even if the client spawn at the left).

copper mango
#

@twilit swift if you call the multicast from a client, it'll only run on that client. you have to call it on the server for it to go to all th e clients

twilit swift
copper mango
#

well that would work, but usually you want to actually detect all the collisions on the server, not on the client, and then the server can just multicast

#

rather than having the client detect the collision, and then tell the server, and then the server tells everyone

#

because if you do it the second way, it's possible for the client to cheat

#

since they could say they got a collision when they actually didn't

twilit swift
#

How can I detect all collisions on the server? I only see the one option for the 'on component hit' event.

wary willow
#

@copper mango you should elaborate about there being two of everything in the world ๐Ÿ˜‰

#

SwitchHasAuthority is usually what folks use

#

Google this in docs if you need further info

#

Look at this content example

#

damn, I did the work for you

copper mango
#

@twilit swift so basically each game instance (server and then all clients) has their own copy of the world with all the actors that are relevant to them

little geyser
copper mango
#

so yeah the hit event would happen on both server and client, and then you can use that switch has authority mentioned to make sure you only actually respond to it on authority

twilit swift
#

I see. Thanks, @copper mango

copper mango
#

@little geyser does your camera rotate properly once you move after the spawn?

twilit swift
#

So, maybe it's because I'm running a dedicated server, but when I test this way, the authority branch never fires. It's always on remote.

little geyser
#

That's the thing I would like a fixed camera, can move it a bit but not rotate it

random oxide
#

@twilit swift me running a dedicated server I usually prefer asking using isDedicatedServer hope that helps

little geyser
copper mango
#

@twilit swift is the object that you're overlapping with spawned only on the client for some reason?

twilit swift
#

I'm just realizing that this is the problem. It's a force field that is spawned by the server, but the projectile is spawned on client.

copper mango
#

@little geyser if you don't want the camera to rotate can't you just turn off inherit owner yaw? or are you saying you want to pick a rotation initially and then stick with that one?

#

ahh yeah, that would do it

#

you gotta spawn the projectile on server

#

so basically when the client shoots it just tells the server "hey I'm shooting" and the server actually spawns the real projectile

little geyser
#

Yea @copper mango , I want to pick the rotation of the spawn initially and stick to it

copper mango
#

so where do you set the initial camera rotation?

glass plaza
#

Does an actor need to have bReplicating to call RPCs on Server/Client? Trying to reduce the bandwidth of my game and I have an actor that updates so infrequently that everything is passing through RPCs.

little geyser
#

Ahem, I'm not sure... I've got my camera attached to a cameraBoom in my character blueprint. But I rotate it in my respawn event (which is in my gameMode) :

copper mango
#

ok so the problem is the game mode only exists on the server

#

and rotation that's not through normal movement doesn't really replicate

#

wait, you're not rotating the camera boom are you?

#

you're just spawning the character with the desired rotation

#

that would replicate since it's the initial transform

#

but I'm not sure how you expect the camera to rotate with them, which is what I guess I'm confused about

little geyser
#

Yea but the camera boom is attached to

copper mango
#

but if your camera boom has inherit owner yaw off, it would never rotate with the character

twilit swift
#

Does that make sense?

copper mango
#

that won't work because OnFire will only run on the client since it's bound to an input event I'm assuming?

twilit swift
#

Ah, ok.

copper mango
#

basically OnFire calls a separate Server RPC

#

and that does the spawning

twilit swift
#

got it.

#

thx

little geyser
#

I guess you mean this, I need to leave it marked if I don't want my camera to turn around my character (my character is rotating to point to my mouse)

copper mango
#

yeah, so what you need to do then is in your character begin play

#

you probably need to manually rotate the camera boom yourself

#

so it'll rotate based on the spawned character rotation

little geyser
#

Ok will try it

copper mango
#

then if you leave that setting off it still won't update as usual

#

but you need to rotate it once to get it to orient properly

little geyser
#

Still don't work

#

But, my cameraBoom rotation is supposed to be good, when I print it onPossessed, the yaw printed is good

twin juniper
#

is there any difference between setReplicates vs bReplicates?

little geyser
#

I guess setReplicates is the function to set bReplicates

#

Ok, I don't really know why, but I've fixed it @copper mango , as you said I change the rotation of the controller in begin play... Thanks!

twilit swift
#

@copper mango I was able to get it working. Thanks so much for the help. pppartyparrot

maiden vine
#

what type of event should I run to replicate Set Master Pose Component?

harsh lintel
#

anyone has used socket cluster client plugin?

twin juniper
flat haven
#

Not what you're asking for: If you follow Epic naming convension, then IsExploded should be named bIsExploded instead.

winged badger
#
void AExplodingBarrel::OnRep_Exploded()
{
    IsExploded = !IsExploded;
}
#

that bit is curious

#

along with calling OnRep server side manually

#

it will do a good job of desyncing clients

cloud ledge
#

lol

#

Oh no

#

I've been fighting similar (but more subtle) problems in our input controls code

winged badger
#

@twin juniper do not call OnRep server side, make a SetIsExploded(bool NewExploded) function

#

call it from OnRep, and call it on server directly

#

while it might not seem like it matters, that changes as soon as you have a cause to put a breakpoint into the OnRep function

twin juniper
#

I will change it, thanks for advice @winged badger

winged badger
#

and when your server sets Exploded to true

#

that replicates, and OnRep fires on clients

#

by the time it did, the variable already had a value of true

#

so you flip it back to false

cloud ledge
#

OnRep is called after the value is modified. The previous value is passed as a parameter

#

void AExplodingBarrel::OnRep_Exploded() could also be void AExplodingBarrel::OnRep_Exploded(bool PreviousExploded) or something like that

winged badger
#

yes

#

the datachannel uses reflection to see how many parameters your OnRep function has andcalls the appropriate "overload"

#

its also why the OnReps have to be UFUNCTIONs

cloud ledge
#

What I did in our input controls is have two variables - basically "IsExploded" and "IsExploded_Net", the one shows if barrel exploded (on client), second one is the replicated value which shows if it exploded on server

#

On server, both are set, on client the first one is set, but the second one isn't

#

OnRep syncs the first one up if enough time has passed

#

This allows client to extrapolate barrel exploding and then after some time confirm if it exploded (or revert its state if it didn't), if that's any relevant for the game

#

Dunno if there's a better way to do this with just 1 variable being modified

winged badger
#

that includes the local simulation?

#

prediction algorithm?

cloud ledge
#

Yeah, for our input controls, this also includes local simulation

#

So when client pokes the controls, they behave just like they do on server, then the client verifies if server also got everything correctly

#

After client stops fiddling with the component & enough time passes (ping_time*2), it checks network replicated values against the client values and hard-resets them if they differ

winged badger
#

so the client sets its non replicated variable to true as a response to an action/event, that also RPCs to the server, and starts local simulation

cloud ledge
#

So if prediction was successful, nobody notices anything

winged badger
#

then waits for confirmation

cloud ledge
#

Yeah

#

Exactly

#

It passively waits for confirmation - if we just spawned in server, OnRep is also called but instead of confirming or declining the state it simply resets the state to whatever it must be, instantly, no local simulation

winged badger
#

if its more then just cosmetic, you might want to consider a Reliable Client RPC for confirmation

#

this is pretty vulnerable to variance

cloud ledge
#

Yeah, it's just a visual thing though

#

In our game it's only used to remove the feeling of lag from all user controls

#

Basically never ever see any resets or problems, the inputs are synced in such a way that server and client simulation of how controls animate/move is almost always identical no matter the ping & ping variance

winged badger
#

you'd have to have pretty terrible network conditions to see any problems there

cloud ledge
#

Oh, I also noticed this isn't #cpp

#

I thought I clicked on that one instead

winged badger
#

well, it was on topic here

#

also, @twin juniper are you sure you want to keep barrel's collisions active after it goes kaboom?

#

that is a design choice, but definitely a question you do want to ask yourself

limber drum
#

What service does UE4 use for multiplayer?

#

I mean Unity (used to have) some service of their own and allowed 20 player to a max of 200 (for Pro) to connect free of charge. Just trying to understand what's used for UE4.

random oxide
#

@limber drum do you mean some kind of online provider ?

limber drum
#

Ah, I see.

#

Yeah

#

Weather internal by Epic or have to get my own via Amazon for example

random oxide
#

it's way cheaper to format your own dedicated server with some linux distro ๐Ÿ˜„

twin vault
#

well thats another story, it should work with most providers, nothing offered by Unreal

limber drum
#

I see.

#

I guess P2P would be an option for me if it is a co-op game.

#

Player hosting

winged badger
#

with unreal? good luck with p2p

twin vault
#

Player hosting is still client server, P2P is something different

limber drum
#

I know...I wrote that and then realized it was wrong

twin vault
#

๐Ÿ‘Œ

random oxide
#

I watched a video recently about the first version of Diablo game and the developer said that the battlenet back then was just 1 machine connecting players P2P and none knew

limber drum
#

oh wow

random oxide
#

๐Ÿ˜„

limber drum
#

Not sure where to get bandwidth provider if I was to run it on my own Linux distro. My upl speed is only 20 Mbps

random oxide
#

from where I live, amazon performs very bad

limber drum
#

I was thinking getting an FTP and kind of converting it if possible

random oxide
#

it's the worst I would say

#

I am not sure what ping you get to their servers in the united states but in the EU it's terrible

limber drum
#

Problem is that they are very expensive too

random oxide
#

gettign an FTP server and running a game behind ? that's smart !

limber drum
#

I am not sure if it is possible but I heard. lol

random oxide
#

I never even thought about it, surely ftp answers requests too except serving files ๐Ÿ˜„

limber drum
#

Yeah

random oxide
#

well for UE server to run all you need is a distro like debian, no need for extra packages installed at all

limber drum
#

Debian is nice

random oxide
#

then the only thing to do is build UE from source otherwise it does not build for linux server

#

debian is stable very stable

limber drum
#

If only our hardware including gpus were more compatible with Linux...I would never install Windows.

random oxide
#

you mean for a desktop ?

limber drum
#

Problem is what I do I need aps that only work on Win

#

Yes

random oxide
#

oh trust me I go through this all the time,... I build UE on windows cause building linux server from linux is impossible lol

#

that's how much they care

#

but what else to do,.... use this lame OS,... and thank god I can run UE on it

limber drum
#

I hear ya

random oxide
#

and I have isntalled virtualbox with debian so that I can connect to my actual servers in the other room using ssh and execute the server

limber drum
#

I see

random oxide
#

it could run in virtual box itself but I want the real thing going on

limber drum
#

I also noticed that Linux is better with new CPUs that are released with much higher treads. For example, when Threadripper from AMD come out Windows did not support it. They pushed the update later. As for Linux it was working out of the box.

random oxide
#

when it comes to servers linux in my opinion is the only way to think

#

desktops are still not well supported by the big companies

#

I got a HP printer recently and I had to initialize it on windows before I could see it from LAN

#

how about that

limber drum
#

Tell me about it. I have Canon and same thing

#

Does not work on Mac out of box right away

random oxide
#

yeah see

#

the only solution is have all OSs jsut in case lol

limber drum
#

lol

#

I am looking for a good FPS tutorial for UE4 but that uses 4.20 and up. I found few on YouTube but they are OK. Udemy is garbage. I do not care how much it is...just need tutorial (even if it is written). Hard to come by.

#

Also in BPs.

#

There is one on Udemy that is a bit old and is C++

random oxide
#

first person shooter ? I thought those are kinda dead,.. are they still popular ?

limber drum
#

I had it and was not that impressed with it

#

yeah fps

#

first person shooter

#

I do not think FPS are dead. I mean look at COD and Destny

random oxide
#

I got bored of them years ago since battlefield 3 ๐Ÿ˜„

limber drum
#

haha

#

Yeah, me too but not because of B3 but rather because I suck *** at it.

#

Man I am horible fps player

random oxide
#

well who can play with those kids using cheats,... nobody

limber drum
#

*horrible

#

I guess. Most of them play 24/7 so no wonder they are good

#

I like co-op rather than pvp

#

man HALO 1-3 was sick

random oxide
#

add their cheats on top running 27/7

#

I mean battlefield3 had client side prediction kidna thing.... very smart anticheat system ๐Ÿ˜„

limber drum
#

Yeah. Now a days they are much better than what it was back in a day.

#

Good thing about The Division 2 for example the whole game is server based. Even if you try to cheat the server will say "nah, you did not".

random oxide
#

the more logic your run on server the better, when you can, it also costs cpu for the server, especially if you make a huge world

limber drum
#

I know but Ubisoft got the $$$. I love The Division 2 (played the first one but 2 is better imho).

#

brb

random oxide
#

I think they go with Google and Kubernetes now

limber drum
#

Yeah I think so too.

random oxide
#

wb

limber drum
#

ty

#

I switched from Unity

#

Glad I did lol

random oxide
#

yeah I remember you saying it yesterday

limber drum
#

I find UE4 much easier than Unity once you get a hang of it

random oxide
#

I like the unity interface but I never tried using it, I isntalled it once, I hated the installation questions, took forever only to then uninstall it

limber drum
#

Yeah, I like the interface too

random oxide
#

it is funny that the unity fanboys hate the unity interface ๐Ÿ˜„

limber drum
#

With UE4 had the game window and editor window like in Unity. In Unity while I play the game I can see my character but in UE4 I cannot (or I do not know where to enable it).

#

*Wish

random oxide
#

not sure what you mean, have you tried all the play options ?

limber drum
#

Well, I can see my character in the play-mode be it in editor or stand-alone. But while I play I cannot see the same character in editor windows like I could in Unity.

#

I used the editor window to adjust the walk speed of the character to get rid of the sliding foot when not using Root Motion

random oxide
#

I see

#

well I am still learning too, I haven't figured everything out yet

#

there is always something to disappoint "you" when switching from another program... in my case I came from cryengine and I hated that there was no sea by default

limber drum
#

heh

#

LOL this description of it in Discord is better than their website.

#

lol

random oxide
#

yeah it takes the metadata of the page ๐Ÿ˜„

limber drum
#

What game you are making or want to?

random oxide
#

I am making a simple racing game and plan for an mmorpg later

#

I started with the mmorpg but got stuck designing the scaling of the servers to support infinity

limber drum
#

ah

#

mmorpg is a big task

random oxide
#

well you got to be good at networking

#

and learn all the networking tricks of the engine you use

#

half and more of the game depends on the servers if not all of it lol

limber drum
#

that is true

random oxide
#

but making this racing game I learned a lot about how the engine thinks in networking

limber drum
#

That is good.

random oxide
#

what are you making ?

limber drum
#

Sorry....was reading.

#

I want to create FPS co-op

#

I wanted to create tps but I think fps would be better

random oxide
#

anything with great graphics and sound is good ๐Ÿ˜„

#

I like the idea of huge openworld

limber drum
#

Well, one thing I cannot figure it out when it comes to creating TPS is: I have FPS movement from lets say FPS sample and I have TPS movement from TP sample. Now, when I am aiming I want to switch from one to another. Since I cannot figure that out I kind of said...puck it.

#

Let me do fps instead.

#

I like open-world too

random oxide
#

those little things you can get stuck for a month to make a thing

limber drum
#

I know

random oxide
#

usually when I cannot do something after like 4 hours I get disappointed and this puts me to sleep

#

lol

limber drum
#

lol

random oxide
#

now I brb

limber drum
#

ok

random oxide
#

anytime you want a alpha/beta tester I am here

limber drum
#

Sounds good. Same on my end...if you need tester let me know.

random oxide
#

sure, are you in usa ? and thanks

limber drum
#

This looks pretty good.

#

no, Canada

random oxide
#

it maybe will help to build a shooter fast, but I personaly don't like such dependecies, not to mention that we can do that stuff ourselves

#

I mean using UE is a dependecy by itself ๐Ÿ˜„

#

but it would take a while to write my own engine so

limber drum
#

I know. I would not use it but rather put it apart and see how he did it and learn from it.

random oxide
#

to get ideas sure

#

I will need to do the lobby system too soon, after I finish with those basic networking things in this racing project

#

the only thing I wish I could easily do is to drive my own sessions instead of using just one which is the default UE behaviour

#

cause with just 1 session you need to execute the server as many times as the matches that ppl wanna play

#

which is like ,... 1950s logic

limber drum
#

lol

random oxide
#

yeah

#

and actually if you google something like "one instance, multiple sessions" all the results are "one session, multiple server instances"

limber drum
#

Sorry, I am just reading something

random oxide
#

no problems at all

limber drum
#

Unity has a wiki page with sample projects from community...does UE4 have something like that so I can look at it?

random oxide
#

hm, not something I've heard of, maybe others know

limber drum
#

ty

random oxide
#

maybe there is some section on the UE forums for this though

#

go here and scroll down you will see the Community section

limber drum
#

ah thanks...will look at it

random oxide
#

you welcome

limber drum
#

wow I do not know how I missed it but this is a very good section

#

thx again boss

random oxide
#

lol good

#

I didn't even check it before actually

limber drum
#

I was looking for this lol

random oxide
#

ah see

#

I think I fell on a video on youtube about how to do this exact thing you want

#

if I were you I would not search for an FPS tutorial but separate single things that I would need to get an idea of how it's done

limber drum
#

I did that too

#

but the problem is I sometimes do not know what I want (I mean I know what I want but the name of "it").

random oxide
#

๐Ÿ˜„

#

usually all I need is a push in how to approach a problem then I do it all by myself

limber drum
#

Will look at it. thx

random oxide
#

if you go to the end to see the result if you like it, oh and turn off the music ๐Ÿ˜„

limber drum
#

lol yeah

#

Reason I did not look at this is because when I do search I look at max of (past) 1 year because I was once following tutorial and whatever he did I did not have it on my end since UE4 updated and they changed it..

#

Now, I am a bit better at UE4 so I am able to figure it out.

random oxide
#

and FPS as a search term bring all trash to the front

limber drum
#

true

random oxide
#

are you going to also build AI ?

limber drum
#

I will have to, yes.

#

That is another world of it;s own

#

it's

random oxide
#

for the mmorpg I wanna write some machine learning app that will run separately on the server and act as th ai

#

much fun !

limber drum
#

lol

#

Yeah, I was thinking of that too but have no idea how to begin with it. I am not even sure why AAA titles do not use it yet.

random oxide
#

lol is that hacked ?

limber drum
#

not sure

random oxide
#

AAA titles run windows servers even

limber drum
#

could be that is how it is in the game but since it is SP and FPS...who cares

random oxide
#

๐Ÿ˜„

limber drum
#

hehe

random oxide
#

a real AI doesn't need to be super smart to do the job you want

limber drum
#

For example DOOM 2016 when you look up and down not only does camera turn/rotate but the whole player as wll.

#

How would I even begin writing AI

#

I mean I have to tell it what to do

random oxide
#

no you got to create the neuron network and teach it how to walk and run and shoot

#

then it does it on its own

#

but you got to teach it

limber drum
#

I did look it up once but it was way over my head

random oxide
#

everything at first is ugly

#

๐Ÿ˜„

limber drum
#

I guess.

random oxide
#

I mean if you are super lazy you can download some open source library

limber drum
#

True, but I hate coding too.

#

I spent almost 2 years on C# and it was a pain

random oxide
#

that reminds me of when I started to learn french

limber drum
#

hehe

random oxide
#

coding is freedom

#

especially when you get to the level to laugh with other's code

#

same as you learned BP you can learn code

limber drum
#

I am sure it is but I prefer BP...I will try to replicate BP to C++ sometimes latter and see how that goes.

random oxide
#

well you will hate it at first for sure

limber drum
#

I am sure but to be hones I tried Unity's Bolt and PlayMaker...in comparison to BP and understand of it...garbage.

random oxide
#

I have't started c++ in UE yet either, I wanna fully undestand the logic of the UE framework first via BP, I find this way faster for now

limber drum
#

Same

random oxide
#

but I feel like paralized at moments when I use just 1 hand with mouse connecting wires, it's kinda silly

#

take a look and imagine an NPC running this

#

haha look at this dialogue with an AI an me

limber drum
#

Quick question. UE4 used to have HQ (PC version) of mannequin but now it only has for mobile and it seems like it is not compatible with 4.22.x either.

random oxide
#

I don't have it here to give.
sorry ?
No problem.
you lost me
Oh I'm sorry. Perhaps I can explain it again better.
try
Let's try to analyse it step by step. We were talking about unknown.

Now are you less confused?
undefined variables confuse me less that they confuse you

limber drum
#

lol

random oxide
#

I don't know what HQ is really

limber drum
#

high quality

#

hd

random oxide
#

ah

limber drum
#

or hd

random oxide
#

I have no idea

limber drum
#

They used to have it but they removed it

random oxide
#

why would you use it ?

limber drum
#

It was more "biffy" and just looked better

random oxide
#

oh I see, well the first thing I do when I want my char to look better is replace that default one with some from the UE paragon ones

#

have you checked them ?

#

they are all free

limber drum
#

I did but they have those weapons at the feet and I do not know how to remove it

#

I want to first make all the non-combat movement and then work on weapons

random oxide
#

but I forgot you go for 1st person

limber drum
#

They are OK. I could use the ones with rifle for example but as I said I do not know how to remove the gun from the mesh

random oxide
#

I see

#

I used "countess" in my mmorpg tests she looked great

limber drum
#

yeah

#

they all are aaa

random oxide
#

maybe you can try using a character without weapons on and add your own

limber drum
#

I will have to use my own

#

yes

random oxide
#

I mean if you wanna release the game it won't stay to the end anyway, it will be just to make it look better for a start

limber drum
#

I know.

#

\

#

ups

#

lol

random oxide
#

are you with a team or all by yourself like me ?

limber drum
#

Just me, myself and I. ๐Ÿ˜ƒ

random oxide
#

better

#

I don't like telling ppl what to do lol

#

joke

limber drum
#

I wonder when will 4.23 come out

#

Destructible buildings..oh yeah.

random oxide
#

the less updates the better for me cause it takes long to compile the engine all the time lol

#

oh they change the physics engine in 4.23 ?

limber drum
#

sec....

random oxide
#

yes I saw this

#

they say it will be the new physics engine of unreal

limber drum
#

oh

#

Unity just got havok

random oxide
#

I hope it does well over the network too

limber drum
#

Or is getting for 2020.1 release I think

random oxide
#

it took me forever to make a vehicle not slide and eject itself like a banana in the sky with the current engine

limber drum
#

Is an amazing tool

random oxide
#

yes I remember you discovered it yesterday ๐Ÿ˜„

limber drum
#

It seems that some people post real BP rather than just a question based

#

yeah I did

random oxide
#

it was you that asked about those double branches right ?

limber drum
#

yeah it was

random oxide
#

I am new on this server it's been like 2 days max

potent prairie
#

Just export the mesh to blender and remove the wep

limber drum
#

kind of like me

#

this is my 2nd day but it's been just over 24h

#

I am very interested in photo-realistic environment in UE4.

#

With those megascans or whoever

random oxide
#

see what jtxp said about how to remove the weapon

limber drum
#

ah lol that was for me....ty bro

random oxide
#

I like those megascans but if I am right to who runs the company I hate his smile lol

limber drum
#

lol

random oxide
#

that's got nothign to do with the photorealistic products though

#

but they would make a very heavy game

limber drum
#

I saw some of the videos and it was mind blowing. One particular video is said that it use "vanilla" UE4 and they did not use any other 3rd party plugins including ray tracing. I thought it was ray tracing. I can only imagine if they did it with ray tracing.

#

BTW, the video is real-time rather baked or pre-rendered. It was playable too.

random oxide
#

I guess if you work on LODs a lot you can make it work fine

limber drum
#

It would be a heavy game but I am going to try the challenge.

#

yeah LODs are best

#

also camera occlusion.

#

It only renders what camera sees.

random oxide
#

yeah make a photorealistic university and FPS guns with destructable walls make it fall down

#

but then tell the server to replicate what happened to all players and good luck huh

limber drum
#

OK boss I have to go. It was nice talking to you.

random oxide
#

see you later friend

crimson fiber
#

I suppose there is no way to use BP child of OnlineBeaconClient, right?
Either OnBeaconSpawnedMapping is not populated or FOnBeaconSpawned->Execute(Connection) is failing

lost remnant
#

Are source UE builds still required to build a dedicated server?

winged badger
#

yes, and that is not likely to ever change

lost remnant
#

Thanks @winged badger

crimson fiber
#

so you gather you party using beacons and ready to venturing forth. What would you do next? 'open %server IP%' on all clients and UWorld::ServerTravel() ?

twin minnow
#

for seamless travel, do you have to set bUseSeamlessTravel = true in the transition map or the map that the clients are currently in before "travelling" to the new map?

chrome bay
#

you shouldn't have to do anything in the transition map. The idea is you just travel from the current map to the desired one, the engine handles the rest

twin minnow
#

@chrome bay thank you. so i should only have to set bUseSeamlessTravel = true in the current map?

random oxide
#

does seamless travel use session ?

bitter oriole
#

Unrelated

#

Seamless travel is a level change thing, sessions are sessions

random oxide
#

I was thinking maybe it gets session data to know who to bring to the other map

bitter oriole
#

No, it's really unrelated

twin minnow
#

it probably isn't an issue with seamless travel then

#

currently trying to do a servertravel

random oxide
#

alright that's infomative thanks

bitter oriole
#

Seamless travel is just one option when the server says "moving to level 2, follow me"

#

That's it

twin minnow
#

but on the server side i get these logs over and over again

LogNet: NotifyAcceptingConnection accepted from: <ip address>:<port>
LogHandshake: SendRestartHandshakeRequest.
#

and then the clients get kicked out of the current map

random oxide
#

@bitter oriole my thought that maybe an easy way to get the who is on the level was from the session which will stay alive while loading and unloading etc, this is how you do it on web servers or other kinds of servers

twin minnow
#

is there a difference between servertravel and processservertravel? may try that instead

past totem
#

the actor is placed in the level and not spawned on runtime

#

any idea why the event isn't working TheSeaestThinkWeird

thin stratus
#

Yeah, you can't call Server RPC on non-client owned actors

#

The Actor has to be owned by the client, which is usually not the case if you place it into the level

#

Try going over the PlayerController or Character first and then access the Actor in the scene

#

@past totem

twin juniper
#

If I wana make an global multiplayer game, Should I use my local or public IP, As i can't find the public one. Or does it not matter what of them I select?

#

I will use port forward so

random oxide
#

what do you mean global ? for the whole planet to connect ?

humble comet
#

Server connection received: ActorChannelFailure guys i am receiving this problem whenever i am trying to connect to dedicated server

#

Post login is not being called, but i am in the map

#

has anyone received the same problem

random oxide
#

hm me never

#

open console and connect to the dedicated server using IP

#

does it connect ?

humble comet
#

yeah, i connect, i am in the map, but post login is never called, so player is stuck somewhere in between

random oxide
#

never happened to me, if you use custom game modes make sure they are all set correctly on your levels etc

humble comet
#

checked them rightaway

#

but theyre there

#

also in the logs i can see that everything initialized correctly

random oxide
#

without knowing much on this one, I would try rebuild the engine then project see if something was broken there, maybe someone else knows about this issue

humble comet
#

yeah, will try it as last resort

random oxide
#

and before you do that make sure server and client builds are same version

wheat eagle
#

hi people how can I make a client get an array of all player controllers from the game? If I try with "Get All Actors of Class", it only gives an array with himself. I know that I am supposed to use something called PlayerState, but I've never used it before and my attempt with it is unsuccessful, since the result is the same. How can I solve the problem?

crimson fiber
#

@wheat eagle client always has only one PC. smoke eXi's compendium

random oxide
#

How can I make the dedicated server inside the editor not appear as a player when I hit play ? everything works correct when the dedicated server executable runs on the server machine, but the play in editor acts strange because the server appears as a player when I choose 2 players, instead of giving me 2 client players.

fleet raven
#

did you check the run dedicated server box below where you configured it to 2 players?

random oxide
#

yes of course

#

but one of the 2 players is the server

#

hm maybe I am wrong

fleet raven
#

if the window titles both say client, they're not the server

#

you'll have 3 instances of the game running within the editor then - one headless

random oxide
#

yes I think I confused myself

little geyser
#

Any idea why Play Sound at Location node is played once on the server but twice on the client?

fleet raven
#

are you triggering it on both the server and the client?

little geyser
#

My event is on multicast yea

winged badger
#

what calls it?

fleet raven
#

I mean, if you call this on both the server and client, it will end up running twice

#

once locally and once from the server

little geyser
#

My PlaySound event got called on "Run on server" event

little geyser
#

Solved!
My Server_Dead event was called twice on client due to a repNotify on a var ๐Ÿ˜ƒ An HasAutority node solved it!

copper mango
#

so the confusing thing is Rep Notifies in blueprint fire on both server and client

#

but OnRep functions in C++ only fire on client (which imo makes more sense...)

winged badger
#

agreed

#

and its actually worse then that @copper mango

#

set the RepNotify variable locally on client and see what happens

fleet raven
#

I really wonder why they did that

#

it makes no sense

winged badger
#

i think its something to do with IRepChangedPropertyTracker

#

but i never went exploring further

fleet raven
#

u sure it's not just the "set w/ notify" node being the equivalent of setting it and running onrep

winged badger
#

its relevant only for BlueprintGeneratedClasses, as far as i can tell

#

well, OnRep is basically a setter callback that propagates to clients in BP

#

and i hate it

#

the way i realized this was making an endless loop @fleet raven

#

just have blueprint OnRep set its own variable, and kaboom

fleet raven
#

oh wait does it not run it when you set it on a client

winged badger
#

it does

fleet raven
#

even in singleplayer?

winged badger
#

that i don't remember testing

fleet raven
#

this is very curious

winged badger
#

but it would surprise me if it didn't, really

#

i last saw this with 4.18, but i have been avoiding doing any networking in BP

random oxide
#

guys if I wanna execute something on event tick, but I want to execute it only on the client, is there any way to avoid making an if statement on every tick ? ๐Ÿ˜„ .. like if (client ) { ... }

fleet raven
#

turn start with tick enabled off and enable tick in beginplay when on a client

random oxide
#

oh wow that I never thought

#

thanks that was smart

#

but I guess if the project gets more complicated you just cannot avoid making the same question on every tick

fleet raven
#

you certainly can design things properly so that you don't have tons of unnecessary ticks just to check on a thing that could also be event driven when it is changed

random oxide
#

absolutely

fleet raven
#

sure some things may need doing so frequently that that becomes pointless and you just throw it in tick anyway

#

you can have hundreds of ticks without much issues

#

above that it will start becoming a problem just to trigger the ticks

random oxide
#

yes currently I am not using it much except to display fps, btu later I will use it I guess

#

what bothers me currently is that some events (not custom) execute before event BeginPlay and I want some logic on BeginPlay while I need the rest to wait, so I got to do thos stupid loops instead of putting the even more silly delays. I got to solve this at some point one way or another

#

a good example is when I need the playerState available but I got to wait for it, and if I wait, other events start firing before I finish. This is not good

graceful cave
#

@random oxide you can override OnRep_PlayerState

#

that would solve your problems

random oxide
#

@satan thanks, this looks like c++ and I haven't yet dived into c++ and UE

jade gazelle
#

Does cmc max walk speed not replicate down to the client? I have a function that changes that players speed on the server but Iโ€™m getting jittery movement on client. Itโ€™s definitely moving faster but itโ€™s very rough looking. If I set the max speed on both server and client then it looks smooth again

#

I figured setting it on server only would propagate down to client but I guess thatโ€™s not the case?

fleet raven
#

if it's not marked replicated, then it isn't

#

changing this smoothly would be complicated

#

it takes more than doing it on both sides - it also needs to re-do it as part of the move reconciliation

jade gazelle
#

Hmm.

#

I see what youโ€™re saying but there must be a fairly simple way to change the player speed in multiplayer. Without having to redo giant chunks of the movement component

#

Or else that seems pretty limiting to me

gleaming niche
#

i do it by overriding GetMaxSpeed().

jade gazelle
#

To set a new speed?

gleaming niche
#

i modify it there by other states, instead of just changing the saved variable

#

to not require having to change everything else everywhere, since it all uses GetMaxSpeed, and then it removes the need to add extra replication.

jade gazelle
#

Ahhh, makes sense

twin minnow
#

just found out that PostLogin gets called once even when no players have joined the game yet ๐Ÿค”

copper mango
#

like when starting up a dedicated server?

winged badger
#

PIE test for that might not be representative of how the packaged game works

chrome bay
#

FSavedMove_Character already grabs and saves the MaxSpeed, so providing you override MaxSpeed replay and prediction will work automatically. Just need to use an RPC to set it. ShooterGame has a "Sprint" function which does just that.

crimson fiber
#

what multiplayer system would you reccomend for pvp game (dedicated server, 8-10 players)? Advanced Sessions? Online Beacons? Online Subsystem Steam?

chrome bay
#

Well Steam is your only option really. Beacons aren't a subsystem, they're for communication.

#

And as for Advanced Sessions, it's just a wrapper that exposes more of the existing Subsystem stuff to Blueprint.

crimson fiber
#

I mean I could use beacons to form the lobby, I tested it yesterday and it was pretty simple and flexible
AS based heavily on sessions which are meant for server lists (survival games style) which I don't like and won't use
OSSteam should have lobbies and friends built-in, I'm not sure how it works tho

chrome bay
#

Sessions are essential to any online game, it doesn't matter if you're using a server browser or not

#

Beacons are for preliminary / pre-join communication only

crimson fiber
#

I didn't use sessions at all

#

just opened IP when my party was complete

chrome bay
#

Sessions are essential when you want to actually ship a game. Join via IP is fine locally, it's not fine when you're trying to matchmake and join volumes of players together over the internet

#

Every subsystem has and uses sessions, Steam, PS4, Xbone etc.

#

UT uses beacons to party players up, they still use sessions to join and play the game

bitter oriole
#

AS is basically a Blueprint interface for the UE4 OSS concept - Steam being one of the many OSS

chrome bay
#

^

crimson fiber
#

hold on guys) I don't stick to BP at this point. secondly, how do you start dedicated server using steam sessions for ex?

chrome bay
#

have a look at the ShooterGame example

crimson fiber
#

literally opened

chrome bay
#

It has the setup for dedicated/listen servers via steam

bitter oriole
#

It's also not easy to understand at all

#

AS is meant for BP but usable in C++ too

#

And it does all of what SG does ๐Ÿ˜ƒ

chrome bay
#

Ah cool, I've never used it but yeh SG doesn't have the easiest setup

crimson fiber
#

hm I guess I would hide all search session process and automatically connect players to first one. at this point AS will be pretty much all I need

#

thanks!

chrome bay
#

Yeah you don't need to have a server browser or anything, just do a search, try to join the lowest-ping result etc.

#

Beacons are handy for reserving space in a session before you join

#

They just have pretty much no documentation unfortunately, and for most folks it's overkill

crimson fiber
#

Idk I setup the lobby based on beacons in several hours yesterday with custom persistent names and some other stuff

#

honestly i don't see how you would use it normally ๐Ÿ˜„

#

maaaaaybe if party leader wanna join a server

#

but if you already have friends functionality in steam...

chrome bay
#

You can use the friends etc. stuff independently of the sessions part, but the sessions is what registers your game with Steams master servers etc.

fleet raven
#

I don't get how "reserving space before you join" makes sense

#

just do that when you get a real join request

chrome bay
#

Depends how the game handles it - but by default there's nothing in place for that. Clients try to join, but if the session gets filled up in the meantime you just get a network error

#

We run into it all the time atm when a player finds a session with 99/100 players, then they try to join

fleet raven
#

you can handle the error though

chrome bay
#

Yeah you can but it's just not very smooth

fleet raven
#

a beacon is a full net connection so it would be twice as expensive to connect that first, initialize everything so it can finally send an rpc on its actor, only to then close it and create another connection for no reason

chrome bay
#

For parties it helps though, like if you have a party setup and you want the party leader to take all players with them, they need to reserve a set # of slots up front etc.

crimson fiber
#

a beacon is a full net connection
is it tho

fleet raven
#

it is

chrome bay
#

Since each player has to join independently, you don't want part of the party getting through and the rest not etc.

crimson fiber
#

everyone and their mother tells that this something different

fleet raven
#

a beacon is basically a net driver that makes full connections with multiple channels just like the normal one

crimson fiber
#

yep just uses other port

#

that's why i doubted using them

fleet raven
#

ok that moving a full party thing is an interesting case I haven't thought of before

chrome bay
#

Yeah I only got that from what UT does, not something I've implemented myself

fleet raven
#

you could handle this with the normal connection process (party leader connects first and aborts if the server can't handle all of them) but it would probably be more complicated to set up

chrome bay
#

To be honest once Epic properly launches EGS, I'd expect them to do a sample project that has all that stuff built into it.. I think everyone has their own interpretation of how to use beacons simply because there's not really a working example.

fleet raven
#

like you could send the number of slots for your party as part of the login url

#

then reject it when it doesn't fit

crimson fiber
#

exactly

fleet raven
#

client would need to pass the network error to the correct place

crimson fiber
#

but they rather build whole new system to make another boilplates we all love so much

chrome bay
#

The worst thing we've had is players try to join a 99/100 session, they successfully join - but because their map load times are so much longer than somebody else, someone else joins first.

#

Which is a real pain in the ass.

fleet raven
#

what

#

I don't 100% remember the protocol since it's been so long since I messed with it, but don't you join the game session before loading map?

crimson fiber
#

why do you load a map on joining session?

#

same question ๐Ÿ˜„

chrome bay
#

As soon as the join request is successful they travel to the map, but for some reason we have yet to work out, other players can join in the meantime. If they happen to load the map faster and steam authenticates the player once they join, the other player gets booted back to menu with 'server full bad luck bro'

fleet raven
#

I'm gonna need to investigate that later

#

just in case it could happen for us too

chrome bay
#

I guess the problem is it takes time for the join to be advertised etc. through Steam, so players are still being told there are free slots etc.

fleet raven
#

"steam authenticates the player once they join" this may be a steam specific bug then

#

do you get a player controller before passing auth with steam?

chrome bay
#

It might just be our setup, but AFAIK once the player controller has logged in (which requires the map load etc.) thats when we authenticate them - but I don't know if that's just our setup that's doing something wrong or some limitation

#

I wasn't responsible for that bit so I hold up my hands ๐Ÿ˜„

fleet raven
#

that seems very sketchy to me because then they can run rpcs before auth

crimson fiber
#

who?

fleet raven
#

the player that just joined

chrome bay
#

Oh by auth, I just mean registering them with the Steam session - but either way.. it still takes a bit of time for the updated player counts to propagate through steam - so players can do searches and still find sessions with 98/99/100 players even though it's actually full

#

But, stupidly - you can't know until you try to join it. That's where beacons would come in handy, as then we can query the server directly for player counts and try to make reservations etc.

crimson fiber
#

you mean once net connection is established RPC's are enabled?

chrome bay
#

Once you're logged in to a server with a player controller you can start calling RPC's

#

Providing you own the actor your calling them on OFC

#

Which initially is just your player controller and nothing else

fleet raven
#

when would you do the beacon thing tho?

#

when the player clicks join?

crimson fiber
#

yeah

chrome bay
#

Yeah probably exactly like that. We plan to use it for queuing eventually too

#

Not got that far yet though..

fleet raven
#

that seems pretty strange to me because you can also start the normal connect process and just catch the error

#

at least that's what we're doing

#

it doesn't try loading the map if the player is rejected early

#

so they just stay on the menu with the dialog open

#

and then it shows the error popup

chrome bay
#

I'm not 100% sure, but as far as I know what's happening is they try to travel once they get a "join successful" result - but occasionally we find players with long map load times end up loading the map, then get kicked immediatelly for the server being full

#

Which I guess is acceptable when your map load times aren't insanely long like ours atm

fleet raven
#

I'd try fixing that issue then instead of working around it, but ๐Ÿคท

chrome bay
#

Yeah but that's the point, as far as sessions is concerned the join was successful

fleet raven
#

yeah, which is why I'd consider that a serious bug

chrome bay
#

Yeah for sure. Atm however no real fix for it comes to mind

#

Thankfully this part isn't my responsibility ๐Ÿ˜„

crimson fiber
#

steam is dead when it comes to fix bugs

#

remember how long voip was broken

humble comet
#

[2019.06.28-10.29.17:624][497]LogNet: Join succeeded: Sardorians-7B6A16A64
[2019.06.28-10.29.17:782][502]LogNet: Server connection received: ActorChannelFailure
[2019.06.28-10.29.18:064][502]LogNetPackageMap: Warning: Long net serialize: 282.192505ms, Serialized Object BP_MekaScorp_C
[2019.06.28-10.30.30:140][676]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection..

random oxide
#

is it possible to have multiple sessions instead of 1 for each server instance ? can you override the default behaviour or .... ?

humble comet
#

guys this is my log and i have no slightest clue why the connection is being closed

#

has anyone had similar problems?

chrome bay
#

@random oxide no - typically you just have multiple servers running on the same machine assigned to different ports

#

@humble comet looks like it's trying to serialize a crazy amount of data or something, or maybe the object has gone invalid. hard to say

random oxide
#

@chrome bay yeah and that is very sad.. this is not how a system should work in my opinion

chrome bay
#

It's pretty standard practice

random oxide
#

in games ?

#

.. because it would be very funny situation for example when you visit a website the machine to execute the server once again just for you,... 1000 users/s ... 1000 processes

chrome bay
#

But that's not really a valid stance because games don't work anything like websites.

random oxide
#

I know it is not the same thing, but you get what I am saying

chrome bay
#

You don't run the server instance for every player, you run it for every instance of a game session

random oxide
#

sure but still

chrome bay
#

It doesn't make sense, one game session shouldn't know or care what's going on in the other - so it makes no sense to bog it down and add all the overhead for managing multiple worlds and actors in one server instance

#

Performance would almost certainly be ten times worse

random oxide
#

you could maybe support thousands of game sessions on the same machine while now you may reach to 50% of CPU usage with 10 idle processes

chrome bay
#

Just opening the .exe with a different port on the command line is a lot easier

#

I highly doubt it

#

Once single instance managing all of that wouldn't be able to cope

random oxide
#

I am not saying how easy it is or not to run the executable multiple times, why are not talking about being lazy

chrome bay
#

It's a technical limitation not laziness. The standard approach (even outside of UE4) is to have multiple exe's running simultaneously on a server machine.

#

Just with different ports specified

#

You also get redundancy for free

#

If Server A crashes, Server B stays up

random oxide
#

so you are saying that it's good ?

chrome bay
#

Multiple exe's on different ports is definitely better

#

But to be honest, it also highly depends on the product

random oxide
#

this is not how things should work in 2019 man

chrome bay
#

...but it's the smartest way?

random oxide
#

what makes it smart ?

#

the limit of 65k ports ? or the CPU overload ?

chrome bay
#

It makes no sense at all to have one dedicated server managing multiple, unrelated game sessions

bitter oriole
#

^

#

It would make testing extremely more complicated, to start with

#

And it would gain nothing

random oxide
#

so you logic says it's better to run photoshop multiple times than having multiple windows inside of it

bitter oriole
#

No

chrome bay
#

That's definitely not the same thing

bitter oriole
#

The logic is to have multiple independent processes to process multiple independent workloads

#

Game servers have basically nothing to share

chrome bay
#

Having more than one process also means you can share the workload across cores, the OS can can assign a core to each process if needs be.

#

Rather than throttling one single core with one process.

random oxide
#

all this could be done with 1 process come on

chrome bay
#

Try it and see

bitter oriole
#

It's easier to not do so, and provides the same result

#

So it's better

random oxide
#

well if it doesn't let me how to try ๐Ÿ˜„

chrome bay
#

Exactly

#

Spend 30 years mastering multithreading and writing game engines then come back with an answer ๐Ÿ˜‰

bitter oriole
#

You would basically reinvent operating systems inside UE4, except worse

random oxide
#

hey @chrome bay relax, this is now about who knows more is it ?

bitter oriole
#

He seems relaxed to me

wheat eagle
#

hi people how can I make a client get an array of all player controllers from the game? If I try with "Get All Actors of Class", it only gives an array with himself. I know that I am supposed to use something called PlayerState, but I've never used it before and my attempt with it is unsuccessful, since the result is the same. How can I solve the problem?

chrome bay
#

I sure wouldn't be relaxed if I was trying to make a server in UE4 handle multiple worlds and network layers at a time

#

@wheat eagle you can't - Player Controllers exist on clients only

#

You should use the Player State (accessed from GameState->PlayerArray)

random oxide
#

it's ok, it is jsut the first time I hear that I need to run a server as many times as the sessions I need, that's all, I respect yoru experience but based on mine with servers all those years this is the first time I face somethign like this

#

I mean don't get offended and all that, no need

chrome bay
#

np's just worth remembering games are a totally different kettle of fish

random oxide
#

sure they are

bitter oriole
#

Even web servers absolutely move toward "many independent processes"

chrome bay
#

But in general if the engine is setup to do something this way there is a valid reason behind it

#

(usually)

wheat eagle
#

@chrome bay The PlayerArray is an array of all playerstates. But I need the player controllers, not the player states. Can I get the controller from the player state?

random oxide
#

and we are here to talk about it not be fans of whatever is happening jsut for being fans

chrome bay
#

You can't get player controllers @wheat eagle - they don't exist on other clients.

#

UE4 Networking 101 - only the Server has all player controllers, the client only has their own.

twin minnow
#

is there a difference between ClientTravel and OpenLevel?

#

Wondering if that's why my ServerTravel isn't taking all the clients to the new level, is if it's because my clients are connecting via OpenLevel currently

wheat eagle
#

@chrome bay ok I need the Player controllers so I can get the players' steam unique ids. Can I get that from the player state? I know about PlayerID , but that's not what I am looking for

worthy perch
#

OpenLevel calls GEngine::SetClientTravel.

twin minnow
#

darn

chrome bay
#

@wheat eagle - APlayerState::UniqueID

#

That's the FUniqueNetID - which you can then pass to the OSS to get what you need.

twin minnow
#

Currently getting this log message for each client after calling servertravel

LogOnlineSession: Warning: OSS: No game present to leave for session (GameSession)
LogNet: UNetConnection::Cleanup: Closing open connection.
chrome bay
#

Generally anything you want to communicate about one player to the other should be done via playerstates

worthy perch
#

Do you have to specify which core your UE4 server instance runs on? So if you have multiple instances, do they automatically utilize different cores?
Or is that dependent on the OS?

chrome bay
#

@worthy perch I think it's dependent on the OS to manage that - you can set the process affinity from in UE4 IIRC

worthy perch
#

Hmm, alright. I will look into that. Thanks.

crimson fiber
#

APlayerState::UniqueID is not FUniqueNetID btw

#

it's a 'cut' version

#

@chrome bay

chrome bay
#

Well it's ReplicatedNetId, which you can use to generate the FUniqueNetId

crimson fiber
#

mmmaybe... Strings are different

#

at least the version of uniqueID exposed to BP was cut

chrome bay
#

It's just a wrapper for an array of bytes, so providing you know what OSS you're using you can construct the FUniqueID from that

#

In fact it does that automatically

twin minnow
#

ok... so when using ServerTravel set the third parameter, bShouldSkipGameNotify to false

#

not really sure what it does

#

but that was screwing me over

winged badger
#

when in doubt, flip every checkbox you can find, hey @twin minnow ?

#

๐Ÿ˜„

twin minnow
#

Very true

#

This is unreal engines way of punishing me

worthy perch
#

@twin minnow So setting bShouldSkipGameNotify to false fixed your problem with ServerTravel isn't taking all the clients to the new level?

random oxide
#

@worthy perch is this santorini island on your avatar pic

#

๐Ÿ˜„

#

you love it or you are greek ?

worthy perch
#

It's really that I didn't want the default Discord logo. I guess the archetecture is nice too.

random oxide
#

ah ok, nice, cause I live in Greece

twin minnow
#

@worthy perch yes, do u have any idea why?

worthy perch
#

I just took a quick look at it, I'm sorry if this isn't really helpful.
@param bShouldSkipGameNotify whether to notify the clients/game or not
...
If the bShouldSkipGameNotify is there, then don't worry about seamless travel recursion and accept that we really want to travel

// Skip notifying clients if requested
if (!bShouldSkipGameNotify) {
    GameMode->ProcessServerTravel(FURL, bAbsolute);
}

And ProcessServerTravel has:
APlayerController* LocalPlayer = ProcessClientTravel(URLMod, NextMapGuid, bSeamless, bAbsolute);
Which notifies clients to travel.

#

By the way, bShouldSkipGameNotify is default to false on UWorld::ServerTravel.

#

So, if bShouldSkipGameNotify is true, clients never get notified to travel.

twin minnow
#

Oh my goodness

#

@worthy perch thank u, ur explanation was amazing

harsh lintel
#

player state has an instance on the server and one on the client or is it like game state which is only on the client side

random oxide
#

one on server and one on client but replicates to all clients

worthy perch
#

Gamestate is also replicated (Server + Clients).

random oxide
#

yeah if you look here

#

"The Game State is responsible for enabling the clients to monitor the state of the game. Conceptually, the Game State should manage information that is meant to be known to all connected clients and is specific to the Game Mode but is not specific to any individual player. It can keep track of game-wide properties such as the list of connected players, team score in Capture The Flag, missions that been completed in an open world game, and so on. "

harsh lintel
#

yeah sorry i was referring to game instance, not state

random oxide
#

game instance is also on both

harsh lintel
#

oh

#

yes I actually tested that, I didn't even remember it, my bad

random oxide
#

on each server and each client

#

for as long as the process is alive

harsh lintel
#

yes thanks

random oxide
#

๐Ÿ˜ƒ

twin minnow
#

@copper mango yes that was for a dedicated server

echo pond
#

hello, I wonder, is there a way to tell from a code that character's movement will be smoothed? Basically, I want to do something only once I know the character is stopped on client (this is AI), thanks

copper mango
#

but on simulated proxies wouldn't any movement just always be smoothed?

grand kestrel
#

I feel like you're approaching something backwards there

copper mango
#

like the moment the AI moves on the server, the simulated proxy has to smooth because it's last known position is wrong

#

then once it's moving and if the velocity is constant it can do some prediction but it's likely still doing lots of smoothing all the time

echo pond
#

yea but that's not the issue

#

my problem is knowing when all the corrections were recieved from server

winged badger
#

movement corrections? after your velocity is zero

echo pond
#

pretty much

#

but when CMC corrects location, it does so via directly setting the position, so character's velocity is 0, but character still moves

twin juniper
#

is their a way i can whitelist a IP or steam ID so were game checks player id if matches ID allows accsess to a widget
im trying to setup admin menu and want it to be whitelisted

twin minnow
#

hey guys I'm trying to get the options from the travel url after a server url and store one of the option values in the player controller. however, InitNewPlayer does not get called after aServerTravel. I've noticed that PreLogin and PostLogin don't get called either but luckily I was able to use GenericPlayerInitialization since that gets called after ServerTravel. Is there any method that takes in the url options that gets called after ServerTravel?

chrome bay
#

@twin minnow If you're using Seamless travel (probably are) then I don't think so - that only get's called when they initially login.

#

You can keep a map of controllers->URL options maybe?

#

Or maybe PlayerState is better, then just make sure it gets copied across with CopyProperties()

gusty slate
#

I am still relatively new to networking and replication in UE, but would it be a good practice to have player character as a reference in the player state? Would that mean that you don't necessarily need to have replicated variables inside of the Player character?

copper mango
#

well, practically speaking you're gonna have replication in a combination of the character, player controller, and the player state, depending on what you're doing

#

you can think of player state as being a place for stuff that persists beyond a specific character instance

#

and then anything that just that one specific character instance should know about should be on the character

chrome bay
#

@gusty slate If something is replicated because it's relevant to the character only, that's where it belongs (e.g, health etc.)

#

Bear in mind - Player States are always relevant, so whatever replicated properties you put in there don't benefit from culling.

gusty slate
#

I see

#

Thank you for the advice

gusty slate
#

Interesting, just doing some spawning tests under cursor as I'm working on an RTS. I just noticed that Hit results and traces if called from the Server are returning false even if the map and trace channels are properly set. What is the explanation behind that?

#

As in, why would hit results and traces work on clients but not the server?

random oxide
#

@gusty slate having a reference of anything doesn't mean you replicate it, for example if you run a function on the server only, that changes the value of a variable, this is done only on the server if you don't replicate that variable, or if you don't call an event from the server (either "Multicast" or "on owning client") later

gusty slate
#

I understand that but that was not what I meant by my question, I just meant that if a reference to an instance is replicated does that mean that all data in the instance is also replicated. So a replicated reference to the Character inside the PlayerState, if that would mean that everything inside Character is replicated or not

timber tree
#

Hi,
My Dedicated server breaks when client FPS goes above 100, what I know is, this can be sorted by adding "client send rate" in config file, but I dont know which config and what value. can anyone help ??

random oxide
#

@gusty slate I am relatevely new to this too and haven't tried what you want to do.

winged badger
#

@gusty slate there is no cursor on dedicated server

#

no player, no player controller

gusty slate
#

Ah ok makes sense, thank you ๐Ÿ‘

winged badger
#

you can probably leverage GetPlayerViewPpoint

#

and reconstruct a trace from that

gusty slate
#

I just wanted to know really why the trace didn't work, but the structure make more sense that the controller just tells the server the location, ty

steady tendon
#

How im i supposed to make a chat system in my game if different levels have different game states?

#

I mean, the player states array is contained in the game state, and each level has its own game state instance, so if a player in a map sends a message, it cant be taken by the players in another map

winged badger
#

that is the least of your problems if you want to have multiple levels open at the same time

steady tendon
#

@winged badger I dont have knowledge about how to have multiple levels in server. I mean, the typical mmo where you can travel to several maps. Im making a chat system and i just figured out that it wouldnt work with players in different maps. Is that too hard to do?

winged badger
#

as far as i know unreal won't let you open multiple levels inside the same instance of the game at the same time

steady tendon
#

So its imposible to make an mmo rpg in unreal?

random oxide
#

@steady tendon implement an chat server outside of the engine, that's what I will do

#

of course it is

#

look at lineage2, tera, etc

steady tendon
#

I mean, with just the engine

random oxide
#

mmos are more complicated so no engine can do everything

steady tendon
#

Well im not only making a chat system, its a social system with commands, so you can have multiple chat channels, parties, guilds, list of friends, etc

random oxide
#

I would implement every separate system outside of the engine and most possibly on separate machines

steady tendon
#

Thats too much for me haha

random oxide
#

well mmos are too much aren't they

#

I mean you could always find a way to do what you want but at the very end you would still be limited

steady tendon
#

Luckyly im not making a mmo, just thought about this type of system to check if i understood how multiplayer works

#

๐Ÿ˜‚๐Ÿ˜‚

random oxide
#

let me give you an example, what if someone wants UE4 to build the actual website as well

steady tendon
#

I understand, i just asked it because i realized that game modes with the game states and so on are unique instances per level

#

Im still studying the multiplayer stuff

random oxide
#

I get ya, the thing is, everytime you are able to run a system or a service outside of the engine, you are no longer depended on the engine for this system to work, and you should take advantage of this. especially with a chat system where you can implement anything outside of the engine and have global chat among all servers of the game and all the rest you seek

steady tendon
#

Thats only possible in C++ i suppose

random oxide
#

haven't done it yet but I guess yes

#

I've done it on other services, not for a game, and yes it always requires coding

steady tendon
#

It would be a great experience, but i dont have the knowledge to do that...

#

At least i will make the system work with one map haha

random oxide
#

knowledge comes with practice ๐Ÿ˜„

#

yes yo ucan make a 20k map for a start it's a good test

steady tendon
#

World Composition with multiple terrains intensifies

random oxide
#

yeap

#

actually if you think about it, a 20k map is huge for a start

steady tendon
#

Actually i should have realized that when you start a dungeon in a mmorpg, a new level instance must be created, otherwise the dungeon couldnt be completed by other group when there is already a group inside

#

But i thought the level was created inside of the server instance of the game

random oxide
#

I hate instances ๐Ÿ˜ƒ

#

actually dangeons the way you describe them are oldschool

#

loading screens and the like

steady tendon
#

What do you mean by oldschool?

#

How is it done nowadays?

random oxide
#

still the same way, with loading screens

#

the whole idea around it is oldschool though

#

minigames inside a game that separate you from the rest of the (open) world etc

steady tendon
#

But loading screens will move the players to a separate "minigame" instance apart of the rest of the world or not?

random oxide
#

yes of course

#

well all this has to do with how you want your game to be like

twin minnow
#

@chrome bay do player controllers persist when server travelling seamlessly to a level with a different gamemode?

winged badger
#

they do

#

look at AGameMode::HandleSeamlessTravelPlayer

#

funny thing about controllers persisting, even if you have Controller A on Map A, and Controller B on Map B, and Seamlesss Travel A->B

#

when player loads the world, he still has Controller A

#

NotifyLoadedWorld gets called, then ServerNotifyLoadedWorld

#

and only when that RPC lands, does the GameMode B swap PCs, if they are not of the appropriate class

twin minnow
#

@winged badger when GenericPlayerInitialization is called in map b, does the player still have controller a or have the pc's swapped by then? sorry if i am misunderstanding

winged badger
#

that happens after its swapped

twin minnow
#

darn

#

im currently trying to transfer values from the old pc to the new pc upon a server travel

#

@winged badger when handleseamlesstravelplayer is called in map b, does the player still have controller a or have the pc's swapped by then?

winged badger
#

A, because HandleSeamlessTravelPlayer is the function that spawns the new PC if needed

#
void AGameMode::HandleSeamlessTravelPlayer(AController*& C)
{
    UE_LOG(LogGameMode, Log, TEXT(">> GameMode::HandleSeamlessTravelPlayer: %s "), *C->GetName());

    APlayerController* PC = Cast<APlayerController>(C);

    UClass* PCClassToSpawn = GetPlayerControllerClassToSpawnForSeamlessTravel(PC);

    if (PC && PC->GetClass() != PCClassToSpawn)
    {
        if (PC->Player != nullptr)
        {
            // We need to spawn a new PlayerController to replace the old one
            APlayerController* const NewPC = SpawnPlayerControllerCommon(PC->IsLocalPlayerController() ? ROLE_SimulatedProxy : ROLE_AutonomousProxy, PC->GetFocalLocation(), PC->GetControlRotation(), PCClassToSpawn);
            if (NewPC == nullptr)
            {
                UE_LOG(LogGameMode, Warning, TEXT("Failed to spawn new PlayerController for %s (old class %s)"), *PC->GetHumanReadableName(), *PC->GetClass()->GetName());
                PC->Destroy();
                return;
            }
            else
            {
                PC->SeamlessTravelTo(NewPC);
                NewPC->SeamlessTravelFrom(PC);
                SwapPlayerControllers(PC, NewPC);
                PC = NewPC;
                C = NewPC;
            }
        }
        else
        {
            PC->Destroy();
        }
    }
#

GenericPlayerInitialization is called few lines down from end of this snippet

naive shell
winged badger
#

not quite

#

you execute MCFire twice on local client

#

*owning client

#

also looks like way too many replicated variables flying around

naive shell
#

Yea i know im new to replication never worked with it

#

Also i cannot even make a client spawn correctly, it spawns in the air and cannot use input with it

meager spade
#

you never multicast the firing

#

Client tells the server he is firing, client spawns projectile/does weapon fire

#

then the server either multicasts the effects or sets a replicated int with a onrep to play the fire effects

jolly siren
#

Is there any way to distinguish serverside a client crash from a disconnect or alt+f4?

meager spade
#

@jolly siren i am sure i heard people talking about this before and the answer was no

winged badger
#

you will get some enumeration with EventHandleNetworkError

#

but if that doesn't provide it, no

meager spade
#

basically the server would never be able to get a call saying the specific reason for ALT+F4/Crash

#

afaict

#

so the server just disconnects them with a lost connection

naive shell
winged badger
#

alt+f4 could had been wired to send a reason

#

how many player starts do you have and is the "in the air" 0,0,0 by some weird coincidence?

meager spade
#

yeah, but a crash could be the same as pulling the ethernet out

#

server wouldn't know

naive shell
#

3 and they are high in the air, also the player is unable to move or anything

jolly siren
#

makes sense, thanks guys. That's what I assumed just wanted to make sure

naive shell
#

Only the server is able to do everything

winged badger
#

so either your clients are not possessed

#

or you're using a dedicated server with one of more inappropriate uses of GetPlayerController[0]

naive shell
#

That get player controller im sure

#

What do i use instead of it

winged badger
#

their pawns are not possessed

#

camera would look weird, too

#

or they are not even spawned, can't really rely on you being precise in explaining the problem at this stage of your networking

#

as PlayerControllers will end up at PlayerStarts, each with one

#

even if there is no Pawn

#

they would be able to pan the camera, but nothing else

naive shell
winged badger
#

PostLogin only happens in GameMode

#

so it only happens on server

#

so Server RPC is pretty redundant

naive shell
#

But even before that it didnt work

winged badger
#

you can use GetActorTransform instead of slapping it together from Location and Rotation

#

you can end up with 2 players at same spawn point

#

with that collision handling override, its likely second won't spawn

stark echo
#

Yo I want to make a shooter and I'd like to know what you would like better fps or tps