#multiplayer
1 messages ยท Page 472 of 1
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
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...?
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
I have this crash report...
this happens at the end of the game, when clients are travelling back to the lobby
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 ๐
how its works with replication (server -> client, client - client, client -> server) without any replications in code? ๐ค
@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
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)
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
ok thanks will do
@waxen crest don't use the camera like that, it's not replicated, use https://api.unrealengine.com/INT/BlueprintAPI/Actor/GetActorEyesViewPoint/index.html
Get Actor Eyes View Point
@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
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 ?
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();```
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
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
@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
so I need have function where client tell server: "open gate", @copper mango?
@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
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)
@little geyser answer here mate
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? ๐ค
@hasty adder First one is in my character blueprint, second one in my player controller
Will try in pie
@hasty adder Doesn't work in Pie
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
Will try this way, but I thought index dosen't matter in multiplayer... And matter in splitscreen cooperation
Ahh ok
@hasty adder Ok, I fixed it, forgot to cast the player controller to my own version, thx for the help โฅ
Cool
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
Ok ok... Good to know, tried with controller by index and didn't work, so @hasty adder wasn't wrong
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)
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 ?
probably easier just to make a replicated float on the character with an OnRep, and then call SetSphereRadius there
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
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
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
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
Ahhh, well that makes sense
and also as chalon said, because replicating the skeletalmesh AND the animinstance is.. well.. not exactly needed either way.
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 ?
Save it somewhere that persists between map changes. PlayerState has CopyProperties, there's also GameInstance which lasts throughout the entire lifetime of the program.
so the PlayerState should be containing a variable that holds the selected character and respawn it again on the new map ?
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.
@elfin creek yes
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.
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 ๐
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
When using server travel, will the default maps folder path "Game/Maps/NameOfMap" work in a packaged game?
Path doesn't really matter AFAIK.
As long as you specify them correctly or you ensure that your maps use absolutely unique names
@ember needle whether it is very or not very wrong, if the FPS drops so much it is not a "very" good thing
will remember that. ๐
just remember that FPS and network are not related
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.
and what does this have to do with frames per second
That said, fair enough, will dig.
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
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.
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).
@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
@copper mango Thanks for the reply. Like this?
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
How can I detect all collisions on the server? I only see the one option for the 'on component hit' event.
@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
Announce Post: https://forums.unrealengine.com/showthread.php?139935 Ryan Gerleve, Sr Engine Programmer at Epic Games, dropped in to break down and explain U...
Setting up networked games for multiplayer.
An overview of the Network Features example level, example 1.2: Detecting Network Authority and Remote Clients in Blueprints.
Look at this content example
damn, I did the work for you
@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
Just to add a view on my problem (Left is client / Right is server)
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
I see. Thanks, @copper mango
@little geyser does your camera rotate properly once you move after the spawn?
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.
That's the thing I would like a fixed camera, can move it a bit but not rotate it
@twilit swift me running a dedicated server I usually prefer asking using isDedicatedServer hope that helps
Like this
@twilit swift is the object that you're overlapping with spawned only on the client for some reason?
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.
@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
Yea @copper mango , I want to pick the rotation of the spawn initially and stick to it
so where do you set the initial camera rotation?
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.
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) :
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
Yea but the camera boom is attached to
but if your camera boom has inherit owner yaw off, it would never rotate with the character
@copper mango So, I added this to my OnFire event in my character class
Does that make sense?
that won't work because OnFire will only run on the client since it's bound to an input event I'm assuming?
Ah, ok.
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)
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
Ok will try it
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
Still don't work
But, my cameraBoom rotation is supposed to be good, when I print it onPossessed, the yaw printed is good
And print weird thing in begin play
is there any difference between setReplicates vs bReplicates?
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!
@copper mango I was able to get it working. Thanks so much for the help. 
what type of event should I run to replicate Set Master Pose Component?
anyone has used socket cluster client plugin?
Anyone can look on my class (exploding barrel) and help me how can I improve this multiplayer code? I will be very grateful, I'm still learning this
https://gist.github.com/rubiikk/51cb391ca5a75263661e38fdb8dcf2ff
Not what you're asking for: If you follow Epic naming convension, then IsExploded should be named bIsExploded instead.
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
lol
Oh no
I've been fighting similar (but more subtle) problems in our input controls code
@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
I will change it, thanks for advice @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
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
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
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
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
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
So if prediction was successful, nobody notices anything
then waits for confirmation
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
if its more then just cosmetic, you might want to consider a Reliable Client RPC for confirmation
this is pretty vulnerable to variance
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
you'd have to have pretty terrible network conditions to see any problems there
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
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.
@limber drum do you mean some kind of online provider ?
Ah, I see.
Yeah
Weather internal by Epic or have to get my own via Amazon for example
it's way cheaper to format your own dedicated server with some linux distro ๐
well thats another story, it should work with most providers, nothing offered by Unreal
I see.
I guess P2P would be an option for me if it is a co-op game.
Player hosting
with unreal? good luck with p2p
Player hosting is still client server, P2P is something different
I know...I wrote that and then realized it was wrong
๐
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
oh wow
๐
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
from where I live, amazon performs very bad
I was thinking getting an FTP and kind of converting it if possible
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
Problem is that they are very expensive too
gettign an FTP server and running a game behind ? that's smart !
I am not sure if it is possible but I heard. lol
I never even thought about it, surely ftp answers requests too except serving files ๐
Yeah
well for UE server to run all you need is a distro like debian, no need for extra packages installed at all
Debian is nice
then the only thing to do is build UE from source otherwise it does not build for linux server
debian is stable very stable
If only our hardware including gpus were more compatible with Linux...I would never install Windows.
you mean for a desktop ?
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
I hear ya
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
I see
it could run in virtual box itself but I want the real thing going on
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.
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
Tell me about it. I have Canon and same thing
Does not work on Mac out of box right away
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++
first person shooter ? I thought those are kinda dead,.. are they still popular ?
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
I got bored of them years ago since battlefield 3 ๐
haha
Yeah, me too but not because of B3 but rather because I suck *** at it.
Man I am horible fps player
well who can play with those kids using cheats,... nobody
*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
add their cheats on top running 27/7
I mean battlefield3 had client side prediction kidna thing.... very smart anticheat system ๐
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".
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
I know but Ubisoft got the $$$. I love The Division 2 (played the first one but 2 is better imho).
brb
I think they go with Google and Kubernetes now
Yeah I think so too.
wb
yeah I remember you saying it yesterday
I find UE4 much easier than Unity once you get a hang of it
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
Yeah, I like the interface too
it is funny that the unity fanboys hate the unity interface ๐
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
not sure what you mean, have you tried all the play options ?
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
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
WTH is this: https://narrativetools.io/
Add Quests to your Unreal Engine game! Narrative is a Node-Base Quest Editor and framework for Unreal Engine 4. Try the free version today!
heh
LOL this description of it in Discord is better than their website.
lol
yeah it takes the metadata of the page ๐
What game you are making or want to?
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
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
that is true
but making this racing game I learned a lot about how the engine thinks in networking
That is good.
what are you making ?
Sorry....was reading.
I want to create FPS co-op
I wanted to create tps but I think fps would be better
anything with great graphics and sound is good ๐
I like the idea of huge openworld
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
those little things you can get stuck for a month to make a thing
I know
usually when I cannot do something after like 4 hours I get disappointed and this puts me to sleep
lol
lol
now I brb
ok
anytime you want a alpha/beta tester I am here
Sounds good. Same on my end...if you need tester let me know.
sure, are you in usa ? and thanks
This looks pretty good.
no, Canada
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
I know. I would not use it but rather put it apart and see how he did it and learn from it.
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
lol
yeah
and actually if you google something like "one instance, multiple sessions" all the results are "one session, multiple server instances"
Sorry, I am just reading something
no problems at all
Unity has a wiki page with sample projects from community...does UE4 have something like that so I can look at it?
hm, not something I've heard of, maybe others know
ty
maybe there is some section on the UE forums for this though
This is the place to show, share, and link to your stuff!
go here and scroll down you will see the Community section
Forum Description
ah thanks...will look at it
you welcome
I was looking for this lol
This is the place to show, share, and link to your stuff!
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
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").
๐
usually all I need is a push in how to approach a problem then I do it all by myself
how about this https://www.youtube.com/watch?v=iZnv1FL0ux8
In this tutorial I will show how to make a quick third person / first person shooter. First, you have to make a third person to first person camera switch. C...
Will look at it. thx
if you go to the end to see the result if you like it, oh and turn off the music ๐
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.
and FPS as a search term bring all trash to the front
true
are you going to also build AI ?
for the mmorpg I wanna write some machine learning app that will run separately on the server and act as th ai
much fun !
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.
lol is that hacked ?
not sure
AAA titles run windows servers even
could be that is how it is in the game but since it is SP and FPS...who cares
๐
hehe
a real AI doesn't need to be super smart to do the job you want
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
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
I did look it up once but it was way over my head
I guess.
I mean if you are super lazy you can download some open source library
that reminds me of when I started to learn french
hehe
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
I am sure it is but I prefer BP...I will try to replicate BP to C++ sometimes latter and see how that goes.
well you will hate it at first for sure
I am sure but to be hones I tried Unity's Bolt and PlayMaker...in comparison to BP and understand of it...garbage.
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
Same
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
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.
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
lol
I don't know what HQ is really
ah
or hd
I have no idea
They used to have it but they removed it
why would you use it ?
It was more "biffy" and just looked better
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
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
but I forgot you go for 1st person
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
maybe you can try using a character without weapons on and add your own
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
are you with a team or all by yourself like me ?
Just me, myself and I. ๐
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 ?
sec....
Revealed onstage at GDC 2019 during โState of Unreal,โ Chaos is Unreal Engineโs new high-performance physics and destruction system coming in early access to...
I hope it does well over the network too
Or is getting for 2020.1 release I think
BlueprintUE.com is a tool for sharing, rendering and rating blueprints for Unreal Engine 4. UE4 is a game engine which use visual scripting called blueprint.
it took me forever to make a vehicle not slide and eject itself like a banana in the sky with the current engine
Is an amazing tool
yes I remember you discovered it yesterday ๐
it was you that asked about those double branches right ?
yeah it was
I am new on this server it's been like 2 days max
Just export the mesh to blender and remove the wep
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
see what jtxp said about how to remove the weapon
ah lol that was for me....ty bro
I like those megascans but if I am right to who runs the company I hate his smile lol
lol
that's got nothign to do with the photorealistic products though
but they would make a very heavy game
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.
I guess if you work on LODs a lot you can make it work fine
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.
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
OK boss I have to go. It was nice talking to you.
see you later friend
I suppose there is no way to use BP child of OnlineBeaconClient, right?
Either OnBeaconSpawnedMapping is not populated or FOnBeaconSpawned->Execute(Connection) is failing
Are source UE builds still required to build a dedicated server?
yes, and that is not likely to ever change
Thanks @winged badger
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() ?
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?
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
@chrome bay thank you. so i should only have to set bUseSeamlessTravel = true in the current map?
does seamless travel use session ?
I was thinking maybe it gets session data to know who to bring to the other map
No, it's really unrelated
it probably isn't an issue with seamless travel then
currently trying to do a servertravel
alright that's infomative thanks
Seamless travel is just one option when the server says "moving to level 2, follow me"
That's it
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
@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
is there a difference between servertravel and processservertravel? may try that instead
I have this event but it isn't executing when I call it from a widget (client)
here are the settings for the actor
the actor is placed in the level and not spawned on runtime
any idea why the event isn't working 
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
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
what do you mean global ? for the whole planet to connect ?
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
hm me never
open console and connect to the dedicated server using IP
does it connect ?
yeah, i connect, i am in the map, but post login is never called, so player is stuck somewhere in between
never happened to me, if you use custom game modes make sure they are all set correctly on your levels etc
checked them rightaway
but theyre there
also in the logs i can see that everything initialized correctly
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
yeah, will try it as last resort
and before you do that make sure server and client builds are same version
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?
@wheat eagle client always has only one PC. smoke eXi's compendium
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.
did you check the run dedicated server box below where you configured it to 2 players?
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
yes I think I confused myself
Any idea why Play Sound at Location node is played once on the server but twice on the client?
are you triggering it on both the server and the client?
My event is on multicast yea
what calls it?
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
My PlaySound event got called on "Run on server" event
(DeadF call the PlaySound event)
Solved!
My Server_Dead event was called twice on client due to a repNotify on a var ๐ An HasAutority node solved it!
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...)
agreed
and its actually worse then that @copper mango
set the RepNotify variable locally on client and see what happens
i think its something to do with IRepChangedPropertyTracker
but i never went exploring further
u sure it's not just the "set w/ notify" node being the equivalent of setting it and running onrep
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
oh wait does it not run it when you set it on a client
it does
even in singleplayer?
that i don't remember testing
this is very curious
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
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 ) { ... }
turn start with tick enabled off and enable tick in beginplay when on a client
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
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
absolutely
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
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
@satan thanks, this looks like c++ and I haven't yet dived into c++ and UE
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?
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
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
i do it by overriding GetMaxSpeed().
To set a new speed?
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.
Ahhh, makes sense
just found out that PostLogin gets called once even when no players have joined the game yet ๐ค
like when starting up a dedicated server?
PIE test for that might not be representative of how the packaged game works
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.
what multiplayer system would you reccomend for pvp game (dedicated server, 8-10 players)? Advanced Sessions? Online Beacons? Online Subsystem Steam?
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.
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
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
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
AS is basically a Blueprint interface for the UE4 OSS concept - Steam being one of the many OSS
^
hold on guys) I don't stick to BP at this point. secondly, how do you start dedicated server using steam sessions for ex?
have a look at the ShooterGame example
literally opened
It has the setup for dedicated/listen servers via steam
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 ๐
Ah cool, I've never used it but yeh SG doesn't have the easiest setup
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!
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
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...
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.
I don't get how "reserving space before you join" makes sense
just do that when you get a real join request
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
you can handle the error though
Yeah you can but it's just not very smooth
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
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.
a beacon is a full net connection
is it tho
it is
Since each player has to join independently, you don't want part of the party getting through and the rest not etc.
everyone and their mother tells that this something different
a beacon is basically a net driver that makes full connections with multiple channels just like the normal one
ok that moving a full party thing is an interesting case I haven't thought of before
Yeah I only got that from what UT does, not something I've implemented myself
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
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.
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
exactly
client would need to pass the network error to the correct place
but they rather build whole new system to make another boilplates we all love so much
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.
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?
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'
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.
"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?
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 ๐
that seems very sketchy to me because then they can run rpcs before auth
who?
the player that just joined
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.
you mean once net connection is established RPC's are enabled?
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
yeah
Yeah probably exactly like that. We plan to use it for queuing eventually too
Not got that far yet though..
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
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
I'd try fixing that issue then instead of working around it, but ๐คท
Yeah but that's the point, as far as sessions is concerned the join was successful
yeah, which is why I'd consider that a serious bug
Yeah for sure. Atm however no real fix for it comes to mind
Thankfully this part isn't my responsibility ๐
[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..
is it possible to have multiple sessions instead of 1 for each server instance ? can you override the default behaviour or .... ?
guys this is my log and i have no slightest clue why the connection is being closed
has anyone had similar problems?
@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
@chrome bay yeah and that is very sad.. this is not how a system should work in my opinion
It's pretty standard practice
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
But that's not really a valid stance because games don't work anything like websites.
I know it is not the same thing, but you get what I am saying
You don't run the server instance for every player, you run it for every instance of a game session
sure but still
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
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
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
I am not saying how easy it is or not to run the executable multiple times, why are not talking about being lazy
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
so you are saying that it's good ?
Multiple exe's on different ports is definitely better
But to be honest, it also highly depends on the product
this is not how things should work in 2019 man
...but it's the smartest way?
It makes no sense at all to have one dedicated server managing multiple, unrelated game sessions
^
It would make testing extremely more complicated, to start with
And it would gain nothing
so you logic says it's better to run photoshop multiple times than having multiple windows inside of it
No
That's definitely not the same thing
The logic is to have multiple independent processes to process multiple independent workloads
Game servers have basically nothing to share
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.
all this could be done with 1 process come on
Try it and see
well if it doesn't let me how to try ๐
Exactly
Spend 30 years mastering multithreading and writing game engines then come back with an answer ๐
You would basically reinvent operating systems inside UE4, except worse
hey @chrome bay relax, this is now about who knows more is it ?
He seems relaxed to me
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?
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)
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
np's just worth remembering games are a totally different kettle of fish
sure they are
Even web servers absolutely move toward "many independent processes"
But in general if the engine is setup to do something this way there is a valid reason behind it
(usually)
@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?
and we are here to talk about it not be fans of whatever is happening jsut for being fans
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.
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
@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
OpenLevel calls GEngine::SetClientTravel.
darn
@wheat eagle - APlayerState::UniqueID
That's the FUniqueNetID - which you can then pass to the OSS to get what you need.
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.
Generally anything you want to communicate about one player to the other should be done via playerstates
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?
@worthy perch I think it's dependent on the OS to manage that - you can set the process affinity from in UE4 IIRC
Hmm, alright. I will look into that. Thanks.
Well it's ReplicatedNetId, which you can use to generate the FUniqueNetId
mmmaybe... Strings are different
at least the version of uniqueID exposed to BP was cut
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
ok... so when using ServerTravel set the third parameter, bShouldSkipGameNotify to false
not really sure what it does
but that was screwing me over
@twin minnow So setting bShouldSkipGameNotify to false fixed your problem with ServerTravel isn't taking all the clients to the new level?
@worthy perch is this santorini island on your avatar pic
๐
you love it or you are greek ?
It's really that I didn't want the default Discord logo. I guess the archetecture is nice too.
ah ok, nice, cause I live in Greece
@worthy perch yes, do u have any idea why?
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.
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
one on server and one on client but replicates to all clients
Gamestate is also replicated (Server + Clients).
yeah if you look here
Overview of the Game Mode and Game State
"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. "
yeah sorry i was referring to game instance, not state
game instance is also on both
yes thanks
๐
@copper mango yes that was for a dedicated server
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
but on simulated proxies wouldn't any movement just always be smoothed?
I feel like you're approaching something backwards there
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
yea but that's not the issue
my problem is knowing when all the corrections were recieved from server
movement corrections? after your velocity is zero
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
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
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?
@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()
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?
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
@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.
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?
@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
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
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 ??
@gusty slate I am relatevely new to this too and haven't tried what you want to do.
@gusty slate there is no cursor on dedicated server
no player, no player controller
Ah ok makes sense, thank you ๐
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
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
that is the least of your problems if you want to have multiple levels open at the same time
@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?
as far as i know unreal won't let you open multiple levels inside the same instance of the game at the same time
So its imposible to make an mmo rpg in unreal?
@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
I mean, with just the engine
mmos are more complicated so no engine can do everything
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
I would implement every separate system outside of the engine and most possibly on separate machines
Thats too much for me haha
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
Luckyly im not making a mmo, just thought about this type of system to check if i understood how multiplayer works
๐๐
let me give you an example, what if someone wants UE4 to build the actual website as well
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
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
Thats only possible in C++ i suppose
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
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
knowledge comes with practice ๐
yes yo ucan make a 20k map for a start it's a good test
World Composition with multiple terrains intensifies
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
I hate instances ๐
actually dangeons the way you describe them are oldschool
loading screens and the like
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
But loading screens will move the players to a separate "minigame" instance apart of the rest of the world or not?
@chrome bay do player controllers persist when server travelling seamlessly to a level with a different gamemode?
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
@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
that happens after its swapped
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?
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
not quite
you execute MCFire twice on local client
*owning client
also looks like way too many replicated variables flying around
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
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
Is there any way to distinguish serverside a client crash from a disconnect or alt+f4?
@jolly siren i am sure i heard people talking about this before and the answer was no
you will get some enumeration with EventHandleNetworkError
but if that doesn't provide it, no
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
Does someone knows why the client spawns in the air
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?
yeah, but a crash could be the same as pulling the ethernet out
server wouldn't know
3 and they are high in the air, also the player is unable to move or anything
makes sense, thanks guys. That's what I assumed just wanted to make sure
Only the server is able to do everything
so either your clients are not possessed
or you're using a dedicated server with one of more inappropriate uses of GetPlayerController[0]
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
PostLogin only happens in GameMode
so it only happens on server
so Server RPC is pretty redundant
But even before that it didnt work
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
Yo I want to make a shooter and I'd like to know what you would like better fps or tps
