#multiplayer
1 messages ยท Page 300 of 1
that's weird now
so, the host can see the client moving but not the other way around?
they both can't see each other
which is why I thought they were joining different sessions
are you creating their characters manually
not sure what you mean
like, are you spawning players' characters and possessing them manually?
What do you think might be the problem?
Yes I did @thin stratus
Okay, so I did some deeper testing and it turns out they are NOT joining the same session
I figured this out by using the Post Login node and printing the new player's name and then getting the GetNumNetworkPlayers
OMG! Finally got it working thanks to @stiff wasp I was doing it soooo wrong. Thanks again to @modern fable and @thin stratus but big thanks to @stiff wasp ๐ ๐ ๐ ๐
lol
@proud wren if you're using sessions via steam, I recommend using the Advanced Sessions Plugin from the forums, its way better than the default stuff
has anyone implemented steam parties? so if you join the game it will put you on the same team as the other people in your party?
So I'm working on a game where you'd be logging in and pulling all your data about your inventory and whatnot from the server, So far in terms of plugins that are going to be beneficial we've been looking at Advanced Sessions Plugin and VaRest.
Any other recommendations on plugins / resources for learning?
is VaRest any good in BPs? or does it turn into a mess / has poorly named nodes
I'll have to find out
I haven't started working with VaRest yet, i'm mainly the designer so i've been working a lot on the game rules and systems lately
I can understand BP, and have an understanding of the logic behind code as well as knowing a bit of C++/C#/Java, so anything that we can get me involved with efficiently in programming by using blueprints will be something we look into
Offloading work from our C++ programmer is useful, especially iterative balance work, so i'm hoping VaRest has good BP implementation
If i can just pop into the database and change how an effect on an item functions and hotfix it without needing 2 people, will be great
@wise depot I'm working with the advanced session but the GAMENAME option doesn't seem to be working. It's always random letters and numbers. Might be because I haven't tested outside the editor yet, but not sure.
anyone here use root motion in multiplayer?
I have a question in a multiplayer game do every player have they own unique game instance?
Yes, think of the GameInstance as the actual process that is running on the Machine
It is created when you open the game and is destroyed when you close it
There is only ever 1
For a single machine
Because I did an object ( PlayerProfile ) for my online subsystem and it get's set as the player logs in. In a multiplayer session the player should access the game instance and uses the profile object to update his statistics
sound this right?
or should the player profile stored somewhere else?
Yeah that sounds fine
The problem I would store it in the playerstate but the playerstate is ingame different that in the menu where the player logs in
good
Yeah need to package and test it
that's why I'm asking just hope it's right
First I thought game instances are not unique like if the host creates a session every other players have the same variables like the host in the instance
๐
Giving me self clusterfuck in my head
GameState acts that way
Yeah that's what I thought and also gamemodes
GameState is replicated from the Host to all clients
GameMode is not replicated at all
good to know tho
yeah but It can sent data to clients?
The Server can, but clients cannot access the GameMode
Allright thank you very much... never knew that stuff but it's important! I write this to my knowledge list ... Thank you ! ๐
If you need a client to talk to the GameMode, route it through the GameState
yeah makes sense
What's the proper way to "kick" someone? For some reason, a third player is able to join my games (I set max connections on the session to 2), so when a player joins I'm just checking to see how many playercontrollers there are, and if there are more than 2 I make the new player load the menu map. But when that player gets kicked it also seems to make the HOST of the original game load the menu map too..
I have just found the "Logout" node.. maybe that will do the trick
I don't think that the host counts as a connection in terms of sessions, though I could be wrong
are you testing with 3 clients? I doubt the third one, the one joining after max slots are occupied, is able to connect even
anyhow, sounds like you are loading/changing client's map server-side and so it changes server's too?
plus I wouldn't do that, you just really want to kill the connection and so use that logout node instead - having an open connection with a non-relevant player is a bad thing
Trying to make some multiplayer in my game, does Steam works well with dedicated servers ?
Does bAllowJoinInProgress work with the Null Subsystem? I have a hosted sessions that is in the InProgress session state yet other clients can still join the game
@civic vessel yes it does. What you're essentially doing is registering sessions using the steam sdk (all under the hood of the online sub system interfaces). You will have to do some extra work though, to let your clients know about the server. The AGameSession class is your friend for that.
During seamless travel I know you can override the PlayerState CopyProperties function, is there something similar for GameState?
@keen frigate Thanks for your answer, I'll try to do that :)
@civic vessel no problem ๐
@potent steppe I haven't tried that yet. What kind of data would require that in your game's architexture though?
@keen frigate I am wanting to simply have replicated gamestate variable. So all clients remain in sync as to whetehr they are in a lobby or playing
hmm ok,I'm not really sure about how to do that sry. In my game I have a SessionStart->InLooby->InGame->SessionEnd loop without the ability to go back into the Lobby
but if you figure it out I'd be interested in the solution ๐ I will maybe try something out later. Kinda sounds to me like a custom GameSession class could do the trick
I actually think I just figured it out
I already havea custom GameSession.
THere is no equivalent CopyProperties for a GameState, only PlayerState
So in my GameMode I implemented void GetSeamlessTravelActorList(bool bToTransition, TArray<AActor*>& ActorList) and added the gamestate to the actor list
So, when using seamless travel it now saves the gamestate
Or so it seems so far
is that an overridable gamemode function
Yes
virtual void GetSeamlessTravelActorList(bool bToTransition, TArray<AActor*>& ActorList) override;
sweet ๐
I am doing more testing and stuff atm. If it turns out to not be doing what I think it is I will comment here.
Does someone here achieve to get Steam and dedicated server working with current version of UE ? I saw an entry on the wiki about it, but it requires to download a pull-request version of UnrealEngine that is stuck at 4.11
Hey is anyone here able to help me out with somethin? lol
@final arrow Go ahead mate
thanks man, i have a simple system where a player fires a line trace -> line trace hits the other player -> player takes damage. the server can damage the client all day but the client won't damage the server. everything (from what i know) is replicated properly and such. if you feel like helpin me out i could throw some screenshots in here haha
BP or C++?
BP
I'd rather not get in to C++ til i start my programming classes in my next semester of college
Thats fine just wanted to know what we are dealing with first
For sure
How are you handling telling the server to do damage?
ill send a couple screenshots, it'll be easier than explaining
Sure
Ok
So first up
By the looks of it your not performing the Linetrace on the Server?
Correct
as in, a custom event ran on server to do a line trace?
(sorry i'm pretty new still lol)
Yep
You're right im not
Ok
So with a multiplayer environment you want to limit important events like that to just the Server
gotcha
That way clients have no control over how they determine what was hit etc etc.
Shooting a bullet is pretty important to get right
And we always consider the Servers version of the GameState to be the absolute correct version
So game critical events like that should be performed on the Server
for sure, so should i do a custom event for the line trace similar to how i made the custom event for Apply Damage?
You should yes but we will get to that, ill run you through the Theory then show you an example via a screenshot ill put together
Alright awesome thanks a lot
No worries
So 1. game critical events should be performed on the Server
The client only needs to perform cosmetic stuff, like playing sounds or effects
Makes sense, i didnt really understand what was critical enough for the server to run it (such as the line trace)
The Server is absolute truth so if you performed critical stuff on the client which is simulating seperately to the Server it may have bad information on an Actors position or something like that
gotcha
So the client needs to tell the server that they want to fire a bullet, this is done via an replicated event (RPC) like you have above with CustomApplyDamage
Since the Server is itself it will run the Event locally anyways, thats why the Server can damage the client but not the other way around.
ahhh yes
So basically all you need to do is perform the Linetrace on the Server
and you should be fine
Note that we pass along the Vectors for the Start and End locations that the Client wishes the Server to attempt to Fire a Bullet to
Yesyes, makes sense
So basically the Client is saying, Here is where i want to Fire a Bullet, please do that for me and whatever happens the Server handles applying any damage that may need to occur
As far as the Client is concerned its a Fire and Forget method
so is my current problem that: the client does the line trace and everything, but the server has no idea about the line trace so the server can't apply damage since the server doesnt know what the client hit?
Pretty much
gotcha, thank you very very very much man. I appreciate it a lot
No worries, any other issues just ask.
For sure!
Hm... rather odd situation now. The client doesn't want to do the line trace at all
Itll get up to the point of the custom fire bullet event, but won't move on to the line trace
If your debugging the Client it wont because you have sent that request to the Server
True, but it doesn't seem to damage the server (at least the print string doesnt activate when the client shoots the server)
Did you remove the CustomApplyDamage event?
Yeah, just the fire bullet event is there now
1
2
is there something i'm completely missing? haha
Acctually i think there might be something i missed, you see in the 2nd picture there is no longer a vector on the A input? that used to come out of the end of the line trace. is there a way to have an output from the custom event from the "Location" output of the line trace?
By the looks of it you had the OutHit location of the LineTrace affecting that Aim Vector
CustomEvents cannot return
Hm... do you think there's a way to fix it?
What are you trying to achieve with it?
i have an emitter at the vector location to spawn an explosion, so it wouldnt be all that bad to remove it for now
true that's an easy fix
Could the reason the client isn't damaging the server be the fact that the Firebullet and such are not in the character blueprint?
Where are you performing it
it's in a blueprint set up for weapon things (i followed a tutorial when i was first starting UE4 and i'm trying to continue the project)
the input action on the character blueprint goes to a custom event that runs off the other blueprint
(i can send more screenshots to explain)
That should be fine, is that custom event replicated at all?
it's set to run on server
in the pic i sent of the new FireBullet custom event, the events for firing are below it
The firing events should run locally and then you send the request to the server to perform the firing action
well it's actually kinda messy, in the character blueprint it executes "StartFire" (which is the blue event after Server_StartFire), then the event StartFire has this
1
so if it's remote, it executes Server_StartFire
this is what i have in the character BP
Any ideas?
Sorry mate a bit distracted atm
Gotcha, sorry haha feel free to chat when you aren't busy
@final arrow These RPCs are in a Weapon BP?
Try setting the owner of the weapon to the player character or controller when equipping
with SetOwner node
Ah alright so you got that covered ๐
haha yes, it's not a weaponBP for a specific weapon, it just does most of the functions for the weapons
oh my god i got it to work
three days. THREE DAYS of trying to figure it out. finally. I'm so happy. While it wasnt an applydamage or line trace issue, thank you so much DevilsD for the help you gave me for the other stuff!
No worries mate, what was the problem?
i had no idea this was the issue, but after searching google for hours i copied what another guy did to fix it and this is the final result
so for some reason it was about spawning the weapon apparently
So you never actually spawned the weapon?
i think it had to do with getting the owner of the weapon since the server was fine and client wasn't
quick quesiton though, is there a way to quickly make a new chracter with a different appearance but keep all of the anims, BS, etc etc? or is that too far fetched? haha
Create a child class and just change the Skeletal Mesh?
When i do that it doesn't like to use the animations that the parent uses
Would i need to retarget or do something in that general scheme of things?
Not sure man im not an animator
no prob i'll stop throwing questions at ya haha
Only questions i can answer are fine ๐
haha deal!
im back! haha. was just wondering if you have any idea how to make the gun shoot in the middle of the screen instead of like this
Is it First Person or over the shoulder?
over the shoulder
i moved my crosshair to the middle of the shot instead of the middle of the screen but that's just kinda a ghetto way of fixing it lol
You will need to do some Vector Math to figure out how to direct your Linetrace
gotcha. if it's not a quick fix i can save it for later, right now i'm working on getting the weapon to fire on automatic mode
You could probably just use the ConvertScreenLocationToWorldSpace node on the center of your viewport and use that as the End of the Trace. The start of the Trace would be your Muzzle
im not sure how i would go about doing that, could you make an example (if you aren't busy of course!) for me?
One more question if you dont mind lol, sorry that im asking you so much, it just saves me hours of googling trying to figure stuff out. for my automatic fire system, its basically a retriggerable delay. so hold button down -> start fire -> delay -> start fire again, but i only get a line trace for the first bullet. any ideas?
Without looking at your code i really couldnt help you
Whoops nevermind i figured out the full auto, my apologies haha
This is probably very inefficient but i did it all on my own and im proud of myself LOL
Well done mate
Thank you! next obstacle: Bullet spread
Regarding the ConvertScreenLocationToWorldSpace, What should i put in to the X and Y?
The viewport X and Y divided by 2 gives you the center of the screen
alright, and then do i plug in location or direction?
Location is the worldspace vector and direction is a unit vector
So try location to start off
sounds good. how do i get the viewport X and Y in order to divide them? since i can't work backwards in the node
PlayerControllers have access to the ViewportSize
You sir, Are a legend. The line trace stops almost immediately stops right in front of me. i tried multiplying World Location by a float and then plugging it in, but it extends the line trace backwards instead of forwards. any ideas?
Multiply WorldDirection by a float (like say 10000) and then add that to WorldLocation
you are an absolute beast thank you!!!
No worries
Hm... the server will happily deal damage far away, but the client will only deal damage up close (as if the world direction was not multiplied), even though the line trace goes through the enemy
Actually, if this runs on server, it actually only uses the server's viewport. so if the client stands in front of the server, and the client fires, the client will die. could it be a playercontroller issue maybe?
The issue is right there infront of you
you're right, i fixed it
my bad
Out of personal curiosity, have you made any games personally?
Not by myself no
gotcha. was just curious since you're so knowledgeable with ue4
Ive been freelance developing for a few years now on UE4
oh, thats pretty awesome
If you wanna chat PM me, its a bit off topic for this channel.
for sure
Hello everyone.
I wanted to share something I am working on with you guys.
Here is a video of a game project I am working on. I am the main artist on the team.
I am looking to recruit a blueprinter who knows multiplayer replication
as we have moved from single player in to multiplayer
My blueprinter is a little stuck at the moment as he is learning it at the moment
I was hoping someone might be willing to work with us as a team mate or just an adviser to help guide my blueprinter when he is stuck. So I am looking for a friend who might be willing to lend a hand by seeing my blueprinters screen to help advise and my will do the work.
Hoping to find a friend
@final arrow https://answers.unrealengine.com/questions/85030/shooting-straight.html here is good answer about why you shooting not in the middle
@final arrow you will need to use camera trace to "fix" weapon projectile velocity vector so it will align with camera view. The problem is - at close distance this look unrealistic. A close example is how Zarya weapon is shooting in overwatch lol.
@spiral hare looks very cool, by the way ๐
thanks
does anyone here know server/clientside replication and multicasting blueprints?
@sterile pebble, could you possibly check out my question in #blueprint ?
thanks
hello guys, does anybody knows if it's easy to extend the default dedicated server to have custom commands like listing players, messaging them and if it's easy to implement a config file to be used to run it?
Hey all, I've written a big-ass post on how I think Epic can improve UE4's netcode and make it more diverse. Here if anybody is interested!
https://forums.unrealengine.com/showthread.php?128589-Suggestions-for-a-refactor-of-Character-Movement-s-Netcode-for-better-diversity&p=622467#post622467
So recently I wrote my own version of a networked movement component, based heavily on the CMC for my vehicles. See here.
Something I noticed while going through CMC and trying to learn how it worked, was how convoluted the netcode is for Character Movement. Netcode is split between the Player Controller, Pawn and Movement Component itself - and trying to disect how it works was extremely difficult. It took me a solid couple of weeks of programming on that task alone non-stop, and slow study
sorted it out? @spiral hare
do you mean like having an external console? @magic gazelle
Liked @chrome bay ๐
Can someone explain me how SessionSettings work ?
I tried to set some values with the Set method
It doesnt compile if I put a FName as value but it works with FString
That's odd, how are you defining your FName? I believe FStrings will get converted to FNames anyways, so that's why that would work
@civic vessel
Like this : Settings.Set(TEXT("ServerName"), FName(TEXT("Dedicated server")), EOnlineDataAdvertisementType::ViaOnlineService);
I wonder if it has to do with the fact that FNames are immutable according to the docs, and the method wants a reference
Not really sure though
@modern fable yes something like that
guys, is there any special ports I should forward for steam online subsystem?
i don't think you should port forward anything for steam
that's the point of the steam subsystem
I posted this in the programming section, perhaps it better suited here?
Hello, I have a question about trying to get my dedicated server to create a session. There is a lot of information on the matter but the part I am missing is how to extend the function "Create Session" from OnlineSessionSettings.h
@chrome bay the netcode is truly horrible where cmc is concerned, i'm behind you 2000%, i made a 'network' component for my pawn that separates the prediction entirely too -- but i only started, i didn't feel i had the expertise to make it as good as i needed it to be
Hi guys, I am trying to code my gameplay in a multiplayer game but I don't know where to put what.
I want to make a checkpoint system where all players see other's progress in the map, so I know that I need to keep track of checkpoint progress in the GameState.
I dont know from what class i need to fire the checkpoint overlap with the player, from the character class or the player controller ?
And I dont know exactly what should happend between the moment when the player goes trough the checkpoint and when the player state is update, should I verify this in the GameMode or what ?
@civic vessel, simply create a trigger actor which change the value on the gamestate, no ?
anyone could help me with mutliplayer (i use c++ but could be nothing related to the code_
)
slight problem with client->server->client messaging
Hey all. I have a an Array with an Interface type (IRadarSignature) that I have marked to replicate. But when the Array<IRadarSignature> is replicated to the client, the array reports the object as None. I'm guessing this is a weakness of using Interfaces as the array type? Is there an easy way around this issue? Thanks!
anyone can help with why my server returns 2 function calls to my local client for no reason ?
@rancid orchid I do mostly blueprints but it actually could be related to the code. If a function is pure and has say two variable outputs, pulling those outputs into separate nodes will actually call the function twice. This can be resolved by not having a pure function. Is that the case?
I don't think so. don't really understand pure functions yet but my functions don't return anything they just send some data over and assign the local variable to the received data
In that case pure or not shouldn't matter.
But if there's no output using a function might be overkill, unless you're using local function variables(outside your actors local variables).
My guess is you're simply calling the function from server and client.
But afaik you can't specify function replication (least not in blueprints). You would have to create a routine (custom event in blueprints) to Run On Server and have that routine call the function to ensure it only runs once.
And I assume the variable it changes is replicated.
I call the function from server to client and do some work inside the function like role checking to determine what to do with the data sent over. variables that are changed are not replicated
I'm basically doing client side prediction and so on
I wrote in more detail in ue4 programming channel, bit weird xD
I'm not sure. If I saw it in blueprints I could probably help but I never got very deep with UE4 and CPP. Not enough documentation for me to want to learn that aspect ๐ฆ
But if you're certain the function is calling twice you need to find out if it's being called twice from the server, or once from server and once from client. You can do this by adding a 'is server' check in there to determine if it's being run on client or server.
I have to head back to work. GL.
Haha thanks xD
Anyone have any experiences using the OnlineFriendsInterface?
It seems every time I call ReadFriendsList it will add more users to the list. For example, if I have only one firend and I call it once I see that one friend. I call it again and get the list that friend is in the list twice. I create a BRAND NEW array for the list each time it is called to eliminate the chances the array was not being emptied properly.
Is it newcessary to call DeleteFriendsList and I can't assume that the list is cleared each time I try to refresh it?
Question regarding joining sessions
How would one do lobbies?
In most games a lobby is a seamless join
Aslong as the game hasn't started yet
Mainly because you already loaded the main menu so the game doesn't see a reason to load it again
But what I'm concerned with is pretty sure you can't have seamless travel when joining a session
Any ideas?
Hello People ๐ Im using servertravel to move all players to a map, it works great when im using 3rd person characters.. but i created a new pawn for VR and added some replication into it and now aslong as im using that pawn, all clients connecting gets stuck on loading screen. (doesnt matter if it's client or listenserver that is using the VR pawn).
Using 2 3rd person character works great, but as soon as i use the VR pawn.. it gets stuck.
Here is the blueprint for the VR pawn (Im guessing something is broken here, because my other characters work).
https://gyazo.com/e7a418d44185c4e257288964b064dcc3
question: I need to select which UI elements to show based on is the player hosting the session or not
where should I store the boolean to prevent tampering
Okey i got it working.. i used "reliable" on the multicast messed everything up..
Is there anyway to drive the update faster? right now we're just getting a really laggy update between the VR pawns
I tried using replicated variables and a server driven event to force all clients to update the variables. but it doesn't replicate :/
Does anyone know why im getting really slow updates TO the server (I.e all clients looks like they are moving once every 10 second) but the clients all sees the server smoothly.
Im using rep.Notify right now on 3 transforms (head, left/right Motioncontroller)
In the notify function i am setting the world transform.
Your screen shot is way too small to make anything out.
Make sure the event is run as Reliable. Is it not possible to mark the transforms youre modifying as replicated so you don't need to use RepNotify?
If you click the link you can zoom twice to get original size (it's almost 5000x1440 pixels large)
@golden granite it doesn't seem to replicate as it's supposed to though. Just using a replicate and serverside set world transform isn't working at all.
It's just so strange that I'm getting replication sporadicly on the server.. I mean if it replicates it should replicate at least on framtick or not at all.
Yes I did that, still very small some reason. Check if the method changing the variable is ticked as reliable
It sounds like not all updates are being pushed through, which occurs if the network can't handle the traffic. Seems unusual this would happen locally but it's still worth checking if the updates are marked as reliable or not. You might want to just replicate the actor/transform itself instead of repNotify. There's a chance that if the variables are updating very frequently then there are some updates being skipped.
Hmm I'll try to switch out our switch tomorrow and see if that help. The transforms are not reliable.
I've tried just a simple replicate on the actor and replicate on the components aswell but it's not replicating. :/
I'll see when I get back on it tomorrow. Brain is mushy after 12 hours straight ;)
Or rather the method switching them aren't reliable
Question: when I set a variable on a player controller in the login functions in the game mode. Is there any sort of guarantee that that variable will be set on the client by the time beginplay gets called?
it probably wont especially if its replicated
@hybrid igloo Just to give a "second" answer: There is NO guarantee.
RepNotify is the better way.
do you guys know right away if FloatingPawnMovementComponent works with Multiplayer?
I didn't find an answer yet
And I didn't really get into how the c++ codes work besides staring at them lol
Ok I have a serious issue cause I'm dumb and can't figure it out lol I followed Epic's tutorial to make the frontend for the steam network multiplayer game. My issue is how do I property set up my player's HUD widgets once the game has started. Right now it's on my BasePlayerBP on begin play. This duplicates my HUD widget when I switch players. When I switch the spawn widget to the PC and say on begin play my server doesn't get the widget but my client does and my health bar is empty and my weapon selector doesn't trigger. On another project I can just spawn the widget and both client and server work but with that project I'm using the default PC. Any ideas what I'm doing wrong?
Problem solved
What does Net CheckSum Mismatch mean?
@slim holly Check "Is Server" on construct and set visibility on buttons etc based on the result
Yea, it was more of an issue with fetching the "Is Server" value from place user can't fake. Currently GameMode sets the boolean for playerstate, but local copy of the playerstate could still be modified enabling UI elements
so I need to make failsafe in GameMode that keeps checking and kick anyone who tries to execute UI commands without proper authority
yey it's working! problem solved
@golden granite you were right with reliable replication. i changed it to reliable and now it's working awesomely!
OY
New: Replication condition property flags are now exposed to Blueprints. This can be set in the Properties Details panel. 4.14
What kind of replication conditions?
i have a really strange problem going on with steam and the Advanced sessions plugin. When the server (p2p) closes unexpectedly the client returns to the main menu as it should. but when trying to join another session i get the error "unable to join game session, can't join twice" even if i call end session before attempting to join, the only way i can join is if i restart the client.
Anybody else had this issue or know of any work-around?
4.11.2 for the record
@golden granite The ones that were only available in C++
Aka: Owner Only etc
Or Skip Owner
And a bunch more
Owner Only would, for example, be useful for ammunation of a weapon
only server and the owner of the weapon need to know that
@thin stratus Ah. So it's a per variable instance?
Yo
I'm assuming that's yes, which is cool.
Anyone having a problem in PIE where Server Travel would result in
LogPackageName: SearchForPackageOnDisk took 0.065s to resolve GamePlayLevel2.
LogGameMode: Not traveling because of network error```
I have 0 idea where this comes from
It's happening in 4.14 after updating
With only one player (server) it worked just now
.>
It's caused by this line in the GameMode
if (GetMatchState() == MatchState::Aborted)
{
UE_LOG(LogGameMode, Log, TEXT("Not traveling because of network error"));
return false;
}```
PIE or standalone?
i've never known seamless travels to work in PIE, they work fine in standalone for me though 4.11.2
play in standalone window* that is
oh...
yeah i've no idea then
maybe its because its not seamless? online travel may be bugged in non-seamless travels?
I just tried to Launch two instances of the Game
with the uproject file
there it works fine
(No changes made)
I would like to know why, in PIE, it sets the MatchState to Aborted, although there is no single reason
and I can't find any Logs about it
Now it's just endlessly loading and the message from the gamemode log doesn't appear
ยฏ_(ใ)_/ยฏ
Does a dedicated server run with a player controller or game state?
Does it generate any of these for itself*
@thin stratus Seamless travel usually only works in stand alone, not PIE
Hi peoples. New to Discord and this Unreal group thing so forgive me if I'm doing this wrong: could someone help me with an issue I'm having in setting up my first multiplayer game?
Generally we just say it's better to throw your question out there, will get the most eyes on it quickly ๐
Oh alright. Well, long-story short I've got a blueprint interface set up for interaction (press E for line trace, checks if hit actor implements interface, if so call function) and an actor blueprint that gives the player money when interacted. Works in singleplayer but it only works for the server player person thing (new to Unreal multiplayer, bear with me) in multiplayer. Screenshots: https://forums.unrealengine.com/attachment.php?attachmentid=117606&d=1479248303 (Actor being interacted with, giving money to the player) https://forums.unrealengine.com/attachment.php?attachmentid=117607&d=1479248337 (Displaying the player's money as well as a randomly generated name and ID above their head. Name and ID works, money doesn't).
When I test it in game, for one of the players it prints No auth.
Not sure how to get around that.
So when your client calls the function locally, it'll get run on the "remote" path of your switch, since it's not the server.
To remedy this, you have to use something called an RPC
This allows you to call functions from the client to be executed on the server, and vice versa (also one called multicast, where the server calls a function to be executed on all clients)
Oh alright, brb, let me try that
One big thing to take into consideration though is how much power you give the client in deciding what happens. If you let the client specify the amount of money for example, they could theoretically set it to anything they want
But that's just the territory of MP programming ๐
https://i.gyazo.com/43c4a7f2264244863928be0ab859c730.png Does this look right? It doesn't print out No auth anymore but now it just doesn't do anything at all for the other player.
Both events are set up with the same settings, BTW.
You need to run the RPC in the opposite direction, "run on server"
Since you'll be calling it from the client to be executed on the server
Oh whoops, thought I had that selected.
Set to Run on Server now, still doesn't do anything. https://gyazo.com/3ebf56da344b2039de3a003bf6fb8c74
Hmm, can you check if the event is being executed? There might be some issues with using a reference you casted to on the client in a server event
Sure, one second
https://gyazo.com/bd10fa96935ebf251ad9642902f947b5 For the first player it works (sets the money and prints out Doop doop, employee here), but still does absolutely nothing for the second player.
If you don't mind me asking, what type of blueprint is this being called from? I learned the hard way, you can only call RPCs from objects that you directly own, which can sometimes be both a curse and a blessing
I only ask because of the cast node
This blueprint itself is an actor blueprint. The one that's calling this one is a character blueprint.
So these nodes are on a third party to the character, correct? If so, you won't be able to call RPCs from it on a client :/
Which is why if it's something on a level, usually you'll want to only have the server handle these things
(But I could be wrong about your situation)
Yeah, they are :/ Any way around that?
You really just have to let the server do all of the handling in that situation
Hm, sorry for the stupid question, new to multiplayer stuff ๐ How would I "let the server do all of the handling"?
So this object is on the level, correct? Just want to make sure we're both on the same page ๐
It's placed in the level if that's what you're asking
Yeah, sounds good, was just making sure. So there are really only a few places you can make client RPC calls from, one of them being the PlayerController. So when you make that call to interact with the computer, you will want to call the RPC on the server at that point, which will then run all of the code on the server
And you'll want to make sure you use an authority switch, since you want the computers on clients to effectively just be dummies to allow them to interact with the server version
Hmm I'm a little confused. What am I doing with the PlayerController?
How are you getting that interface call onto the computer? There's a lot of ways to do it, just want to know what route you're taking
Sorry, had to go for a second
https://gyazo.com/8f71c8c3d9066d8cebb0cc157e2a2411 Rather messy setup but that's how I'm calling it.
(from the character blueprint)
So the character is also a place where you can call client to server RPC. So you can make it a server call just fine there
Should I do it right before the On Interacted node?
You would make a new server RPC that simply calls the OnInteracted, and one of the parameters to the RPC would be the computer reference
Now that does give some leeway to let the client decide what computer is being called, but as long as you're aware of the issues, you should be fine in knowing when it's actually a problem in the context of your game
https://gyazo.com/aaf70fee0a1e5cafa862fdcf3b2ce8f9 Is this correct?
I would run the target in as a parameter, simply because the line trace is probably only happening on the client, not the server
(Gets confusing since an RPC parameter is default called target ๐ )
Oh god it works, thanks so much! Been banging my head against my desk all day trying to figure this out haha
Good to hear (not the desk part) ๐
Worse on the desk than it is on me ;P Lol anyhow, have to go now. Thanks again for the help ๐
I'm currently looking for a back-end server framework to develope an mmo
I would like to know if somebody already try photon server, gamespark, or whatever
Is photon a good choice for back end server framework compared to the basic stuff we have in UE4?
And using the basic UE4 networking is it possible to get the lowest possible latency and network efficiency for multiplayer games?
Anyone has any screenshot for ping ms of their own game while playing on LAN and got low latency? which should be <1ms or 0ms
@odd nimbus It depends of your game, Unreal Engine server focus on a competitive game
I guess the max number of players you can have with correct performance is around 200
hmm but I was wondering while testing if 5 people play an FPS LAN game and the data usage is less how much latency it should give?
most multiplayer games in LAN gives <1ms or 0ms ping as the latency is negligible
but I was wondering if UE4 counts the latency in the same way or have some overhead
@thin stratus Pretty sure the issue was with server travel with seamless enabled. It may now be with seamless disabled as well.
you should be able to do that just fine with game states and so on
I have a pre-game lobby in a project I'm working on
@night jay check out the blueprint multiplayer tutorial from unreal engine on youtube
he makes a pre game lobby
@night jay I have one on the Marketplace
Hey folks, I'm having an issue where my GetOwner node isnt returning a valid owner, when I know that the owner is valid. The owner is a player controller and this is a networked project. Any thoughts?
Where are you calling GetOwner
its being called on a component begin overlap of a projectile
its checking the owner of the "other actor"
are you trying to get other actor's owner from the player who shot the projectile's end?
so that you are trying to get a character's owner from another client?
@charred crane
when the projectile overlaps with another player, im trying to get the owner of that player. so yes to your first question?
Ok two questions:
Are you 100% sure the other actor is the PlayerCharacter Actor?
And, are you sure you call this on the Server?
Cause the Client most-likely will not get an Owner, due to the PlayerController of others not being a thing
right, so i guess i need to make a server call after the overlap.
I have a cast to the playercharacter actor, so the only time it would try to get owner is if that succeeds, and it does when it needs to.
that's what I was referring to yea, there's no way a client can access a character's owner
cause that would be a player controller and they ain't replicated to all machines - they're owner-relevant
projectiles should rely on server-side checks only though @charred crane
i assumed that an overlap event was server side.
rite, thought you were calling a server event on client overlap ๐
im also working on the "experimental(since 4.9)" 3d health bar widgets, but they only seem to show MY hp over the enemies heads, even though the widget belongs to the character itself.
@bitter veldt @thin stratus do either of these have any hiccups when joining a lobby?
Hiccups of what sort?
are you trying to travel with PIE?
standalone
It's a common issue
You can't start a session without opening a level afterward
You can't join a session without traveling to the host
and that travel is what's causing freezes and hiccups
There's seamless traveling but that's only applicable once you've joined the server and the host performs a servertravel
You need to open a level due to the ?listen command
And clients need to join the level due to the restriction of one level per world
In c++ you might be able to call join session without the travel
But no idea right now what that results in
I don't have Hiccups when creating the lobby and joining it
Seamless travel keeps the GameMode class or?
That's not really useful for lobby to gameplay level or?
yup, hence why I'm not using seamles travel
You sure you have no hiccups?
If you do open level it freezes depending on your level complexity
If you have nothing it's almost instant
But if you have an actual main menu like triple A titles do it takes a while to load the map
As for joining session without travel
Doesn't work
gamemodes don't sync
You're having multiple instances of the same server that way
As in host can't see client and vice versa
It loads a really short while, yes, but that's normal and it still works
Can also cover it with a loading screen if wanted
Anyone have a US dedicated server rental service to recommend for game server hosting?
Reliability, availability, performance. So you Start, dedicated server rentals for developing your business. From $42/month.
$42.00 USD /month.
I don't think the traveling UE4 is really ideal for lobbies. Especially how games have been seamlessly joining lobbies for more than 10 years already.
I would like to know why my player state is valid on player 1 but not on player 2
but sometimes it works correctly
@rare cloud When exactly is it not working
Yap they got DDoS protections also..so I think perfect and cost efficient choice for game servers in USA and Europe
@thin stratus, PlayerState isn't valid
For the player 2 most of the time, and I run dedicated server
So he connects, can run around, sees the other player, etc etc but the Player State isn't valid?
How do you retrieve the PlayerState?
I get it from my character
I simply set an input event get my PlayerState and print if it is valid
And yeah it is correctly connect
From the controller it work but a problem happen when you need PlayerState from other player
Controller is not replicated to all clients ?
Is the Character constantly possessed?
Yeah
For what do you need the PlayerState of another Player through his Character?
All PlayerStates are available in the PlayerArray of the GameState
There, it's a bug and fixed in future engine releases
Might wanna post below the answer
So it gets new wind
I had the same issue but it's only in PIE
Well that's funny on my 'blank' project using Third person template
the playerstate of the player 2 is valid
but not the first
In C++ trying to make a VR pawn. For the time being we have all of its components replicating (ie DOREPLIFETIME ). This works, in the sense that the clients can see the server pawn and its movements, but the server cannot see clients and clients can't see other clients. Any time comes mind that we might be missing? We cannot get this to work. All help welcome
Sounds like you have no form of input recreation if they aren't seeing them moving
if they aren't seeing them at all then perhaps your pawn isn't marked for replication, it also needs to be spawned by the server
can an actor destroy itself over a network or does its owner need to destroy it?
@normal ingot presuming its the player pawn and you're leaving the engine to spawn that, replication settings i have ticked on mine are:
Always Relevant
Replicate Movement
Net Load on Client
Replicates
NetCullDistanceSquared: 225000000.0
Net Update Frequency: 30.0
Net priority: 3.0
as for actually spawning it, if its the player and you're not doing that manually anywhere then the server should be handling that by default. But if you do have any replicated actors that you want visible over the entire game/all connected clients then the server must be the one to spawn that actor into the world
@charred crane if its a replicated actor then the server/host should be the one destroying it. Although I think its ok for clients to destroy replicated actors, you probably shouldn't be doing that. test it and see what happens?
thanks mine ill give it ago
I've been testing and I believe the problem is that I didn't have a good understanding of who should spawn objects. I (now) use a hasAuthority node to spawn some projectiles. I've got an overlap event for the projectile that checks authority and calls a server event to destroy the overlapping projectile(self) if its the remote. If its the authority it executes that same event but doesnt use the event call since it's already on the server. The event never fires but a print that i have right before it does. Any idea?
Morning! Wanted to ask a quick question about Network replication...Anyone know the best route to go about this: I have many players, each of which need to have a particle spawned and attached to. In the Characters begin play I want to spawn and attach it, but not sure how to get the RPC's setup to work so every other character see's them. Do I call a method that runs on server, then have that call a multicast that then spawns and attaches?
thanks in advance ๐
Yeah, if you want everyone in the game to see a change on a certain character/actor, you'll have to call it multicast @fossil silo
thanks @brittle sinew , I have it so it calls a run on server event,then that calls a multicast, but I think extra emitters are being spawned
Could you screenshot your setup for me? If you think duplicates are occurring
So is the general consensus, to replicate movement of something without it being jumpy, you need to do the move on the server AND the clients? (and let it sync any differences/inaccuracies)
It's funny, technically I just shipped a multiplayer game but it was so basic I didn't really have to deal with proper movement
Moving it on the server and just letting the movement replicate to clients is hella jumpy even with the client on the same machine
Anyone else having issues with widget items not responding to clicks on multiplayer?
I'm opening two PIE clients and when I interact with widget on one, other widget stops working.
and other times it seems to just not work no matter what.
Looks like calls to server aren't working from client, even if they own the object
nvm that atm. just realized Im working from an old source so previous data was lost. might be in relation
yea PIE is really bad at capturing mouse properly
in UI
@turbid stratus having stutter issues on same machine can be caused by excessive data transfers
Unreal has bad habit of prioritizing bit wrong things
usually happens when you run multicasts in repeating updates
There's something else doing on. Also, it seems clients no longer have authority over player controller.
are you sure you are not referencing server side copy of the controller?
I'm sure. I use this to confirm controller is client side. https://i.gyazo.com/7fa653a96ca3842074df78d7f1274e44.png
index 0 should always be owners controller, at least it was in 4.13
yes exactly
so by comparing self to player index 0, I know its always owners controller
Then when I interact with an item within the widget I use https://i.gyazo.com/e5fb6dfbe1915da2859b998b48191a1a.png
it might be true, or false
really random
use IsLocalController to see if it's remote
that is a sure way to test it
Which then calls https://i.gyazo.com/56f654f8817b0d5b47197392e3822cd3.png
but since the controller isnt authority some reason, server select card is never called
select card is triggered from ui?
controller_selectCard is
but its still not calling Server_SelectCard
which you think it would, but there's no authority some reason. This was literally working fine in 4.13.
I know they refactored networking in 4.14
refactored broke
anyway
try print string "hello" in between those events
it could be that your reference is just broken
I did, controller_selectCard is being called
it's not running Server_SelectCard because it doesn't have authority. But I don't know how that's possible if I'm grabbing player controller through GetOwner of a widget.
uh
I wouldn't use owner
had issues with that
pass the controller into direct reference variable to the UI on create widget
I had random null owners back in 4.10 and 4.12
for no reason
- you can call events directly from that variable without casting
and then expose the variable on spawn, set editable
and I assume you're spawning the UI from controller, so use self reference to fill that variable
game board ref should probably be rep_notify too
since server spawns it
or, I assume server is spawning it
nothing stopping from clients doing that too
its placed in level but all functions related to it are called on server
maybe thats the broken reference
but to set it to replicate properly id have to assign it through the server sides pc
repnotify should update it once server has it figured out
But if we don't need to take actions is repNotify really needed
afaik repnotify doesn't update on every network tick
Also, let's say I'm replicating it to the servers copy of GameBoardRef, wouldn't it be a null ref if I'm calling it from client pc since the reference doesn't exist on their end.
ah
in theory yes, but if everything you need is set to replicate, it will be mirror image of what server has
including references
Let me set that up and give it a shot.
Yeah, I have that. Read over MOST of it.
Yeah, it says accessed none
probably because the reference is server side and I'm accessing it from client.
more like accessing local copy of it
which might be different from remote
and probably is
probably
So does referencing a local copy of an actor no longer work with Run On Server, even if the actor exist locally?
because that's a huge crapshoot if so.
you could try sending the event from UI -> local controller -> remote controller -> remote gameboard
yes, I thought of that. it will probably work but also requires redoing a lot of work
not really, add few events
it looks really dumb
but lemme take a screencap of my current project controlller
It would work, but some reason client doesn't have ownership of it's own PC
that's the real problem
this is how I always do controller
raw input feed directly to remote controller
But you have authority so you can do that.
RunOnServer won't work without authority.
So back to the real problem, why doesn't client have authority on it's own PC
like switch auth node?
When checking IsServer and HasAuthority both return false.
yea those are only for listen and dedicated servers
Right, but if you're a client it would return False
yes
and if you're client HasAuthority on your own PC should return true.
I thought you had authority on anything spawned locally.
And servers should get their own copy of PC as well clients
client can spawn what ever, but it will never show up on other clients
when server spawns it, it shows on everybody
technically you only have authority over your controller
in your figure of speech
server does everything else
Something doesn't make sense...like uh
as and example: Variable X is replicated
if client tries to change variable x, it changes but it will be overwritten by networkupdate
but, if client sends an event to remote containing the variable value
then it changes on both ends
I think I just realized my issue.
And I feel like a dumbass because I'm just now remembering I ran into this awhile back when I first started working with replication.
rule of thumb, everything exist on server only and if you want something done, tell server to do it
unless it's visual effect
So I know why it's not working lol
It's basically what you said earlier, about using servers copy of PC.
Local PC was calling it's own event fine, but when I tried to reference GameBoard's RunOnServer event it wasn't firing.
Likely because the reference was invalid.
So the solution is to pass local event to RunOnServer event in same blueprint, which actually runs it on servers copy.
was all i had to do
and I can remove the 'owning client' part
Doesn't explain why the UI inputs randomly stop working though. That's definitely new.
well that's the easiest way in my opinion to do it
as long as you grasp the idea that same variables have different content depending on which side of the event chain they are
Self ref is probably the only one that works where-ever
right, im hitting bed
night, thanks for the input lol
Something is broken with the UI and in a weird way. Can't figure out why inputs aren't being detected after issuing networking events.
Setting Input Mode Game and UI seemed to have fixed it. Not sure why it's losing input though.
@golden granite did you use UI only before?
It was game + ui before. But I never had to specify it each time I switched windows.
It's working now, just weird issue.
@golden granite the two nodes I would recommend to use to separate stuff is "Is Locally Controlled" and the "switch has authority" nodes. Locally controlled will separate it to only the person controlling the pawn and the switch has authority can be used to separate the server and remote.
I briefly scanned over your convo, hope this is relevant enough
I didn't know that node existed so I'll probably look into it in the future. That wasn't the problem though.
I was trying to call RunOnServer across blueprints when I didn't have authority. The issue was figuring out why I didn't have authority. I completely forgot that to have authority on PC you have to first call a RunOnServer event from and to the same PC, then you can jump between blueprint calls that use RunOnServer.
kind of like a delegate
The unresponsive UI thing was just... unusual. It worked in 4.13 but I had to make some changes in 4.14 to fix it.
Yep, it came out a few days ago
Hi guys, i've posted in the UE forum but no one answered me. I would ask if someone know how i can "save a world state". Practically when the dedicated server is turned off all actors should be registered and when turned on should be respawned. How i can achieve this? Thanks
My guess is you would have to dump to a database. Bit over my head though.
You probably wouldn't save instanced worlds either. Just last locations if in actual world(assuming mmo), and maybe health or mana but I wouldn't even bother with that
Thanks for your answer @golden granite , but actors can spawn actors. So almost everything should be saved
Anyone know why EventBeginPlay may not be firing on clients connecting to a dedicated server? (not in editor)
character @thin stratus
also the tick isnt firing, thats why im looking at beginplay
heard that if it doesnt trigger the tick may not go on server
on a dedicated* server
Hey guys, also wondering, if I have a replicated character, and I spawn some particle effects into the character (from server), will that be replicated too?
@fossil silo nope, you gotta trigger them manually, besides you dont want fx running on your server wasting cpu cycles
thansk @thorn merlin if I needed to replicate a particle system to every client, would I multicast it from server and add it to the same pawn on each client?
multi cast is a way to do it yes
thanks ๐
it depends on the effect but you can also wrap it in a replicated blueprint, spawn it on the server, but set it only to activate if its NOT dedicated
Could someone please link me the PDF on multi-player stuff. I'm at work on mobile and need reading material.
Nvm got it
Can someone help me please? https://forums.unrealengine.com/showthread.php?129134-How-to-save-world-state
My goal is to achieve something like RUST, DAYZ and H1Z1, where you have a persistent open world run on server.
I know that i can create a save game but this method could become hard to handle several actors.
How i can save a "world state" and everything that a world can contain like actors transforms and client's spawned actors?
@fossil silo, when did you need to spawn a particle ?
the pdf is pinned to this channel, see the pin icon in the top right of this screen @golden granite
Yo, updated my 4.13 Network projec to 4.14.
When joining the Lobby, the Server instantly goes from Waiting to Start to either Playing and then Aborted or from Waiting to Start instantly to Aborted if I check "Delayed Start".
I don't even do something and it worked in 4.13. What could cause my MatchState to go to Aborted? (Cause this stops me from Server Traveling).
(Note: This only happens in PIE with more than 1 Player)
So it seems like, this is due the initial connection that you have in PIE
If I start with 2+ Players, they are already connected in the MainMenu.
Start a Server(LobbyMap) with the original Server will result in the Client loosing connection, that's totally fine.
But for what ever reason, it tells the Server to Abort the Match of the New server
I think this screws me over, although it's weirdly called, as the game already reopened
void AGameMode::HandleDisconnect(UWorld* InWorld, UNetDriver* NetDriver)
{
AbortMatch();
}
OH WOW
Since when is this boolean a thing:
That didn't exist in 4.13
Oh it did
But grayed out, hm
Hm nvm me
Guess I need to update my Compendium soon
This boolean existed even in 4.12 and probably before. How did I not find this ealier. I lived with the knowledge that you can't stop this initial connection
Ok, updated my conpendium a bit
Mostly the same though, as the changes weren't that big in terms of information
what's the auto connect boolean do?
i think you can only do auto connect if you do the launch in own thread thing
i thiink that was 4.12 or 4.13
@golden granite i think if you dont have it checked, your clients will boot to your entry point,w ehre as your dedicated will boot to the server map
ah
i've noticed 4.14 has changed its build process, gotta update my dedicated server build scripts
@thorn merlin Ohh really, what changes were made? I just finished doing an overhaul on my build servers this week and I haven't updated to 4.14 yet
So, what does "starting" a game session actually do? I mean, if I create on and not start it everyone can still join and play.
@golden granite @thorn merlin
See it like this:
You want to test your GamePlay map in Multiplayer, but you don't have a Menu to actually host and join.
Hit the boolean and they auto connect.
Otherway round, you want to test your MainMenu and the connection process etc, but with the boolean ticked,
they are already connected IN the main menu.
So you untick it. With that, they all start as "Clients". Though the Server is still a Server, but the Clietns don't connect to him
Before this bool was a thing, you always started connected
@potent steppe This is mostly things for SubSystems afaik
Steam for example might do stuff when "Start" is getting called
SubSystemNull might work without
I use steams sub system now
and i am not using start at the moment
hmm i will test some more and see
Microdose
Hey guys, if I am doing a Multicast (from server) and I have a pawn reference I pass (self from a clients pawn), how do I get each clients version of that pawn to spawn something on? Does that pawn automatically point to each clients version of the pawn? it seems that only the triggering clients pawn gets the spawn on it
@fossil silo
what do you mean exactly, do you want all clients to spawn something on a given pawn or an actor to replicate to all clients
anybody have the xbox developer license thing that people pay $20 for and then can test games on console? if so do they give the xbox live online subsystem? please let me know.
@modern fable Yes that is correct
is the actor meant to be the same on all clients
@fossil silo
if so, rather than a multicast
you should create it server-side and make sure it's replicated
Thanks @modern fable , i will experiment with that
I am having some trouble spawning & possessing characters for my networking setup. I try to spawn a character in OnPostLogin, then possess it with the player controller passed, but its not working
tried every which way I can imagine to spawn & possess, but don't seem to be doing it right. anyone have any advice on the best method for handling players joining and giving them a character?
does anyone know how to do reconnects?
nvm just found this
sexy blog post
worth a pin
This is actually covered in the already pinned multi-player compendium already pinned
@fossil silo why not just use the default GameMode functionality? Even if you need to change it, I would just look at how everything works together and build off that
@thin stratus is multiplayer on Android covered in the Compendium?
Nope.
I have no experience with Android Multiplayer
But if the Subsystem that Android uses supports sessions, then it should work
If not, then connect via IP should still work
But don't quote me on that
There are a few networked Android tutorials out there. None which I have on hand, but they exist. Blueprints too.
I see
If you have links to those Android MP tutorials handy, could you please post them here ? (I'd like to try having MP between several Gear VR users; probably dedicated server on PC and Android clients connecting to it; or only 2 players, both on Android, one is listen server and one is client connecting to it)
@golden granite ahh okay thanks, I didn't realize it covered that
I always watch or read some comprehensive replication learning material without practicing it straight away, and then when I go to actually make something I've forgotten it all
Can someone please point me into the right direction in regards to Proximity VOIP?
Anyone know how to resolve the issue of a multicast method needing to call a run on server event (which does not fire because the client is not the owner)
@fossil silo You could have the mutlicast in the player controller, and have that method call a Run On Server. That should work.
thanks @distul u helped me figure out next steps ๐
Hey everyone! Please tell me, is Unreal have multiplayer user limit at 64 users?
I don't believe so, where did you find that number?
Squad is 50v50
network limits are really just server limits at this point. if you want a lot of players, you're going to have to run with localized servers in popular regions
If i want to make multiplayer MMO game, will i have player limits, except for servers load?
depends how well your server backend is built
Ok. IE its not depends by Unreal, yes?
right
it depends on how many people you can employ to make it
and how good your servers are
and your server locations
Ok. Thanks so much!
@valid fiber there's a good talk about it from steam dev days 2016
you can find it on youtube
Does anyone have experience with SVN?
I have, not for a few years though
@hollow sandal Perforce4life
@hollow sandal been a while since I used SVN, but ask away. chances are someone knows what you want to know
@valid fiber @high lotus Let's just say: If you want to make an MMO with UE4, you need to code your own Servers.
The Server System of UE4 is not made for that. They are designed for smaller purposes, like Unreal Tournament etc.
And coding such servers is a LOT of work. That's one of the things why you need a big team for an MMO
how many concurrent users UE4 server is designed to handle comfortably ? 64 ?
Is it possible, with stock UE4, to travel from server to server without having to go back to the menu and manually connect to another server? (for example, being in-game you step into a portal, and appear on another server with all your stats transferred)
if so, one can have a big world split between servers and each section of the world can contain only so many players at a time.
sure you could code that, use various tricks to hide the transition
like Destiny, have transition areas with no actors in that hide the matchmaking and connection that goes on
I don't know how well UE4's multiplayer scales out of the box though. I would guess it's still deathmatch-style game oriented to keep all players in sync at the same resolution at all times, regardless of position in the level
well, I don't want to code anything. The idea is to use stock UE4, from launcher. In the events of getting a huge dump of cash, sure, full scale MMO can be developed. However, until then the best bet is to use stock UE4 without any custom code.
(unless you have a skilled team, it's probably better to stay away from modding engine's code)
you can certainly start out making a multiplayer game in UE. But think like UT style multiplayer.
a single server running a single level that people can connect to....you got that out of the box
right, that's where I would start (but with coop, not competitive MP)
but I am asking about this server to server transition our of curiosity, for future references so to speak ๐
@hollow sandal I have experience with SVN, just not with UE4 and SVN
(and the way I did it with Unity and other engines as simply adding respective files to repo and committing it; then when I'd update from the repo, only these files would be updated; I never used built-in functionality in Unity to mess with version control)
Tortoise SVN is the client I've been using
In C++
Thanks guys. I ended up getting my problem fixed with the help of a friend ๐
Hey folks. New here. I'm hoping I have a really stupid question. I'm trying to get steam working with my linux dedicated server (4.13.1). The server builds fine. I fire up steamcmd on my linux test box and can log in fine (and download stuff like the SDK redistributable). When I then run my ue4 dedicated server I get:
LogOnline:Display: STEAM: Loading Steam SDK 1.32
../common/pipes.cpp (769) : Assertion Failed: fatal stalled cross-thread pipe
../common/pipes.cpp (769) : Fatal assert failed: ../common/pipes.cpp, line 769. Application exiting.
An strace of ue4 just shows line after line of futex timeouts. I'm thinking the problem is ue4 isn't able to talk to my running steamcmd but that's just a guess. I don't have any firewall running at this point. My server is publicly available on the internet. Any helpful hints? Subtle (or not so subtle) slaps upside my head?
@wary willow heh, people requested Epic to do c++ counterpart too (I also did request it), it's again up to the community to do that it appears
I do appreciate that guys attempt to do everything in c++, it is really rare on this community
Almost all tutorials are for BPs
Surely there are c++ tutorials available?
besides battery collector?
there are training stream projects sure
but I mean the basic BP tutorials where they just focus on individual things on the engine
there's never a direct c++ counterpart from them
when I started with unreal, I would have been happy to just have c++ counterpart, like just the code version of the BP tutorial
just to see how same things were done in c++ (also do note that I already knew c++ before ue4, just wanted to see the ue4 way of doing those things in code)
instead I had to do tons of searching around to figure some basic things
but yeah, this is getting bit offtopic, sorrry about that ๐
@fierce birch check out the Twin Stick MP template that is inthe sticky postlist, it's mainly all C++ plus BP for gameplay stuff and customization. But all the networking is done in C++.
@rough iron ah nice
my rant was about epic not doing these officially though ๐
also, I don't really need those basic tutorials on c++ side anymore myself, but would have loved them when starting out with the engine
yours is multiplayer related though so I'll probably have a look at it still ๐
I never heard that they were done reworking it
Thanks for the pull request. We are in the middle of a large refactor of OSS in our dev branch, I will add this there when the dust settles. It shouldn't take too long.
they added that though
yeah back in june
did you see the answer there when someone asked the same epic dev about that 2135?
TheZoc: slonopotamus is right, at least at first glance, we have to maintain a cross platform solution that does its best to behave correctly with the same code on all platforms. If a developer has to #if STEAM anywhere then we are failing. That being said we do have someone that is assigned to Steam tasks, we've just been very busy with other priorities. There is a JIRA for authentication.
Isn't the engine supposed to be "open sourced". Replying to pull requests with a mysterious under the covers refactor doesn't feel very open source. Especially not when it's been taking a long ass time.
that's fine. but epic should still fix the code that 2135 was fixing...
it's been a long time
seems like steam would be a pretty high priority
yeah, it seems odd
epic doesn't do multiplayer games with ue4 that would use steam so that's probably why
if they did, it would have been fixed immeatidly
right :/
somone really needs to take that pull over
I don't even see any #if STEAM in the pull
heh
@jolly siren other than my little tutorial on how to get that into a BP (via C++), you can get it now via Advanced Sessions Plugin, after I asked them why they didn't have it...
is local MP much easier to setup and work with than normal online MP ?
split-screen / shared screen
aye, cool
I have the pull working just fine. I just don't want to maintain it every upgrade...especially when it's something that epic should be handling
"local" is shorter than "split-screen" ๐
well, yeah
Which is technically Local MP
yep
Couch/Shared screen is totally different
btw, will fps drop significantly when playing split-screen ?
two cameras, double the rendering
it will obviously impact performance lol
it's still two cameras, double the rendering. i didn't say anything about res
the key word in my question was significantly
it's significant yes
test it
I am not even sure how they manage to run split screen MP on XB1 / PS4
so is there a new way to include steam in 4.14?
DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
that is what I used to do
@jolly siren it's not that significant
do note that unreal renders things really fast when resolution drops
also splitscreen disables bunch of PP effects too
Right fps wise probably not.
Hey everyone. I'm having a slight issue. I have a 4 player co-op multiplayer shooter i'm making. I'm having issues with clients 2 and 3 are not causing damage to anything but the server player and client 1 are. I'm using LineTrace and Apply Damage. Any ideas what's going on?
@brittle sinew @native moth
๐
Would probably have to see at least your basic setup to see anything wrong
Make sure your replicating your events to the server correctly.
lemme take some screen shots
run on server when trigger is pressed to spawn action
spawns handgun actor
use linetrace to apply damage to hit actor
Where is the "bullet trace zoomed" getting called from?
look at the 3rd pic
Oh, I missed it because of the collapsed graph D:
Just skipped over it with my eyes haha
๐
It's jus weird since server and client 1 both work but client 2 and 3 don't. Shouldn't client 2 and 3 be following the same instructions as client 1?
Yeah it seems like it would be that way ๐
Could you try seeing where the calling stops when Client 2/3 do their call?
Versus where client 1 goes
I did a simple print screen on the enemy to see if damage was being applied and it does with client 1 but it's not registering with 2 and 3 but the line trace is hitting like it should. Let me try it with breaks and see what happen
*preakpoints
*breakpoints
Yeah I'm just wondering where along the path it fails. If you figure that part out, it will definitely help
yea so when I apply the break to the anamy actor on his Event AnyDamage, Client 1 triggers the break, when I shoot the enemy with Client 2, the break doesn't happen
and the break doesn't trigger at all when I place it on the Handgun actor's ApplyDaname node
*Damage
Well, I think we got that the damage isn't working ๐
If you can find exactly what call fails, that's where it's really useful
Yea, everything before ApplyDamage is being called properly, but soon as it hits ApplyDamage, it doesn't do anything
Does the authority node get called?
yup. I've even tried it without it too
(after it)
it stops on the authory node
And it doesn't when client 1 calls it?
sorry, it doesn't stop on the authory node. I forgot I had it break there on one test.
so it randomly registers with client 2 or if I actually get right up on the enemy actor so that the handgun actor is forced to collide with it, it also registers @brittle sinew
So... are you sure that the traces are getting a result on client 2/3?
That's the only other thing I might think of
They are under those 2 circumstances that i described
I've got a print screen after linetrace to see A) what the player is hitting and B) what client is doing the line trace
Traces running on the server don't really work... sure it prevents the client feeding random data in but it's probably not a great representation of what the client is looking at
Since it calls the line trace once it gets the call, not when the client called it
hmm but that still wouldn't answer why when the handgun actor overlaps my enemy it applies damage. I can still be just right outside of the threshold of the handgun actory not over lapping my enemy and it not register as damage. This would rule out accuracy of what the server preceives as a trace hit since there is no room for errors
And the trace is null when damage isn't applied? Or does it return some scenery or something
No the trace says it's hitting my enemy, just the ApplyDamage component does nothing
Hmm. If plugging in the instigator doesn't work, make sure your damage is what it's supposed to be when the call occurs, since it's not replicated
That's about all I can see there
yea, enemy has 6 health, gun does 1 and player had 48 rounds of ammo lol I've unloaded all my ammo dozens of times.
I'll keep putzing around with it tho, thanks for trying
@brittle sinew solved it. I assigned my Player as the instigator for the spawned Handgun BP. I used Get Instigator and plugged that as my object when I casted to my Player.
instead of useing Get Player Character
Hi, after update to 4.14 my Dedicated Linux Server wan't compile. Has many errors "undefined reference" with PhysX ? Someone has same issues?
found problem, i'm use old LinuxToolchain
I'm reading a replication article by Rama and in it he gives 2 cases in how to use OnRep.
One case is to have OnRep_SomeValue, and execute when that value changes.
The other case is to have OnRep_SomeBool, and set SomeValue to UFUNCTION(Replicate). And update SomeBool so it calls OnRep_SomeBool when SomeValue changes.
He says the first case is a bit risky, and i don't understand why
I don't understand why a regular repNotify would be worse than using yet another repNotify, just to call the first repNotify. That makes no sense to me, unless I misunderstood you?
Or are you saying use a repNotify on a bool to know when to update a variable? Which still, makes little sense. RepNotify exist so clients know exactly when a replicated variable updates. AFAIK there's nothing wrong with it.
That's the source of my confusion as well
In the "Two Approaches" section, which talks about RepNotify
In one case I rely on the value itself to always be dirtied and updated properly, a bit risky sometimes, depending on your situation.
In the other case I am flipping a bool that serves to guarantee replication will occur, and sending along the actual relevant data at the same time.
I'd recommend you try this latter approach first! "```
I would probably disregard that
Oooh
I know what he's implying now.
Basically if you have variables that all need to update at once or in a specific order, hes saying don't set those to RepNotify, but rather set a bool to RepNotify and flip it once all changes are complete, then request the other information
Wouldn't it be way better to just pass the data via RPC in a struct?
They can be net serialized afaik
Flipping the bool would still need to actually pass the data
So you need the RPC anyway
Replication the Data and flipping the bool after they are set doesn't work, cause teh boolean could be replicated faster so the repnotify calls before the changes are at the client
@thin stratus Yes, I agree. So the document really doesn't make much sense.
I thought so... alright it's not just me.
Hey all, I've been following the Blueprint multiplayer playlist and I'm at video 16 but have been having some difficulty getting my players name to appear and also for some reason the lobby widget appears as soon the game starts, any have any ideas?