#multiplayer
1 messages ยท Page 404 of 1
@jolly berry the server knows your camera rotation, it'sautomatically replicated from player controller
I send my control rotation to server, not sure if thats ideal
but i figure if it worries me down the line i can add some validation stuff to prevent cheating
im not sure if camera rotation is good for aimming so I send an rpc when i fire so it knows the direction. since direction is little more than an input by the player I dont have a huge issue with handling it that way personally
Why my client+server does not update my widgets whiele the other clients do?
@bitter oriole they are not. It should all happen in Owning client. It's just the weapon info and a thumbnail of the current weapon. The logic replicatesand the mesh and materials of the weapon too. All clients can see the changes. But the widgets are not working for the client+server
You mean the listen server ?
Maybe you implemented the logic on the replication event rather than the RPC
ReplicatedUsing isn't fired on the server
yes, listen server.
ReplicatedUsing? I have to check what that is
The logic happens in the "run on server" event.
This is my nodetree, is it helps: https://blueprintue.com/blueprint/-gpyqjko/
ah, forgot to mention I'm doing the whole thing with BPs
no ideas?
Why does the gamestate's GetNetMode() function return NM_Standalone when running in the editor but everywhere else whe nyou use GetNetMode it returns correctly
i'm testing a multiplayer game locally and my mouse cursor is being recognized from one viewport in the other
@teal crest maybe you are using the wrong player controller? I'm newbie so probably that's not the case ๐
Even if I use a server RPC and call GetNetMode it returns NM_Standalone
Nevermind it's just some strange behavior with getting x,y mouse position when outside of the viewport
one window shows x as 0 and y as .00001, the other x as 0 and y as like 90000000
Hey guys, I'm using seamless travel
and I get this problem where if a client loads the level before the server does\
as soon as the server loads the gamemode a pawn is spawned and assigned (possession) to the client.... but shortly after it seems that by default it assigns a spectator to the controller, canceling my player initialization...
When is it safe to initialize the player?
On possessed maybe? You could have an dummy invisible player waiting for on possess.
I wanted a clean solution... an event that can safely initialize players
I'm getting no simulated proxies on clients, what could be happening? The server pawn is AutonomousProxy on the server, which shouldn't happen...
Where is the pawn being spawned?
From the custom game mode I have, in a server function.
hello
I follow this code : https://forums.unrealengine.com/development-discussion/c-gameplay-programming/25008-communication-between-ue4-and-a-python-udp-server
For gameplay programmers writing C++ code.
when I start..Exception throw
You need the engine debug symbols to dbeug this
This isn't the error, this is a warning that you don't have the symbols to generate a call stack
The error will be in the output log window
@scenic tangle Actually, getting the local PC and printing its remote role gives SimulatedProxy. Getting the pawn remote role gives AutonomousProxy...
@umbral adder on aws you also have to add the ports to windows firewall as well
@worn nymph nvm i found out the solution long ago
the ports dont open if ur using steam ded s
to join u have to do find session advanced and choose dedicated server types
u cant connect to a steam ded server via open ip
Anyone knows how to setup the LobbyBeacons so that the LobbyState and LobbyPlayerState replicate properly? Here is my initial setup, but after connecting a LobbyBeaconClient (successfully) the states aren't replicated
the RPC's seem to work just fine
there is an answer hub post
@vocal dagger
u need to call setup or something before regesterhost
yeah but they also say that someone got it fixed by setting up the lobby state after registering the host
Hey guys I have a question about beacons. Is it limited to sessions and steam only? Is it fine to use it with a null subsystem?
Trying to replicate aiming animation offset to all players. Can someone tell me where I'm going wrong? I also tried to multicast it but it still only shows up for the client who's aiming.
is it important to unpossess before destroying a pawn? are there any good resources for learning the basics of the gamemode class (setting up matches, respawns, etc.)
I'd like to do it properly. I may end up just reading the source but if theres any place to get me jumpstarted that would be nice
I think you should really know what pawn players are using at different times
not sure why you are replicating that?
shouldn't the anim offset just be worked out locally by each player based on values sent in?
^ yea it's basically the variable value you use to drive the animation, just replicated
RPC it to server, set replicate w/ skip owner
so you don't get jittering
becaons is fine with null susbystem
subsystem*
iirc
so happy i got perforce running smoothly
finaly got away from GIT ๐
needs a new keyboard ffs
@meager spade We in the office are hoping to be able to get rid of perforce and go to git soon ๐
Can someone tell me why this wont work if I call it from SpawnDefaultPawnFor on gamemode? The function is in the playerstate and I grab the playerstate from SpawnDefaultPawnFor's player controller input
Remove loading screen works but I can't seem to create a widget
Might be too early
InGame UI should also not be in the PlayerState
PayerController or HUD or better
And then on BeginPlay of the class itself.
Ah thanks eXi!
When creating it in the PC, make sure to limit it to the LocalPlayerController
Otherwise your server ends up with multiple ones
That's what I needed to hear I was having that problem originally which is why I moved it to playerstate assuming that would be the solution
Well you have to realize at some point, that specific classes exist on specific instances
Somestimes only the Server has one, (GameMode), sometimes only Server and Owning Client (PC), somtimes everyone (PS, GS) and sometimes only the owning player (HUD)
And in each case, each instance calls BeginPlay, or Tick etc.
That doesn't even have something todo with Multiplayer or rather replication
It's just that each copy on each player calls beginPlay
If you don't limit it, then it will call too often and create x UIs
E.g. the PlayerState exists on each player and once per player.
So with two players, you have two PlayerStates on each player
With 3 Players, each Player has their own and the PS of the other two, so 3 in total etc.
And each of them Calls BeginPlay
IF you create the HUD in BeginPlay, without checking whos PlayerState it is, you'd end up with x huds layered on top of each other per x players
@glacial lotus have you heard of PlasticSCM? it's what I'm looking forward to
it's like a mix between GIT and P4, also how are you going to deal with large files and file locking? P4 is better for that
@agile lotus He knows everything. He was born next to UE4. ๐๐
Hello, guys! I am working on a Steam Dedicated Server inside Unreal Engine 4 and I couldnโt get it to show in the Internet tab in Steam Master Server List, but at the end of the day I solved this issue.
One more problem that I am having is that I cannot find the server using Find Sessions Advanced. I am using the Advanced Steam Sessions plugin.
I think this problem is caused the 3 warnings I am getting in the server log.
I researched the problem and I found out that it is from the engine and that I need to make some tags shorter. For example, SPN, SGDIR and SGDESC. I also changed the thing at line 136 with TEXT(โbobโ). I am talking about the file OnlineSessionAsyncServerSteam.cpp. However, I still get these warnings...
On short, I followed the steps in this post:
Any help would be highly appreciated!
Does player state by default have any reference to the controlled player on all clients?
@distant wave are you working with decode? ๐ i was the one that helped him get his ded server working on ec2. ping me if you need assistance.
You can grab the "Owner" on owning Client and Server
Which is the PlayerController
Invalid on all other clients
A PlayerState is created for every player on a server (or in a standalone game).
When in doubt, check the API
I guess the easiest way to get the Pawn into the State is to use OnPossessed in the Pawn
Grabbing the passed PC, then the PlayerState and setting a Replicated Pawn Ref variable that is located in the PlayerState
What will happen if you go out of relevancy (due to distance) from that replicated pawn ref? Locally it would get nulled?
@twin juniper Help me!! ๐
i am not working with decode but I am in his discord server
I need to get my dedicated server to work properly
can you help me?
I will DM you
@thin stratus do u know the answer to my issue? sorry for tagging i am desperate ๐
Weird bug - when I use a multicast from a server event, the client that doesn't instigate this gets sent underground and character is destroyed. Any ideas why? I vaguely remember having this issue a while ago. Couldnt find the answer online.
are you sure it's being called from server?
if invoked from the server Runs on server and all clients. if invoked from a client Runs on invoking client
Yeah, take a look here. I've disconnected it as it was causing these issues.
Not sure whats causing the issue, looks all good to me.
I'm about to re-read the network compendium, but was wondering if anyone had a quick answer that I could try out before hand. If I have a pawn owned by authority, what would be the appropriate way to have the client fire a request to possess it? If it's a simulated proxy, a direct RPC on the pawn wouldn't work, what's the alternative here?
grandmaMax - not sure but maybe because you're in a player controller and the other clients wont have that PC
I thought all players know about everyones PC as long as its replicated properly? hmmmm ๐ค
All players know about everyone's player state. Only the server and owning client know about the PC.
Congruent, serverrpc on your PC that calls possess ? Should work
I see, so the UFUNCTION(Server) rpc should be defined in the PC
seems like it would work
Slight misunderstanding. I assumed I could call the server rpc from the PC on the pawn object itself. That makes sense though.
yeah you need client ownership for server rpc to work or you get a warning and it fails. can see warning by adding -log in multiplayer options : command line arguments
Awesome, I'll add that in now. One more question... can a PC possess more than one pawn? The default pawn is the camera view of the player so if I possess this other unit, that won't cause the camera to become depossessed will it?
the default setup is for one pawn, but people asked that before so there should be info about doing something yourself
Ok no worries. I have the system in place that should support it.
if you're just looking ot manage the camera yourself you can experiment with disabling automanagecameratarget or something
I'll look into it. Thanks for the guidance.
/**
* True to allow this player controller to manage the camera target for you,
* typically by using the possessed pawn as the camera target. Set to false
* if you want to manually control the camera target.
*/
UPROPERTY(EditAnywhere, Category=PlayerController)
bool bAutoManageActiveCameraTarget;
That would be good, only the player can potentially possess 0..n pawns on the field. Good to know it exists though.
This will work. Just moving the command/select logic to the PC seems like the solution.
Yeah that worked. Sweet! Success ๐
Nice... the -log function brought up 4 additional command prompts for all the clients I'm testing lol.
lol, but it is very useful
indeed
Thought I messed something up at first when they all loaded.... "OMG why are 4 dedicated servers running"
Is there a better way to check if the mouse cursor has exited the viewport?
PanX = 0;
PanY = 0;
}```
Sometimes this works sometimes it doesn't. Im' using edge scrolling and occasionally when swapping between clients the other client continues to pan after leaving the viewport
oops, I see a bug I just added. Maybe that's why
Ok, fixed it to what it should be... Still tedious though. Was hoping there might be some event triggered when mouse leaves viewport.
Might try UGameViewportClient bIsMouseOverClient
Vax for the win
What did you search... "Viewport" ?
Still funny how seemingly obvious and easy you made it look hahaha
Anywew
At what point is the Player controller ready? IE. What is the last initialisation step in the chain?
Depends on what Ready you are looking for
The best point is usually BeginPlay
However from a connection side of view, you can access the PC for the first time in the Login Function of the GameMode
And you are allowed to perform RPCs on it in/after the PostLogin function
@fresh saddle
@thin stratus i am using Discord Rich Precense
and it need 64bit time
i what the time to be when i started the game
@thin stratus tyty
@umbral adder :P No idea. Haven't used that plugin. Please refer to their documentation.
Look at the doc
Third-party plugins are what they are, don't expect as much support as the engine
most of them have threads on forums
Sounds like the GetWorld()->TimeSeconds
so when you have a replicated property without a rep notify, is there a way I can check it has been replicated on a client?
no in discord not ue4 @bitter oriole
@vocal dagger Fire a RPC from the client to tell the server
@umbral adder Log the value on the UE side to check that it's correct, try small numbers like 42 just to debug it
when i launch its 0
If you don't get 42 on the other side then ask the developer why
and after 1 sec 1
the problem is the plugins time stamp
its 64bit type
like this 1507665886
which is 13:20:44 if u right click me and see
so u get my point
@bitter oriole the thing is I want to tell on the client if it got an update from the server, and I'm not fancy on using tick functions
I was hoping to get a callback somewhere
yes but the class I'm using (LobbyBeaconState) is replicated without that
Then change it
@vocal dagger u can use the host and client
Or you can just patch it
@umbral adder Have you tried passing a simple, hardcoded value that you understand to be what Discord expects ?
That's the first thing to check
And ?
i tried 0000000000001
for trying to get 1sec
but i just deleted the 0'0s and gave me 7hours lol
What
anyone ever seen an onrep take a full minute to reach a client?
(worst of all, this is testing locally, in PIE)
Only if you are spamming the network with something else
it's more likely to be other game initialisation events
I have a hunch it's the loot spawning
How is it possible that the Server Pawn has a RemoteRole of AutonomousProxy, but if I print its Role on the client I get SimulatedProxy...?
Sure it's the correct client ?
Yeah, only have 2 players, listen server, so Server and Client1
@twin juniper and the client 1 "copy" on the server, I think
Didn't understand...
I'm newbie so maybe I'm wrong but I think all the clients have a copy on the server
They have their copy on the server. I'm not worried about that
if (GetOwnerRole() == ROLE_AutonomousProxy || GetOwner()->GetRemoteRole() == ROLE_SimulatedProxy)
{
LastMove = CreateMove(DeltaTime);
SimulateMove(LastMove);
}
The thing is, this should run for each owning pawn, it just doesn't run on the server one, because its remote role is giving Autonomous, instead of Simulated, as it should...
And I can't figure out why that happens. I spawn each pawn on a server function on game mode, and possess it right away on that function. So how can the roles be messed up...?
have you printed the name of the PC you are evaluating there?
The thing is: if I get the local PC on server and print the remote role of that PC I get SimulatedProxy. If I get the RemoteRole of the server pawn I get AutonomousProxy
looks weird. But I don't think I can really help. As far as I know that should not be even possible, unless you changed how all that stuff works in the engine and that can not be done accidentally.
This is way too weird.
DrawDebugString(GetWorld(), FVector(0, 0, 100), GetEnumText(Role), this, FColor::White, DeltaTime);
I use this to print the role over the pawn
FString GetEnumText(ENetRole Role)
{
switch (Role)
{
case ROLE_None:
return "None";
case ROLE_SimulatedProxy:
return "SimulatedProxy";
case ROLE_AutonomousProxy:
return "AutonomousProxy";
case ROLE_Authority:
return "Authority";
default:
return "ERROR";
}
}
If I change for it to print RemoteRole, it prints AutonomousProxy over the Server pawn (which it shouldn't, in theory) but if I leave Role, I do get a SimulatedProxy...
when i try to connect to a server i get a net checksum mismatch error
what does it mean ?
likely that you have two different versions of the application
it doesn't strictly return an error at all
but if you have different content packages or binaries, I could see the a checksum failing
what is a checksum ?
i have the same content packages (i believe)
it isn't about the files , right ?
(the files not used in the game being different , or one extra)
A checksum is usually created based on files. If there are bit errors in your files after transfering or saving your files, the checksum will be different
@hollow mural
you could compare the the hashes between your copy and the other copy
Hey everyone, I am trying to figure out what is the best way to save all the game data from a player in a database for dedicated servers. Anyone has any idea of how this is done and can point me in some direction? (hopefully the rigth one :D)
save game objects look ok but not for multiplayer or maybe is there some way to adapt / use them?
someone suggested me to convert all the save game data to string and save that string and then convert it back from the database to load the game. Is this the correct way?
So, apparently, the problem with the roles and remote roles, have to do with having the parent class of Game Mode being AGameMode instead of AGameModeBase, and with the spawning too.
If I leave the parent class as AGameMode, but choose DefaultPawn on the BP instead of custom spawning, I get the same results.
However, if I change to AGameModeBase, and choose the DefaultPawn on the BP, without custom spawning, I now get the RemoteRole on the server pawn as SimulatedProxy.
Have no idea why this is like this, as I am even using the custom spawning routine shown in UE4's official multiplayer blueprint tutorial
@pearl plank you can store what you need into a SQL database
that how a lot of online games do it
there is no way to pass a savegame object from unreal to the database somehow? i have to do my custom way to save the info to sql?
depends what info you are saving
Hi guys! i have a complete brain stop here and i have no idea how to connect this so they update when players join... if anyone have time to check it out i would be greatefull!
https://gyazo.com/6ffc5cdf872749cabcf150e4be58d701
https://gyazo.com/c25e3255aaea6809b79cfaae61688406
https://gyazo.com/0c82e469a0596da12d46bf3203e636b4
so on the 3e image the "Lobby server name" and Player display is not connected anywhere at all,
my problem is obviously that they dont show up ingame.
the count and server name that is..
https://gyazo.com/69d3f5726745391f819d8a1a729c8d3c
I'm looking for a tutorial how to add steam friends to a party in my main menu and then start matchmaking. Has anyone any infos on that. There is a UParty class, but im not sure if that is the right thing
@twin juniper Check these links, maybe can help
https://answers.unrealengine.com/questions/713197/apartybeaconxxxx-usage-general-questions.html
https://answers.unrealengine.com/questions/467973/what-are-online-beacons-and-how-do-they-work.html
https://forums.unrealengine.com/community/community-content-tools-and-tutorials/1355434-onlinebeacons-tutorial-with-blueprint-access
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/85348-party-beacon-how-does-it-work-o-o
https://docs.unrealengine.com/en-us/Gameplay/Networking/OnlineBeacons
Hey everyone,
I noticed that this is covered very little in the official docs and around the web. You can find tidbits here and there, but not a full example that
For gameplay programmers writing C++ code.
@versed island thanks, i'll have a look
@twin juniper I dont know exactly what you are doing, but if you are printing on screen debug messages in editor then printing on one client will also print on the other client, which confused me for a bit
it prints across the board
so if you do any sort of prints about a pawns role it can be sorta weird
also, if the pawn isnt locally controlled it will be simulated
only the pawn that you control is autonomous proxy
I will say this though, I still dont understand when an actor's remote role is simulated proxy. I dont really understand that and if anyone can explain that would be super helpful for me
@thin stratus ah thanks. For some reason didn't get notification about it
@thin stratus do you know in what situation remote role is Simulated Proxy? Its probably the one thing I dont really "get" in regards to roles
SimulatedProxy should be the Client that is not owning the Actor
You are maybe confused cause the Role and RemoteRole stuff swaps when you view it from a different connection
That should help
I read that. So I guess I should be more specific: If I call remote role on a character from the server, will it ever be simulated proxy?
Server basically see Authority as Role
or will it always be autonomous
And autonomous or simulated on remote
Based on who he refers to
And the Client sees Role as Auto or Simulated and Remote as Authority
At least in the example on the page
that makes sense about the clients
but if the server calls remote role on a character, is it always auto?
Not sure actually
It should be Auto for the owning client
and simulated for the others
So I guess it returns auto
I see okay
that clears it up
i wasnt sure because theres going to be multiple versions of the same character across various clients
one being auto, the rest being simulated
and I didnt know how the server determines what the remote role is when the remote role differs based on which client is viewing it
if you know what i mean
but i guess it just says, okay there is a client that owns it and it is auto, so the remote role uses auto as the "higher priority role".. disregard the simulated roles
?
I assume the same
But I haven't really looked much into that
even with my background of knowledge, there is some stuff I just never touched and thus never fully learned :P
Guess it's easy enough to print some strings
thats fair hah. theres a lot of code, and this is also a very particular situation
my question mostly stimmed from curiosity more than practical use
oh, maybe bots would return a remote role of simulated proxy when called from server
I didnt think about that case
I was doing some research:
sigh, is that an assignment in the if statement ๐ฆ
sounds like you might be setting rotation on the clients unintentionally, Im pretty sure it shouldnt be replicating the rotation if the movement replication is set to false
i would do ctrl-F and search some files for setActorRotation to see if theres any spots where it may be getting set on a client
Hello there !
Is the keyword WithValidation and his function _Validation is a mantory for all rpc functions ?
I have this error and I can't compile. My function is unreliable so I suppose that the validation isn't required. ๐ค
Thanks in advance ๐
I dont think validation is ever required
I have this error : error : Server RPC missing 'WithValidation' keyword in the UPROPERTY() declaration statement. Required for security purposes. ๐ฆ
Sometimes when im copying and pasting though for my validation function, i forget to make it bool instead of void, or forget to return a boolean value
UPROPERTY?
Yes i didn't understand I have a UFUNCTION(Server, Unreliable) and not a UPROPERTY
yes it's the same line in the compiler
do a sanity check and check the header file for every use of the word WithValidation and make sure you didnt accidently put it in a UPROPERTY
Hum it's concerned the line 100 so the function and not the line which has UFUNCTION ...
99 UFUNCTION(Server, Unreliable)
100 void UpdateDirection(FVector dir);
101 void UpdateDirection_Implementation(FVector dir);
You dont have to declare the implementation function
Oh ok ^^
yeah its kinda weird
The UFUNCTION macro takes care of it
Given you use a Replication keywoard, such as Server
hurray for macros, making things confusing unintuitive for normal CPP programmers ๐
nah but its actually kinda nice when you get used to it
Ah yes I have missing the include !
But it's weird, why the error is so explicit ?
Better than adding 3 declarations per rpc
^^^
im not sure about your situation. it sounds like if an actor is attached it may inherit the replicate movement of the parent
Thanks all ๐
it sounds to me like the engine is replicating movement variables of the parent actor and all its children actors when the parent actor moves, and when the parent actor is not moving the parent and children dont get replicated (unless its explicitly marked as replicate movement, perhaps)
Maybe you have check the orientate with movement checkbox or enable the boolean ?
it may be a bug, it may also be intentional.
i think when actors movement is replicated, it replicates the local transforms of all the child components
so if you attach an actor, it may be treated as a child component, thus gets replicated
if you enable replicate movement on the attached actor, does it rotate when the pawn isnt moving?
just out of curiosity
yeah that would be odd, i would expect it to
hmm yeah i have no idea
yeah I'd be interested
@dull stream Exactly. Like @thin stratus said, "SimulatedProxy should be the Client that is not owning the Actor", so in the case that I have that there are two players in listen server mode, you should get SimulatedProxy once as a RemoteRole. (because the remote role of the server should be that). I wasn't getting that, which didn't make sense. But making those changes worked for me. Although, further down the road, I must make it work with custom spawning, but that's a later problem.
making what changes? sorry i got kinda lost there
im surprised you are getting simulated proxy as the remote role, how did that happen?
when the server gets remote role its supposed to be simulated?
In most cases I think so.
Here are the changes:
"So, apparently, the problem with the roles and remote roles, have to do with having the parent class of Game Mode being AGameMode instead of AGameModeBase, and with the spawning too.
If I leave the parent class as AGameMode, but choose DefaultPawn on the BP instead of custom spawning, I get the same results.
However, if I change to AGameModeBase, and choose the DefaultPawn on the BP, without custom spawning, I now get the RemoteRole on the server pawn as SimulatedProxy.
Have no idea why this is like this, as I am even using the custom spawning routine shown in UE4's official multiplayer blueprint tutorial"
Also, about your question, here: https://docs.unrealengine.com/en-us/Gameplay/Networking/Actors/Roles#role/remoterolereversal
i think maybe my confusion stemmed from server setting the remote role. the reasoning/logic behind making, for example a pawn, simulated vs auto
because the pawn is auto to its owner
simulated for the other clients
so which "remote role" should it be? there are multiple remote clients in the game, and not all of them necessarily have the same role for a particular actor
and which is it actually? from what i understand pawns are considered to have an auto remote role
i actually looked through the source and it seems that when the pawn is possessed, the function PossessedBy gets called. Inside that function it sets remote role to auto.
in other areas, it seems by default the actor is set to have a remote role of simulated
so pawn may be the exception
which makes sense, because there are few situations where the client should have autonomous role
So, the basic setting is (I think):
On the server:
- Server pawn -> Role == Authority / RemoteRole == Simulated
- Client pawn -> Role == Authority / RemoteRole == Autonomous
On the client:
- Server pawn -> Role == Simulated / RemoteRole == Authority
- Client pawn -> Role == Autonomous / RemoteRole == Authority
hm so Im a bit confused, how does one get the server pawn from the client, I didnt think such a thing was possible?
i thought server only had copy of server pawn, and same for client, only having copies of their client pawns (if locally controlled, auto, if not, simulated)
how does one get a "client" pawn on the server? how do you get a server pawn from the client?
@dull stream Well, on each machine, the code runs for each pawn whether it's our pawn or the others. However, if it's the others, you're running code on a simulated version.
On the server, you know you're running code on the simulated version of the client pawn using "if( !IsLocallyControlled() && Role == ROLE_Authority)"
This means the code running is on the server (that's why the role is Authority) and on a pawn that it's not the Server one (since it's not being locally controlled)
(To anyone seeing this, if I say anything wrong, or if you can explain it better, please, enter the conversation)
@dull stream BTW, a pawn is auto for its owner, only if you're on Client owned connection... Because on a Server owned connection, the locally controlled pawn is Authority always
Tried to replicate bone transform and i followed this guy https://answers.unrealengine.com/questions/512242/replicating-bone-rotation-modifytransform.html it works but the replication is really laggy and bad (last answer shows that) is there any other way to replicate bone transform or how to fix this problem?
@twin juniper yeah I know it runs code for all the pawns. But you said that on the server there is a server pawn and a client pawn
thats what is confusing
each player has two pawns on the server?
i didnt think thats how it was done. if that is the case, how do you get each version of the pawn?
the way I understood it was that simulated proxy pawns are not locally controlled, but are simulated by the client. How they are simulated depends on the data received from the server.
@dull stream What I meant is that on the server, you have your own pawn, and all the others remote versions. Just like in each client you have your own pawn all the other ones which are simulations of other players. Maybe the choice of words wasn't the best, sorry about that.
How does the server know which pawn is his? Maybe I'm thinking dedicated server
It may be different if client is hosting
@dull stream If you are the server and want to run code for the pawns which are not local, you can basically do if(!IsLocallyControlled() && Role == ROLE_Authority)
And it will enter there on every other pawn except the local one (on the server)
But yes, on a dedicated server, there is no Server Pawn per say...
On a dedicated server I assume that if( IsLocallyControlled() && Role == ROLE_Authority ) will always evaluate to false (anyone, correct me if I'm wrong)
@brave moon You could either try to change the update frequency of the replication... Either you have a lot replicating and it gets busy (really check what you need to really replicate or how many times do you really need for each property to update), or it just isn't updating fast enough for your needs hence changing the update frequency (just a few ideas, don't take this as the right answer straight away)
Ok that makes more sense to me
Nice ๐
As long as the Server is the one defining the value and sharing it via rpc or rep var, it doesnt matter much.
To remove hacking you need to never trust the client and use dedicated server which are hosted away from the clients
@lilac gazelle
As long as you dont send the value at some point from client to server, yes
No, what the client does locally is up to them
They can set health and ammo to 10000000 anyway
It is Important that you never let them send that to the Server
The server already corrects you if you use the cmc
Try setting max speed only on the client
No, the cmc performs the move
Input is local
Youd need to dive into cpp to understand that
Yeah, they should already have made it anti cheat
Cmc is the charmovementcomoponent
In case that wasnt clear
For speed changes you use a repNotify variable
When sprinting, you set the variable on the client to minimize lag and directly adjust the max speed. Then you tell the server you want to sprint, he rhen sets the variable too. In the OnRep of it you set the max speed again
Variable here would be a float for example
Would rather adjust that differently
It is limited by acceleration of the cmc and max speed
Changing the movementinput scale is a bit weird
Cause that is only locally
Yes
They dont get out of sync cause the AddMovement later moves the vector to the server
Which then limits it by the settings of the cmc
So you wont run faster thsn 600 units with that anyway
At least you shouldnt :x
Well yeah
Setting things on the local client first is only to reduce lag
Otherwise the person who person who presses the button had to wait till the server gets back with the changes
You do have to do the changes with onrep or what ever you do anyway
Yes
Well not only
You wouldnt even set the var on the server
Cause setting it to the same value doesnt cause the repNotify to call anyway
Cmc will constantly correct the clients location
For example yes
Client rpc is enough as you wouldnt need to tell the other clients
This should only ever happen if the client tries to cheat anyway
E.g. Using energy for sprinting, server has 0 for energy and client changed the var locally to 100
Then the client says I CAN SPRINT but the server double checks the energy and goes nope
Yeah if wanted.
Could also let the local client suffer from correction warps/lags
They cheated after all
Depending on what the situation is yeah
Cause on the server the client uses the default speed
Yes
Client usually only does some fx for shooting
Server spawns the actual projectile or line trace to deal dmg
Yes
No biggie
Sorry my bad, ๐ท ๐ท This is the error, i dont undertsand why it is throwing the warning/ error. I need to know where to look at trying to fix this, It is my only problem holding me back from getting servers onto steam. i really need your help please
Anybody knows where's the character rotation correction comes from to Client ?
I see only SmoothClientPosition
I see SmothClientPosition also working with rotation
but it works with FNetworkPredictionData_Client_Character
Is there any way how to force to use my custom rotation ?
the cmc works offseting the mesh
somehow override it
rot and translat.
sure, you can create your own cmc
and override those methods
just track these variables
and make sure you set them everywhere they need to be set
The problem is that in my CMC for my special movement I am turning on and off replication
at the end of movement I am turning on replication back and set the final rotation which is correct.
byt the cmc sometimes overriude it to something old
why you do that, tho a special mechanic?
because CMC does not support custom movement
like Move actor from A to B
where I need to set distance , and duration
why do you say cmc doesn't support custom movement lol XD
you can do whatever you want overriding it
literally w/e u want
There is only Launch which is not what I am looking for
So even if I modify FNetworkPredictionData_Server_Character (ServerData->PendingAdjustment.NewRot to my rotation) it's still corrected
on simulated proxy only
Is not only that, thats the thing
You need even to modify your character
It has a method that communicates over net updates to the cmx
And pass info over to the updated component
You mean in ACharacter ?
If you know method names that would be cool otherwise I am at the beggining
hey there:
So I started with a steam / unreal integration. There where several issues which took quite a time to figure out. Due to the fact that documentation is pretty lacking I decided that I will publish a list which hopefully helps other devs in getting started and/or troubleshooting .
Just be aware it is the first time for me working with the steam framework and the game I am working is not shipped yet so this list is not complete.
โข Steam works out of the box in unreal. There is no need to setup. Just activate the plugin.
โข When testing the steam integration you need to have steam running.
โข Launching the game via PIE will not start the steam online subsystem. So PIE is a no go for testing.
โข The Standalone version seems to be fragile when trying to connect / host a listen server sessions. Sometimes it works sometimes not. Use a packaged build or start it via the DebugGame / DevelopmentGame targets. This could be due to the test appid.
โข When testing, both steam applications needs to be on the same download region.
โข For proper steam integration tests you should use two seperate machines.
โข The SteamDevAppId property in the DefaultEngine.ini is only for developme.nt builds
โฆ For shipping builds you need to put an steam_appid.txt file inside your win64 folder.
I hope this list will help fellow developers.
Thanks, MadSystem
feeback appreciated. will put this into a blog
So I started with a Steam / Unreal integration. There where several issues which took quite a time to figure out. Due to the fact that documentation is prett...
@thin stratus thanks for the pin ๐
Any idea where to look for replication issue? I use detach from component. When I drop "flag" for server it drops where it should be, for client I assume at 0,0,0 world location.
My drop and flag BP
And how can I set back collusion after I drop flag?
@dusty halo flag set to replicate/movement replicate?
gosh. Have set it to replicate but forgot about movement replication. It fixed the problem. thank you @dire coral
Do you know how can I set back colusion?
hm, set it on both client and server when the event happens?
wait I'm not sure I understand nvm. Did you try something already? is it working in one place but not the other?
It removes flag collusion after I pick up item. That is correct. But I want to set collusion back when you drop the flag
So I could set a logic, if player dies, he drops the flag and other player's can pick it up again
copy paste the set collision node? you will just have to manage some kind of lock/delay for the player who drop it so it doesn't insta pick it up
oh just if they're dead.. don't pick ๐
basically set it back to query only, or use set profile name instead
I need help with a respawn system
For some reason it dosn't set back collusion. Maybe I'm casting from wrong thing
I don't even see it in your graph
the flag can never overlap with post because collision is disabled to start with. try use flag ref
well... if anything else collides with that post i think you crash
not crash but.. null ref
try to debug if that ref is correct. does it actually detach?
you can try setting breakpoints(f9)/watches - that little arrow and watch
select node f9. open bp when it is running and change dropdown target
Ah but if I don't remove collusion, when it drops flag I can pick it up again. So seems like it detach
It detach, just debug it
Does anyone here have a link to a good multiplayer game setup with matchmaking from steam..? c:
@open gazelle now you know what would be useful? if you could explain to me how to load the Steam symbols for debugging ๐
(sorry I don't mean it in the way that the guide isn't useful, good job!)
@vocal dagger there are debugging symbols out there for the steam api?
as of now I cannot remember exactly but I couldn't find them at the time, also many people suggested me that building from source you can get these symbols
but the integrated Steam version doesn't have them (at least I couldn't find them)
i hardly doubt there any debug symbols out there for the public
wow really you think? but I mean that's the whole purpose of handing out the SDK isn't it?
for us to debug and make the games run on Steam
at least i cant find any info on their debuging page
one would think, if there where debug symbols they would be mentioned here
true, hmm I'll keep digging, I'm pretty sure I have seen some people using them while building from source but maybe I'm mistaken
Using Blueprints, how can I dfferenciate between the actual player controller in the listen server and the copy that the server creates? I'm talking when you launch the game in New Editor Window and not using dedicated server
Anyone has any ideas how to add collision?
Any good documentation (better if it's with BPs) for non-dedicated/P2P multiplayer? I don't f get why this is not working....
what does it mean to replicate a component with no replicated properties?
@cerulean hamlet I could imagine using RPCs to replicate it. What they mean is not using DOREPLIFETIME on the component itself
I was being silly, it's a dynamic component, so it has to turn on replication to be visible to clients
didn't know that's how that works
Has anyone has experience with a bizzare problem where, if you play a networked project from the blueprint screen, it works, but play it from the editor it breaks and sometimes vice versa? What could even be causing that?
Hm still can't figure it out. Probably I need to cast to flag and take it from there, only can't figure out from where to cast
Hey folks, I'm testing a bunch of multiplayer stuff. Yesterday when I had the players set to 3-4, 3-4 windows each with their own logging window, but today I'm only getting a single client game window and a single logging console regardless of how many players I set
This happens both with play in new editor window and standalone
Ok setting it to run on single process, then changing to run on client, then changing it back to not run on single process ๐
@halcyon abyss ?
if I initialize a client player controller on the handle starting new player event... I spawn a pawn, but soon after something somwhere makes the controller possess a spectator
this is after seamless travel
Been struggling with this issue for so long
I just want to initialize clients, and be sure that goes through
no matter what
it is a mess to test, cause i always have to package the game and put it on steam
Anyone?
@halcyon abyss see
I'm listening ๐ and thank you for the attention! ๐
Hmmm currently debugging this multiplayer game, and it looks like every player has the same player controller?
Nevermind... I didn't have the "server options" under world outliner for some reason. Maybe too many players being simulated or something. I'm having an issue assigning default start locations to the players as they enter the map. I've overridden ShouldSpawnAtStartSpot, PostLogin, and ChoosePlayerStart of the game mode. The functionality is working somewhat because I can see when playing as a listen server I get one player spawning at team one, and the rest at team two. Should I be hooking this into game state somehow? I was under the assumption the game mode would set the player start locations for each person and replicate it to them accordingly.
is there a way to test local multiplayer via pie splitscreen?
if I initialize a client player controller on the handle starting new player event... I spawn a pawn, but soon after something somwhere makes the controller possess a spectator
this is after seamless travel
Been struggling with this issue for so long
I just want to initialize clients, and be sure that goes through
no matter what
it is a mess to test, cause i always have to package the game and put it on steam
Anyone knows why my mouse X-Y movemnts when i transfer to a new level only works when i hold the right mouse button down?
is there a way to create a session without requiring a player controller to be active ?
a online steam session to be more precise
@ruby wraith advanced sessions always need player controllers to create advanced sessions. if you're using Josh's plugin. just use player controller 0
here's an example that includes a servername
@twin juniper yer but is there a way to advertise the server on the steam master server list without having a player connected. my understand is that a player has to be connected for there to be a session created?
yes. SebatnikTV posted a vid on that. a few months ago, its on youtube. you can advertise either listen or ded servers using his approach.
yer that is the video i was following along with @twin juniper but i am getting a warning/error when my ded server runs. which is this. and im not sure why it is throwing this warning. i dont know where to start looking for this auth login in either
you have to make sure that steam is running, and make sure to create the session using the dedicated flags as sebatnik shows. other that that you'll have to debug it. i dont use steam net driver in my game anymore, i use ipnetdriver now
@twin juniper awesome thank you for the input anyway mate ๐
yep. also make sure ur defaultengine.ini file has the steam lines
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"๏ปฟ
In theory when playing from my listen server I would have 2 PC right? The actual player and the server copy. Is that correct?
A ListenServer is Server and Player in one
A DedicatedServer is only the Server and Clients connect to it.
@thin stratus Then.... well, the thing is I cannot access widget/HUD stuff in the Listen Server. I assumed it was because it was somehow defaulting to the server PC, but if it's the same then I don't understand why it doesn't seem to have access to HUD/Widgets? Do I need to use a special condition like Has authority? Is local controller? or something like that?
Well, it depends where you try to access it
HUD and Widgets are local per Player
Means that they are not meant for replication and shouldn't at all care about the game being multiplayer or not
With this said, each Client only knows about their own HUD/Widgets
The Server, (ListenServer here) is also a Client and should only care about their own HUD/Widget
The Server can't access the clients widgets or HUD
@glacial lotus
Following these, rules you should be easily able to access each players HUD by making sure that you target their connection (e.g. a Client RPC on the specific PlayerController or Character/PlayerState) and accessing the HUD from there directly or via GetPlayerController0
The Server would do it the same way
(just minus the rpc)
Generally you handle the ListenServer as just another client
Thanks!!! ๐
Have anyone tried limiting control rotation with PlayerCameraManager:InViewYawMin/YawMax/PitchMin/...? It works perfectly in editor but not in build
I'm using dedicated server and I understand that its client-authoritative mechanism
there is no reason for anyone else on the network to know your camera position
each PlayerController has its own PlayerCameraManager
and it should be handled locally only, where IsLocalController == true
I mean that functionality of limiting control rotation is client authoritive. But the question is not about it. The issue is in that limitating view is working in editor but not in actual build with dedicated server and client. Has any one had this issue?
Hey guys, I am having some trouble with Server RPC's being called from my client. I made a forum post about it here: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1495440-server-rpc-cannot-be-called-on-the-client
So I have just started working on a new project in Unreal which is intended to be a simple networked multiplayer game. What I have done so far is make a Weapon
Basically I am spawning a Weapon to the player on Begin play, and I want to handle the spawning of projectiles from inside the Weapon class
my setup works on the listen-server, but not on the client. The client just won't call the Server RPC, unless I make another server RPC for the player's input to call the weapons server rpc
@thin stratus @everyone I have create project multiplayer with server host and server dedicated...when I connect client to server host work all well, when connect client server dedicated many function not work well, why? where is different with server host and server dedicated?
@visual elbow and the weapon is ?
Actor?
is it attached to the character?
you getting any "No owning connection for... ServerFire will not be processed." LogNet entries?
actor
I did get those yes
But when I spawn the weapon I am giving it the spawn params with the owner as the player character
@winged badger
did you call Attach?
iirc it is required
basically weapon has to be in AttachedActors list of your character for the RPCs to work
hmm
ok i will try that
thanks!
That didn't seem to do anything
Here is how I did it inside the player controller:
CurrentWeapon->SetOwner(this);
CurrentWeapon->AttachToActor(this, FAttachmentTransformRules::KeepWorldTransform);
you are doing that server side?
and CurrentWeapon variable is replicated?
also, it would make more sense to attach the weapon to character's skeletal mesh then to something amorphous as PlayerController
yea I have just changed it to attatch to the players skeltol mesh
Here is how I am spawning the weapon:
if (IsLocallyControlled())
{
// Spawn the character's weapon
if (StartWeapon != NULL)
{
UWorld* const World = GetWorld();
if (World)
{
// Set the spawn paramaters
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
SpawnParams.Instigator = Instigator;
// Spawn the pickup
CurrentWeapon =
World->SpawnActor<AWeapon>(StartWeapon, SpawnParams);
CurrentWeapon->SetOwner(this);
//CurrentWeapon->AttachToActor(this, FAttachmentTransformRules::KeepWorldTransform);
}
}
// Attatch the weapon to the grip point on the player
if (CurrentWeapon != nullptr && Mesh1P != nullptr)
{
if (CurrentWeapon->GetMesh() != nullptr)
{
const FName GripSocketName = FName(TEXT("GripPoint"));
CurrentWeapon->GetMesh()->AttachToComponent(
Mesh1P,
FAttachmentTransformRules::SnapToTargetNotIncludingScale,
GripSocketName);
}
}
}
Before I didn't have the IsLocallyControlled check in there, and it would spawn two of the same weapon on the players
the CurrentWeapon field is not replicated, it is pointer to a WeaponClass
the weapon class itself is marked as replicated in its constructor
if you're calling CurrentWeapon->AttachToActor(params)
and the variable is not replicated, that will not work
or it might not work
depending on the rest of the setup
nah, it would still work the way you're spawning it
i think it may be something with the owning actor being problematic
Because RPC's invoked from a client can be dropped?
that runs client side only
unless its a listen server host
so weapon is not spawned on the server at all
yea but even after I remove htat the same issue occurs
try if (Role == ROLE_Authority)
spawn the thing on server, attach it on server and let the weapon being replicated handle the rest
so studied up on some client prediction stuff.
Just to make sure I got it right, we basically send and receive ping between client and server and using that ping prediction we tick our components forward by that amount?
for whatever we're attempting to predict
with the IsLocallyControlled() check there is never a Weapon Actor at all, nothing to receive the RPC
how would that work @jolly berry , that would limit you to 5 FPS with 200ms ping?
nah I think you only do it once
at spawn
so for example, I pinged server and found I had about 200ms of ping
ill fully describe all the steps cause its a bit more than that
gimme a sec brb
kk back, had to take care of something
ye I read all that too
definitely appreciated it
- Client and Server both spawn a projectile, one is simulated, the other is authoritative
- Server sends a replication packet containing its own spawn location, rotation, velocity.
- Client receives this one time replication packet and syncs up to the server.
- Client using it's current ping to server, ticks the new synced up projectile forward by the predicted ping amount.
- Client and Server both now have a relatively synced up projectile. ๐
wanted to type it out in one block
With Vlad I'm not 100% sure what deferred spawning would accomplish, but that's mainly because I'm still trying to learn the specifics of these things. It seems like the attempt is to simulate the IC's latency, but I think they shouldn't be responsible for that. Server is still authoratative and all OC's should just attempt to simulate as close to the Server as possible, given their own Latency to Server.
When the IC receives the sync replication packet, and then forward predicts the projectile with its latency, it would effectively be doing the same thing as when the OC receive the spawn replication packet and then forward predicts with their own latency.
In theory, if ping was static and unchanging (ofc its not) then this should have all clients sync up perfectly. Unless there's a part I'm missing. In my case I'm not deferring any spawning other than OC waiting for the server spawn event.
@fleet sluice
@jolly berry If you and I both have a larency of 50ms and you fire a projectile, I need to ignore the first 100ms of my simulation and start it at FireTime+100ms, hence deferred.
Unreal Tournament doesn't do that. It starts at MyLocalTime-YourPing-MyPing and then accelerates my simulation, trying to sync it with what you see on your end. Guess what? Sounds good, works questionably at best.
@thin stratus tk man
@fleet sluice ah I think we just misunderstood each other. I thought u were deferring the spawn (i.e. delaying it and spawning it later).
Instead it sounds like you're just spawning it ahead of it's simulation?
When you say ignore the first 100ms, you're saying whatever location it would've been at 100ms is where u spawn it right?
Calculating where the instigator sees it and spawning it there, if even needed. For close range, sometimes it doesn't even need to be spawned. There, I'll just add some FX on the other clients, kind of to show where the path or something. Haven't got to the visual side of it yet.
Yes
ah okay yes I understand where you're coming from then
I left the system as a tangled mess a while ago, where the next part was establishing the latency thresholds for when to simulate or not. I'm currently focusing on a bunch of new plugins, though, so it's unlikely I can finish and share it soon :/
nah its all good
Is there an easy way or best way to replicate data found in large groups of actors + a single timestamp during a single replication call?
So would something like this work well? :
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
float TimeStamp;
UPROPERTY()
TArray<FVector> Vectors;
UPROPERTY()
TArray<ATestActor> ActorsTheVectorsBelongTo;
};
But that doesn't feel like it'd be the best way to send bulk amounts of data
And i'd have to copy vectors and actors each time i want to replicate, which is about 20 times a second.
@winged badger he tagged me by mistake ๐
@cyan bane what's in that Vectors array?
@winged badger I've written custom actor movement networking. So it's the locations of those actors. I'm also sending Quats of those actors, but i didn't add that to the test struct above to keep the example more simple.
custom movement or not
they should still know their transform
oh, this is a part of that
i don't think you save by separating timestamp
I need to send the TimeStamp of when the server is sending that data, but it'd be a waste to send loads of Timestamps if i can send a bulk of data with 1 timestamp
unless you overhauled the entire networking, different actors will send their bunches at different frames
but by saving the bandwidth with single timestamp
Well adding a TimeStamp to every actor, which updates at 20 times a second, adds 80 bytes per actor.
If i have replication in each actor, is the NetGUID sent behind the scenes each time replication happens?
It is, the client does need to know which actor is being replicated
but its sent once per update
have you looked into CMC's remote procedure calls?
Very much so
you could compress the data, if you insist on sending it in a single bunch
you don't need 15 digit precision for location
so you can make a struct with a custom (de)serialization
but i would definetely keep the movement updates inside actors
just feels... inelegant the other way around, and you do lose some room for optimization by separating it (like CMC won't replicate Velocity to owning client)
Well right now i'm using NetQuantize_100 for Location and FQuat for rotation, but i was hesitant to add another float in there for TimeStamp
Because that already is a lot of data per second
TimeStamp here is servers timestamp at the tme of sending?
Yes
that data should already be around, without you sending it separately i think
In each replication call? o.o
each time client receives a packet
i would be very surprised if it is not timestamped
physics involved?
Nope, i dont need velocity, which is sent by default
I made my own struct to strip that out
you could assume a stable net update frequency
then send the new timestamp only if there is a significant deviation from expected
That's what i was doing, but it deviates a lot. And it was causing a lot of jitter.
Even with updates being every 0.05 seconds, it'll deviate a whole 0.01
ish
Hmm, i can investigate why there's deviation that large
I've been using ForceNetUpdate
i am not a big fan of forcing the network to be Reliable, or Forcing updates
lots of people with vanilla CMC end up with a lot of jitter just because they overdid the Reliable RPCs
and all ServerMove functions in CMC are Unreliable
I'll try changing my replication to unreliable and removing ForceNetUpdate
Reliable is for stuff that has to get there even if its seconds late
for movement i'd rather not have an update from 2 seconds ago just land whenever it feels like getting here
@winged badger interesting point. i have almost all of my RPCs marked as reliable. do you think if i try to reduce my reliable RPC count this may reduce the net latency i am seeing on my ded server with my game?
firing weapon?
if it fails to get to the client on the first try
its actually better if it doesn't also arrive late
cool. i will try to look into that. hadn't thought of it's impact.
If i use unreliable might it arrive out of order? Then requiring a TimeStamp?
it will not resend it, if its unreliable
i guess it can arrive out of order, but you would ignore everything prior to last processed TimeStamp
but it will still call it right?
it wont just not happen at all?
if i want to trigger something visual, for example, probably a good case to use unreliable
Hey folks. I'm attempting to add custom start locations to players as they connect to the server. I alternate through each player in PostLogin, and add them to a "Team" map stored in the game mode, which I then use in ChoosePlayerStart to return the correct start location. It appears as though only the server (when using a listen server) gets the alternate start location and everyone else that connects gets the same one. Anyone have any thoughts on where I'm going wrong here?
Hmm, will all of my player controllers be the same if testing with a dedicated server locally? I have multiple PCs with the exact same name/memory address
Ok, so one issue was assuming PostLogin gets called before ChoosePlayerStart. The other (I think) was using play as client in the multiplayer options. This solution works in case anyone else is trying to do something similar.
I test dedicated server in editor and its ok. Player controllers dont seem to be the same.
Yeah just a logic error on my part I think. It's working as expected now.
nice
@dull stream did my guide help out?
havent gotten to amazon stuff yet, but i have it saved
not for amazon, i meant getting a dedicated server built from the project launcher
oh. I dont remember that, are you sure that was me? I know you gave me some gamelift stuff
nope lol
I followed a wiki for dedicated server
I'm going to try out gamelift soon. Any of you experiment with it yet?
I have not, but I plan on it eventually.
i gave you a guide on source building unreal, source building the game, and getting the dedicated server .exe running and then migrating it to a dedicated server in the cloud.
@teal crest the problem with gamesparks is that it's a bit outdated, the 4.19 / 4.20 features are not really up to date and you have to write custom code for RPCs
gamesparks / gamelift
ahh yeah it did have a section on building the dedicated server. I had already done that though ๐
the part I havent done is getting it on the cloud
fairly straightforward. just upload your server .exe and run it
make sure ports are open
really? wow, I assumed there would be more to it honestly
are those flying things any more developed than the vid u showed me last time?
Im working on a few things. Actually if you want, you can playtest it with me. Gonna need to build it first
โฒ , cant
np another time for sure
learning CPP right now
fun lol
i was going to suggest a few things though
you should add a UI and add more weapons and try to start getting actual meshes with textures in there. work on lighting too maybe
I added a healthbar, but thats about all there is when it comes to UI at the moment
you can also have an animation for when the player casts the fireballs
that auto fades into fly anims
other than that looks cool
yeah that would be nice hah. there might actually be an animation with the paragon assets i could use
right now my animations in general need a lot of work, theres no blending or anything
i just switch animations when velocity directions change
so much to do ๐ฎ
do you have a singleplayer campaign yet
heeeell no, Im probably just gonna stick with multiplayer honestly
as much as Id love to do single player, I dont think its feasible if i want to push it out in a reasonable amount of time
players like when they can play singleplayer and get a feel for the game for a while. you might sell more volume if you do that.
i initially wanted my game multi only, but thought about that and decided to add a singleplayer campaign
I might add a sandbox mode of sorts
like a flight range
but idk, I would have to do AI and missions and all kinds of things, not to mention art
you can add a open world with AI that spawns in waves
i have that as a level in singleplayer called "skybox"
and the player has to kil the ai's in each wave and only after all AIs ar dead does the wave increment
hm true, that wouldnt be too bad actually. use existing maps
yep plus really easy to spawn in
i did that
you can spawn in random box meshes too for cover
make their size random but find some algorithm that spaces them out evenly, make a min / max size
but yeah. def keep going with it
yeah i do pretty much everything in CPP
ah ok cool i remember you told me
well anyways, i gotta get going. lmk if you have any multi questions
will try to be on later
will do ๐
Hi people, I have a problem.
I start 2 player dedicated server in Editor and trigger the event which is Multicast and I see there is no problem, it all works. But when I start 4 players and do the same scenerio, the editor crashes
I was using multicast in wrong place. Fixed it.
we can't help you without a crash log and your code
anyone ever had issues with certain types not replicating? e.g. FTimespan, FTimerHandle
EDIT: only UPROPERTY variables in USTRUCTS can be replicated and it seems like FTimespan doesn't have UPROPERTY on its members.
@scenic tangle yeah i already reported this years ago
https://answers.unrealengine.com/questions/585179/problem-correctly-displaying-utc-datetime.html
was logged under issue UE-22533 and apparently marked as FIXED but the issue has been reopend again logged under issue UE-57403
https://issues.unrealengine.com/issue/UE-57403 now set to backlogged.
the workaround for now is either make your own custom date/time struct and mark them as UPROPERTY
or just break the struct into indivdual variables and replicate them on their own then recombine the struct the other end
ooh ok interesting, thanks for those links ๐
I'm having some serious problems with the rope component - Its not replicating smoothly and 'freaks out' when used on multiplayer.
I'm using it for a lasso weapon. All other functionality for the weapon works fine. I've checked the replication boxes.
Has anyone used the rope component and replicated it?
hi ho , who can help me ? I did a team deathmatch mode, now i want that, if you are in a same team you can see the names overhead but only same teams . My Team Var ist saved in my PlayerState . How i can do it ? Any idea?
do i need steam authentication to list my server on the steam master server?
how come this never works for anything but Static Mesh? I just want a one-way location&rotation replication of the RootComponent which is exactly what this is about
@glossy vessel No.
@glossy vessel As a follow up on Vlad's answer: You only need authentication if you want only Steam players to join
Otherwise, without authentication, everyone can just start the game and join
So also people who pirate the game
@verbal wave - only native functions of the UCharacterMovementComponent are replicated with this checkmark.... so Physics for example - is not replicated and needs to be done via Server. Anything that is custom done - animations that use RootMotion - need to be ran as server & netmulticast - so that they appear to other other players (replicated). Physics and Rootmotion are challenging at first in Networking - but once you understand the rulesets - they come pretty easy.
@worthy wasp thanks for cleaning that up. static mesh actor uses it too but only partially (uses the checkmark but not Velocity Quantization Level since there no velocity rep for static mesh physics). so it's a little confusing.
can you have rcp's inside a uobject, thats owned by an actor?
or even just a regular c++ class?
Pretty sure you need the reflection stuff of ue4 to at least take care of creating the proper RPC code
UObject might work, but then you are really just moving it through the Actor anyway
Hey I'm trying to setup the OnlineSubsystemSteam for my multiplayer Steam game but when I compile I get this error:
OnlineSubsystemSteamPrivate.h(28): fatal error C1189: #error: Steam SDK not located. Expected to be found in Engine/Source/ThirdParty/Steamworks/{SteamVersion}
Thought I do have the folder there... http://prntscr.com/k1bd68
Please @ me if you answer
Hey guys from some time I try to figure out how to make a good team selection screen system but i canโt find a solution, so I try to check on internet but all video and forum answer didnโt help me, now I found this one, in your opinion is a good base to make the team logic?
https://m.youtube.com/watch?v=lIZYq72n8qQ
Here we continue with our Character Select screen and provide the functionality for selecting and assigning the selected character for our server/clients. We...
Anyone have experience using the mobile mount node and know if it could be used to mount a pak for a PC game?
Hey guys,
i am trying to make the client show that its joining the server after finding the match, like in fortnite after it searchs it says "Joining server"
-Decode
is this possible with beacons?
Take in consideration that my game is based on this one series https://www.youtube.com/playlist?list=PL3TrrCsmmxllnBvhucQ4c683a2VltXBx6
@tawny parcel Pak on PC are mounted when placed into the right folder
The Mobile ones are for downloading data additonally to your apk to get around the store size limit
@umbral adder Has nothing to do with beacons. Fortnites Joining Server exists cause they have a custom backend.
If you want that, then just Show the text and delay the actual JoinSession node by a few seconds
@spiral badge Team Selection isnt Character selection. Plus the preview already shows weird coding style
@umbral adder Idk how your system works. Generally you can do everything. You just delay your joining attempt
oh after join session u mean
@thin stratus did you have a good tutorial for the team logic?
@umbral adder No, before.
ok cool
The default joinSession node instantly ClientTravels. You wouldnt have time to Show the text
@spiral badge Really depends on what you want
Usually you save the team of a player in their playerState, replicated
Then you have some button in your UI to select a team, or switch a team.
Pressing that should ServerRPC on the PlayerController or PlayerState and change the team variable of the playerState.
Thats it. Well and then updating the teamlists if you have any
Oh not really easy to do ๐๐
There isnโt any tutorial for it right?
@thin stratus thank you anyways
Not sure, I mean it isn't that complicated. You'd need to understand replication itself though.
Have you read my compendium (Pinned to this channel)?
I canโt understand bro i am soo sorry what you mean with: โHave you read my compendium (Pinned to this channel)โ
I am not really pro in unreal BP i am doing a series to learn it and have some fun but the team selection is a little bit hard
I was thinking about character selection to โsimulateโ team
(Sorry for late answer i am at work) ๐ฉ
@fringe dove 4.19 uses Steamv139 so I have to download 139 version instead of 140?
@thin stratus loading content appear's before u search match
any idea's as to what is that?
in fortnite
@spiral badge :D What do you mean you don't get that?
It's a simple question: Have you read my compendium? If not, it is pinned to this Discord Channel.
It helps getting started with Multiplayer
@past totem You might just want to use the SDK files that already come with the engine
Which are 139 then
If you want to update the SDK version, you need to modify the Steam Plugin (C++)
@thin stratus I'm using this tool https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/38640-steam-setup-utility?67565-Steam-Setup-Utility=
Build powerful visual scripts without code.
No idea about that
@thin stratus i am so sorry now with the help of google translate I understand ๐
So yeah i found it before and it is a really good documentation but is too big to understand especially at first engine step (just a year max 2 of knowledge)
Anyways thank you ๐๐ป๐
How do i make sure if an actor dowst have an owning connection, to not call the function?
this falls under role authority right>/
@deft plaza Sorry?
Owning connection goes through the PlayerController
Which only the local client or server has
RPCs on non-owned actors are dropped already
Well ServerRPCs it is
@thin stratus Yeap - I have that portion working fine (working on a patch system). I need to mount/unmount paks as needed from a non-content directory.
Why non-content?
What keeps you from copying the pak into the right folder to let UE4 mount it automatically?
what if i would make a steam integrated multiplayer and pack a server version of the game and it is free on steam tools so if u own a server you can download the "Server" version for free and then can start a steam multiplayer that is 24/7 online but the server version doesnt spawn an actor to the Server so its 0/64 for example could that be an option ?
What does SetReplicateMovement do exactly? My actor and its movement seems to be replicating ok without this flag set. Digging into the source code a little bit looks like it handles some stuff with attachments/physics, but I'm not 100% clear.
@lilac gazelle are you setting your NetUpdateFrequency and MinNetUpdateFrequency?
Well the default min update frequency is like 3, try setting them both to 60 just to see if that's the cause. Then tweak it to your needs if it is.
No worries. Can't say for sure that's the issue, but it's worth a shot.
Couldn't tell ya. Maybe someone more experienced would know.
Hey Everyone
i tend to make images to show what i mean to make it more easy to understand for people
What i show there could that be Possible?
Like Building 2 Games but 1 is only for Hosting games?
You would have an Dedicated Server build that would be downloaded from the "Tools" section
Grr. So I have a multicast event in my game state, I call it from gamemode on postLogin.
The multicast calls an event dispatcher which notifies stuff that a player joined
well I have a UMG widget and I bind to that event dispatcher in construct
it doesnt seem to work at all, not sure why
Have you tried in an Standalone game?
The delegate may be getting called to early, the Widget may not be constructed yet when the delegate is fired.
PIE creates things typically alot faster than an standalone build will
okay so I kinda thought that was the case, so I had added an InitializeScoreboard function. I call it before binding to the Login Event and add entries for every playerstate that already exists
this actually does create entries, but it doesnt always create all the entries. for the ones it doesnt create, I assume that the delegate would catch them
but it doesnt
Is it marked Reliable?
yeah, i tried with and without reliable
When are you creating the Widget?
uhhh good question
Your GameState may not be valid on the Client yet.
HUD begin play creates the top level widget
hmm
okay I will throw in some debug statements on my cast
idk, but it has to be valid because it does add SOME of the entries
sometimes
at least, when i do the initialization of the scoreboard
the delegates arent firing though when new players join, it seems
im adding entries in two spots right now basically. both in constructor. One basically gets the player state list from the game state and adds the entries from there. Then after that, I bind to the delegates, which should be triggered by postLogin from gamemode via the multicast
sorry this is a little confusing lol
its essentially something like that
and in OnPostLogin in the gamemode, Im calling that multicast
๐ค
I dont see anything wrong with this
Is there something wrong with your ScoreboardEntry functions?
Nope, it just creates the widget. It works sometimes
just wanted to know what is partybeaconstate?
is it a host,client or hostobject?
It's just not creating widget for all players consistently
Delegates never fire it seems
So it's only the initialize scoreboard doing anything
But that function just iterated through the player stated in gamemode and calls the same scoreboard entry functions
Playerstates*
just wanted to know what is partybeaconstate?
is it a host,client or hostobject? [REPOST]
Im looking around decode, since Im stumped anyway lol
?
Im looking into your question
I cant even find it in source, is it in 4.20 or something
no it started in 4.15 i guess
what the hell
its a cpp class only
oh oops, dur caps sensitive search
still not showing anything, weird
what is the class called in CPP?
havent touched beacon stuff yet