#multiplayer
1 messages Β· Page 621 of 1
Modified CreateUniquePlayerId to have a config driven mapping of foreign net id type to local net id type, in case you have a local online subsystem that wants to provide special handling of foreign unique net id types
is it possible to send data from client to server when they dont both execute the same code path?
Im having trouble understanding how to just send data from client to server
im thinking of it like an http request and its totally screwing with my head
well it also changes the check in AGameModeBase::PreLogin to actually support multiple OSS types, not just the "default"
which is handy for implementing cross-play
yes even I was also facing this issue and ultimately I had to override the PreLogin to add support for two OSS.
Now I guess it will be painless
and tricky part is most people don't know about this.
and the client connection to server will be dropped if OSS don't match, and dev will be pulling their hairs
it came from the 4.25Plus stream too, which is the 4.25 compatible stream but with PS5/XSX TRC stuff
ohh cool
need your help
so the question is "can we make a multiplayer game in unreal engine without replication?" using only websockets etc?
Does anyone know if Amazon Gamelift supports 4.26? I'm only able to see up to 4.25 and getting a headache
isn't it just a REST API? why would that be tied to an engine version
plus gamelift is an expensive service too
Whats your recommendation?
we were with multiplay, we moved to zeuz, they both offer bare metal servers which will be cheaper than cloud
I see, thanks
When I put the gamelift plugin into my project I'm getting "engine modules are out of date" error
And I'm just trying to avoid rebuilding in VS again for the 4th time in 24 hours
if it's installed to your game project, just build the game project
which will build the plugin
I'll give that a go thanks!
That's sorted it! You're the best
any way to estimate cost on Gamelift? We're only a team of 5 network testing, not actually using for public play
@plain torrent remember, the pricing estimation on Gamelift page is only for 15 days. its a dirty trick gamelift
Blimey, that does look like it's going to get pricey.
if it's just for testing couldn't you just use a cheap VPS on something like digitalocean or vultr?
or even hosting locally
I use Digital Ocean for our Perforce but I'm not great with Linux, how tricky would it be to get something set up on there?
Linux is damm easy man,
if you have a way of getting your build onto a server, you'd just boot it using the command line
assuming you have a linux build of your dedicated server
which you'd need for gamelift anyway I believe
I've been building it as win64 so I'm assuming I'll have to set up a new project?
no?
Yeah ignore that sorry, misread entirely
I didn't know gamelift even supported windows builds
though windows typically adds to the cost for server providers
due to licensing
Looks like I'm downloading Ubuntu π
well you can use the cross-compile toolchain to cross-compile a linux build from windows
gamelift supports windows.. but adds licensing cost in final bill
yeah, not worth it
I've not used cross compile before, should that be pretty straight forward?
thanks!
if you experienced software engineer, you can get the logic easily
though we compile our linux server build natively, but this should work pretty much the same
any specific reason for doing this
ok
Any specific reason which made you think of wek sockets or you have any requirement which engine replication can't fulfill and we socket can do???
I do remember long back some people asking about nodejs being replacement for dedicated servers and they were trying to make a POC for that.. but not heard from them in a while in this channel... May be they dropped it or made it..
in theory one can work fully without unreals network layer not sure if its easy to remove / or how good it's interfaced, but since its open source, there should be a way of replacing it with what ever netcode one wants \o/ if its worth the effort depends I think
which one should i use in a constructor of an actor component class?
bReplicates
why?
@marble gazelle actually one of the module from engine repo do does networking and replication to python backed framework.
so yeah it is possible to do but needs time and good effort
@light smelt SetIsReplicatedByDefault does not exist on actors and SetIsReplicated is for runtime
huh? it doesnt exist? but it does
Not in Actor.h it doesn't
It's a component method
For actor components you should use SetIsReplicatedByDefault
Ah, but you asked about components
Then it's SetIsReplicatedByDefault
For actors it's bReplicates
what's the difference between an actor and an actor component?
They're completely unrelated classes
Except that actors have components inside them, of course
Actors usually have many actor components, yeah, that's kind of how they work
ah ok makes sense
so components in unreal are objects but in unity components are just scripts right? so in unreal a component is more like a gameobject in a prefab in unity.
(hope that wording made sense ^^)
No idea what Unity does
If you come from Unity, there is a nice doc page that explains the architectural differences
Translate your Unity knowledge into UE4 so you can get up to speed quickly.
And of course, https://docs.unrealengine.com/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/Components/index.html
Explanation of Components and descriptions of the various types available.
thanks π
First, big thanks to Authaer, you are absolutely right! In case anyone wonder about my problem: I replicated the config actor, yet since I didn't seperate the client/server version of spawning the actor, in fact there are 2 actors on the client end (one spawned by client PC, one replicated from remote PC), and my variable was set to the locally spawned actor, not the replicated one.
Solution: Make the spawning event server only, and make sure the variable is set to be replicated (so that the client PC knows to refer to the replicated actor)
Now here I come with a very beginner and conceptual question: what's the best practice to use physics? Should the calculation happen on the server, on the client(called result event on server), or mixed?
So long as you're using Seamless travel you can override the CopyProperties / OverrideWith functions to copy data to the new player state in the new level
The actor itself is always spawned anew but that's where you get a chance to copy data between old and new
CopyProperties is the one for seamless travel I think
Oh and there is SeamlessTravelTo also, which calls that
@tawny talon Unfortunately that's not quite as beginner of a question as you'd think. There isn't really any party line for physics in UE4 at the moment besides to use it at your own risk because it doesn't work very well by default and requires quite a bit of custom implementation. In the end the shortest answer to that question is that it highly depends on your intended use and the gameplay you're after.
So I am getting this as a message in my logs when trying to find servers using the steam online subsystem
LogOnline: Warning: OSS: Async task 'FOnlineAsyncTaskSteamFindLobbiesForFindSessions bWasSuccessful: 0 NumResults: 50' failed in 15.095481 seconds
Any suggestions on fixes?
Are you using your own App ID?
No, the default for spacewar
That's probably the issue. It finds 50 results, but none are compatible with your game
is it because I am trying to make my own version using two instances of the game?
So one as a server, the other as a client to join
You can't run two steam clients from the same machine that's for sure
Has to be two different machines (or a VM) and two different steam accounts
I am having problems making ServerTravel work π¦
The server travels, ListenServer also travels, but clients don't.
Is it broken on the editor? π€
I tried with and without seamless travel and no dice
(UE 4.26.1)
@chrome bay thx, I just got an idea: two standalones an have one create a listen server and the otherone join 
HA, GOTTEM.
(creating 2 standalone instances, having one host and the other join and then the servertravel works
)
Ty
Is an unpossessed pawn able to receive a multicast from the server?
yep
Oh, I think I know what's happening. The player actually doesn't have anything possessed yet, so I reckon the multicast is failing the relevancy distance check
Oh π€
its the distance to whatever you send via ServerUpdateCamera last
most cases have camera attached to Pawn so Pawn is roughly the center of relevancy distance
but its measuring from whatever camera you're using atm
and all ACtors receive MCs
(Pawn is unpossessed, and player also has nothing possessed)
doesn't matter who ownes them or possesses them
there is always achance you did some weird spawning and its not the same Pawn
It's an actorcomponent on a pawn, multicasting there, and I'm trying to get the event to be received within the same AC.
The server get it, but client not
also, why would you MC on BeginPlay of anything?
It's not on beginplay though
spawned implies it is
Usecase is that I spawned a character as a preview, which I have not yet possessed.
(So player can swap characters through UI without committing the PC to a pawn before the player has confirmed)
On accept, I possess
(the multicast is unrelated to all this though, and happens far past BeginPlay)
Christ. I hadn't worked on this component in a while, just noticed I never flipped replicates on the AC
Sometimes the answer is simpler than expected. Good to know about ServerUpdateCamera though, will note that down.
So... Here's a fun one. I have a subclassed HISM component. Component is replicated. Instances of said component are in identical places on client and server. I'm uncertain of the terminology, but when a non locally controlled pawn, that is not on the server jumps onto one of these components, their character "disappears" from all clients. Server still sees them in the correct location. After some debugging I've found that on clients, any non locally controlled character is teleported to near 0,0,0, and then simply continually falls until that player walks off of the HISM component or jumps.
This would be much easier if I was getting errors or something. But as it is, I have no idea how to debug this.
CMC has a reference to the base
a primitive component you're standing on
your HISM instances are not net addressable
its where i'd start looking, anyhow
Hmm. I thought that replicating them would solve that.
never encountered that particular issue
Ironically I didn't have this problem when I didn't replicate them. Although that makes sense now... if CMC thinks it's standing on that component, which is at 0,0,0.
I have.. No idea how I would even begin to start addressing that? Surely there must be a way to use HISM components with networking stuff. How does it work when the HISM are loaded with the map? That doesn't throw the replication error about not being able to resolve the floor, or the disappearing issue of teleporting the character to the component.
@kindred widget At one stage I made HISM Foliage component replicated, and although it worked I was seeing warnings in the log saying that it shouldn't be.
But I never saw any problems like you're describing. The worst I had is just that client and server disagreed about which instances were visible and the client would jump about when too close to one of these problematic instances. this was on 4.25 and since then I changed the design so it's not the component that's replicated.
I changed these values on DefaultGame.ini, then made a new build. Profiling showed that the new bandwith limits were ignored. How do I go about changing them?
TotalNetBandwidth=128000
MaxDynamicBandwidth=28000
MinDynamicBandwidth=16000```
MaxClientRate=10000
MaxInternetClientRate=10000```
How do you set these settings?
Worth pointing out that Unreal doesn't do any hard bandwidth limiting
Just considers the connection as "saturated" beyond that point (the IpNetDriver settings anyway)
[/Script/Engine.GameNetworkManager]
Unreal Insights shows me than no packet goes over 8000 bits, and on a network heavy scenario Insights looks like a horizontal rectangle
For reference
And what's the practical implication of this?
Can't find the dang post now
I made these ridiculously big to rule them out, still capped at 8kb per connection
MaxClientRate=4000000
MaxInternetClientRate=4000000
[/Script/Engine.Player]
ConfiguredInternetSpeed=4000000
ConfiguredLanSpeed=4000000```
On DefaultGame.ini?
yes
I was expecting those setting to uncap the 8kb packet limit. Am I wrong in assuming this?
Why did you increase those numbers @meager spade , what were you aiming to improve
What happens when you set net.DisableBandwithThrottling 1 ?
How do I do that? on the commandline arguments?
Will try that
@floral crow those are listen server specific
if you are dedicated server, won't apply to you
Ohhhhh that would explain it all. Am I out of luck tweaking these for a dedicated server??
Wait where did you get those from? This is what I found in my GameNetworkManager
Mine looks quite different. Currently on 4.26.1
im on 4.25
so maybe they did some changes :/
strill says listen server
for the bandwidth
TotalNetBandwidth does say ListenServer though π¦
This is interesting:
ConfiguredInternetSpeed=
ConfiguredLanSpeed=
[/Script/Engine.NetDriver]
MaxClientRate=
MaxInternetClientRate=
These values were all raised to 100,000 bytes in 4.26```
Looks like they made quite a lot of changes in 4.26
Wonder how much of it is actually in the release notes
Ok, everything seems to indicate that NetSpeed is never adjusted for anything other than ListenServers
So now what, why am I seeing this hard 8kb per frame per connection limit even when running a dedicated server and 2 clients on my computer
So theoretically bandwith would be constrained by my own computer performance, which is able to handle waaaaaay above those limits
Hence my assumption that there's a hard limit. Where can I ask about being able to change it?
Hello π
has anyone worked with Steam's Lobbies before? (the ISteamMatchmaking API)
I am trying to confirm if LobbyDataUpdate_t after SetLobbyMemberData is only triggered for clients and not the lobby host. Because I'm receiving none on the host
Maybe someone know how predictive multiplayer works in arpg games like path of exile, diablo3 etc, where your actions instant, but sometimes desync happens and your position reverted? Im not sure what about other action, like using skills, doing damage to enemies, etc, is it also instant (hard to tell, but feels like there is no latency for it), how you revert actions then and how usually predictive system supposed to work in that kind of games? Maybe there some guide for that, it can be for specifically ue4 or just some core information in general
all prediction works pretty much the same
movement for example
local client saves his moves (can think of them as steps) locally and RPCs its movement to the server
when the server update comes back confirming the client's position, client takes the servers position he just received, then reapplies all his steps made after the time the server update was sent
and discards the older ones as they no longer have a purpose
It's worth noting that prediction can sometimes be very misleading. It gives you the impression that something is happening when it isn't. Saw that in Overwatch a few days ago. Went and ulted. Died immediately. Still had full ult charge. Ult never went off even though I saw it start on my screen.
ye i understand that, but its very useful for non pvp games, where rare desyncs not critical, for like coop games
@winged badger i dont understand it fully. What you mean by "then reapplies all his steps made after the time the server update was sent". Like server every n seconds send you your position and then what exactly you need to do? As i understand you store all your movement (last n seconds of them), so now you can compare it and what server also store, something like that?
position server sent
doesn't arrive instantly
you moved since the server sent the position
so need to reapply your steps again for the thing to look smooth
otherwise you'd be jerked backwards by the server all the time
so you mean when i get server data i should change my position to server position + all steps i did after server send position, but i dont know how much time past sines server start to send data to me and after i receive that data, it depends on ping etc
if i understand it correctly
oh didnt know it exists
typically
you'll want to use server's GetWorldSeconds
for network clock
clients bounce acouple of RPCs to figure out the delta between their world clock and servers
then mutate their own GetWorldSeconds by that delta to get the network time
you can google syncing network clocks, its not too complicated, and its on the internet
okay, thx, you helped me a lot, i finally understand that conception
hi everyone. Im using client travel with seamless travel. it's working fine, since I can get the Player State values copied.
However, when entering the new map, the player cannot see other players that entered the same map after.
If I play starting from the specific map the players can see each other.
Im using C++ and play in standalone
does anyone knows what can be happening?
Hi all, please can anyone give me a tip on how i can archive server distribution structure for RTS games like Rise of Kingdoms or Infinity Kingdoms. How i can archive a seamless sever across the glob so players from different origins can play on same map an see each other.
i have gone through https://www.alibabacloud.com/blog/global-gaming-servers-1-content-acceleration-and-architecture-comparison_594580?spm=a2c65.11461447.0.0.39093f7eU1ieqb but i don't know if i can archive that.
i created this in gamestate
create chat information is getting from UI where i have text
where i cast to Here to create child and added it to box
but it only wheres if creator of text is Listen server
client only makes child for him self
how can i make this for every player
What is responsible for calling CreateChat?
Right... but CreateClient is just a RPC function. So where in the gamestate does this get called? In the BeginPlay? When a match starts?
What exactly should I keep in my game state? Game time, some variables and that's all?
And how I'm supposed to create in game scoreboards? Do I have to prepare everything in my gamestate and then pick the values from there or do I have to iterate through every Player State or what? If I do the latter then how I'm supposed to display variables updates(example a variables changes while the scoreboard is beign displayed)? Are repnotify a good way to achieve that or there are better/easier ways?
Last thing: is Player State Client/Server only or both?
*If it automatically is being called upon begin play, why even have it as an RPC?
I think your functions are being skipped on the clients since the functions are being marked as Execute on Server
for all clients
I could be wrong, but just a guess.
@hollow oasis why not to create the widget directly inside the player HUD?
^
You create it at BeginPlay and you're sure that the player has it
can you call RPC functions on the game state as a client? I know that every client has one, but I thought that was one way, from server to client.
I wouldn't think you would be able to, as there is only one game state on the server instance, which owns the game state actor
Game state is only one, and if I'm not wrong it's located on server, so if I'm not wrong you have to find an alternative way to do so
Yes, I do know for sure that there is only one game state on the server, so therefore, no client can actually own it because that would not make sense
So while you could use the game state to broadcast the messages sent from other players, you would need to use another route, such as maybe the player controller as one example, to send the message from the owning client to the server.
then of course from there, the server would use the game state to replicate the sent message to all other clients. The reason this works with a listen server is you have an instance that is acting as both the server and the player. So in that case, your server player really does own the game state.
i think is that client is not calling it like he should
it replicates from server to all client
but how can client tell server to create it
*call it
Hey, I faced a problem with the multiplay. It is not smooth when I run the game and watch the IK motion of the Client in the Server side. For example, running. Hoping someone can help!
I think the gist of what we are saying is that you probably should re-think placing your message HUD logic inside of the game state.
Move that somewhere else, such as the player HUD's begin play for example.
and just have the HUD create the message on the HUD's begin play
*create the message widget(s)
right
so if you are sending messages, then first you would need to call an RPC on an object that you actually own, such as the player controller. The player controller on the server would receive your sent message and pass it along to the game state, and then ultimately, you could send that message to all players via the game state. I'm not saying it is the best way, but that is the easiest to explain based off of what you are currently doing
ok
Glad I was able to help π
Not sure if you are using a common base game mode class, but if you are, you could pass the message from Player Controller to it, and then it would determine whether or not clients were currently allowed to send messages. If not, then have the player controller send back an error code that the message could not be sent. If the message is allowed to be sent, then the game mode could pass on the message as you already are doing from PC to GS.
Not required obviously, but I only mention that because game mode is supposed to control the rules of instance.
ok got it
When I am starting up a client build, the world loads up and everything looks fine. But after about 20 seconds or so, the map reloads, and in the output I am getting a UNetworkConnection TIMEOUT exception. So I loaded up the DebugClient build, and I can see UNetworkConnection::Tick(float Delta) being called. Why is it trying to establish a connection to the null subsystem?
I haven't told it to do anything with the null subsystem yet
Well, that's not true. I did initialize the null subsystem, but the call stack here is trying to call UNetConnection::Tick within the world tick, and I haven't tried even querying the NULL subsystem yet.
This is what I get when I just press F5 to start debugging the game
Does anyone know if RepGraph takes actor bounds into account when Spatializing the actor to nodes?
Hello ladies and gentlemen. I wonder how to divide players into teams. I suspect I should do it in the game state, am I right?
Relative newbie here, but I would assume the game state is a good place. There's no secrecy about who is on what team, and should be useful in general game logic
It would also be a good place to have event dispatchers for when someone changes teams (if possible in a match) that a client function can broadcast to
Event dispatchers seem like a great idea, thank you @desert scarab :D
You're welcome!
π¬ ok..
I wonder if an actor can be in multiple cells
couldn't see anything re: bounds when I looked thru the code
but there is a StartX/Y and EndX/Y members for each FActorCellInfo - just can't see how they get setup π
might be via the CullDistance.. this might work
don't mind me, just talking to myself π
I use AddMovementInput method to let unreal sync movements of characters. It works perfectly on all clients but server, on server other character movements look like low fps. Why is that and can i fix it?
if i spawn an object through the player (in this case a decal actor) the player should be its owner correct?
Define "through"
an RPC
Then no
Assuming the spawn occurs on server, the owner is part of the parameters
Dunno what it defaults to
i am calling an RPC throug the player and then it spawns in the server and gets replicated back
ummmm so i have to set the owner manualy then
Hello Guys! I have a situation, I am getting unresolved externals when I try to use Set Function SessionSettings.Set(SETTING_GAMEMODE,FString("TeamDeathMatch")); from the FOnlineSessionSettings. Aready Included the #include "OnlineSessionSettings.h"
#include "OnlineSubsystemTypes.h" any suggestions? Thank You!
Solved: changed it to this query.Set(SETTING_GAMEMODE, FString("TeamDeathMatch"), EOnlineComparisonOp::Equals);
Hello, I have a small question. On PostLogin I spawn and posses pawn with incoming player controller. Then I try to setup custom camera (camera is custom camera BP that is child actor object in pawn) in controller BP (or in pawn bluperint, but for every pawn i get server controller, and camera is only setup in listen server instance.
hey guys we're trying to execute a console command on the server on the press of an UMG button (either the client's or the listen server's button) and nothing happens. using the command line to execute the command on the server works otherwise. does anyone have any idea what we're missing? from the widget, on the click of the button, we're calling an execute on server event that iterates over all clients and calls a multicast event executing that console command
@hasty yoke Where is the Server event? Is it inside of the Widget?
Hey authaer! thanks for helping. this is our button widget:
dont mind the event called RPC if it isnt technically an RPC, we're still a bit lost
the event Restart Level RPC is inside of our controller, it is executed on the server
so far this doesnt work, but we got something very similar to work at some point, but ONLY when the client clicks on the button
@hasty yoke Well, at the moment you're telling the button to get the local controller, and call a client event on that controller that I'm not even sure what that event does. It's not in the second picture. What actor is that second picture in?
second picture is the player controller
What is the RPC currently? In the widget image it's a client call, in the second it's a server RPC.
it's the server rpc. sorry, my teammate changed it back to an event replicated to server
Hmm. That technically should work. But isn't ServerTravel meant to be called on the server? I'm fairly certain you just need to move the Console command to the Restart Level RPC in place of the stuff that's on there now.
Unfamiliar with it. Single world in my game. But I was under the impression it was only meant to run on server.
it is indeed we think, since entering it in the console line only works when writing it on the server
so you're saying that we should execute the command after restart level rpc and nothing else
Correct. And also it will only work in standalone or packaged versions. So PIE sessions it shouldn't work with. Not sure about your testing environment.
oh okokokok we're gonna try packaging it. that's really strange because even when we execute the command in the command line, we're not in the packaged version, we're just playing straight in the editor and it works
would the way we call that RPC in the widget the good way? i feel like widgets have particularities and we are not confident that's how it should work. Only clients own the widget and the only thing they can do is call a server RPC like we're doing right?
Standalone should work fine too. And disable RunUnderOneProcess
The RPC should work. Since the RPC is done through the player controller.
thank you π
Man, it's really not working even in a build
thing is i'm trying to do the most basic thing at this point, which is just a print
and somehow it only prints when the client presses the button. when the server presses it, nothing happens
Hmm. Not really sure why that would happen. Server events should still run on the server even if they're server started.
Hello guys, good night, I want to ask you something. I watched doing Steam multiplayer. It used to work before but no longer works. It works painfully on the same computer without Steam, but it doesn't work when I open steam. I've been dealing with it for a while, neither on another computer nor on the same computer.
We're working with dedicated servers for the first time, once I push this build to our host, will I have to re-build for the server each time someone on the team makes logic or asset changes?
Think I may have the answer if anyone with more experience can sanity check! I'm going to be hosting on DigitalOcean, from what I understand I'm going to be building it as a Linux app, setting up a repo and deploying the server to DigitalOcean VIA GIT to keep it synced?..
Scratch that again.. Can I use the same Server Instance that's hosting our Perforce SVN to run the dedicated server to test our multiplayer? Really sorry for spamming!
perforce and SVN are different source control technologies
but yes, you can as long as there's enough CPU overhead for it
Have anyone can help ?
Can someone please tell me if it is normal behavior for a game client, targeting the NULL subsystem, would automatically try to connect to a socket? I keep getting UNetConnection::Tick() TIMED_OUT error messages and the level restarts
It says the state is "Connecting"... but I haven't told the client to join or even search for a session. The entry map is just being loaded upon start up.
So... why is it trying to connect to anything?
@meager spade do you have any idea?
[2021.03.03-03.07.02:501][ 0]LogLoad: Game class is 'BP_RaevinGameMode_Menu_C'
[2021.03.03-03.07.02:505][ 0]LogWorld: Bringing World /Game/Maps/RaevinEntry.RaevinEntry up for play (max tick rate 0) at 2021.03.02-22.07.02
[2021.03.03-03.07.02:506][ 0]LogWorld: Bringing up level for play took: 0.003340
[2021.03.03-03.07.02:510][ 0]LogTemp: Warning: ARaevinPlayerController_Menu::ClientSetHUD_Implementation()
[2021.03.03-03.07.02:512][ 0]LogTemp: Warning: ARaevinPlayerController_Menu::BeginPlay()
[2021.03.03-03.07.02:513][ 0]LogLoad: Took 0.082853 seconds to LoadMap(/Game/Maps/RaevinEntry)
[2021.03.03-03.07.02:513][ 0]LogTemp: Warning: URaevinGameInstance::OnStart()
[2021.03.03-03.07.02:513][ 0]LogTemp: Warning: URaevinGameInstance::StartGameInstance()
[2021.03.03-03.07.02:595][ 0]LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init()
[2021.03.03-03.07.02:595][ 0]LogLoad: (Engine Initialization) Total time: 9.37 seconds
[2021.03.03-03.07.02:601][ 0]LogInit: WinSock: Socket queue. Rx: 32768 (config 32768) Tx: 32768 (config 32768)
[2021.03.03-03.07.02:601][ 0]LogNet: Created socket for bind address: 0.0.0.0 on port 0
[2021.03.03-03.07.02:601][ 0]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2021.03.03-03.07.02:602][ 0]LogNet: Game client on port 7777, rate 100000
and then finally:
well, it won't let me post the final piece unless I turn it into a text file
hello, im trying to correct a ugly transition into join session...the host player always loads fine but the other 2 players join their view ports show world origin 0.0.0 THEN it spawns a pawn for them. is there something I need to add a check to somewhere to fix that?
i would honestly have them stare at a black screen rather than seeing a view from under my world for 2 secs....it just looks horrible
please @ me if you know of a solution
Hey guys, does anyone know how to prevent Interface function from overriding the previous action?
I have set left mouse key to call a interface function, and that function has a delay of 1 second then printing on screen the number of click, If i continuously press left click, it only shows few of them
what I assume is that when i click multiple times, it removes the previous action/call and reset/override it
I have checked it documentation in unreal bp or cpp, but didn't find anything that pointing that
https://docs.unrealengine.com/en-US/ProgrammingAndScripting/Blueprints/BP_HowTo/Interfaces/index.html
https://docs.unrealengine.com/en-US/ProgrammingAndScripting/GameplayArchitecture/Interfaces/index.html
Sample of using Blueprint Interfaces to communicate with multiple Blueprints at once.
Reference to creating and implementing interfaces.
@jolly crag collect the spawn point on BeginPlay and spawn the players on OnPostLogin
the reason that happen to you is because you are not spawning them the moment they join the map, so they spawn at 0,0,0
Does Epic offer account services like playstation does? For example if im a player and i want to purchase skins inside my game then all the info of the skin purchase and then it actually showing up in my game, in game purchases etc?
Epic has account services (EOS) but I don't believe they include microtransactions yet
@bitter oriole So Epic Games' Fortnite doesnt use Epic account services ?
@worthy knot thats probably a feature they have private or havent released on EOS yet
there are many alternatives however that would work but i dont think EOS is one of them
the store is only supported on EGS, for add-on purchases on PSN you'd likely want to use the platform native API for that
@worthy knot EOS is built on what Epic has for Fortnite
And yeah, like sswires said - usually you just use whatever your store provides
When you're on Steam you'd use Steamworks
though IOnlinePurchase isn't implemented in the Steam OSS
that's what you use on certain platforms for getting receipts for transactions
we did something custom with DLC on Steam
The Steam OSS does next to nothing tbh, Steamworks has the feature
Hello. I'm having problems setting up custom camera in FPS multiplayer. I attached camera as child actor, and on posses in pawn i try to setup, but only get camera on listen server instance
Pawns have their own camera, there is no need to use another one - and if you do it should be a component of the pawn, not another actor
(child actors are not great)
I tried with my camera actor, couse I need template sequence animations for some custom camera animations. I can't seem to setup template sequence with my fps pawn.
Hey guys does anyone know how to resolve the yellow warning of no owning connection (AI character , child class of main character) will not process function .. the AI is spawned by game mode and I've set the owner to getController.
So steamworks has some API that allows microtransactions?
What do you say which ones better, EOS or Steamworks?
There really isn't an answer to that
Steamworks is Steam exclusive, EOS isn't exclusive but kind of EGS related anyway, and Steamworks does a lot more stuff
So if i sell my title on epic store then it obviously wont be able to use steamworks right?
Correct
Steam takes like 30-40% of your sale though for using their platform, I believe EOS is free if your using Unreal Engine(or much lower percentage)
EOS is not a store
Steam takes 20 to 30%, not 30-40
And EGS takes a 12% cut
Unreal Engine is free when shipped through EGS, IIRC, but then it's also free until you make an absurd amount of money
What is best practice, where to put inventory. In Player State or in player controller?
There's not really a best practice. It just depends on your game. For instance, mine is in a component that is added to many different actors, including the player's pawn. If you don't plan on losing inventory on death, then either PlayerState or PlayerController could work. Which one depends on whether or not you want other players to see other's inventories. If you want them private, put it on the controller, if you want them public put it on the PlayerState.
@blazing cloak Does the inventory need to be visible by other players in some way ?
Yeah, already answered I guess
Why is SetReplicateMovement even a function if it just calls SetReplicatingMovement ?
@grizzled stirrup It's overridable. ACharacter does the default, but also uses it to do some stuff on the authority version.
void ACharacter::SetReplicateMovement(bool bInReplicateMovement)
{
Super::SetReplicateMovement(bInReplicateMovement);
if (CharacterMovement != nullptr && GetLocalRole() == ROLE_Authority)
{
// Set prediction data time stamp to current time to stop extrapolating
// from time bReplicateMovement was turned off to when it was turned on again
FNetworkPredictionData_Server* NetworkPrediction = CharacterMovement->HasPredictionData_Server() ? CharacterMovement->GetPredictionData_Server() : nullptr;
if (NetworkPrediction != nullptr)
{
NetworkPrediction->ServerTimeStamp = GetWorld()->GetTimeSeconds();
}
}
}```
Ah that makes sense thanks!
@vivid prawn thank you bear!!!!
Can replicating a significant amount of data (say a few hundreds bytes) cause stutter in itself ?
first thing to do is make it unreliable
but...wouldnt that cause it to be.... unreliable..? XD
no .reliable means that gameplay needs this data ASAP or otherwise it will not behave correctly
Right
here it was world streaming
Which I guess is not that necessary
As-in can be delayed
depends on intended game play
thanks for the tip
it does help
I aslo have this weird thing where there's a long delay before any actor is able to replicate, only the world does Im not sure why
And after the delay even if the world still streams, any other actor is fine
The game only replicate a few at the begining then stop
Yes,
The only explaination I can see is that they are too many and the game trioes to replicate everything at once
you should not do that
They're replicated because some "spawned" object can be animated and stuff and needs replicating the animation
you should generate a random seed in game server then replicate that seed to all of the clients then each client can generate their own foliage
I mean I could use a flag to say whether or not the particular actors needs replication but that would only be avoiding the issue I suppose?
maybe you should have a foliage manager that just gets a seed and generates foliage and gives each of them an index
I mean it's not a problem of folliage, this actor could be a door
They're replicated because sometime they get events on them
then you should work on network relevancy
and only repliacte properties that need to be replicated
like only property in a door that needs to be replicated is a bool
or an angle
Well not even actually, right now it's only so that my even open/close gets replciated with proper relevancy
(or any event needed on that actor)
Is there a way to make those actor's replication "Unreliable" as well may be?
AActor::IsNetRelevantFor()
is a possible solution
Checks to see if this actor is relevant for a specific network connection
net priority property
stupid question: in BP does a variable get replicated if set on server but equal to its previous value?
when i click login on PC(editor) it goes to the LobbyMap but when i touch LoginButton from the mobile it outputs me this CSharpWarning: Script Msg: Sessions not supported by Online Subsystem any idea as to why?
@ember needle AFAIK it's not
that's what I thought but I'm getting the replication event every time it's set, even though it doesn't change
in this specifics, it's an integer
(on rep notify, that is)
did you try to log it, is the value always the smae?
@forest swift The number of actors was not the issue in the end, I removed all ffolliages and still have the issue
so how you know its from replication?
Because solo works fine
if you are using epic online subsystem
but they'll probably help with other subsystems too
I set it in a loop on the server, always to the same value. π
ok well, thanks
use network profiler to see what is causing it
no
replication checks the changes not sets
well it does, iraj π
Someething seems to crazy cloag the network? or is it just normal the call count is increasing
it should not
If you are setting it using an event that might be the problem
use network profiler
Where do I find it sorry ?
Tool for displaying network traffic and performance information captured at runtime.
btw be sure to profile on both clients and server
thanks you will try it !!
(you probably need to set a command or something to use it be sure to make it work on both server and clients)
it will basically tell you how much data each actor is sending
Can I do it on the standalone game rather than in viewport?
Haven't tried it in any way other than dedicated server
i am using GooglePlay Subsystem ofcourse cause it's on andorid
google play subsystem does not support sessions
I m guessing this is not a very good shape ππ
90% possible
try netprofiling shooter game example and use that as your optimization goal
I mean it's never gonna be that good Im streaming the whole level but I get your point
I think there's a bug tho
Not an optimisation pb
yeah see what properties are causing it
I think you'll need to profile server
send me your netprofile log
Ah that's what you were saying about the special command
To trigger the dedicated server's profiling as well
and use a separate process server
They're both initial only, but commonChunkData (of course the big one) has 300k replications instead o 188 WTF ?!
no wonder it doesnt work...
How could this happen ?
So how can one make multiplayer for android?
@brazen sluice relevancy/dormancy?
Maybe it's too large for the buffer so it keeps trying to resend it
Relevancy is distance based
It's set to InitialOnly as well,
And the replication seems to work, since I see them
Actually now that you mention it there were a few broken chunks
You could be onto something
A buffer too large clogging it all
Let me try to increase the limit
What engine version are you in?
Yeah apparently that's in 4.25 and below (deprecated in 4.26)
Do you see anything like βReceived a partial bunch exceeding max allowed sizeβ or βAttempted to send bunch exceeding max allowed size" in the log?
In version 4.26, these values have been deprecated and are no longer used, as the engine now uses the previous valuesβ maximums.
They also bumped MaxClientRate=
MaxInternetClientRate= to 100,000 in 4.26 too apparently
Oh interesting
Which is a mega increase
Some more info: When sending or receiving a bunch, UChannel will check its size against NetMaxConstructedPartialBunchSizeBytes. If your bunches are too large, you may want to adjust the net.MaxConstructedPartialBunchSizeBytes CVar. Itβs worth noting that this value is already quite large, so increasing it is not recommended unless completely necessary.
Maybe also look at net.PartialBunchReliableThreshold
But yeh my guess is it's too large, so it keeps trying to resend
haha
Time to do some logging I suppose
yeah
@chrome bay Value barely ever goes above 3000 and never above 4000 that's not the issue I suppose
Hopefully easy question: If a server spawns an Actor, then sends a pointer to it along a (reliable) Client RPC in the same tick, is it ever possible for it to fail because the actor hasn't yet been replicated on the client?
yes
That's unfortunate, but I guess it can be worked around
I remove the replication and now it works... the question is.... WHY DOES IT WORK IF IM NOT REPLICATING π
you can use RepNotify
Hmmm, I'm not sure how to repnotify on actor spawn
the repnotify willl be called if the value is different than the default one in the consytructor
Is there some kind of method on Actor that is called after being spawned on the client?
if an actor is replicated, then begin play will be called on each client
And there you can check if the actor was replicated from the server by role
Okay, that makes sense
hello everyone. what is the definitive way to replicate a skeletal mesh change? like changing a player mesh.
i tried to turn on component replication, and I use a RPC Server, called from the playercontroller
the skeletal mesh change doesnt replicate to the other players.
i've read a ton of articles and didnt find the proper way to do it
Is it possible to make my replication Server -> Client only ?
I think my issue comes from the fact that the client can freely set the value itself but then triggers some sort of check with the servers
what could cause a replication to fail other than max array size ?
If I enable replication on my value I cannot have anything else on the network , no replication no RPC
Going back to Jambax's theory about a failing rep that cloags the network on retries
The easiest way is to set a replicated pointer to the asset type with a rep notify. Rpc to server with the desired asset of the type, make server set the variable, in the rep notify, set the skeletal mesh component to use that mesh.
right ill try that
Is there a better way to make a value that only replicate once than COND_InitialOnly
Because I change this value constantly on thousands of actor and I think the server constantly check with clients if it wants it, and when doing so, still check the value (which is couple of kb sometime)
And everything crumbles
Can anyone help me with this i cant use sessions with GooglePlay Subsystem is there a way to make a multiplayer for android and pls dont tell me to post in another channel since i did and i got asked to post here again!!
How can one make a multiplayer system for android π₯Ίππ
AFAIK, only the server checks replication stuff. Client only gets it when server changes it and it gets replicated.
yeah but it's killing everything else :/
It should only affect server cpu usage though.
Well nothing replicates anymore if I enable that particular value to be replicated (with Condition inital only)
and it doesnt have any replication hook attached
I wonder if reliable rpc called one time when client connects would be better for larger data bursts. Not at home to test. Would be curious to know the difference.
Yes taht's what I do except it misses the initial data
If the server generate them before the client is there
Hence why I want to replciate once
But I mean server still has the data. It could be sent though new connection events in game mode. New clients would still get it.
It's an infinite world, sending world data to players only when they are around that part of the world
So on edit, the world sends data again via RPC
But then the initial set are sent upon replication
What does this waste column mean ?
Looks like replication checking vs actual replication.
Ive gotten stutter from folliage set to incorrect lightmap resolution scales causing me to go over budget if that helps you in any way..
It was never inherently noticeable until I got in range of the foliage in large enough clusters
What limits exist on replication ? is there anything like byte limit? Timeouts? anything
Other than array size?
The main limits are practical, large replicated data will simply prevent other things from replicating
if you have to ask, you probably shouldn't use replication
But here they prevent things eeven when the world has finished loading (aside from missing level chunks), Jambax proposed that some of the chunks gets stuck and retries in loop
But what would cause them to fail is the mystery
I dont see any other alternative, of course if I was sending new data constantly I understand nothing can work, but here it's after the data is loaded on the client, that still nothing can happen
Feels like net.MaxRepArraySize=16384 is not working or is getting ignored tbh
But it's set in the console
So may be I thought there was something else to setup
Setting net.MaxRepArrayMemory=1024000 helps,
but I still have a lot of actor not replicating at all
if a variable is rarely modified is it better to update the value via reliable RPC or just make it replicated?
Depends which way
For server to client, replication, no matter what
For client to server, RPC
I have a big problem :< . I have an actor component on my player character that gathers some data and then uses it to tell the character which attacks to use. I have a combo reset timer that brings everything back to default state once the player doesn't attack for a certain period of time. Everything is fine and dandy in a 1-player "Play as Client" scenario. But when it goes off in a 2-player "Play as Client" scenario, the object that shoud reset only its combat data somehow reverts to its state from the "BeginPlay" method invocation time. Every pointer it collected since gets nulled out. Every other data that was inside it (regardless of whether it's an UPROPERTY or not) gets wiped. I checked and the component doesn't seem to be corrupted from the blueprint's side of view. Does anybody know what could cause such a weird behaviour?
As long as the timer doesn't actually execute, the component works as intended
alright thanks
Hello Guys.I working on steam multiplayer.I when close steam system work but I when open steam don`t work For Each Loop
Quick question what does listen command do in open level or console command
Is there a way to "reply" to an RPC, as in send an RPC back only to a specific client
send a client rpc back?
@pearl hearth Presumably your array of sessions is empty. Nothing to loop over.
@kindred widget so advanced sessions not work right ?
It works fine. I'm not sure what your problem is. Just answering the issue with the loop.
First assumption is that your settings might be wrong for steam. You'd have to google how to set up your stuff for steam, I haven't done it yet. But by default you start with the null subsystem. AFAIK you also have to run the game on multiple machines with multiple steam accounts.
yes i try different machines and different steam accounts
I watched this video https://www.youtube.com/watch?v=EDNF2DNLhPc
βΊCheck out my Unreal Engine courses right here: https://devaddict.teachable.com
Getting Steam multiplayer to work in your Unreal Engine 4 games can be quite troublesome. So in this video, I'll show you how to create a very simple menu and server browser that works over the internet on Steam so you and a friend can connect and multiplayer! This ...
It was work before
then I open new project and now not working
it'll never work.
https://issues.unrealengine.com/issue/UE-16478
https://answers.unrealengine.com/questions/328659/change-skeletal-mesh-blueprint-multiplayer.html
@kindred widget are you available
Sorry for delayed answer
Yes rpc back, I was thinking client sends « please send me that data » and server replies with whatever data it need even async
ServerRPC from client to server, server does a Client RPC back with the data
But itβs going to be sent to all clients
Unless I had client owned version but I canβt do this because itβs thousands of actors per clients thatβs tens of thousands for the server
what ou mean?
you*
the server rpc has to be run on an actor OWNED by that client
so a client rpc will go back to the same actor
owner*
Anyone got any experience with multiplayer and particles? im attemtping to make particles activate on the client player alone but it seems to be activating on everyones side
Is there an event (maybe a gamemode event or gamestate event) that fires on the server after the client finishes possessing the character?
@spring swift What is the particle for? Sounds like you just need to trigger it locally.
The Particles are for a snow effect that follows the player and i turn if off and on everytime a player hits a box in the world with a certain tag
You may need to add a check to your box that checks if the hit player is locally controlled.
all the functionality is in the player tho? it triggers when the player hits a object tagged with the name
Same thing. Only run the logic if the player is locally controlled. There's already an easy function to use on the pawn for IsLocallyControlled.
Right now the level parts are owned by the server
I replicate + multicast on them
But having 3000 replicated actors, even if no property gets replicated, already completly kills the netwrok.. .I thought the issue came from all the data, but I disabled them and the network is still congested
So I am trying to reach a setup where the level part wouldnt be replicated anymore but it's a little though to find a way to sync the level data properly, hence the question, could I just have the client say "hey server can you send me level grid 1,2,3" And server replying to that client only "here you go kiddo"
I'm not sure how you ascertained this, there are plenty of ways of replicating this, even if it's just replicating a reference to the SKM and setting it on the client in an OnRep
might want to use a soft ref though so that it's streamed in as to not hitch the game
Lolol I loved reading through those. "Known bug".
if(GetLocalRole() == Role_AutonomousProxy)
{
blah
}
In a server RPC, this will always fail, right?
It should. Since those should only exist on clients. On server, role should always be authority.
So GetOwner() prefix never should be used if I want to pass client data in server RPC
Thats odd, I should be missing something then
prefix? Not sure what you mean.
GetOwner()->GetActorLocation in a server RPC will always returns server location
Not clients
I meant that
Correct. If you want client locations, you need to send it through the RPC. And even then if you're locally simulating, that's only an approximation.
What if I feed the data via OnRep?
Client calls RPC -> RPC sets the OnRep variable (with GetOwner()->GetActorLocation()) -> in OnRep set the transform (if role is autonomous proxy set the transform, and if we are server, skip the function?)
What about for simulated proxies? This would only affect actors that are locally controlled, or owned by the local controller.
Not quite sure what you're trying, so I'm only half following.
One month ago I made a basic pawn movement replication and now I am extending it and refactoring
SimulatedProxies are being interpolated on Tick()
Some guys world origin shifting for multiplayer PR got merged into UE4 a long time ago. Anyone knows what happened to that?
I was passing the data via parameters on server RPC, but when netpktlag=200 my locations are acting weird (since I am sending data via parameters, server and autonomousproxy locs are different and they are both sending data and client is teleporting between two locations in a loop)
I thought if I use GetOwner()-> I could solve it, but didnt work. Trying to brainstorm about it
From what little I understand of CMC, both the client and the server do the same input on the component. Both simulate it locally, and server replicates this to simulated proxies, but tries very hard not to interfere with the autonomous proxy unless it's out of range too far from the server version. I don't know if it does this by replicating the server's position constantly and lets the client check it, or what. But it rarely messes with the client's owned pawn. It feels bad for the player to get jerked around a lot. But at the same time there's little you can do for bad connections.
Yeah I also tried to understand CMC and analyzed other replicated components to find a workaround. Also I have followed the KrazyKarts tutorial (https://github.com/UnrealMultiplayer/4_Krazy_Karts/ --- thanks to Stranger π ) . Looks like engine components and krazykarts have different philosophies about replicating movement.
Having a mix between two was a bad idea indeed π
As far as I know testing replication with netpktlag is a common rule and if its not working as intended with a value like 200 I am sure I am missing something
Is it possible to replicate an actor to specific clients?
I'm trying to have clients spawn a projectile locally then have the server spawn it and replicate it to everyone else.
Right now I'm getting away with spawning it locally on the originating client, then spawning a non-replicated version on the server and other clients through a multi event.
Is that possible in blueprints or c++ only? I haven't messed with c++ at all.
c++ only, a lot of the advanced networking stuff is c++
you could..
spawn it locally, and set it to owner only
and spawn it on server, set the owner as the shooter, and set it owner no see
and keep it replicated
but that is just the mesh iirc
they will still get the projectile, but won't see it
but apart from that you are out of luck in BP π¦
So I spawn it locally on the shooter's client, then spawn it replicated on the server while setting the owner to the original client and OwnerNoSee to true?
yeah but you can only do that on the mesh
in C++ you can stop the entire actor from replicating to owner
Hmm, seems like unnecessary complications when the c++ option solves everything.
Hey there, can someone help me?
I have a pawn that has custom movement that's being smoothed out so it looks good even when updated only once a second. This is very similar to the KrazyKarts projects if you know it.
My problem is when I try to stand on top of that pawn as a character, even if I'm attached to it.
The character only seems to update position as often as the pawn is updated, which results in very visible jitter.
What can I do here? Smoothing the character with similar code as the pawn might not work properly since it already has Unreal's own CharacterMovement replication. Is there another way to go about it?
Hey everyone I am working on a mac and using unreal engine to launch onto the oculus Quest 2. when I launch, the launch will succeed and the application is found in my unknown sources on the headset. when the application is selected and the three dots show me that loading is finished the screen remains black. what should I do guys ?
think you'd get better help over at #virtual-reality or #macos
π
I wonder - is it effectively equivalent from a networking performance perspective to replicate an Unreal primitive (e.g. bool, float, FVector), as opposed to setting it via Multicast event?
Depends what you mean by performance
the serialization format is the same
but there's an added CPU cost on the server for replicating variables
because it has to check to see if the variable has changed
(unless you use push model)
Is there any callback or function when an Actor has recently replicated properties?
There is PreReplication
Doesnt seem to be a PostReplication though after its finished dispatching the changed properties
@fossil spoke i don't see anything either
i looked for this before, i see where it calls Actor->CallPreReplication
but that is all it does in NetDriver
There isnt, i just double checked its execution path and there isnt anything at all.
Bit of a shame really.
Yeah the only reason I can come up with for why they dont is they might not want to iterate the list of changed actors more than once???
Yeah i would have thought so.
Like i said, cant really come up with a decent reason
seems odd, but π€· maybe its something that can be mentioned, they might put it in, but i can't see why UActorChannel::ReplicateActor can not call PostReplicate on AActor
Maybe its already in UE5 π
Can we replicate Texture, or do Video Streaming ? from Client to everyone.
I want to replicate a RenderTarget basically.
What would be the approach to do such kind of thing.
not doing that?
so what should i do ?
Why do you need to replicate a RenderTarget?
What are you trying to achieve?
Are you trying to let people watch a Youtube video together ingame or something?
yes
exactly something like that
I am trying to think how can i replicate browser
I can replicate URL, but thing is for some website, URL stays same, but stuff changes on the same URL, so that is making my life misearble.
Replicate the action of clicking on the screen for example.
hi. when I host a game without Steam (through console), the number of servers seen in game is equal to opened game instances. however, when each of my collegues host a game on Steam, only one server can be seen. I have no idea where I should start searching. game has unique AppID, we are in the same city
Out of curiosity. Why doesn't FastArray just have a .add helper function on the FFastArraySerializer with like a.. templated add thing and a second argument as a bool for whether or not to call PostReplicatedAdd or not? Is this oversight, or is there some reason they don't do this, or is it just a laziness factor?
Bit annoying to debug and I haven't done that in ages, but first thing would be checking that your colleagues are actually properly hosting.
Via existing logs and enabling LogOnline, LogNet and what not (might be worth checking source what Logs are relevant).
And if that is all working, check the same on the client that is trying to find the games, check if they are maybe found but discarded or so.
There are also logs that would print that iirc. Best is to go through the Steam Subsystem Plugin, and find the Session related bits and check the logs of that.
ok, thanks, I will do that
Quick question, what is the console command to show dedicated server FPS for the clients? I did some digging in the internet with google and couldn't find anything relevant. Thanks!
Unless there is an existing helper, I am assuming you need to RPC an updateFPS function
Or simply replicate the current tick rate through game state
Hmm, what's the general consensus/good practice on tracking players in gamemodes/other game logic? IE whether to use states or controllers as a "playerlist"
A bit confused since most events inside GameMode use PCs, but GameStates default player array uses PSs to track the players 
Yeh, PCs are owner only
This is for mostly serverside logic, replicating is ofc through PS's
Hello all. I'm looking for info on level streaming with multiplayer. I've got a menu level as the entry level, the player clicks to join, and this opens the main level. I'd like to make it as flexible as possible, so that level streaming works on client, listen server, and dedicated server. Is there an easy way to achieve this? Right now, the level is opened on 2 clients separately. I'm calling open level from the Game Instance. Thanks in advance for any info.
I've got my Linux server build compiled and going to push to our Digital Ocean server VIA P4. What Files do I need to be pushing in order to run the server on our VPC?
you just need to run the packaging for the linux target and then you'll get a folder with all required data
these are what I have, is that correct?
yep, looks like
So I just execute the shell script on the server and point the shell script to the file above it?
on our VPC that is
our ignore list is removing the large file, is that something required?
I've never really used linux before so I am not sure of terms or what I'm supposed to be looking for to be honest
which file? this is a folder and for me it is just a few MB.
well but we don't check in any binaries anyway, so^^
and for me this folder not even is part of the package oO
I have moved a few things about to try and restructure it, hopefully that doesnt cause issues
the one above the shell script in my first picture which shows up as "File" for file type isnt being pushed to our server
well, don't restructure stuff you don't know what the structure is for ...
If we package our stuff I get a folder and this folder we put into a docker container and that's it.
Is docker something I should be looking into?
depends^^ It makes deployment very easy in the end, but most likely we will drop docker at some point, since we use kubernetes and agones to dynamically spawn new instances and this wont support docker in future if I understand it correctly (I'm not very exp with it, one of my team is handling that, I just use it^^)
If I'm only looking at having 1 test server up for 5-8 people max will I be able to do that on the same dropplet that my Perforce is on? Or what is the process to spinning up a server when someone calls the create advanced session blueprint in Digital Ocean? I've spent 3 days scouring for info but cant find much documentation
I'm so lost in all of it π Sorry for flooding with questions.. the last week has been just trying to get a server on Digital Ocean and I very lost
what?
Quick question for the multiplayer's veterans:
Can a server build be generated with the binary ue4 version or the source is needed?
Thanks π
Sorry that was worded pretty poorly. I've put the dedicated files into our server, and connected to the server console. How would I spin up an instance of that on Digital Ocean?
what is digital ocean
no idea, we have a simple ubuntu server and just start the executable
Mine is running ubuntu 20.04
well then just run the shell script I guess, not sure if you have to install smth before hand, since we use docker I don't need to care for that anymore xD
I've probably got some steps I'm missing then! I really appreciate your help
good luck^^ sorry I don't remember what I did before docker
That's all good ^^ Is Docker worth getting in conjunction to Perforce, do you know?
we use git, and we deploy with docker, not with git^^
I'm trying to run that on root of my fileserver but getting no such file directory
you need to cd into the correct dir
That may help! Whoops
Was hoping linux was just super smart with indexing magic or something
well you still could have the same file name in different dirs π
now that's a good idea
just make a normal shortcut for it in the main dir?
nevermind i completely misinterpreted
you could create a command in a .bashrc file that does the cd and startup
yea, but typing that each time...^^ there is a command like startserver easier
Is cd a different syntax in ubuntu to windows? I can't seem to get into anything
is what I have
this is the sh script that unreal creates, yep
Would that work fine? or is there any better way about it
make it run first^^
Yeah that's a good idea π
I can't seem to cd into anything via my terminal :/ Am I following the file structure I see in Perforce which is "//depot/"
that is the "online" structure but not the checkedout
you first need to checkout the depot on the server where you want to run it, I don't think you can run smth inside your perforce server thingy
Is that where Docker comes into play?
no
How would I checkout that on the server?
Well you use perforce, I don't know how this works with linux^^
So by me having that on our hosted server I can't just fire up that application on the serve that's hosting these files?
perforce sorry
okay, I was hoping I could try and get it working that way to only have a single server running. So I should setup another vpc and run it on that?
I think I've got you thanks π Would there be a tool to deploy my server builds to the cloud host that you could recommend?
bloody arthritis π
we got there in the end
Oh don't you worry I have that DLC too
Yeah, my experience of hands on server work are about 10 years old, and then it was primitive. So now i'm out of my remit entirely
It looks like my webhost has an autodeploy tool that connects to Docker. Perhaps this will save noobie me
Possibly a bit overkill then
maybe start using smth like filezilla to upload the server package into some dir on your server and then use ssh to start it
Quick question. If a controller is a local controller does that just mean that it exists on the client or does it mean that it's THE controller that represents the local player and not any of the replicated actors that the player might have spawned on his client?
Or does it mean something completely different and for example controllers on the server are also considered local to the server?
Local Controller means it's the local one on that Client that owns it
PlayerControllers only exist on Server and owning Client.
Okay so there can be no local controller that isn't on the client and at the same time isn't the one that reacts to for example user's keyboard key presses?
Local controller is the one and only? π
For that particular client of course
Yes, Clients have no access to other Controllers
And for the ListenServer, it would mean that it's their own Controller
hey all, im getting issues with spawning replicated actors on the server, they spawn correctly on the server but are extremely unreliable with spawning on the client (I spawn ~8 actors that should appear on every client but every client can get different amounts of the actors to actually load)
I'm wondering if this is just some weird in editor goofiness? I tried standalone but that still showed the issue and im considering compiling out a build to try it there but if its unlikely to be weird stuff in the editor then I probably won't bother
never seen issue where client fails to spawn actors.. that sounds weird
Yeah, it seems really odd cause I get no warnings or anything regarding it... they just never appear on the clients
just as a rough showing, left is the server right is a client. There's no real consistency to what actor classes its happening to (Can see even in this instance, we have 2 "ufo" actors in the server but only 1 appears on the client,
but this also only happens on the 2nd time we enter this phase of the game. The first time it runs round its absolutely fine
@thin stratus how would i even know if something clicked on browser, like a button inside a web page ?
No sure. It can totally be that UE4's very minimal Browser Support won't ever allow doing what you want to do.
@tranquil yoke there is a way.. if the website that you are loading is maintained by your team.. then you can bind a UObject to javascript function callback... And UMG webview to have a public function exposed to bind UObject.
It needs c++, no bp at the moment
OK right, regarding my issue of clients not spawning actors... it turns out i've gone from a completely smooth brain to having a single wrinkle. It wasn't set to spawn regardless of collision blocking it, so i guess on clients there was something blocking the collision that didnt exist on the server
its always the simple things huh
well, im glad its fixed but ive been trying to figure it out for most of the last week or 2 lmao
@tranquil yoke https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Runtime/WebBrowser/Private/SWebBrowser.cpp
and search for void SWebBrowser::BindUObject(const FString& Name, UObject* Object, bool bIsPermanent)
Name is function name that should be called from Object
this way you can bind the UObject to web view button click.
not sure though, but I think this is how epic games uses web view for payment gateway for nonce stuff.
Hello, can anyone explain to me how to create a simultaneous match countdown ?
I found a video, but still failed. And the setup I made myself works somewhat, but I'm pretty sure that it's flawed
@weary badge what do you mean by match countdown?
Before the match starts, I want a little countdown form 5 to 0 before the game starts
ok, so how you implemented it?
But i always have delays
the last thing I tried was
an event dispatcher to all player characters, who then call the event on their respective player
It's for online play, in case this would be relevant
this time variable is actually seconds elapsed after match has started
it is a multiplayer right?
yeah
you will have game mode, game state and PC and PS
just multicast RPC to clients that from 4th second the clients should show countdown timer
and clients will check that time variable from game state.
and on 9th second the countdown timer will reach zero
i hope you understood my logic
I'm reading it atm
basically clients should know the timer start time, once they know just start it. the clock second is same on client and server
@rich ridge Thanks, will look into this
What systems are available in UE for creating multiplayer sessions beyond LAN setups? I know there is the steam subsystem, and Epic has its own EOS. Are there any others? Looking for something that can preferably be implemented through Blueprints since I have very limited coding experience
If you're intent on sticking with blueprints only, you're going to have a really bad time with multiplayer. It's doable, but you lose a lot of control.
@kindred widget , understandable. I'm looking to use this for enterprise remote collaboration, so I don't need a lot of features like player profiles and metrics tracking. As a starting point I'd like to just be able to get multiple people in different places into the same environment in VR. Is that still a stretch for Blueprint-only?
no @tranquil beacon, but any kind of optimization is impossible with BP
metrics tracking in blueprint tho, i'd rather go watch over sheep all day π
Which system would you recommend then for a basic multiplayer setup like this? Again, I've seen Blueprint tutorials for setting up Steam multiplayer, but my understanding is that would require each client to create a steam login (maybe not a dealbreaker, but not ideal for enterprise). Wondering if there are other options here
@tranquil beacon Hard to say. Depends on your desired use. AFAIK, Null is fine for simpler uses. It allows LAN connections and direct IP connections. Steam allows easy those as well as friendslist and server search connections. I have no idea about any of the others like Facebook, Amazon, Twitch, etc. I'd assume something roughly the same as Steam with connections based on the platforms.
@tranquil beacon you'll have to do a little bit of C++ setup but it's not like you'll be writing 1000 lines or anything. I'm sure there's a million tutorials on getting steam sessions working
If it's a really small project and not meant to be widely distributed, you can probably just host your own server somewhere and do a IP connection
@kindred widget , @winged badger , @dark edge , thanks! I'll dig into these options further and see which one makes the most sense. Learning a little C++ along the way might not be too bad either
what function(s) should I be looking at overriding to verify moves in the CMC? looking for server authority crowd controls like Roots that can prevent movement while active, checking for them is simple enough, but I want to know exactly where I would put that check to prevent the server executing client-sent moves that should be rooted
@vivid seal extra custom predicted stuff is carried in FSavedMove, or your subclass of it
so you need to extend it first, then plug it into the CMC
you'll see what to override with a reference search
alright, ill take a look at FSavedMove
Hi trying to spawn and add multiple components to an array, but for some reason im only able to spawn 1 component on the client, subsequent additions are either overwritten or not spawned.
Works fine on the server. Anyone not as thick as me got any ideas, as what im doing wrong here π
this is all done on the player controller btw
@pliant locust what are the multiple components you're talking about, are you calling that event multiple times?
its an inventory component, I call it every time a new rts unit is spawned
so actor component to be more specific....
So that print string never prints anything more than zero?
indeed but only on the client, server prints correctly
You should definitely not be adding components on both sides. Replicate them. but why are you adding a component per unit, that sounds smelly
its not as bad as it sounds , think heroes of might and magic if you ever played that. the player can control a hand full of units and each unit has their own inventory.
Why is the inventory not on each unit, and instead all on some Pawn or player controller or whatever you're putting them on
I didnt write the inventory, and it needs to be housed on the player controller by the way it was designed...
but if you say that is the wrong way to go about things I might just have to write my own then π
That sounds whack, but anyway, just do the logic on the server, and replicate the results AKA resultant array
Looks like you already have the array replicated, just have a rep notify on it to trigger whatever should happen whenever it changes
but I already tried running it on the server and the array still prints 0? am I missing something here?
Prints zero on the server?
yeah when called from the client
What's inside that add AC inventory function? it looks like you're not passing over any sort of parameters so how would it even know what to add or what unit to associate it with?
Well the actor component, with pretty much all the stuff for the inventory. but as I said it successfully adds the first inventory but no subsequent components. so obviously the server is able to add at least one inventory... π
How does it know which unit to associate the inventory with? Or is it just like you spawn a unit, you know what index the unit was, so that is the index of the inventory?
something like that yes, as you can see in the image, current hero selected gets assigned the array position after its been added.
You should pass current hero selected over inside the event
Otherwise if that hasn't been passed over already by the time the inventory gets created you could have the inventory get given to the wrong hero
ah ok, but shouldnt the print string still show an increment on the array?
well that made no difference, but thank you for taking a stab I think I might just have to rethink my approach all together.
First thing first I would confirm that you're actually calling that event multiple times
I mean it prints each time I spawn a hero so Im sure that works at least π
Yeah I don't know, put the inventory on the hero. It's kind of strange to have it on the player controller anyway. If every hero has an inventory, just add it to the hero BP and call it a day
yeah that sounds like that way to go, ill give that a shoot
Hi everyone, when I call SetViewTarget on another player's pawn for a spectator cam, how do I ensure that the camera's rotation follows the player's view point? Currently I'm just calling SetViewTarget and the camera follows the pawn fine, but the rotation of the camera is locked in a single direction. What I want is a follow cam. I have tried overriding GetPawnViewLocation and GetActorEyesViewPoint, but it's not working. Am I missing something?
I supposed I could manually force the camera using Tick, but that seems like a really ugly way of handling it
Thanks @empty axle
@hybrid zodiac what is the player character cameras rotation driven by right now?
If it's control rotation, I'm pretty certain you cannot see the control rotation of another client.
Try using getbase aim rotation instead
@dark edge Hey thanks for replying π I have a function in my character class called GetLookRotation(), this function returns either the control rotation if you have authority or are the local controller, or it returns the replicated rotation (RemoteViewYaw and RemoteViewPitch)
I have overridden GetActorEyesViewPoint which uses this GetLookRotation() function to set the out rotation
But SetViewTarget still has the camera locked in one direction, so the camera must be getting its rotation from where else
What is CalcCamera used for? Is that for view targets?
I tried overriding GetPlayerViewPoint as well, nothing
@rose egret I don't think that's exposed. There is a KismetSystemLibrary call for IsServer though. It just checks if GetNetMode() != NM_Client
Guys , I just wanna ask how do I implement a PUBG style matchmaking . Forget about the gameplay and the other thing just tell me how do I make a that sort of a multiplayer matchmaking system because the system matchmaking system I implemented is boring and felt a bit inappropriate and yeah please provide me with code in Blueprints preferably . If C++ no problem still . If you know what should be done . DM me
does anyone know what might be causing this behavior when moving right this only happens locally when moving left or right when both playing on client
its like some werid twitching and im trying to figure out what causes it
@sudden lagoon Matchmaking happens before UE4 - you'll need to handle it on your own servers, with your own matchmaking service, if you want something somewhat elaborate
Hmm. Had a random, curious thought. How would you replicate ocean waves? Been playing Valheim. Was rather amused by the sailing. But it had me wondering how I would personally do that. My first thought was replicating something like an array of values that could create or simulate splines, like wave height, length, speed, etc, and let each machine simulate that with a few updates a second.
Deterministic simulation with a shared seed + start time
That's fair. Even with weather differences it would still be about the same. And server time is already replicated.
Fun thought. I might try that later. Need to finish my building stuff first. Snap points.
Hello! how can I send AIcontroller data that happens only on server to a specific widget?
As expected, casting to AIcontrollers in client fails on Widgets.
@sudden lagoon There are many ways to do what you want though I dont think anyone is interested in making the whole system for you. Though for my games I use playfab which has some blueprint support to for playfab party its fully c++
@olive kraken If you need stuff on the client. Possibly use the pawn instead of the controller and just replicate it. Then the client widget can just get it locally.
No I don't wanna system but some code for a kick start . @eternal canyon
I have foudn this guy
particularly helpful @sudden lagoon
though playfab is just a lot of json objects
which arent hard to get used too
and you get 750 hours a month for servers
Yeah, I thought about it. The problem is that most of the data happen after our perception system in the controller AI.
So I might need to go from controller to character to widget?
for free
im doing a networked building kinda game
I could make an example project u could use for a queue system and server system example @sudden lagoon btw
if u really want
and my buildings disappear from a distance because of net cull distance, i guess
Yes I want it . Is it free ?
what is?
would it be a bad idea to turn the net cull distance way up so that my buildings dont disappear?
at least for like, walls and floors and stuff
The Project @eternal canyon
im pretty sure if u have net load on client enabled that shouldnt happen @leaden atlas
@sudden lagoon I havent made one, I was aying I could if people want
π
@eternal canyon does that apply to stuff dynamically placed?
na I don't want it I think I know what to
yeah its spawned in
i mean is there a way to keep it in past its net relevancy distance?
i dont want the client to keep receiving updates about the actors
but i do want them to be able to see it at a distance
always relevant tho I wouldnt recommend that for a ton of actors
it would be for a ton of actors
its for like, walls and floors and construction stuff
In this case your best bet is ReplicationGraph
There is official stream on rep graph.. you can watch that to see if it actually solves your problem
yea
kk
this looks like exactly what i need
And if I m not wrong, engine also ships a default graph example
But remember rep graph π is c++ only
theres a plugin somewhere on github that exposes some of it to blueprint
tho its the bare minimum
and its pretty old
@leaden atlas
^^
this is the blueprint exposed
oh this helps though
@eternal canyon I came across this tutorial series but the thing is that I don't have a Steam API key so yeah I did not attempt doing this tutorial series .
you dont need steam
@sudden lagoon
Thats just what he'susing
the blueprints still apply
for everything else
I have steam but no API key
OOO
The system doesnt rely on an OSS
So , that part where he installed steam is unnecessary and I am not talking about OSS , OOO means OHHHHH ! now I get it @eternal canyon
yea
Ok thanks @eternal canyon
how to port forward for unreal?
for test dedicated server
the issue is that port forward doesn't allow my ISP, so what should i do?
Heya all, someone on my team is trying to connect to our dedicated server but is unable to. I can see "client connecting with invalid version. LocalNetworkVersion: -626150653, RemoteNetworkVersion 1082236133"
Any idea on how to get around this? I've compiled the server VIA source, but my team is running on standard UE clients.
well it seems tehy are ona diffrent build version
that isnt compatible for some reason with the servers
tho i may be wrong
@plain torrent also why not build the client from source also
I'm not sure I follow what you mean sorry
I have built the client from source to create the server, so the rest of the team also need to be running source builds, right?
im so confused what ur doingπ
me too me too