#multiplayer
1 messages ยท Page 547 of 1
oops
does anyone know why sometime there is a slighty delay in replication
after i added the player states and game state
for some reason, when i shot an enemy (another client) -sometimes- it just doesn't register hit for few secounds on the client
the HandleDamage is done on the server
and if i just keep clicking it just starts calculating damage
automatically
i didn't have any issue like that before
am i overloading the server?
it happen -someimtes- for few secounds after i revive the player
okay upon further debugging, it turns out for some reason the shot is sometimes not shot in same direction at the client?
and the server lol
after restarting the play
it takes few secounds sometimes and then it shoots correctly
Can someone please help me with some replication issues I'm having?
Just want both players to be able to push a block around on a grid but only the server is currently able to do so, I've been trying a lot of different things
Also this is using blueprints
I can post screenshots of everything but don't want to clutter the channel as it would be quite a few
Explain what you did and how it doesn't work
Ok so firstly I added a collision box around the block so that I can do a cast to the player character and set the owner for a player when they walk up to the block.
I have made a custom event which has "Run on Server" setup. I call this when I want the block to move. It has the parameters for the direction the block should move. This performs a "Move Component To"
In the FirstPersonCharacter BP when the character walks up to a block and presses the interact key it calls a function in the block BP which then sets the direction it should move based on which side of the block the player is.
This then calls that custom event which runs on server
So I'd have thought that the server would then move the block and it should replicate this movement for all clients
It moves for the server player when they do it but does not update for the client player. When the client player goes to push the block, nothing happens for either player
And I do have replicates and replicate movement enabled for the Block BP
Alright, so two issues here
First thing : you can't use RPCs (run on server) from client to server, on an Actor that is not owned by the client.
That's a basic safety measure in UE4, only player controller, possessed pawn, player state, and actors owned by them, can call RPCs
The good news is that you do not need RPC at all, because collisions happen on the server too. Just make the collision check only on server and it should just work.
Wait sorry just to clarify, what I want is for either player to be able to walk up to the block and hit a key ("F" in this case) which then causes the block to move
Then the easiest way is to have the RPC on the player controller or pawn, depending on where the action was implemented, so that the PC/pawn can trigger the movement on server directly
Basically have a "f key pressed" server event
Ok so, just to make sure I understand. I should have my player pawn, when they press F then run a "run on server" custom event which does the movement?
I would have a "f key pressed" server event on pawn, that then tells the block to do the movement, on server
Ok so Press F calls "F key pressed server event" which calls "Move on server event" in the block itself
Sorry, this whole thing is a bit hard to get my head around but I'm starting to get it ๐
The block itself doesn't need to be "run on server" itself, really, for it should never be called on client in the first place.
The important thing to understand is that clients and server each run their own Blueprints, and replication/RPC are only there for synchronisation. It's tempting to see RPCs as a single checkbox that you tick to make something run where you want, but you really should think in depth about whether a particular part of your graph should run only on client, only on server, or both
Thank you so much for all this! Its almost fully working. Just got one small thing which I should be able to fix
The way you explained that helped a lot
can someone please explain why the client playercontrollers doesnt posses the spawned pawn?
only server playercontroller possesses
in theory this should work i think?
@shrewd tinsel I more or less copied what you were doing. It seems to work fine from a client's input in the controller. So I'd check how you're calling SpawnMe Maybe put a print on it and make sure it's running.
I mean I can put the input in the pawn, but it's going to have the same result.
thanks for the help
thats for confirming it works, it must be something with my script or something
Just to make sure I moved this to the pawn and it's still working.
@kindred widget thanks my dude
i solved it
it didn't work because i called the event from "Any Damage" which is excecuted only on server
it clicked with me when the button pressed trick work
I'm curious as to why changing the steam version number in the Steamworks.build.cs has no effect when I try to play in standalone or when I hit the launch button. It says that it's trying to load version 1.47 but I have set it to 1.48 in the .cs file.
I'm not running the source engine.
You can't upgrade the Steam SDK version without source build IIRC
Not that you would need to do it
You first need to get the SDK from steamworks, you can get it free without NDA just login with your steam account on partner.steampowered.com/ or whatever
then replicate the folder structure that 146 has as 148
But you don't need that.
For a launcher build you just need to set the OSS to Steam and it just works
If I've got some actor that implements some interface, and I want to send that interface-implementing actor over RPC so I can call interface methods on it on the client, do I send that actor enveloped in a TScriptInterface?
Guys does all the clients share gamemode bp or do each client have their own gamemode?
Because i know each client has their own player controller.
Game mode is server only
Yes, only on that hosting player though
Remote players don't have game mode at all
can someone tell me how to stream level instances in multiplayer
last time i tried it the server boots players connected
i have create and join session nodes and both print string with success, however, after the join session node is executed succesfully i still don't see any other players in the level etc
That's normal
Sessions are not multiplayer
They're a way to share information about the game
e.g; lobbies
You need to actually join the game too
You say "node" so I'm assuming this is advanced sessions, dunno how that's supposed to work
You have two key concepts
UE4 multiplayer support, which relies on the UE4 replication system
And sessions, which rely on Steam, or whatever online platform you are using
Joining a session may or may not make the player connect to the actual game hosted by the player
Well i made a simple online game with join with server ip just a few months ago
i used create session for that
and no steam
just pure game
and port forwardgin
Sessions won't work on the Internet without an online platform
Multiplayer will (that's what port forwarding is for) - so you can actually join someone with the IP
Sessions are meant to avoid IPs, but in turn, they require some kind of centralized service
In the particular case of Steam, it also removes the need for port forwarding but that's another topic
I think i just used open level and listen in the options column
Alright, but that's multiplayer stuff, not sessions.
okay fock sessions
Do you know of any onlinesubsystem non steam based platform?
EOS, GOG, and of course the PS4, XBox, Android, iOS...
Switch etc
Each commercial game platform has its own, with our without UE4 integration
Okay let me rephrase question
We cant use those. Need something where we have control over.
Then obviously you need to create your own service running on your own servers
What would tunneling accomplish in the context of friends, matchmaking, or achievements ?
I was recommended ngrok but couldnt get that working
Friend + matchmaking etc not need. Its not for gaming. So yes we are trying to do something that is not a game on a game engine
Which feature do you need ?
That's quite unrelated to online subsystem though
Online subsystem is mainly friends, matchmaking, achievements, in app purchases.
Technically you can use Steam's VOIP based on extensions to the Steam OSS but i mean, for P2P, OSS is out of the picture entirely
With a bit of self engineering you dont necessarily need it. I specifically only need the replication using sessions and the voip handling that it comes with it. I have go it connecting direct p2p voip using onlinesubsystemNull with STUN and portforwarding over the internet, but wanting a better way where we dont need the portforwarding part
Replication and sessions are unrelated
Hmph
Alright, let me explain a bit more because you're conflating different things
Okay
OSS stuff is meant to get the public IP of a friend, or (in some cases like Steam) abstract the IP layer entirely to allow all traffic to go through Steam, preventing DDOS etc. In the case of voice, Steam also has voice support, but you're not using that.
So now, what you want is basically the Null OSS but that works over the Internet, apparently only for the purpose of port forwarding
What you need is some sort of NAT punch. Steam uses libjingle internally to perform it for you, so you can take a look at that. If you're not going to have matchmaking, or friend lists, or achievements, then OSS won't do much for you at all
Long story short. We want basically the oss null functions for session initation and voip talker function that can be attached to it over internet. Sorry should have led with that
So "session initiation" - what would that be ?
Thanks for the suggestion. I shall have a look at libjingle. Would you know of any exisiting NAT traversal solutions not tailored for games?
What I can't stress enough is - sessions are meant for matchmaking, or joining / inviting friends to a lobby
If you don't have that, you don't really need sessions at all
Noted. Will reconsider
can i get PlayerController from PlayerState?
I wasn't able to find a more elegant way to do this, so the way i did it was iterate over all player controllers until i found the player controller who's state matched the state i was looking for the player controller for
You can just cast the owner
ah nice
but if theres no pawn i guess it fails
you can?
well thats the best way yet, haha
cast the owner?
awesome!
Player States never used to keep track of the pawn. That whole thing is a bit of a mess tbh
ok my turn for a question, haha, in the begin play of the player controller, it runs on both teh server and the client, how do i know if its the client?
awesome! thanks @chrome bay
MAN, thats basically exactly what i was looking for i think
Probably want IsLocalController(), that just means it's a controller that is used by a 'local' (aka this machine/instance) player
i have a dedicated server but also can be a listen server, so what i was doing right now was doing an rpc to server only, then from server to owning client
i knew there had to be a function somewhere but i didn't know what it was
yeah, i'm pretty sure thats exactly the function i want, thank you!
do you know what the difference between islocalcontroller or islocalplayercontroller?
IsLocalController() works for any controller, islocalplayercontroller() is just a convenience thing
Sicne you have AIController and PlayerController etc
So it'll only be true if it's both local and a player
how do you guys manages multiple game modes with the map? is there anyway to automate having multiple maps each with different game mode a la Call of Duty?
you can set a specific game mode for a map in world settings, and you can also override which game mode to use with a parameter in the open level function
Hello friends! Has anyone here ever had to deal with several player controllers per client in an online multiplayer game? I'm trying to achieve that atm and I'm struggling. Currently, I have set up a lobby where I create 4 local players for each client that joins the session (my game is a 4-player-coop game). The reason why I create 4 local players (and thus 4 player controllers) for each client is because that is the only way I found to detect every potential controllers connected to the client's machine. At this point, when a player presses the start button on their controller, I set a bool to true that indicates that this particular player controller will actually be used during the following game. Finally, when everybody's ready and just before transitioning to the play level, I need to remove the extra player controllers that are NOT in use. Basically, I just loop over the player controllers and check the bool I set up earlier to know whether I should keep or destroy a given controller. That's the part I'm struggling at rn. I guess I didn't find the proper way to destroy a given player controller because I always end up having the 4 player controllers created per clients after the level transition. So, my question is: How to properly destroy a local player (and its associated player controller) in an online game context? Thanks in advance for reading/helping (sowy for the text wall). Take care, cheers!
why would you do all this hacking instead of using the normal split screen support? it already has internet multiplayer support
@chrome bay Just wanted to make a major thank you mention to you. I finished a pretty major hurdle today by getting the first major part of my inventory system working. It's nothing more than drag and drop UI stuff, but it's fully replicated to all clients and should work well for a small coop style. And I'd probably still be struggling a lot with it without quite a few of your tips on C++ help!
I'm kinda confused on how I'm suppose to get a specific OSS interface implementation
^This doesn't work, obviously
But neither does casting it
So I'm wondering how you would actually get the FOnlinePresenceSteamPtr?
Hello friends. I am struggeling with the concept of having areas that multiple players can share simultaneously.
I have a lobby where 6 players can run around freely.
Lets say 1 player challanges an other palyer for a duel, I want to teleport these players to a seperate room for duelling.
In the meantime the other palyers can still run around the lobby and chat, emote etc.
No problem till here.
When 2 other palyers want to duel and get teleported to the same duelling area as the previous 2 players: How can I make the first 2 players (and effects, sound, decals) invisible to the other 2 palyers and vice versa?
My different approaches:
- Clone the duellant room and place it somewhere in the world.
- Try to make each duellant group invisible to others.
- Maybe run a new server for each starting duell and transition the players to the servers?
Thanks for your ideas!
You're more likely to have more luck with different rooms rather than dealing with changing a lot of different collisions and visibility factors. At least from the little I've seen.
So create a duplicate for each duel? Can I create a sublevel/streamed level for that and place multiple instances during runtime?
Hi @fleet raven Well, I believe I already use the split screen framework. For instance I call "CreatePlayer" to create a new local player (or RemovePlayer to do the opposite). I want to achieve something similar to what's done in Overcooked2 where you only need to press a gamepad button (circle) to add a player. In Unreal, in order to detect button push on my different gamepads I needed to create several local players. Is there any way to detect inputs on gamepads that are not linked to a player controller?
In addition to Load Stream Level and Unload Stream Level, the Get Streaming Level function enables even more dynamic streaming behavior. Since it gives you access to the actual level streaming object, you can modify and query its state. Using this function in combination with Create Instance, you can also create and stream in copies of a specific sublevel. By applying transforms and sending parameters to these copies, you can create procedural worlds.
https://docs.unrealengine.com/en-US/Engine/LevelStreaming/Overview/index.html
I think i go with this approach.
Streaming Levels can be loaded with Level Streaming Volumes or programmatically with Blueprints or C++.
@bitter oriole I tried with just the OSS to Steam, and it didn't seem to work. So I had downloaded the latest steamworks SDK kit and followed the documentation provided by Epic and it won't change.
There is no need to download anything
Just set this in DefaultEngine.ini
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"```
Nothing more required.
@fleet raven sorry for just replying, just woke up
i think i read that you can do parameter like ?gamemode=<game_mode>
i guess you just use open level with <map_name>?gamemode=<game_mode> as argument?
saw this too but i don't understand really understand this latter part where he used prefixes
I followed this tutorial for multiplayer, and I got it so that you can see the other player. However, you cannot see objects the other player interracts with?
its odd.
Don't know why but on server I cycle through all player controllers and create a character for each to posses. It works for client but the host keeps changing possessed characters and not sticking to it's original one
So whenever I create a new character for a client to posses the host also posses that character .
:P Show code or we can't help.
Has anyone every touched the steam A2S_Rules?
I'd like my server to expose a ton of information and the standard 128 byte limit on Gametag's isn't enough
(I'm using steam btw)
The GameMode actor (server only)```
I was going over documentation for seamless travel because I thought GameMode was supposed to persist on the server and I found this in the documentation which supported my theory, but I have a structure in my custom GameMode that becomes empty after seamless travel occurs. Any reason?
These look like they aren't implemented, yet Epic's code makes calls to them. It's from an interface, but I don't see a class that implements it...
quick question. i would like a ref to the controlled pawn for another player so that i can update some HUD elements (team). problem is gamestate->playerstate only has access (from what i can tell) to your own pawn. i am assuming this is the wrong way to go about it and instead i need to create a team array in my gamestate so that i can have access to this info as needed. thoughts?
Gamestate has a built in array of player states already, you could use that.
@fading birch yes agreed. the private pawn appears to be NULL for 'other' players in the playerstate.
this is my issue.
The server can see all of that. Are you using a ded server?
You should have the server update that and the client just receives the updates.
What are you trying to do exactly?
a simple team HUD on the client that has attributes of the possessed pawn.
so basically i need a clientside ref to the pawn controlled by other players (teammates)
yeah
ok great
heres the rub
so create an array of pawns on the server. (im imagining i can add to the list on possess)
i cant replicate that .... right? or does replication magically ensure that pointers point at the same thing on the client. dubious.
you can just use the PlayerArray from the gamestate on your server and get your pawn that way
pass whatever you need to to each client
oooohhh you want me to move the attributes that i care about out of the pawn s
for example, say you want to have the name of each player in the array, you can set the playername in the player state (you can have the client do that), the gamestate will then have those variables. You can have your server tell clients that information
yeah
that's what the player state is for
thanks. makes perfect sense
^^
you can theoritically do it all from your pawn, but there's no point in doing that when it already exists in engine code
random question, anyone ever have issues with on landed not replicating correctly?
they could host their own server or you could host it permanantly
I have a thing where if I click on an object I addForce to it to push it away. However, if you do that the two players start to see different things - the player that clicked sees the object fly away and the player watching sees nothing.
Did I do something wrong?
UE4 Multiplayer Tutorial Blueprints
In this video we will create functionality that will allow us to play our game with a friend. :)
Discord: nusun#1898
I just followed this tutorial.
From my research on the internet, physics and multiplayer don't mesh too well? And I should use c++ for greater control over whats going on
hm, does anyone have any good documentation on running a dedicated server with steam online subsystem?
everything i'm finding is on earlier versions of UE4
I'm getting Steam API failed to initialize
i had this working previously, but i'm not sure what i broke and what is going wrong
i'm getting this
[2020.06.06-05.35.39:383][ 0]LogOnline: STEAM: [AppId: 0] Game Server API initialized 0
[2020.06.06-05.35.39:383][ 0]LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
[2020.06.06-05.35.39:384][ 0]LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
[2020.06.06-05.35.39:384][ 0]LogOnline: Warning: STEAM: Steam API failed to initialize!
[2020.06.06-05.35.39:384][ 0]LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()```
but i certainly do not have a client running on the same machine
oh for some reason it;s innitting appid 0
this is probably why its failing
ooooh
its using the wrong appid
Not sure I understand the difference between OSS functions that just have a "Checked" added at the end. The comments on the functions are the same
For example: GetExternalUIInterface() vs GetExternalUIInterfaceChecked()
@plush wave It will call a check() which ensures that it returned the ExternalUIInterface.
I believe the check() is skipped in shipping but can be useful during development.
yeah, Checked functions "crash" if they fail
crashing on a failure there is very helpful in some situations
like if you have some critical code that just can't fail
and if it does fail, you have an unrecoverable error in your logic
Hello! Any professional UE4 dedicated server developer here? Want to ask some questions regarding compiling UE from sources
@rare hound compiling from sources and "professional ue4 dedicated server" something difference..
i missed the word developer ๐
@rare hound english your native lang?
nop
@rare hound I've not enought eng level, can told in russian abotu it
im Russian ๐
@rare hound enjoy ๐
If you spawn a replicated actor deferred on the server and before finishing the deferred spawn you set a few properties on that actor, will the client get the same changed properties or would you need to replicate those down separately via COND_InitialOnly?
The properties should be gathered at the end of the frame IIRC so you should be fine
Deferred vs normal spawn shouldn't matter though
@chrome bay So clients get any custom non default properties the server sets on a newly spawned actor before the initial replication "for free" without those properties needed to be replicated?
Well they don't get it for free as such, it'll just be part of the initial "open channel" packet
All the replicated properties will still rep
Ok thanks, I'm just basically checking if I still would need to replicate those properties or not as they only are set once at spawn
As in if the client basically gets a copy of what the server spawns initially
Or if the client just gets the ID of the thing to spawn meaning he will not know about any initial changes to the default properties on the server
Unless they are replicated properties
hey folks, I got a weird one I could use some help with.
On my On Landed event, I do a fall damage check and an check for which end animation should play. Randomly it appears to "apply" the fall damage of one player to another player. However, it does not make sense in how it is applying. I cannot work out how to resolve it, I just have a list of symptom and how they relate.
-
(primary issue) CharacterA falls, CharacterA Survives the fall; but CharacterB dies
-
CharacterB both reports and does not report taking damage; when it reports taking damage the number calculated doesn't seem to make sense (it neither matches the damage CharacterA took nor does it make sense in other ways) ; in some cases it reports no damage but still triggers the death even (which is only called by the damage event)
-
(When the primary issue is caused) The issue only occurs to happen when I use the shift key (which triggers stamina use).
-
Related to the above point, when the player jumps a bool is set (to true) for checking if the character is jumping, the same bool is set false on the landed event. However, when certain special events (that use stamina) are called, such as dodge events, they check if the character is jumping (using the bool I just mentioned) and should not go off if the bool is true, they are going off and reporting the bool as false. I have tried, replicated variables set on the server and it has the same effect.
@novel siren It sounds like you're having some replication and reference issues. In short to avoid many issues, usually you'll RPC to the server to set your statebool(bIsInAir) on the server. Then let the server version set it again on land. You'll also RPC to the server to tell the server that you want this character to do your stamina stuff like dodge. Almost everything on the client side of the pawn should only be used for cosmetic effects for the most part. It's hard to point out what could be wrong without seeing what you're doing though.
Tried with RPCs to have the same result, which makes me think the player is not clearly being set some where. Stamina oddly is replicating fine, using RPC. I am about to test a different RPC setup, and set the calls in a slightly different manner
the damn bug is so inconsistent that it takes ages to work out if a solution worked or not
Not sure about RPCing the stamina. It should just be a replicated variable.
the character stats are set in a custom component, which numerous structures to build the character attributes and abilities. Stamina runs on a timer for regen, reductions, etc.
Thus the RPC on stamina was to make sure the timers and all the associated functions worked correctly. As I said that part is working without issue, when its by itself. In fact even when the above bug is described (which is in the health related functions), the stamina check remains correct for both players throughout. The health check, which is in the same component does not. It does only seem to go off (and key word is seem as I cannot reliably determine when the bug will go off) when I use stamina on one player
anyone know how I can serialize an AActor* reference?
is it as easy as Archive << ActorReference; ?
I think we had that conversation before, unless it was with someone else, but basically serialize the name of the actor, or a unique ID of your own making, and then when you deserialize you can find the actor with that name or ID and set the pointer to it.
do I have to do that? Will Ar << Reference not work?
(I AM planning on doing exactly what you said ๐, I'm just curious)
No idea what it will do. I have never used the UE4 serialization system
Yes, I use JSON for saving instead
Oh
well after a few other set ups to taht RPC I can now replicate killing the wrong player (without the correct one) dying...
also worked out it is not a jump event, I made a fundamental mistake... the issue is purely on the landed event.
What's the bp/cpp code to disconnect from the game as a client?
can't seem to find it
Is it possible to disable rotation replication while keeping everything else replicated in movement component?
for some reason, when I spawn a pawn from the server, the world rotation of the camera spring arm is not in check with the pawn's rotation
for example
if my pawn is facing 60 degrees to the left, the spring arm and camera will still have 000 for all rotation axes
Spring arm is probably set by control rotation
exactly
when I possess the pawn, it goes inline with the pawn's rotation
I am trying to set the view target with blend to my new pawn, and it only goes to the right camera location when I do it on the server
But if I run the game in PIE with 1 player and no dedicated server, it works normally
this is how It is supposed to look
this is how it looks when Im not the server
Ok I see the problem
for some reason, only the server sees the correct rotation for the spring arm
the client thinks it's 0,0,0
Hello! since I am a big fan of multiplayer games and I plan to develop my multiplayer game, I still have some questions:
1๏ธโฃ Is it possible to make a Steam game hosted on AWS GameLift? I know about SteamApi and managed to make a game and connect P2P through Steam.
2๏ธโฃ Does anyone know if there is a tutorial or something like that for AWS + Steam?
3๏ธโฃ What would be the best procedure to make a dedicated server for a multiplayer game?
Yes it is entirely possible to make a game sold on steam that runs AWS servers
You should take a look at online subsystems
first make a simple multiplayer game, then learn how to integrate it to AWS
@XZ thanks a lot for the answer ๐
So both players as spawned and told to posses by server. Don't know why when the player attacks all other characters also play the attack animation. ( they don't replicate the jump so whats going on??)
Code to spawn an posses executed on server
Hahhahha that looks so funny and enjoyable to play
blast
I'm still having issues with steam dedicated servers
it's still loading with appid == 0
but it's not throwing any of the error log messages to explain why
@warped stream Thank you ๐ But not gonna be anything to play haha multiplayer is doing my fucking head in
usually something very simple when it comes to an issue like that, check control input
Hey guys, good day!
I have a packaged game in 4.23. I'm trying to launch the .exe in server mode using this command:
TPSGame.exe /Game/ThirdPersonBP/Maps/ThirdPersonExampleMap -server -log -nosteam
It works fine, the server is launched. The problem is that a client game window is launched as well. Is there a way to prevent a client from starting? Or to set the num of players to 0 initially?
is that happening when you set to 1?
I'm running the server from a .bat file, maybe i could set the num of players to 0 but i'm not sure if there's a parameter for that.
@gleaming vector What version of unreal are you on?
4.25
and linux dedicated servers?
no, windows
it doesn't seem to be craeting the steam appid.txt
or reading from it
Ahh okay, was going to say I had issues with 4.25 and linux because of this https://issues.unrealengine.com/issue/UE-93277
But I didn't test windows servers
Does anyone have experience with the advanced sessions plugin breaking the packaged game, e.i. it crashes immediately after launch (which can only be observed using task-manger, it does not create a window). Why is this and how do i fix it?
Also, I'm using advanced-sessions 25.0
@normal isle wdym check control input ?
just realized it might be something to do with the animation blueprint. In the anim bp you cast to thirdpersoncharacter to get the needed variables. Maybe both pawns are using the same animation blueprint or something like that? Or can a controller posses two things at once?
im actually so confused to why this is happening
argh
im still failing to run my dedicated server
appid is being created, but not for the dedicated server app
but even then, it's giving me appid 0
come on epic, why is this so freakishly hard
@normal isle I mean i just use this the attack event just changes a varible and the attack animation plays
hey every one i have a really weird question , i have a game where a bunch of actors follow a head its been working good and i just got it smooth replication through a replication function but it is extremely bad (Multicast and in Tick()) when i kill the player but what is very weird is that the sparks do spawn after some wait and also for other players theres no lag nothing , instant !!!! so if i dye and your flying past boom sparks no prob , but i litterally dont see mine for awhile its very strange please anyone willing i would be greatful for help
void ASnake::KillPlayer()
{
if (Overlay)//remove bottom right score counter
Overlay->RemoveFromViewport();
dead = true;
ClientKillPlayer(size);
if (Role == ROLE_Authority)
{
for (auto i : Segments)
{
i->SetActorTickEnabled(0);
i->SetReplicates(0);
//i->BeginDestroy();
//SpawnSpark(i);
//i->Destroy();
}
CanPickUp = false;
CollectionSphere->DestroyComponent();
Head->DestroyComponent();
for (auto i : Segments)
{
//i->SetActorTickEnabled(0);
//SpawnSpark(i);
i->Destroy();
}
//Segments.Empty();
SpawnSpark(this);
CurrentForwardSpeed = 0;
ServerChangeCameraAfterDeath();
Destroy();
}
}
How do most games handle ai in multiplayer
After adding like 10 ai the clients all start to lag
And an ai in my case is basically a sentient player
All the standard player logic
Just blackboard driven
if a single AI is 50 replicated actors, sure, it would lag with 10
that snake should be one actor
and you should never replicate anything clients can figure out with data that is already replicated elsewhere
it not only wastes bandwidth, but any interaction with separately replicated systems has a replication race potential
hey what is the best way to open a level for all clients?
Zlo so if the snake is a pawn followed by actors there probably alot of rework to do?lol ๐ just brain storming here people have said I should look into static mesh instances or something like that just want to here your take on making it one actor before I do a wrong move with a ton of work, should I do some kind of static mesh instance, i feel like I could loose collision then ,
@polar wolf server travel
Thanks @fading birch, just looking into how that works now. I think you need a proper session set up for it to work?
will entire struct be sent if only one property in it changes?
hm, have a trouble with steamapi.. Api deploy and works on same machine where server was compiled.
But not working on dedicated server(Game Server API initialized 0)..
what can average dedicated servers handle in terms of bandwidth?
My config which solved a somewhat similar issue with masses of characters replicating movement:
[/Script/Engine.Player] ConfiguredInternetSpeed=100000 ConfiguredLanSpeed=500000 [/Script/OnlineSubsystemUtils.IpNetDriver] MaxClientRate=500000 MaxInternetClientRate=500000 NetServerMaxTickRate=30 LanServerMaxTickRate=30 MaxNetTickRate=30 [/Script/Engine.GameNetworkManager] TotalNetBandwidth=10000000 MaxDynamicBandwidth=500000 MinDynamicBandwidth=5000
@split drum are these settings even feasible for many players?
gotta pay the price somewhere, game would just require a lot of bandwidth to play
i haven't gotten to a point where I have wide-scale player testing to find out
based on my tests though it seemed reasonable. Bandwidth use never really came close to the max specified there
my game would be made of deployable servers, it'd make sense that the people who pay for the servers edit the bandwidth to their needs? though, optimization of bandwidth still required but I need not worry since im not paying?
Why is this event not working when i go from the lobby map to game map with servertravel?? It works fine if i start the game in that map.
Nvm i fixed it by turning off "Use Seamless Travel"
Does the Player Array of the Game State reliable have the character controllers in the same order on all clients?
Oh Wait, the player array contains the player state?
Hi Im trying to get the Advanced sessions working but I'm a bit confused by this step: https://forums.unrealengine.com/community/community-content-tools-and-tutorials/41043-advanced-sessions-plugin?69901-Advanced-Sessions-Plugin= If installed at the project level you need to Create a C++ blank file in the editor to allow it to package out the plugin - If installed at the engine level you do not need to do anything else.
Advanced Sessions Plugin
Updated 05/05/2020
Plugin now has two modules, one is AdvancedSessions and one is AdvancedSteamSessions, this will allow me to tie more Steam specific functions in without forcing the steam subsystem to be packaged out with projects that don't wan...
asin I dont know what to name the file or anything
anyone who can give me an example of how it should look like?
nvm managed to do it
hey is replicating an array practical?
i have a snake game and a tarray of segments i want to replicated the number of segments , should i just replicate an int32 and have checks to spawn if the server has more?
Hey anyone know how to multicast replicate, my player replicates this int 32 fine and the server but my player doesn't see it's other players in the world ๐๐ญ
Is replicating information in C++ cheaper than replicating info in bp?
Hello. How can use the restart player for respawn players on their player start? I have set the find player start and when the player choice the team the spawn work, but now I need to restart all player position on the their relative player start when the game start.
Somebody knows why Steam Advanced Session not works on dedicated host/virtual machine?
I always got error : Warning: Steam Dedicated Server API failed to initialize.
Instead this, it works on machine where it(Server) was compiled..
omg.. Is anyway to run SteamAPI without steam installation?
How run dedicated servers without it..
@twin juniper All of those values are way above what any connection could tolerate anyway
500000 bps per-client is bonkers. We have 100 players, and we're set to 15000.
Not that it really matters, there's no hard-cap. That's just the point at which Unreal considers a connection "saturated"
True, you'd expect it to be spread over frames though
when multicast is called, it automatically replicates to only relevant players right?
yeah
Reliable multicasts used to affect things outside relevancy range, but they fixed that sometime ago IIRC.
Is there a single global UPackageMap, or is there one instance per actor (the replicating actor in question)?
What I'm interested in is: Can I GetObjectFromNetGUID() with an object that's not the calling actor itself?
Does anyone know why a Dynamic Multicast Delegate would not be reaching the blueprint for the host? It works fine for PIE but when deployed it's only triggering at the BP end for the client. It's definitely being broadcast in C++ too.
This is my "Find player start"
@unkempt tiger one per client connection IIRC
the character change their rotation but don't spawn or change location. Any suggestion?
Thanks @chrome bay!
@buoyant wedge Not sure what your problem is, but my initial thought is wondering why you're trying to get a reference to the GameMode on a client?
why does a widget get created on my client for each player in the lobby? The widget is created inside the thirpersoncharachter and for each third person spawned a widget is created
@light fog You are probably creating the widget for each character on spawn or something. Which means once on every client, per each character.
yeh so for client 1 each time a new client joins client 1 gets and extra umg added to there screen. How do i stop this from happening ?
@light fog Character is a bit of an odd place for a widget anyhow. But I suppose if you want it to stay there, just check if the character is locally controlled.
@kindred widget I checked if is locally controlled and its still happening ? Does that mean that the client has control over the other third person pawns ?
multiplayer hurts my head soo much
Only one of the pawns can be locally controlled.
Hi so i'm trying to "Fade In" when the player is spawned and completely ready to move around. i have everything set up but idk how to make the player start with a dark screen? every time it lags a little then it goes dark.. How can i fix this issue?
@kindred widget Ok got it working thank you ๐
I made a macro for that kind of like the IsValid node. I use IsLocallyControlled quite a bit.
@kindred widget Ill give that a try , Ive got one more problem that i have no idea how to slove https://discordapp.com/channels/187217643009212416/221799385611239424/718925980399566939
When i click the attack button both third person characters player the animation when only the controlled one should
How are you calling the attack animation?
so when u left click (attack) it changes a varible within the thrid person pawn. The anim bp cast to third person character on update animation to get the varibles changed
@kindred widget I'm wanna respawn at the player start the player when he die. I think I can do it with the restart player but I don't know how set it
@buoyant wedge I just meant that it looks like you're trying to get a reference to the game mode on a Client. Input starts on the client always and you're trying to reference GameMode there. Your GameMode Reference should be invalid unless you run that on the first character of a listenserver.
@kindred widget sorry for pestering but any idea? Ive been looking for a solution for a few days now and have no clue.... :/
fuck sake sorted it out. I should have used try get pawn owner instead of get controlled pawn when castring to thir person character in my anim bp
when i hit M, i see the player try to reset position and rotation... but not spawn with the "find player start" on the game mode.
Why does my widget not show up when i'm using "Seamless Travel" in gamemode??
Without Seamless Travel:
With Seamless:
ok guys i have fix my problem. I need to go on the player state and comunicate with the game mode for obtain the correct "find player start" ๐
the default Choose/FindPlayerStart functions in the GM select one for you, and stash a reference to it in your PC as StartSpot
it is not accessible from BP
there is also no way to get those 2 functions to assign you a different PlayerStart on Respawn with BP alone
i suppose for the HUD widget not showing after seamless travel, that'll entirely depend how you're spawning the widget
our game uses the old-school HUD class to manage UMG widgets
Question about GetPlayerCharacter. This works the same as the controller? Such as that GetPlayerCharacter 0 will always be the local controller's character?
Anyone on 4.25.1?
I'm having weird issue since last update when trying to connect other players
LogNet: TravelFailure: LoadMapFailure, Reason for Failure: 'Failed to load package '/Game/FirstPerson/Maps/UEDPIE_0_somelevel''
the issue is...it's all run from editor
and it was working fine before the update
i would never make assumptions about which character or controller is at what index on the client
Well, presuming that you're not doing anything local, there should only ever be one controller on any client since they don't replicate anywhere but the owning client.
yes but if you call it on the server for whatever reason then that assumption is not going to be correct
or if you have listen servers or standalone games with AI
though you didn't mention in what context you're wanting the first player character in
I just wondered if the GetPlayerCharacter call worked the same as the GetPlayerController. Such as if it used the player controllers to get the character reference.
{
APlayerController* PC = GetPlayerController(WorldContextObject, PlayerIndex);
return PC ? Cast<ACharacter>(PC->GetPawn()) : nullptr;
}```
but imo, in a networked game, you shouldn't really be calling these
I'm not using it for anything other than UI. It's never used in network code. In fact they never leave Widget or HUD classes.
well the UI already has the owner player controller
and i'm pretty sure there's a utility function for the owning pawn
does anyone know how to fade in camera when the player is loaded?? (Multiplayer so using "Start Camera Fade" will give a delay before it becomes dark and fade to 0)
will entire struct be sent if only one property in it changes?
Can someone help me hide whatever is happening with the clients before they actually start fading in? (Top Left is Host) https://streamable.com/9aqgmb
they are spawned at 0,0,0 waiting for a pawn to possess
So i need to spawn the pawns and posses them?
you would need to have the client possess some camera in the level maybe then when things are ready they possess their gunmen
cause it looks like the client starts the level, has no pawn yet (cause server delay) hence 0,0,0 then they get their gunmen and ready to play
So i do event begin play and make them posses something for a second then make them reposes the character pawn?
you could possess camera in ready up screen
you could make 0,0,0 some sort of "decorated waiting area"
or make your fade out graphic have everything black, and ONLY fade in when have real character
So you mean by the 2nd option to have the player spawn in a completely black area and when event begin play for the character pawn a change its location to its correct location?
i think more clever use of fade is best here. you need keep screen black for longer time. and only fade when character has gun in hand ready to go
ye 2nd option like a dark room at 0,0,0 works too
a dark box you know ?
I'm using the "fade in" in begin play of the level so idk how to fix that
Yeah i know
A dark box with only emissive color (Unlit)
Btw the loading screen does nothing its just cosmatic because i have no idea how to make a functional one
Anyone been able to package a project in 4.25 with nativization enabled that doesnt break multiplayer??
@winged badger I have set the find player start and now it's working with the reference to the player state. Is all make it in BP. I don't understood why you write is not working on bp ๐
We keep getting error C2248: 'UNetPushModelHelpers::MarkPropertyDirtyFromRepIndex': cannot access private member declared in class 'UNetPushModelHelpers'
Basically this https://issues.unrealengine.com/issue/UE-93196
Hey there guys, I made some progress on my game today but I got stuck in this issue:
- I have a spectator class for when the players die in the game, and I would only like other spectator to see each other, any suggestions on how could I approach this ? https://gyazo.com/02b59aa7bd75b50557a4443a59a13ec6
@hoary sandal let's say that you have set of spectators Spcs and set of players Plrs that are filled with references to UPlayerControllers. Once character dies you spawn spectator character and on server for each player, who's controller is not in Plrs set Visibility of spectator character to Hidden
@amber yew wouldn't that make it so spectators can't see each other?
It is client-side variable
So you just have to track that it is not hidden from other spectators
You can also move them to some other collision channel
anyone got a sample for multiple game modes? or tutorial regarding it ?
LogEQS: Warning: Query NewEnvQuery over execution time warning. Total Execution Time: 27.73 ms
generator[0]: 5.08 ms (items:1273) (EnvQueryGenerator_PathingGrid_0)
test[0]: 0.34 ms (items:1273) (EnvQueryTest_Distance_2)
Has anyone come across the error above. Found in logs of dedicated server build..
Hi
So in c++ im working on an inventory system for multiplayer. My thought was to have a bool return if an inventory operation was successful but apparently i cant return a value on a replicated function. Is there a way to run a return value somehow that im missing?
You can't no. RPC functions are inherently latent
I.e, you can't block all execution of your local game until the RPC completes and returns the value.
So i would just use something like a delegate then to tell the client that the inventory operation was a success? I have the inventory array on rep notify as well so i suppose i ignore if the operation was a success or not and just refresh the UI when something changes
Yeah that's how you would do it most likely
Personally, I pretty much always have my UI ticking and polling the game for info
im always trying to cut down on tick type systems and wanted to update only when absolutely required
Too many edge-cases (in multiplayer especially) where event-driven UI just falls apart.
gotcha, so the tick expense is worth the possibility of a missed event
TBH binding to events is probably fine I do that quite a lot for more involved stuff.
It just becomes a long-term maintenance thing when you have gamecode explicitly telling UI to update etc.
Can be very error prone
Depends I guess, if you have a very fixed-function game it could be alright.
i always go event driven there, and find there are very few edge cases around when you're using fastarrays
but that can't be done from BP
@dawn glen the documentation for those is in NetSerialization.h header, they are capable of per item callback on clients
I tried so freaking hard to keep a playerlist updated event based and I gave up at some point and made it the most performant tick i could
Unreal Engine 4 Tutorial:
- player child
- player list
- kick player (only server/host can do it)
- number of player
โฌโผโฌโผโฌโผโฌโผโฌโผโฌโผโฌโผโฌโผโฌโผโฌ
Do you have a black screen or an infinite loading screen?
This could help: https://www.youtube.com/watch?v=N8qoXas1wMA&feature=youtu.be
โฌโผโฌ...
Hello, Im trying to create a game using Unreal Engine in which the screen splits when a timer runs out. My problem is that it automatically requires a second controller, I would like to create an option of split screen where each screen is controllable by player 1. If you have any advice let me know.ย
-Thanks : )
Is it normal to use seamless server travel to go from lobby to game map?
I'm using non seamless now and it works fine but i was thinking if seamless is what I'm supposed to do
Has anyone here used ggpo? How do I actually get this into my project?
So in c++ im working on an inventory system for multiplayer. My thought was to have a bool return if an inventory operation was successful but apparently i cant return a value on a replicated function. Is there a way to run a return value somehow that im missing?
@dawn glen write a "valid operation" function and call it on client/server. If the client allows it, the server not, then there might be a desync (or server checked something client has no access too
Thats what I did everytime. And moreover, it saves the RPC bandwith. Never really encounteted problem and since it's some sort of inventory that should work well
If you next execution depends on the server approving/Dong something. You can pretend it in the client, and once the server evaluates, call an RPC on that client that rerolls the pretend if it was a bad one
Or if you have time. The server can call another rpc with a boolean for the next action. But then yo have to wait
any local-coop veteran in here?
is it possible to locally set the location of other players without changing their real position on the server?
Sure, just call SetActorLocation locally.
As soon as the server replicates movement though it will move there instead
@light monolith seamless travel doesn't require reconnecting, and also steam sockets won't work with hard travel
Is there a way to get the current Byte size of a TArray? I know how to use the Network Profiler vaguely, but I was just wondering if there was a more manual way I could look at data sizes just to sate personal curiosity.
sizeof(element) * size
I tried seamless but it doesn't change the player controller for the host/server.. Only clients
Can i use it to change maps or is it level streaming only?
its for changing maps, not level streaming
I used it on my game and everything works how to should for the clients but the host doesn't seem to execute functions that i have in my player controller
how do I use voice chat for my dedicated server. I am not using default session or matchmaking of UE4;
I just use NullSubsystem and my own backend. conenct by open command;
This is an old video, its non seamless but when use seamless the host (Top Left) doesn't execute the functions in player controller to show the widgets (the 500,500,500,500 one)
Anyone using Steam sockets notice a lot of latency when testing on the same IP locally?
Getting 60 ping usually when testing on different machines in the same room with different Steam accounts
When testing overseas I get about 100 ping
If I test on a local machine using the default net driver there's about 10 ping which is to be expected, any reason that the Steam socket ping is so high or is it because I'm testing multiple clients on the same IP?
Don't Steam sockets go through Steam infrastructure ?
Yes I believe they are routed but it still appears strange that I get 60 ping however maybe that is reasonable if instead of going directly to the host it has to route through the nearest Steam server which could be far away
Maybe it's just the way it is, I would be interested to hear if anyone else has a similar experience as I am noticing what seems like packet loss when playing in the same room (reliable events happening later than they should). I did not experience this packet loss when playing on the same build overseas so perhaps you are at the mercy of Steam's server connection quality
I believe the older Steam net driver had much lower ping when playing in the same room but perhaps doesn't route as much and connected directly, exposing the IP of each player with less security
a mesh started cloning itself on the server in pie. I have an intercation that rotates it, and it clones itself on top of rotation. what can be the cause?
now I understand, it's the child actor, for some reason when I spawn stuff with child actor, there's two of them.
what are the rules for using replication and child actors?
I'm working on a Blueprint project that utilizes Steam's Multiplayer Subsystem (including the advanced online session plugin) and am encountering an issue where a Host makes a LAN session, another player can find the session but will not join it. Making an Online session works just fine, but I can't get the LAN to work. Any ideas?
I've verified everyone is using the same download region which google searches seem to say can cause an issue. I have also tried playing in Offline mode with Steam.
Any recent or upcoming strides with reliable physics replication between client and server?
onrep events always happen after beginplay, right? even if they were an expose on spawn variable that made it into first bunch?
not necessarily
actually
onrep events happen before beginplay
unless the variable changes on server later on
later on not being the same tick the server spawns an actor
all replicated variables on an actor set/different from CDO at the time netdriver decides to replicate it for the first time are in the same bunch as instructions to spawn the actor, all are set before beginplay, and all onreps fire before beginplay
infact, PostNetInit() is what calls BeginPlay on actors on clients
I'm replicating a structure using ReplicatedUsing but the function does not seem to be called when the data is replicated. Is there a workaround for this?
ok so first time im working on networking and so far i have made every event reliable and i feel like thats not right. Is there any examples of events not to make reliable so i can get a image in my head of when to check/uncheck reliable
@light fog Make something Reliable if it can't afford to be dropped and 100% needs to be there for the game to continue. There is a limit of reliable events that can be pused at one time so it's best to use them sparingly.
Can the game continue without that UI update? If no, make it reliable
In my experience, unreliable still happens 99% of the time.
good question and it can hahah. Ok i guess ill just ask myself that every time i check the reliable box Thank you ๐
@light fog Score should be a RepNotify
@dark edge still kinda new ill look into repnotify thank you ๐
@bold heron only UPROPERTY marked members in a struct are replicated
if they are not marked UPROPERTY, they wont replicate
yeah I tried that. the replication was fine, the function call just never happened. I ended up just doing a function that passed the variable forward instead. It's a few more steps but got the job done.
I hope someone can help, this is local multiplayer question.
I have a checkpoint system for a racing game: everytime the player overlaps the checkpoint, the current checkpoint is hidden and the next checkpoint is activated.
Right now if player1 goes through checkpoint1, he will hide it and activate checkpoint2 for all players.
How can I tell the checkpoint system to be specific for each player? so if player1 goes through checkpoint1 he will activate checkpoint2 only for himself, so player2 has to go through checkpoint1 aswell to activate checkpoint2.
What could be the cause for a replicated actor being spawned on the client a second or two later than it should?
When I test with a listen server and 1 client, it works instantly every single time but when I test with a listen server and 2 clients there is often a delay before the clients see the replicated actor
Ok it turned out to need a higher NetUpdateFrequency in order to show up responsively. If responsiveness is extremely important and the actor doesn't have many replicated properties that do not change often (1 in this case), is it fine to increase the NetUpdateFrequency to say 30 or 60 to ensure clients will see it spawn as soon as possible?
Or if anyone knows a way that I can keep the NetUpdateFrequency at 1, using ForceNetUpdate() for important state changes but still have it spawn very responsively on clients, I'd love to hear it! I have tried calling ForceNetUpdate on begin play on the server but it didn't spawn any more responsively on the clients
Do you have that in empty projects too? Because it could very well be that you have bandwidth issues.
Hi, Does anyone here have experience with having persistence within unreal to have an actor persist through level loads. Currently using the Photon SDK for networking within unreal and stumbled upon Seamless travel which fixed the persistence issue at first... Now it seems like the level provided in the Travel URL of the SeamlessTravel function is not being loaded in correctly...
@thin stratus it works flawlessly with 2 clients (listen sever + client) even with lots of projectiles and other enemy characters moving around and doing things. If I introduce another client for some reason only those things that have a NetUpdateFrequency of 1.0f start often waiting the whole second before showing up on the client even though everything else happens more or less as it did before (as everything else has a higher update freq)
I donโt think itโs bandwidth related just because it works fine for everything else. Feels possibly more like a priority issue, Iโll try bumping that up
Otherwise Iโm going to have to keep the net update rate at around 30.0f to ensure clients see the spawned pickups right away as they should
But there should be nothing blocking that stuff
If you give it a higher priority etc. then other things are still doing shit
Yeah there shouldnโt which is odd
Like I said there can be 100 projectiles and 20 enemies
Nothing drops
Or 1 enemy
Can be an initial thing
And this pickup is still delayed
Are you replicating an inventory or something bigger to players?
No just a simple actor with 1 replicated property
That property is a pointer to a character
Which is null by default
It just seems to skip the initial update and I never noticed before because I mostly only tested with 2 players
Just seems to be something causing the pickup to wait the full second if there are more players
Then again it might be ok to have a higher net update rate because nothing is frequently replicating right so no more bandwidth will be used. That one replicated property can only ever change once when the pickup is picked up
It will only cause a bit less performance on the sever because it has to check if the value has changed more often, correct? (but worth it because of the responsive spawning)
Hi there. I'm currently planning an application where two clients share their live video capture via webcam. Each player should be able to see the his opponent over the player's HUD. So I'm wondering... How would I accomplish that? I'm totally new into network programming, but for my understanding I would replicate the media stream on the server and send it back to the client's HUD? Any help with that?
How do you replicate the pitch of the players camera to spectators
Hey guys what the set up to do VOIP with the advanced session plugins ? I made a post on the thread but I'll post it here too since it's for the game jam https://forums.unrealengine.com/community/community-content-tools-and-tutorials/41043-advanced-sessions-plugin/page163#post1773386
Advanced Sessions Plugin
Updated 05/05/2020
Plugin now has two modules, one is AdvancedSessions and one is AdvancedSteamSessions, this will allow me to tie more Steam specific functions in without forcing the steam subsystem to be packaged out with projects that don't wan...
TMaps don't support replication, right?
correct
Thanks!
I saw a thread that Epic was working on it in 2014 but wasn't sure if they actually implemented it or not
Hi
Have a problem with attaching actor
Each player sees the location of other players in different ways. This is achieved by setting the location for each player separately. The problem arises when dealing cards: first, we attach the card to the playerโs pawn and then play the animation of moving along relative coordinates. But immediately after the card is attached, it moves to another place (due to the different position of the pawns of each player)
if something is not clear I will try to describe as detailed as possible
Would you guys advise having a different GameMode for a MainMenu level?
hey guys ive been working on this snake game for ever lol ive got it to a really weird point i def need some help, its very weird whats happening, im able to attach these segments and then see them through just replication they are alittle jumpy on the snake tho, and they also start to stick in the screeen ......??? ikr they like stay in place on the screen when the snake gets big, but no matter how big everything like spark spawning happens perfectly , is there any way to fix this,,, also to add the snake is ok in the beginning just like always, ๐ฆ but i can only make it to like 50 segments before the lag starts to come in , is it just the snake replication packet getting to big, too much and just being lost?? thanks again i love all of you, i will try spline meshes next i just am praying for some fix for my current implementation ,
When making a game with hitboxes (swords/spells/etc) should both the client and server be checking hitboxes and then the client confirms with the server for a valid hit, or should only the server be handling hitbox-collisions?
(Unless there is another best-er practice)
depends on the game, it generally feels more responsive if client has auth over hits and server just does few sanity checks
coop games are not as impacted by cheating as competative as well
and dedicated servers won't tick skeletons by default
I have an actor with a TArray inventory that spawns on player death containing the players items. If the players bags were empty the bag spawns with physics enabled and falls to the ground as expected. If items are added into the inventory the bag floats in the air. The same code is called if there are items to add or not.
I know this is vague question but does anyone have any suggestion what might be causing this behavior ?
Does Steam have a callback for when DLC is enabled/disabled?
Fixed for 4.26: https://issues.unrealengine.com/issue/UE-24280 ๐ฅณ (Actors in sublevels do not replicate to Clients after Seamless ServerTravel)
https://pastebin.com/cdAUdmb4
Can anybody tell what happens..
Why dedicated server accepted public connections from steam users without client-side build?
Test/AppID: 480
you're using 480... its something that's publicly used.
Hey guys I have a weird things when someone presses alt+f4 in my game it move everybody to the menu screen but it's not showing the widget, what type of error is that consider, network failure or something else?
hey i have a much better solution to my issue but ive ran into a very weird issue, i am sending a small array of locations to the snakes on the clients but i cant access the replicant , like the array doesnt have the actor replicated to it, but i see it spawn in the world and just not move , and replicate is on through cpp and blueprint
so when i try to use this array to move the replicants i cant access the replicantes like this ```cpp
void ASnake::multicast_Implementation(FRotator Rotation, FVector Location, const TArray<FVector> & locations)
{
if (Role != ROLE_Authority)
{
UE_LOG(LogTemp, Warning, TEXT("Some warning message %d"), locations.Num());
SetActorLocationAndRotation(Location, Rotation);
for (int i = 0 ; i< locations.Num(); i++)
{
UE_LOG(LogTemp, Warning, TEXT("Some warning %d"), Segments.Num());
if (Segments.IsValidIndex(i))
{
UE_LOG(LogTemp, Warning, TEXT("Some warning %d"), Segments.Num());
Segments[i]->SetActorLocation(locations[i]);
}
}
}
}
the most inner if allway is false im wondering what else do i need to replicate the replicants. or access them
UPROPERTY(Replicated)
TArray<AActor*> Segments;
the Segments.Num()) is always zero , i would like to just be able to access the replicant im working on efficency and i know that this set location loop runs fine on the host (very fast ) so this might just be what makes it all work any suggestions are greatly appretiated
of course its not zero on the host but this actually only plays on client of course
- I have an actor with replicates movement on
- At some point in the game I "Run On Owning Client" a function which will move the actor, client-side
So, does the server version of that actor not move? The client is seeing it at "the wrong place"?
Because that is not the behavior I'm seeing, strangely enough the server's version also moves. I think.
Is it better to put the battle related functions onto the Pawn or the player state ? (Because both of those are replicateable, but one is persistent while the other is not. It doesn't feel like it matters in that situation though)
Or should I put them somewhere else ?
Can anyone enlighten me ?
What does waste mean in the networking profiler
hey guys so how can I have a unique identifier for my player we tried through player stat >> and then get the player ID but it changes when new players join
is using game instance safe in a networked environment for storing important user data while level transfer? Can the player change these variables using cheat engine or something?
for real can anyone tell me how to get ahold of these replicated actors , like a referance i want to change the replicants location, i can do it in the actor thats being replicated but that would kill bandwidth im trying to access them in the snake and quickly set the locations.
why can't maps be replicated?
Because they dont support Replication.
Yes I get that, I'm just curious what the reason is. is there some kind of technical issue with replicating a map or is it just something they decided to never update to allow replication?
map wha do u mean, like the lvl itself? and that was a stupid answer tbh lol
variable maps
I think the main reason would be the complexity of being able to support it outweighs the benefits.
i nvr used dictionaries in ue4 b4, didnt know they were refered to as maps.
I found them helpful in certain situations. Good for keeping a lists of statuses, or prices in a shop or something of that nature.
Maps are basically 2 variable structs.
Right..so it seems odd that it would be technically difficult to replicate a map if you can replicate a struct
yh lol
would a server wide save system be located in the gamestate? or would it be a multicast function in the player controller?
i currently have it set up as the latter where a post request is send to a webserver inside a multicast function in the the controller, but will that effect bandwidth or something?
the reason is most likely "because epic has never needed to"
I have a replicated actor that has a ticking function running on the server (this is just 2 player peer to peer, no dedicated server). This ticking function (actually a timer that loops every 0.01 seconds) keeps track of the lap timers for both player 1 and player 2. The client HUD and Host Hud display those. It seems to work initially, from anywhere from 40-60 seconds and then the client stops receiving updates. This will happen for about 30 seconds and then suddenly it will start getting updates with the correct time again.
Until it freezes, they are in perfect sync as far as I can tell
It looks like "always relevant" wasn't ticked on this actor, and ticking it seemed to allow the timer to update the entire race. Does that make sense or was that just a fluke?
@somber glade The Client is most likely out of NetworkRelevancyDistance
Therefore it doesnt get updated.
Ticking AlwaysRelevant makes it, always relevant as a networked actor.
It will always be considered for replication.
Ignoring any distance culling rules etc.
if I set a projectile's Velocity & Rotation on the server, will the changes be replicated to all clients or do I have to do a multicast RPC and set the Velocity & Rotation on each client?
@fossil spoke That may be it, I didn't set this level up, so I'm not sure of the dimensions. I know the default is quite big, but maybe this map has areas that take the player further away from it
@versed bear I think if the actor has replicate movement true all you have to do is set it on the server
hi everyone. i've been tearing my hair out trying to figure out why my game can't talk to steam at all. 4.25, c++ project, i've got the necessary bits in my DefaultEngine.ini, i've got OnlineSubsystem and OnlineSubsystemSteam added to PrivateDependencyModuleNames in my Build.cs, i've got the subsystem and steam plugins enabled, i'm previewing the game in standalone, i have steam open in the background.
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
SteamAppId=1346630
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
got this junk in my ini
got this in my Build.cs even though i've seen like two different conflicting things on whether this is even necessary
(yes i know that's bad form)
kind of at my wit's end here, would appreciate a savior
i hit Launch instead of Play (set to Standalone) and it worked. so..... not really sure what that means
steam client doesn't work in PIE
everything i read said Standalone would work
Hi Guys,
not sure 100% is this is where to stick this post, but ive been creating a plugin for steam (yes another one :D) and just upgraded to 4.25
I have updated project to 4.25 and any link to steamworks to 147.
i run my sample project in standalone and i no longer get ste...
well nevermind i guess, it's a 4.25 bug seemingly
right that's actually cooking and packaging. the bug in 4.25 is that Play -> Standalone has stopped working. it used to work previously apparently
oh, i assumed that was the same as clicking Launch in editor
its not
my bad, thanks for clearing that up ๐
Is it ok to ask in here for help with a blueprint based multiplayer game I'm trying to get working?
I want to have two different player pawns. One is the default "third person" player pawn and the other is a modified "motioncontrollerPawn".
I'm using launch flags to determine which pawn should be used for which player. If you have the "-nonvr" flag, it will be the third person player pawn but if no flags then it will be the VR "MotionControllerPawn". This works fine until connecting to a server instance of the game.
The server's listen client seems fine, everything is spawning and working as expected. When the VR client connects to the server however, I cannot for the life of me get it to spawn a VR pawn and have it be replicated to the server. No matter what I do, I can't seem to convince the server to spawn a VR Pawn for the client to possess. Does anyone have any ideas?
I'm sure I'm missing something simple (like for example if the player controller object is wiped when connecting to a server or something?) but I've been at this for a while and I'm not sure what I'm missing now
server can't know what kind of controller is connected to the client unless you explicitly tell it
is there an existing quat compressor somewhere?
one that can compress a quat to 3 floats?
Oh found it
Hi guys, is correct to assume that client events are ignored when there is no owning connection? Or are they executed on the server?
https://gyazo.com/35103f7ebd7b4939517e1b988d38f634 how can I make it so that the ghost see each other but the player doesn't see the ghosts ?
@hoary sandal Hello, I think you should override "AActor::IsNetRelevantFor" in your ghost class, you have a "ViewTarget" parameter which you check if it's the player and if it is, return false
cool I'm going to try that now
oh but this is a BP project
is there something similar in BPs that I can overwrite or has to be through C++
ah, sorry i don't think there is an equivalent in BP
When trying to make multiplayer fluid, (generic multiplayer RPG sword attacks, etc)
When attacking (assuming it is best practice to do the following:)
Client:Attack -> CallServerAttack -> Server verify / Multicast Attack
Should the client complete their attack while waiting for the response from the server?
(and then ignore the multicast attack) or should the client attack wait for the response
I imagine given enough latency it would make the character feel very unresponsive if we don't always assume their action was valid
You can have the client execute the attack and have the server replicate the attack to other clients. Damage should happen on the server though. @gilded vapor
Thanks @fading birch,
is there any common idioms to detect that the action has already occured on the local client (IE to ignore the multicast call)?
you could use an enum to track the state of the character, ie attacking, running, w/e and set it to ignore owner on rep
Yeah I have good-ol statemachine I was just wondering if there was something weird like
pass an AActor* and than when you get the multicsat call if AActor == this AActor ignore it
GAS?
Gameplay Ability System
oh sweet
it's what #gameplay-ability-system is for
it's a bit of a learning curve
but it's extremely network efficient
we actually use it for our FPS game
Oh sweet
The prediction part is fricken sweet
So GAS basicaly does the same thing as checking with the server for abilities, but than just has a rollback feature if the client actived an ability incorrectly
right
Yeah, I'm new in this server, posting a link to github with documentation about GAS is allowed?
There are two github pages, one has a lot of links to documentation and stuff and the other is a in depth view of GAS, not sure if i can post them here but search for them, they are really useful
Thanks @drowsy belfry yeah I'm actually on that page now
Just wondering if anyone else has experience with GAS,
according to their docs:
"Gameplay Abilities do not carry out their primary work in a "tick" function like Actors and Components do. Instead, they launch Ability Tasks during activation which do most of the work asynchronously, and then handle the output of those Tasks by hooking into Delegates (in C++) or connecting nodes to output execution pins (in Blueprints)."
Is this done for convienance or performance?
The framework seems like its pretty great
I was wondering if its worth migrating my current system to this as the curr sys is workable, but I feel like its not worth moving over if its a performance loss
Did some research and decided that its prolly worth it, at least for the net correction code if nothing else
The print in this sequence never reaches the clients, can anyone tell why?
Server runs multicast, but it doesn't seem to replicate to the clients...
Oh I'm silly, I needed to tick
๐คฃ
how do i access a specific variable from the player array. for example, if in the player state, there is a variable called username, how would i access it in the gamestate
nvm i figured it out
figured it out nvm
any one know what I'm doing wrong here?
everything
- you don't send reliable rpcs every tick
- you don't use rpcs for this at all
just call add controller yaw input on the client side
how can I figure out where a vehicle pawn is looking server sided?
GetPlayerViewPoint, engine keeps it updated via ServerUpdateCamera in the PlayerController
umm, can you explain that a bit more, I don't think I have enought infomation
Error 'Failed to load package '/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap''. Exiting. I only get this when the server tries to switch levels. Any idea why?
how do i properly replicate a tarray and will this give me access to the segments replicants i have it handling well , i would just like a more efficent way to get the replicants on the client and move them.
currently im sending the segments from the server to the client and assigning the client the servers value of the segments array , please help i just need a more efficent way to do ```cpp
void ASnake::multicast_Implementation(FRotator Rotation, FVector Location, const TArray<AActor*> & segments)
{
if (Role != ROLE_Authority)
{
UE_LOG(LogTemp, Warning, TEXT("Some warning message %d"), segments.Num());
SetActorLocationAndRotation(Location, Rotation);
Segments = segments;
}
}
@shy kelp is that packaged only?
Can anyone educate me on how to detect a forceful disconnect (server closes your connection without notice) on a FSocket?
Does anyone have a good resource for Actor vs UObject performance?
I've been resisting making an Object into an Actor because I had heard they were more performant but I'm curious what the difference is. Especially since it would give me access to blueprint libraries again.
it depends on what you're using it for exactly
Well lets say it doesn't tick and doesn't exist in world it just has some event based logic?
Is it intentional that multicast isn't executed on client if the actor calling the multicast isn't in the players viewport even if the actor is only a couple of meters behing the clients back?
And then after for example 5 seconds the client turns and sees the actor the multicast gets called?
And the multicast function is marked reliable
It's a bit weird but maybe that's relevancy acting
The actor is marked always relevant and net dormancy set to Never
Then it does not sound intentional at all
Okay the problem isn't with the rpc, it's a widget that doesn't update correctly
What can be the cause of a "ReceivePropertiesForRPC - Mismatch read" error in the server log?
it just started happening with an RPC that has been working fine for months, and hasn't been touched
clients are instantly kicked
Sounds like the properties are not being serialized the same way on server and client.
Could be the case if you've overridden NetSerialize() for a struct or something.
hm
I did add a new RPC and a new struct, but didn't even bother with NetSerialize for that struct, I would have expected it to complain about that one
You don't need to add it
But if you did add it and it wasn't setup right, this could happen.
I know
I was just saying that if anything, it would complain about the only thing that has changed
I'll investigate further
How can you determine if all players have joined from the previous map in a Seamless travel in order to safely start the match a player joining after the other players have spawned? (Since PostLogin doesnโt get called)
Do you manually tally up numbers in HandleSeamlessTravelPlayer and store a previous tally in the GI on the host to compare or something? Or just make sure there are a few seconds delay before starting?
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Replicated, Category = YagDice)
TArray<AActor*> Segments;
``` hey how come this tarray wont replicate at all , i dont know what im missing , the clients are all empty when the server totally has some stuff in them
DOREPLIFETIME(ASnake, Segments); i tried adding this to my snake.h cppright under the includes but it wont compile with that
Read the doc here : https://docs.unrealengine.com/en-US/Gameplay/Networking/Actors/Properties/index.html
Detailed information about how Actor properties are replicated.
It explains how to use DOREPLIFETIME
thank you !
Did the Advanced sessions plugin stop working for anyone else?
My old project and my new project DONT work, my old one did and the code is the same. the old one stopped working. did anything change?
Can anyone please help explain how to detect a disconnect from the server in a FSocket? (As in the server forcefully closes the connection) Can't find anything on the topic...
You also have to make sure those actors exist on client as well. You can't replicate an actor that isn't on the other side.
Maybe if I just repost my questions another 4 times someone will say something
hey guys i got the array to replicate and all but it seems to crash when adding alot and accessing at the same time which it does every frame is there any way besides .isvalidinex that i should use if i take the accessing line out the problem goes away completely
Sounds like you access the array at an index greater than its size
To be clear, having many (>100) objects in a replicated array is probably a bad idea
dang ok ill have to keep searching for better ways of going about this, the array is only the segments not the locations so its a bit better,
i have an idea to only update the array when segments are added, this is possible im about to do it , but when someone joins im going to have to rely on another replicatted component the size , so on begin play the segments for plp already in the world will have begin play called on them from the new players point of veiw??? right and then i can quickly exicute a costom replication function that adds all the existing seegments in the world to my replicants arrays , idk tho i already tried to attach the segments and it just did really weird stuff where at large size the segments just got stuck in place in the world like super stuck lagged idk that was the closest tho, i think 3d snake would smack tho if done right....
@abstract pike again it depends on what you're trying to use it for.
guys how i can make the filters in advance session steam
in create and find
where i have the error
Hello ๐ What is the proper way for clients to handle the usual "pause" menu? And exiting the current session/game into main mode?
@quiet fjord make sure you filter the found sessions before and after
the thing is, there are no engine specific filters. it just creates a string stored under that value name (in your case, gamename)
i was having an issue in #blueprint pertaining to client side prediction for animations. my current setup feels very inefficient (and laggy) so i was wondering what would be the best method to "execute on client first then have the server correct it"
Hey guys, I'm trying to hide players from the local player if they're not moving. It works perfectly fine client to client or client to server, however if the server is the one triggering it, it's hiding the players from themselves. Anyone have any better ideas on how to achieve this? The weird part is, I handle similar systems the same way and only have issues with specifically setting an actor hidden.
@rich hare you need to call animation things both locally for the client and then on the server for everyone else. You should handle most of your multiplayer code that way.
so through a sequence i'm assuming?
uh let me see if i can find an example real quick from my stuff.
take your time
You have a more efficient way of handling things?
i activate firing locally, then ask the server to activate firing
server replicates effects via its firing
to all other players except the owner
Using rep notifies?
mine is complex using ability system, and batched rpc calls
but a simple system is, client activates firing and starts firing
server gets notified, and starts firing
Rep notify counter sends effects to simulated via a replicated property that Skips Owner
every shot increments EffectsCounter by 1, to play effects
shooter game has a very good example, but its C++ and unless you can understand C++ its a bit hard
Yeah, I've used a similar system to that in the past but have had better performance with this style.
Multicast is fine but it shouldn't do entire firing thing
it should just be for effects
Well aside from our difference in methods, Squidee was just asking how to get their animations to play without latency. So i think this system works fine for them with the difference of skipping the multicast RPC if they want.
i though you were asking a question
i didnt scroll far up enough to get the full story
I could check all the rooms and look at the smallest number of them?
are you trying to sort them from what im hearing?
If you're trying to make a system that joins a match with the least amount of players you can do something like this.
just spitballing here, but this method will replace the current chosen session if it finds a match with less players
i dont really know how unreal sorts the order of found sessions but this can be reversed with > to make a method that fills the first available session
the node get current player is the number of players that have the room?
yes, it is the number of players that have joined
Hey everyone
Trying to get InitialOnly custom conditional replication working.
I only want to replicate some arrays if the arrays are non-empty
Stuff in PreReplication doesn't seem to effect my stuff at all. If I put replication in GetLifetimeReplicatedProps, replication works. If I don't, it doesn't.
My understanding is I use the override in PreReplicate alonside the GetLifetimeReplicatedProps, but when I do that, replication always happens, even if I try to force it not to (like setting false in the DOREPLIFETIME_ACTIVE_OVERRIDE call).
@meager spade Why multicast only for effects? (I am probably seriously abusing it....)
So where exactly is an OSS singleton stored?
Hey guys while attempting to connect to a server I got an error:
"NetworkFailure: PendingConnectionFailure, Error: 'incompatible_unique_net_id'"
We are using the steam sub system, any idea what would cause this?
Apparently I'm semi retarded as I've worked myself into a corner after hours of attempting to do some 'simple projectile' replication.. works when played from the client that is the server, but not from the clients --> other clients or server... ( anyone got a few mins to show me where I got jacked up? )
how to test server cpu & bandwidth stress with many many clients? nothing unrealistic just ~40 or so players... how to launch standalone graphicless clients for stress ???
@fading birch Well if the answer is always just it depends how am I supposed to ever find out any differences? No resources I can read?
@abstract pike I meant more it depends on what you're trying to do with it. You also need to understand an Actor is a UObject, it just has more implemented into it, especially networking stuff.
I understand that
But I don't know what details you're going to need to be able to give an answer
@fading birch Can you point me to any place where I can just read about this then?
You would probably need to test it yourself tbh. I'm not sure what you're doing with a UObject. If you have it replicating and doing network things properly, then it's likely loads more efficient than an Actor.
As for a place with this info specifically, I cant help. I usually just do testing and reading source code.
GetPlayerViewPoint, engine keeps it updated via ServerUpdateCamera in the PlayerController
@winged badger
can some one explain what "GetPlayerViewPoint" is? I can't seem to find this
@gilded sentinel Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint
It was the top result on google.
ok, I found a node, called "Get Actor Eyes View Point" is that different from "GetPlayerViewPoint"?
bit of oddity here. 1 v 1 peer to peer multiplayer situation. Racing game. Obviously I want countdown and timers synchronized. So my gamemode on the host, has a post login event, that makes the player possess their pawn. When all the players have done post login (by running a counter and after it runs twice) it calls to the racemanager to start the countdown. The problem is, if I do not include a delay on the racemanager of 1.0 second when it calls the race manager and "gets all actors of class" for the pawns, it will still only find the hosts pawn and not the clients. But that function shouldn't be called until both users are possessing their pawn.
So this is on the game mode. It should not be called until both players have been told to possess their pawn. I just set this up to work in single or multiplayer for this race, before playing the host would choose 1 or 2 players. What I found is that anything less than a 1.0 second delay on the TA manager will cause issues
is it somehow possible that the spawn and possession are not finished before it calls the function on the manager? Building a list of the possessed pawns isn't even the first thing it does on the manager. It builds an array of all the checkpoints on the map first.
@gilded sentinel it's essentially the same.
@somber glade are you familiar with c++?
Yes I am.
Sweet
Ok, so when a game starts, the game state fires and changes what's known as the match state. You're supposed to override those activations and control it that way.
For example, if you dont it will automatically cycle the match state to match started
You want to add your function calls in your own custom game state in the calls that change the match state
Sure, I get that. My issue isn't really about that, it's about the fact that both players have a pawn spawned and been told to possess it, but the host can't see those without a delay
when it's the host telling them to spawn and possess the pawns.
Right. What I'm suggesting is changing your flow a bit. Have it do some checks before the match starts to make sure its accurate.
Also what are you using get all actors of class for?
Just to build a list of the pawns in the map so that i can keep track of player 1/2 and make calls to each one when I need to
Why not use the player array in the game state then get their controlled pawn that way?
I just noticed something weird on the game mode itself. I didn't build this project from scratch, only coming in to it part way through.
I may do that instead. I just noticed that my game mode is somehow passing that check more than once. So I need to investigate what's going on with that.
That's strange.
math error. I had >= should be >
that fixed that..but oddly it still doesn't quite work here.
@gilded sentinel it's essentially the same.
@fading birch ok thanks I'll try that, I kinda forgot AI doesn't "look"
So i had the idea, to put the pawns into an array in the game mode, and pass that on to the race manager. When it's passed on to the race manager, it's showing a length of 2, which it should, because it should have 2 pawns in it. But those pawns seem "wrong". The client doesn't have it's race start functions called.. which is a bit strange.
I would have to see how you're having the client possess the pawn and where.
in the game mode on post login. When a player logs in, it gets the next start point, spawns a pawn and tells the player to possess it
after telling the player to possess it, I add the pawn to an array
then pass that array to the race manager so that it has a list of the 2 pawns in the race.
but when the countdown starts, it should trigger a function on each pawn to enable the HUD.
but that doesn't work on the client, where it was working the other way I did it (building the list on the manager itself)
I'm printing the list now to see if there is something strange.
LogBlueprintUserMessages: [BP_GameMode_TA_KSS_C_0] Server: BP_Drone_011``` game mode list looks fine, two unique drones.
LogBlueprintUserMessages: [BP_TAManager_71] Server: BP_Drone_011``` the race manager prints out the same list.
Even if I use the game mode to pass a list of the pawns into the manager, without this 1 second delay, it doesn't seem to work.
When the manager starts the race, he has to tell each pawn what the next checkpoint is, and tell it to create its HUD and direction arrow for the checkpoint. For some reason, despite it having a list of both pawns, it doesn't seem to run that on the client without a delay
after the manager calls this function, it initiates the countdown.
This is coming from the game mode. The game mode calls this function on the race manager.
That's exactly what is happening. I just added a breakpoint on the "create TA Hud and Arrow" function on the pawn, and without the delay, for some reason, this is never being called on the client's pawn. Yet, the manager has an array with a list of both pawns.
no wait a minute..
the manager's list is wrong
We should move this to dms this is getting a bit lengthy
Hey all. What would be the best way to store a variable between maps on the client side?
Did the Advanced sessions plugin stop working for anyone else??
i dont think hosting games works anymore.
ok, so I'm trying the get actor eyes view point
it seems to only work for the server, all the clients (and clients verson of the servers pawn) seem to be 'looking' at the works orgin (0,0,0)
@spark fossil in the player state
just copy w/e variable you want over to the new player state
๐คฆโโ๏ธ I forgot to replicate the Target variable, now the server replicates to clients, all clients always look forward, relitive to the world's forward
so it's fixed?
the server works, but the clients are still broken
is the Actor Eyes View, able to replicate from the client to the server?
@swift cargo it works for me, tested earlier today even.
@swift cargo did you change engine versions?
same engine version. @fading birch
Even my old project where it was working stopped working.
that's very strange
try reinstalling the plugin?
what's the error you're getting exactly?
plugins don't generally randomly stop working
i already gave up and cleared everything.
the project corrupted after i spent my entire day working on it.
im trying to remake it and im having really stupid issues with opening basic blueprints, the windows are all messed up and i cant find the viewport window.
RIP
im just going to give up.
Yes.
ok
shut down your PC
reseat your graphics card
and your RAM
unplug your PC
then turn it back on
I had to do that 2 days ago
and UE started running like a champ again
this just takes too much time, i dont even do anything and its STILL to much time. ive been trying off and on for several months and i always run into a roadblock and give up
its not worth it.
i stopped playing games and hanging out in online friend groups and i only got enjoyment from working on a game i would actually like, i have had the same idea for several months and have tried to make it work for FOREVER spanning over 8 projects
anything worth doing takes effort.
the entire experienced feels like climbing up a fucking slide backwards
it can certainly feel like that at times
:P Good idea is to use Source Control for your projects. Then you won't have to redo them if they break.
even a local git is nice
i've done that for a few projects
lets you experiment without having to mash ctrl + Z a bunch either
Make sure you're making a large scale MMO. Those are the easiest for indie solo devs.
the gamemode has a chain of events that are triggered at the client. I need to call the next after finishing execution the current for all clients. To do this, I can only notify the gamemode from all clients, or is there a more convenient way?
How do I find out if a player is current being spectated by another player
@spark fossil in the player state
@fading birch Thanks, will give that a try. I didn't think that the player state wasn't persisted between maps tbh.
when a new player connects, he needs time to load all the objects on the level. How can i track the end?
@spark fossil in some cases it doesnt. But you can use Copy Propertirs and not worry about losing stuff.
@twin juniper you should do that kind of stuff in the game instance or a subsystem of a game instance. For some reason things can get weird if you try to connect via game mode.
@small marsh first question.
What is being triggered at the client? What are you trying to do?
2and question:
Look into HandleSeamlessTravel overrides.
@fading birch I didn't know about Copy Properties - thanks again
Np ^^
@fading birch GameMode onBeginPlay
spawn a few objects. and for each client(player) I put them in a different position
Why not just have the server move them?
Hi, im trying to make a server travel from one level to another, i have it in a custom event at the gameinstancebp, how do i call it and from where? im a little bit lost
You should be using server travel in a game mode, but your game instance can work fine in this case. You're not testing in PIE are you? @woven otter
I have no idea what PIE means
oo, yeah im using that and made it so it makes 2 players to test things out
Yeah you can't use server travel in PIE
So i will need to package it to test it?
You can just launch in standalone.
Thankyou @fading birch
can someone please tell me if inputs to a rpc to server from client get replicated to the server with the event call
i wanna send a vector from the client to server so server can compare
thats what the inputs on RPCs are for
is there an alternative to move in an animation without rootmotion, while player input is blocked? Im on multiplayer, so i have root motion montage only, is making anims like that into montages a bad idea? plz @ me
Anyone know of a good way to restart a level in a multiplayer game? We want to just restart the current level after a certain point is reached but it doesn't seem to want to behave...
We've tried calling OpenLevel on the server, and as multicast. The server will reload the level but the clients just go black
@hot mauve try using server travel.
Hey, does anyone know a good tutorial or information source to create a "menu type" pre-game lobby ?
It's just so that player get loaded into their teams and can chat or ready up, before the actual match gets launched
@weary badge there is a good multiplayer template available on marketplace : https://unrealengine.com/marketplace/en-US/product/rpmsf-multiplayer-shooter-framework
if you want a tutorial series: https://www.youtube.com/watch?v=SfD5Xpx1iXE&list=PLLiI_CRDNPL95LQnS6PGjrWxHkWbHcjAl
Tutorials brought to you by Yun from RyseUp Studios.
If I'm going too fast, hit that pause button. Sorry about the silent clicks and shortcuts used.
I'm doing that "on-the-fly" because I don't have much time but I was really eager to do a new tutorial series.
If you have an...
Hi everyone! I have a question, maybe someone can help me. I want to make a game with a dedicated server, but in the future, for now I just want to test and to make the game per se. Do I have to build the entire engine source and build the server just for that or is there a faster, easier method to test the game with this setting?
@acoustic jewel you can just launch a local ded server
no need to build from source for that
you just create a short cut that has:
PathToUE4Editor.exe PathToYouProject.uproject -server -log
you can also just check dedicated server in PIE
๐
Thanks!
in the shortcut version, you'll need to connect to your server, this is simple as just pressing ~ to bring up your console and typing open 127.0.0.1
if you want a standalone game, you can copy your shortcut above and replace -server with -client, so basically:
PathToUE4Editor.exe PathToYouProject.uproject -client -log```
That was easier than expected. Thanks!
Np
You will eventually want to build from source.
I recommend doing it when you dont need your PC for a few hours.
i need some help, i made a login screen my game to request the stats for my game, i currently have this login screen in a different level than my main level. How do I make it so the server doesnt have to login, and will automatically start a session of the main level as soon as its opened, so the clients can join the session of the server?
I couldnt find any tutorial for this
set the server map to w/e map you want your clients to join. Then from your login screen, have the client open the server level.
your server map?