#multiplayer
1 messages Β· Page 540 of 1
I have a Problem. The Server teleports 2 Players to a Location and Rotation Point in the world. But the Rotation will only synchronized for the other players. The player see himself as the rotation before teleporting
Both should be looking into right but only the other client is for a player visible with the correct rotation
Is something screwy going on with the latest (4.25.0)? With PIE each client window is printing out all messages from the GameMode BP. That shouldn't happen right? If I run Standalone the client's don't get the GameMode messages
That's normal. With pie the instances share a process unless you tell them not to
ah so the only proper way to test replication is with Standalone option?
Right click the uproject file and hit launch twice, basically
playing standalone seems to give more reliable feedback than PIE
Why that is not working? its in the PlayerController BP
I think the Server will set it visible again, but how i will hide then actors for specified players?
Ah nvm, i need to check the children button that everything else is also hidden π
Is there a way to get all player controllers which are connected?
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/119099-getting-all-player-controllers Does this work for you @twin juniper
Build powerful visual scripts without code.
It looks too complex that i want to use it. Actually i registered the players in an Array by my own which works fine
yeah, I did the same actually. from the EventOnPostLogin which kind of works but is a bit buggy. Not sure why yet..
am i able to set the camera to "static"? Actually the camera will move into myself when i stand in front of an other player
i disabled the collision for the player collision capsule but the camera is not care about that
Do you mean that the camera changes position when you have something behind your character?
Yes
It's cause of the SpringArm that is connected together with the Camera
Do Collision Test needs to be unchecked
π€·ββοΈ Disable it and test
I'm back with my questions about CMC. Have anyone implemented custom data replication via CMC?
@twin juniper HiddenInGame is replicated
no need for a client RPC
just get server to set it and client will be hidden
if i set it in server, it will be invisible for everyone
What is the difference between render off vs hidden function?
wait hold on
you said you dont want him to be invisible
to himself?
so why is the client RPC making him hidden?
or you only want to make him invisible to himself?
and other players can see him?
π
Anyone else experiencing extreme lag with SteamSubsystem, non dedicated server.
I sent project to my friend, the ping says 9,999. And it stutters sooooo bad.
It should be P2P right?
When not using Dedicated
I host, Im the server, he joins, hes the client.
Possibly too many RPC calls?
Can the dev console show that or do i have to implement it in?
stat fps
dev console then stat fps
SHows 600 FPS
On server ?
thats in PIE, on the build its 250 3ms
Is this due to draw distance? Is there a default draw distance?
What is the framerate on the hosting player when performance is bad
Simple question
Everything is quite basic, taken from the FPStemplate
By stutters, do you mean the character only, or everything?
Believe only the character
And on his side only. Seems fine on my end when hosting.
And vice versa, shitty when i join and he hosts
Then it could be bad specs on his part
Does the project work with simulated lag in multiplayer PIE ?
It's not a perf issue
character stuttering is server correction in CMC
CMC?
character movement component
google UE4 pktlag
Net PktLag=1000
will set lag to 1s
If it works fine with 200 you have a problem
Hopefully you will confirm a netcode bug with 200
Unsure where to plug this into
console
Looks worse
That's the point
A NetPktLag of 50 is real-world conditions
100 would be a bad connection
You can also add other settings like 5% packet loss
If it stutters with 50 lag (ping = 2xlag + frame time on server = ~110ms) then you have a bug to fix
1000 pkt lag is extreme (2 seconds ping, won't ever be playable)
Rodger, thank you.
So clearly its some sort of replication issue on movement.
If the BP (self) has replicates and replicates movement. None of the other components need to have it checked right? I just unchecked it from the Capsule and poof, the stutter went away, in PIE that is.
Character movement is replicated by default anyway, no need to replicate that yourself
I have no idea why the capsule had it on.
Anyone experiencing weird behavior with 4.25 and testing multiple players? It seems to work different than it did in 4.24
settings have changed, yes...but mp seems working as it was
Hey, since the topic seems to be similar to the one I have been having for a few days and have not gotter answers before.
I am trying to do client side prediction and on client, when I have set lagg to half a second, when I execute an action, I call it on client right away(I also log into console the same time), now the log appears right away but the action happens sometimes right away, sometimes with a delay between 0,1-1 seconds
When I do a normal mp test it launches one in PIE and one in stand alone, which works but takes far longer to test. It looks like the βlauch as one processβ feature fixes that two and launches both clients in PIE but causes new problems I didnβt experience in the past.
Hello, how are you? I am developing a Battle Royale (with blueprint) and I have a little difficulty... When I increase the scenery, which I did using the landscape function to more than 400x400, the character does not appear. Can you help me?
Anyone can help me please?
Why are all opened windows when hitting play called Server? Using 4.25
You can help me?
@stoic acorn they changed the play settings for multiplayer. im fiddling with them but to me they seem really buggy now. ive had zero problems in 4 years of UE4 with MP testing until this release.
it launches much slower, if you test as listen server, the listen server launches as PIE but the client launches in a standalone thats way slower
yeah 4.25 multiplayer seems really weird
can someone help me please, my play sound at location play for server but not for client
What even happened to the Dedicated Server button?
well thats "play as client"
ahhh ok!
they change the verbiage. if you choose play as client, they auto start a dedicated server for you.
They do like to make things look neater, i'll give em that
im getting lots of bugs though now that i didnt have in 4.24-4.22 in this project. i think its just buggy
seems like a case of if it aint broke dont fix it
Damn that's a shame
I tend to wait for the bugfix versions to appear before I upgrade projects
probably wise. i wanted to play with niagara thoguh D:
FeelsBadMan
Yeah I've been tearing my hair out all day trying to figure how to properly test things. Doesn't make things easy when learning BP multiplayer at all.
i guess my main beef is why does it launch the second client in a standalone window? just takes forever
Hello, how are you? I am developing a Battle Royale (with blueprint) and I have a little difficulty... When I increase the scenery, which I did using the landscape function to more than 400x400, the character does not appear. Can you help me?
Have you set the BP_Player to be in your GameMode Pawn list?
Yes
when I increase the size of the landscape this problem
but it does not happen when the landscape is at 100x100 does not give this problem
that sounds really weird
auto clipping plane?
It's just a guess as I'm just learning UE4 now, but have been 3dmodelling for years... and it sounded like a clipping plane issue maybe
does the character not appear or is it not spawned?
Not Spawned
probably not. Was the landscape dimension the only thing you changed before noticing the character disappears?
any heightmap or elevation on the terrain?
Some elevations made in the landscape sculpt
This is just a wild stab in the dark but is your player start embedded in the terrain after the scale change?
also what setting do you have on your player start?
how so embedded?
Do you have your PlayerStart in your scene?
Yes
under the Actor > Spawn Collision Handling Method?
Default
RE: embedded I meah is it beneath the terrain or partially beneath?
It might cause issues with spawning if it is (guessing here)
Not, the player start is above the ground, just as the mesh is also
But I only use the player start
OK I misunderstood
I think I also misunderstood
I'll try to explain, I only use the player start, with the player character specified in the gamemode
because as it is multiplayer I have to use only the player start
Do you get any interesting output logs when you start the game?
I didn't even look
Would you only use RepNotify on variables that have no effect on gameplay? When else would you use it?
OnRep can be useful for doing Health or when playing effects for example bullet impact effects, it is also useful for traffic lights and so on
I am having a lil issue. For example a player changes his skeletal mesh. Works fine no issues with multiplayer. But if a new players joins after someone changes his mesh. The new player won't see that change. How to make sure it is also replicated to new players that join?
Are you using multicast by any chance? That can make things not update for new players joining in
Yeah I use multicast
The on server event triggers a multicast event
So everyone sees it
The downside is that new players won't see the change
Use OnRep instead π
Read the first reply from Sam Bonifacio if you want to dig a little deeper on understanding the difference: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/25318-onrep-vs-multicast
For gameplay programmers writing C++ code.
Yeah I use blueprints
I think it's called RepNotify on blueprint @viral raft
Sorry if that's wrong, I have a hard time with blueprints. No problem π
Thanks WhyAreLess, good info this
no worries! π
Have brazilian in this server??
Did you get any information from the output log, did you fix your issue? @empty matrix
No
@stoic acorn Rule of thumb: RepNotify(OnRep) - For things that have a state, traffic lights, chest being open/closed, etc
or if you have to run logic client side if that variable changes from the client version (health changing, etc)
(as replication goes Server -> client, never Client -> Client or Client -> Server
Are you in a sense trusting the client to update the server with info? Can that be exploited at all?
If a montage is played locally will other players hear any sounds from the montage ?
no unless you replicated those sounds some other way. why would they hear it?
Ok but if I play that same anim on the server would the local player hear it ?
I want to play weapon sounds but I have 2 meshes and I want to play the sounds with montages
So I'm looking for how I can do it without a player or other players hearing 2 sounds at once
nope
it will only play on the server
weapon sounds are cosmetic
you normally don't tie them to a mesh in a FPS game
same as muzzle flashes
FPS is pretty tricky π
This sample project is gone from the Epic Launcher Learn section. MP Shoot. What gives? https://docs.unrealengine.com/en-US/Resources/Showcases/BlueprintMultiplayer/index.html
Breaking down the Blueprint Multiplayer Showcase and how it was constructed.
It was there in UE 4.24. Didn't make it to 4.25?
@meager spade then for stuff like reloads I'll have to make one long reload audio file ??
Luckily I had checked the project into Github. Upgrading to 4.25 just had one BP change. PlayerName became GetPlayerName()
The learn section needs a really good MP tutorial though
UEEditor still has the bug where you can't connect to a session in the editor. Requires a standalone client.
MP Shootout is garbage for multiplayer tho
Hi ! when i got an online game ready, even with a create and login, when i log in i always start at the same point. is there a way to handle it that i start were i finished? how is it called? how can i find more about that ?
thanks if you help
so many bad practices
You should make MP tutorial, sounds like a plan!
If i call something from the server in the GameMode Blueprint to add an Actor to the Player Character which has logged in in the PostLogin Event, how do i replicate that?
i have added the blueprint manually into my player character and made it invisible. But when i use set visibility from the server, it wont affect on the clients
The Udemy MP tutorial is finally on sale for $12 instead of $100
link?
Yep I'm following it at the moment. Can recommend! @raven moss
Tom Looman is a G
doing network stuff in blueprint sounds like hell
Yeah
though this one is a bit confusing, gamemode events are run on the server and you're toggling visibility based on a player joining... but that only runs on the server
why does visibility even need to be toggled in this way based on login
@raven moss sometimes its even 9
I think he's working on a new course too. Let's hope for the best π
I just choosed the PostLogin to do actions for specified players for testing
so i want to set the visibility of an Actor which is in the Character of a player
But set visibility did nothing
in postlogin they probably won't have a pawn yet
they wont
yes but i did a delay
its just for testing as i said π
well use the proper place
just dont understand, why set visibility executed on the server, wont replicated
cause Visibility is not replicated
so i need to send it to every client and execute it there?
setting it on the server, only sets it on the server
it wont magically go to client
I thought it is replicated like the position π
not everything is replicated
Replication isn't either, other than character
Unless you count the tick box that only works for stuff that doesn't move
Movement is replicated with actors (via SetLocation) on server if the Replicate Movement is ticked
Unless you count the tick box that only works for stuff that doesn't move
Well it works, it just teleports once per second
well its not smooth for sure, its not once per second tho, its everytime the actor is replicated, which is based on its update frequency no? or do they throttle movement?
Depends on how busy the server is and how the network feels like
It will absolutely never be anywhere near smooth
It just can't
yeah, so its whenever the server replicates it, which is why you have to use smoothing and prediction between updates
Yes
You can't add smoothing on it without disabling "replicate movement" though
Anyway, not the topic π
Man if everything was replicated, I would be living the dream lol
It's called Stadia
Is it normal that the Event Possessed on a character gives a double reading when called?
Not sure I follow, could you send a screenshot on what you mean?
( Win + Shift + S for quick screenshots and then CTRL + V into Discord chat if you didn't know )
I'm just checking on the default pawn class if and when it gets possessed by printing the output from EventPossessed
I'm also printing out the output from EventOnPostLogin on my GameMode BP
just wondering why the EventPossessed is giving the reading twice
Hey guys, I would like to make a game where there's a server browser and people can make their own servers, adding it to the list. That would probably involve me having dedicated servers for rent, right?
Yes
It would also mean you would need some type of Master Server to aggregate the list of available Servers.
What would be the con of having it be like minecraft where people were responsible for getting their own servers from exterior sources rather than renting from the company?
ot
They would be able to list it in a browser still, I think.
Btw. Epic offers free multiplayer hosting with their Epic Online Services, right?
I read it somewhere, can't remember where. Not for MMOs though, then they recommended to use SpatialOS
Steam has some sort of multiplayer API
Yea this isn't an mmo, imagine a server browser with servers of varying capacities having their own little games or large games
Making a fighting game here, will I be able to have online multiplayer without paying anything?
anyone here know why pinging a steam server would fail?
AActor::IsReplicationPaused Effects RPCs as well or its just the property replication ?
Hey ya'll... I'm trying to add structures mapped to integers to a map on the server player state and I'm getting an error that says 'cannot add a key to the map while a key with the default value exists'. Can't find anything else about this issue other than an open bug report. Any ideas of how to fix this or get around it?
Like, just in the BP or runtime?
@tribal solstice
@coral moss Depends on how you set it up.
If you use ListenServers, then you don't have to pay anything upfront, as you can use, for example, Steam, which provide you with a MasterServer.
But Steam also takes % of your sales, so while you don't have to actively PAY something, you will make less.
If you use DedicatedServers, you probably need matchmaking and all that stuff, and then NO, there is no "free" way of doing this.
Even if you host everything magically yourself (don't do that), it would still cost money.
Note here: ListenServers allow the Host to Cheat, as well as make it shitty for the other person if the host has a bad connection.
Furthermore, fighting games depend a lot on having the whole state of the game being in sync and reliably replayed.
That's nothing UE4 supports out of the box.
@twin juniper Well you can give them the DedicatedServer executables and then use .e.g Steam for the MasterServer. That's basically it then.
No need to pay anything.
Despite the % for Steam.
@cyan current Not sure they offer free hosting. They would offer the MasterServer for free I guess, but then again, will take ages before that system finally releases.
No news since they originally announced it. (At least nothing I heard).
I must have misunderstood. It did sound like they were offering multiplayer hosting for free when they said online services for free lol
I can't confirm or deny that. Given the costs for this I doubt though.
Holding the PlayerData and Session Info for free is already nice for a lot of people
(PlayerData != complex database though I guess)
@thin stratus At runtime it will add structures with key, but it seems to be temporary and they disappear. I get that error message in the blueprint though so I figured it was related.
TMaps needs a unique Key. Usually you don't want this to be a complex type (like a struct).
In C++ you actively need to add some code to the struct to tell it what parts of it are used for the actual key
Not sure how BP do that
@cyan current check out GearHost. create an asp.net web api and a mysql database and you can host it there for free while testing. it's on the slow side but it's free unless it gets a moderate amount of traffic
Ah, think I understand. I was trying to hand it an integer to use as the key, matched with a struct
but an integer is not a complex type, so that should work right?
Yeah, Integer as key is fine
But then keep in mind that the default value of an integer is 0
I'm not sure why you get that error runtime
You would get that when adding in the BP by pressing + twice
Cause the first time it will use 0, and the second time it will try to but fail cause the key is already taken
that's what I thought too. it could also be a fault with my blueprint and creating the integer key incorrectly. I'll keep looking. thanks so much, eXi
@tribal solstice if it helps - Maps can only have one occurrence of the default key present in them. So in the example above if you're setting 1 -> PlayerState_1, 0 -> PlayerState_0 if you tried to press '+' to add another entry it would fail with that exact message as the '0' mapping already exists (which is the default) and it can't add a new one.
If you're trying to access all the PlayerStates, you can do the same thing through GameState -> PlayerArray which should store all the PlayerStates in an array
Thanks, Fin - good to know! Much appreciated.
@tribal solstice TMaps will throw something like that in BP if you have an element with key 0, then press add - this will cause it to try to add another element with key 0, which it can't do
its also why its a good idea to have first member of enum class be Invalid or something similar if its going to be used as key for EditDefaultsOnly/EditAnywhere TMap
in c++ if you call .Add(key, value) on a TMap that already has the key it will just overwrite the value
I wish the details panel would just automatically choose the next available value for the TMap enum when you press add.
Guess it's hard to do that in a way that applies to any type though. Anything integer-based would be fine though :/
@winged badger Ah yes, I think that's what was happening. I was casting to the player state and trying to ADD a new structure/integer pair to the map. It would add them temporarily and then reset to only one.
Is it possible to set the first member of enum class as Invalid with blueprints?
Thanks, Zlo
its Invalid, as in called Invalid
the first member is the one you don't use, or use only when there is an error
but any adds to editable TMap will add an element with key Invalid when + is pressed, after which you change the key, enter the value and repeat
Do you guys plan on or have built any multiplayer games with a server browser and dedicated servers?
I want to make 2 games where there's a server browser and dedicated servers that can hold 100's of people or so, maybe even 1000 people. Worried that people won't spend the money on these server providers to buy the large scale servers.
So I was thinking I would have to purchase a dedicated server or rent one myself to keep something up for people.
I heard I can give them dedicated server executables? Could players run their own with those files ? Is this a viable way ?
100 - 1,000 players is pretty much impossible on a residential connection.
The best approach IMO is to partner with third-party services, and allow players to rent servers instead of distributing the server binaries.
I will add however, there is only any point in that if you actually expect to get anything like those player counts.
We pay to host a bunch of official servers, but most of them are community ones now. Obviously, you need to have some degree of success for that to be viable. Making a 100-player indie multiplayer game in 2020 is obscenely high-risk.
The game idea is scalable, you can easily play and it can still be fun even with just 40 people
Even 40 is a stretch
@bitter oriole has the numbers on this IIRC, but you have to be within the top 1% of games on Steam to be consistently above 1,000 concurrent players (worldwide)
If I can't get 40 people playing on a server, I have failed.
Welcome to indie multiplayer π
But yeah what's the best way to go about that then? Just work with a revshare server hoster and hope players rent from them?
40 players is something like 5% of Steam games
That's what we do (g-portal and nitrado), I'm not sure what the actual deal is or how much they cost mind you.
I think you need to be able to guarantee some level of success/player numbers before they'll consider you though, which is the first step...
My advice would be build the game to support both listen and dedicated servers, so that in the likely scenario the game fails, you at least have some playability for those that invested in it. (Maybe some supporting AI too)
@thin stratus
Thanks for the advice! I'm gonna try putting it on Steam as a free game.
Don't mean to be a downer, the stats just aren't great unfortunately.
Yeah I was thinking of that, bots.
so that even 10 people can still play around in it.
it is supposed to support a 1000 player giant game though
Yeah. I have no experience of whether or not that actually helps the situation RE low player counts, but it's probably what I would do.
tbh 1,000 players in Unreal is a big ask anyway
Success stories aside, the engine won't do something like that itself.
Would lowering the graphical quality help?
Would need a lot more than that
so something is innately wrong with the engine and it could be made more performant?
No
There's nothing inately wrong, it's just that 1,000 players is absurd. Character Movement is extremely performance intensive for example - but that's just the nature of it
1000 players is just absurdly high for 3D games
You will easily be both CPU and bandwidth bound at 100 players. It's taken us years to support 100 players gracefully, and that's after a butt-load of work on the engine after Fortnite too.
Well what's a reasonable number for a large scale game? 100?
5
π
If you're an indie, it's 5
That's what works without expensive dedicated
And its your likely playerbase
Rip
I've been lucky enough to work on a 100-player indie that has done relatively well - I still wouldn't recommend it. It is a major challenge that requires a team of people supporting it.
Wouldn't do it again in a million years
I would like to try to get high counts. I'm not disrespecting you, I understand that what I want to do is probably ambitious.
Also - high player counts don't make the game anymore fun
It's a business issue : how do you get 50,000 sales ?
You need that for 100 players
I'll have to cross that bridge when it comes
From the little I know, Fortnite having 100 players in a game without much lag was already an impressive feat that required a lot of careful optimization, thatβs why many BR games you see are choppy and laggy. 1000 is probably off the table, 100 is possible but not easy.
yep
It's a major technical challenge. My favourite part is when players suggest you should add more too.
What's the game you worked on? If you can tell.
https://store.steampowered.com/app/686810/Hell_Let_Loose/ Still working on it
Also, to get this for sure, lowering graphics to early 2000's will not make it a smoother experience compared to if I had PUBG graphics?
with 100 players?
nope
No
You're not GPU-bound at that point
In terms of FPS though, for individuals
So it makes no difference
No
Try putting 100 AI characters in a blank UE4 map
Keep a fire extinguisher on standby
The issue isn't graphics alone, it's everything.
no
Would writing a custom engine be better for a larger scale game? I noticed Unreal was mentioned here. OR probably some edit to Unreal.
Also notice in this game's roadmap there is an engine upgrade.
Well if you make your own engine the sky is the limit
But that's an entirely new level of challenge and takes years
Even then, it doesn't solve the business side
Do you know why Unreal has this problem that you talk about though? Why didn't they make their engine go lengths?
Due to being general purpose?
It's not an engine problem
It's not an Unreal issue
100 players is juste hell
There is a reason no one makes MMOs anymore
Has anybody even made a 1,000 player 3D multiplayer game? Like ever?
WOW ?
I guess MMO's yeah
Dedicated game engine for the game of course
So if I write my own engine for this game instead of using Unreal, I can push the limit.
My team is 2 strong
TL;DR: multiplayer iz hard
It' s fun though
Team of 2 -> 5 player game
Lol
^
Just my advice as a 10-y game dev
You know, just let them find it out the hard way.
How often do we tell this to people?
Yeah I am not disregarding your advice. Thank you for it, I still would like to make this or try.
They always know it better.
I enjoy crushing dreams π
Yeah, Dunning Kruger and all that
You can do whatever you want. Just don't argue against things we've been dealing with for years. :D
I wasn't really arguing I am just trying to gauge how I should go about this tech wise.
And I see it seems to be, custom engine.
I have no grounds to argue, I am asking questions.
Custom engine yes
At same time as we say "Custom Engine could remove the limit.", we also tell you that a Custom Engine takes years, even for a team of 50 people.
Which means: Don't freaking try it, it's not worth it.
I know a custom engine MMO developer
It's been 10 years but he's got working 3D samples now
What do you guys say about Mordhau which can run I think 64 players on a server and it is built in Unreal (to my knowledge). Different from 100 or 250 I guess?
64 is lower
Custom engine with team of 2 will perform worse then unreal, likely much worse
100 is doable
100 is doable in Unreal, with a lot of work
but it'd be less time than making a whole custom engine for the game.
"How do you get 50,000 sales", "how do you get 100 testers to develop every feature" and big questions
We have 8 players and 150 AI, and the server still cant do 60 FPS if its not a high end PC
But you know that now
Yeah I would want to have bots just in case population dies
If you want to finish something, make a smaller game. If you want to have no hair 2 years from now, continue as you are.
Just for you to get a feeling how much a Chatacter costs
It'd also be a game with deep mechanics. It wouldn't a run and gun. It's a roleplaying strategy game 1st person.
Doesn't really matter what it is.
Well that's good news
I was a bit scared that having more interactive systems would hurt it
Our 5-years of work title got a maximum of 12 online players I think, while being in the top 10% of Steam sellers or something
So just do 8x better
Each scene component will ultimately hurt it
In terms of FPS?
I just got aware of the fact that every person that started this discussion, never came back, in any way
π
Maybe they all get lost somewhere
Maybe there is a place where all of them sit, mumbling some non-sense, staring into the void.
lol
It's just not worth it IMO. Would be far better to finish something than spend an eternity chugging on a project with no end in sight
Unable to heed my own advice, but still
It's also so much more rewarding if you make a game that you can actually finish without these fights
Yeah
We have a lot of interactable objects, with each of their interaction components using 0,002ms on Tick, tally was 2ms total
I have 2 ideas in my head that would require ~4+ players, in Listen Servers.
I still debating if I should ever work on that or just cut the multiplayer.
And that coming from a Studio that has the option to make those games.
It's sometimes just not worth the headache
YEah, multiplayer is really something
5x more work for even 2 players
Just the UI is a lot
"It's a simple friends list, what could go wrong ?"
And this is after UE4's networking system does most of the heavy lifting too.
Sod building that yourself
"oh, it has to update in background and not break selection ?"
longingly gazes at singleplayer
Doing a second MP game here after a 7 year "no MP" rule
So Unreal has to be tweaked in some way to support 100 players.
most likely yes
But tbh that's true to most games, I don't know many that shipped without some degree of engine modification.
We shipped with a vanilla engine tbh
Yeah I guess I technically did, if you don't count a slight tweak to a ush file
Thank you for the responses.
Sorry it's so negative π Don't take it to heart though, it's just the way things are.
You could compare game development to spaceflight in terms of complexity
Except everyone has access to it
hmm when I test with 2 players, widget says that GetWorld()->GetNumPlayerControllers() is 1 and playercontroller says 2, is that just how things are or am I missing something?
PCs aren't replicated
small addition, priting that inside server rpc
could it be that widgets cannot have rpcs?
They don't replicate either, so they don't have RPCs
okey, gotta make a separate widgethandler for playercontroller, that should do the trick
is it normal that clients read a different value of a game state's elapsed time depending on when they joined the game?
yes
there is GetServerWorldTimeSeconds but it sucks
basically you just don't have a synchronized time
GetServerWorldTimeSeconds() isn't that bad, tbh, but it's not perfect
bummer
i also notice that the game works differently on my pc (which is also hosting the server) than on the other clients. is it normal, or perhaps steam updater messed something up? we play via hamachi
by working differently i mean stuff works for me, but not for the other peeps. they just update the game from steam everytime i upload a patch, i launch my game from the Cooked folder
Anybody have experienced with resetting UWorld::TimeSeconds after seamless travel?
Annoyingly it appears to carry over.
Does anyone know a way to test ServerTravel in the editor? Seems to work only when building an exe
Seamless travel doesn't work in editor at all, but you can hard-travel
@chrome bay Is hard-travel the same as just "Open MapName"?
yeah exactly, IIRC it should bring the other players with you
If you want to use seamless travel though you can uncheck "use single process" in the advanced play options, and set the editor to not play
Hm interesting, will check that last one
@rain coral you dont need to build an exe just launch the editor as game client . I have some helper batch for myself π
@rose egret You mean to hit the Launch button, or to start it with some special args? I wanna test with client windows etc
@rain coral by some commandline.
Collection of arguments that can be passed to the engine's executable to configure options controlling how it runs.
Interesting, will try that!
i am using js for my tools and thats the command line I was using.
UE4Editor-Win64-DebugGame.exe ${ProjectPath} ${mapName} -game -log -LOG=${logFile} -ResX=${resX} -ResY=${resY} -WinX=${winX} -WinY=${winY} -ConsoleX=${cx} -ConsoleY=${cy} -login_username=${username} -automatchmake
Cool :) Yeah we tried putting -game at the end of the visual studio solution args, and it starts it as if it's a built game, so that works
how do you send a RPC to a dedicated server... (swear i've read cedrics compendium) but for some reason this never gets sent:
that yellow print string just never comes up, neither on server or client
Is this Blueprint replicated and client-owned ?
it exists on both server and client (so there are 2 instances)[if that makes any sense]
it is set to replicate
It should be created on server, set to replicated, and owned by the client
Conditions for RPCs to exist
okay, so every client that logs in to the game
will be the owner
of his own instance
of the whiteboard?
No
Ownership is on server, and can only be one client
In other words, you need to call SetOwner() on this actor, on the server, with the player controller that will be allowed RPCs
my use case: I need to update this whiteboard, everytime a new client comes in, so i wanted to do it on begin play , using switch has authority, on the remote side call it to the server to send the owning client the update for everything thats changed on the whiteboard
does everything you said still apply?
No RPCs from client that are not the owner.
If you need clients to pass data to an actor that is not owned by one specific player, move the RPC to player controller
And then just set your data from the server side RPC in the PC
ah ok, will try that, thanks Stranger
you can set this on the drop down for Play, but is there anyway i can add an extra network client at runtime in PIE?
I'm trying to figure out how unreal engine, steam online subsystem and aws dedicated servers play along. Currently problem is that i'm getting
Error: 'incompatible_unique_net_id'
when trying to join a dedicated server that is running on aws after finding the the session with session search. Is that a common problem? The way I have understood is that for some reason the server isn't using steam net driver, but the client is. Can we just use ip net driver for game joining etc. because game creation and matchmaking happens through aws, but still use other steam features?
think i found (what i wanted to do of starting a server, and then having a client connect on demand[so i can test late joining things]_ it, just need to find the string for dedicated server
@copper grove https://www.youtube.com/watch?v=_XW9oI36kTE
In this video we will simply be creating a dedicated server to be used for testing our code in a multiplayer environment.
Host Server:
"C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\Win64\UE4Editor.exe" "C:\Users\YOUR USERNAME\Documents\Unreal Projects\TutorialGame\Tutor...
@twin juniper Sorry to ping you a few hours later, but 100 players is indeed possible. > than that though shared in the space and you'll want to start implementing stuff like what Dual Universe talks about (lowering update rates based on population in the area and distance to the target quite severely with alot of prediction). We've manage 100 concurrent fairly easily in the same space with a good few hundred networked actors in view without the game throwing a fit.
Thank you for the ping, I will have to save this post for the future.
Been hearing alot about DU lately. The building system is cool. Good luck with the project! @barren warren
No worries, feel free to mention me if you do have any questions Paul, had a good 2 years now of messing around with UE4 networking
Thank you, I'll log that for future use.
@ocean geyser thank you!
Guys, what is the best way to host a dedicated server? Amazon Gamelift just send me a $160 billing in their "free" server. Edit: best way = less expensive
GameLift is not free?
lmao
No. You have X hours per month to run your server.
No it is not
build a dedicated pc and hook it up next to your local ihop for free wifi
I forgot the (?) but whatever lol
I was stating that it's not free, that shit sounded weird to me
@viscid escarp how many hours / what instance types were you running for over the course of the month?
Also - it will depend a lot on your monthly active users and player activity, If you want I can walk over your setup with you a little and see if there's anything odd going on / misconfigured
hey guys, I'm wondering if there is a way to spawn an actor on the server, and have it replicate to all clients except the owner, just like if it were a replicated variable with COND_SkipOwner as the condition, but on the actor level? I hope that was clear...
there is a option
in Replication of the Actor
to not go to owner
otherwise you have to override IsRelevantFore
IsRelevantFor in c++
would it be bNetUseOwnerRelevancy? pretty new to networking
@sharp knoll you could also look into replication graphs (https://docs.unrealengine.com/en-US/Engine/Networking/ReplicationGraph/index.html) a little bit more of a golden sledgehammer approach though
well Repgraph is a bit overkill
but its not doable in BP by the looks of it
C++, you could override IsNetRelevantFor and skip the owner
Yeah its in c++, im just looking at this repgraph now, and awesome, ill test that out thank you very much
seems like it, but maybe in the future i could find a use for it. Theres so much to learn with UE
well if your new, i wouldn't mess with Repgraph
i would understand how the stuff works for
const FVector& SrcLocation) const
{
if(IsOwnedBy(RealViewer) || IsOwnedBy(ViewTarget))
{
return false;
}
return Super::IsNetRelevantFor(RealViewer, ViewTarget, SrcLocation);
}```
Seemed to work, thanks for the info!
what is a simpel way to realize multiple levels in a multiplayer Game?
i was looking through AWS Gamelift but it is hard to setup
Seeing a lot of mentions about Steam in Editor: Steam integration in 4.25.0 doesn't work when playing in Standalone. This will be addressed in 4.25.1, but in the meantime you can remove the -MultiprocessOSS argument from the CommandLine in PlayLevelNewProcess.cpp line 101:
CommandLine += FString::Printf(TEXT("GameUserSettingsINI=\"%s\" -MultiprocessSaveConfig "), *GameUserSettingsOverride); /*-MultiprocessOSS*/
Hello, i have a question.
I did packaged a game that work on LAN (it work with 2 differents pcs and 2 differents ips (xx.xx.xx.11 / 14)
On internet with 2 differents ips (92.xxxxx / 94.xxxxxx)
When i try to find a session by the node 'find session' nothing happend. But if i connect directly 'open xx.xx.xx.11', it work.
Anyone have more informations or the solutions about this ?
I'm trying to create a rudimentary e-mail system within a game. The player sends an e-mail, which adds it to the receiving player's player state in a custom structure array that contains e-mail info. Then it tells that player's mailbox to update so they see their mailbox UMG populate. Here's the blueprint that updates the mailbox:
and here's the 'Store Email Locally' blueprint:
when I check the length of the Emails Array, it shows the correct number, and when it runs the 'ForEachLoop' on the Emails Array, it fires the correct amount of times. But for some reason, the 'Store Email Locally' event fires twice every time. I don't understand how this is hapening at all. Any insight would be awesome, thanks!
A 'print string' after the 'Store Email Locally' node fires the correct amount of times, but a print string firing FROM the 'Store Email Locally' event fires twice no matter how many emails are in the array.
would someone be interested in helping me out with some client server stuff? basically client is unaware of certain thigs it shouldnt be...
ask your question here, and someone will help if they no
@indigo anchor
@cyan current
So, basically i am trying to replicate camera rotations (controlled by player with mouse).
for example on the server instance the "SpringArm" of my Pawn wont go through walls, but on clients it will. if i use a dedicated server, of cousrse all clients have this problem.
the exact thing i want to replicate is the "Control Rotation" property
If someone is interested in helping me, i would be happy to hop in a call with you! project is on github if someone wonders.
Is there a trialed way of replicating ammo usage on a client. Let's say I fire a shot, should I be deducting each shot with a server RPC? I tested this with some latency and lost packets etc and it just seems like a constant battle with the server on fast firing weapons/RPCs.
I'm tempted to just let the client handle it himself but that seems like bad practice
@orchid pollen
int32 Ammo;```
is how i replicate ammo. And i only "consume" ammo while on the server(or IsLocalRole() == ROLE_Authority). While firing i only notify the server when i start firing, and stop firing, rather than an rpc for each shot. This has worked so far in my game
I have not tested with high latency yet tho
How to make sure online subsystem steam is used when packacking dedicated server?
Does anyone know how to enable the SteamOSS but also keep the IPNetDriver? I want the Steam overlay but i dont want to use the Steam OSS for connecting to Servers.
@fossil spoke
Check the bottom section of this "Using IPNetDriver" https://docs.unrealengine.com/en-US/Programming/Online/Steam/index.html
I'm currently testing the same thing
An overview of Online Subsystem Steam, including how to set up your project for distribution on Valve's Steam platform.
Does anyone have any example how should steam_appid.txt file look that is needed in the binaries folder?
Oh man.
Nice
@random nymph It simply contains the SteamAppId
480 is the test id.
It should only contain that.
Or whatever your Steam App ID is
Okay, I'll test. Thanks
Thanks for that tip, it appears to have worked for me.
Have full Steam OSS functionality but still using the IPNetDriver.
π
@fossil spoke - Matt Boatswain Can I know what is the benefit of using IPNetDriver?
The SteamOSS has its own networking layer that allows you to interface with Steams backend and how it wants to deal with Servers. IPNetDriver is just the basic networking layer.
If you want to connect to Server via IP but also run the SteamOSS, you will run into trouble. At least, ive run into trouble with it.
So i needed to disable the SteamOSS unique networking without disabling the SteamOSS itself.
So that i can still use Steam features like Friends and the Overlay and all that nice stuff.
Without the messing about on the backend since we dont use Steam as our backend service provider.
So then what about SessionCreation. I think when we
[OnlineSubsystemSteam]
bUseSteamNetworking=false
set like this, SessionCreation is no loner happens using SteamOSS.
Correct
We use Dedicated Servers on AWS GameLift, we dont use Steam or Sessions in that sense.
How were you able to test it is working so fast?
And nice to know you have exactly same setup as us with steam and aws π
@fossil spoke
I added the steam_appid.txt file to the binaries folder and made new fleet to aws, but I'm still getting the following error
LogOnline: Error: STEAM: Failed to create file: C:/game/GameFolder/Binaries/Win64/steam_appid.txt
LogOnline: Warning: STEAM: Could not create/update the steam_appid.txt file! Make sure the directory is writable and there isn't another instance using this file
LogOnline: Warning: STEAM: Could not set up the steam environment! Falling back to another OSS.
LogOnline: Warning: STEAM: Steam API failed to initialize!
Did you have to do something specific to get steam to initialize on aws?
Havent got there just yet, we may run into the same issues.
Okay
I believe though as part of our build process, the steam_appid.txt file gets created automatically.
Id have to review our build scripts.
oh god gamelift. that's one way to guarantee high server costs
Yeah it aint cheap, but thats not my area so π€·ββοΈ
well as long as someone's bank rolling it, cloud is so insanely expensive for game server hosting. most of our game is on bare metal
i have no idea why the steam p2p was (or is) the default in the steam OSS
i suppose for smaller indies having listen servers with automatic NAT punchthrough might be easier?
I think its just for the Session system, yeah to make it easy.
Dev Builds have the steamappid text. Shipping builds don't.
Shipping Client builds are meant to be distributed through steam, which take care of that text file.
For the Server you might not want shipping anyway?
So to have finding session working, you have to use the steamDev for internet connection (via ip) ?
https://docs.unrealengine.com/en-US/Programming/Online/Steam/index.html in this documentation there is the "Server details" section describing macros that can be used in ServerTarget file. Is there any example on how to write those macros into the target file?
An overview of Online Subsystem Steam, including how to set up your project for distribution on Valve's Steam platform.
ok so i set up steam online subsystem and everything and got a working server browser
my au friends can view the server but my us friends cant
and if my us friends make a server my au friends cant
Getting off for tonight. will be on in about 7 hours, can work on this again in 10 hours (after class). Trying to simply destroy an actor. Right now the actor is destroying for the serverclient, but not the client. Ive followed epics documentation and tried various rpcs. If anyone could be on tomorrow around that time I'll venmo like $10 or something for someone to answer my questions about replication. If interested, PM me or @ me here.
Thanks @thin stratus for the compendium. Was nicely laid out and did break down some concepts. Will be reviewing it again eventually.
is it possible to edit game mode settings as a dedicated server?
@queen flower if you want to dm me when you get back I can go over things / screenshare if you like, don't worry about payment
Hey everyone, has anybody gotten LAN connection as PC being a host and an Android device being the Client? I've tried to do this using normal sessions and it doesn't seem to work, even though this seems to be possible
Also, I can't host on the Android device as a server at all if that helps
So I found out if I only start one instance of the server on cloud the steam initializes successfully, but if I start more than one instance or add instances later the steam doesn't initialize and in the logs it says this
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.
@barren warren would you mind helping me with a similar ploblem like DarecZaFire has? basically i am trying to replicate camera movement...
Okay - what's the issue exactly? @indigo anchor
i am rotating a camera with the mouse around my pawn, the camera is attached to the object with a SpringArm. on the server instance the spring arm works as expected, wont go through walls or anything, on the client instances tho is goes clean through everithing. it seems like the clients arn't aware of the floor and walls or something
if you dont mind, i would just show you? @barren warren
@random nymph Cloud isn't the same as a dedicated server is it? You should be able to run multiple dedicated servers on one box (assign them to different ports).
Hmm need to figure out how to do that in gamelift
@indigo anchor sure
great, just let me know when you are free @barren warren
Just, funny thing, that normal if i try to overloard my server, like with a lot of ragdoll, the server start to dilate the time ?
is it something automatically handled by ue4 ?
How can I use CharacterMovementComponent just to rotate Pawn?
Is it still true ? The find session work only on lan ?
Build powerful visual scripts without code.
Yes
You need to use some third-party service (aka steam) for internet sessions
(or create your own master server system)
You can still join via IP address though
Thanks, it's sad that it doesn't appear in the official doc
That the default susbsytem is called "NULL" should be a hint
But yeah, it's not clearly explained in the doc that NULL is a placeholder for your platform service
The basic idea is that NULL works on LAN, and you use your platform's service when shipping
My destroy session nodes have stopped working to all players except the host
hello guys, i have problem about how reliable multicast can transfer data correctly.
i have a forloop 0 to 21 instantly transfer to server that message with run on server rpc(reliable)
then server send to all with multicast(still reliable)
but it doesnt works correctly. still there missing 2-6-8 integers.
Why?
tried another one loop too. now appeared 2 but not for 3
servers cant handle that fast loops?
if yes, then what happen if some two players did something at same time? one passes and another one will drop?
this worries me.
Why don't you batch the rpcs?
What is it you are trying to send? Why are you using multiple rpcs in the first place?
Instead of just sending the payload in a single rpc
because when one player write smth to send. it need to send that text to server.
how i can read the client one writed and without getting from client?
also multicast need to call from server so.
im making in game chat
simply:
client text > server > multicast to world for can see everyone
right, why are you sending 21 rpcs the same frame from the server tho?
instead of sending them as you receive the chat message
i was testing. because when i get much players in game, then there will be a headache
okay
In that case yeah you can just queue them up on the server as you receive them and spread out the processing of them
let me say the simulation like loop:
if 5 players did the send message to everyone at same time (sameframe if they catch)
then 2 players can pass to send messages.
i thought reliable rpc already queueing these data and send it till receive data like in a row
I wouldn't use a multicast for chat messages
I would use a server rpc and then a client rpc
The engine already has chat message support btw
See AGameMode::Broadcast and APlayerController::ClientMessage
so your suggestion is: make a array that you collecting player controllers
then pass it to owning to client rpc with foreachloop. right?
Look at how the engine does it
You just loop over all the PCs in the GameMode and send client rpcs to them
Client rpcs are much lighter than multicasts
And is what is needed here anyways
well gamemode have no access from client so i need to use casting
It doesn't need to exist on the client
The client who writes the message sends it to the server via PC
The server (GameMode) loops over PCs and sends client rpcs to them
thats correct right?
for collecting array PCs
no, still missing.
maybe the one send to server rpc cant handle. otherwise i would see full message on server
does can max tick rate happen?
I am spawning two replicated actors on sever. AItem and AItemDropper.
AItemDropper has a replicated pointer to the spawned AItem.
on client's AItemDropper::BeginPlay pointer to spawned item is null sometimes. (i need it in begin play)
is there anyway to make sure that two items are spawned on client at the same time?
Not easily - from what I've found it's not entirely safe to assume references to newly spawned replicated actors to exist on their clients straight away, the safer way to do it would be to set a reference to the ItemDropper on the Item on construct and do a callback on beginplay on clients
btw the pointer is COND_InitialOnly
@rose egret you can't garauntee what order they will replicate in
So having two replicated actors referencing each other in beginplay will never work
My suggestion is you use a RepNotify
When the pointer is updated to point to the live object, the rep notify will be called again
Then you can do the rest of your initialization
currently I am trying to do it with OnRep_ to see what happens.
another question:
I think UE4 default spawn takes lots of bandwidth . I am just using location though.
is there anyway to override the net serialization for spawn bunch ?
No
Correct. Spawning is costly yes, because all replicated properties for the actor are sent at spawn time, including the class name
If an actor of that class hasn't been spawned yet, the class will be serialized by the full string.
(Until a NetGUID is acked for that class)
But yeah, there is no way around that. That's low-level replication code.
you mean all replicated properties that that differ with their Default value in CDO ?
Yeah
Most of the spawning cost is usually the client loading the object for the first time.
And all associated assets (e.g meshes, textures, materials, sounds etc.)
huum so my lag is because of class name ? and its full path ? like \Game\Blueprints\MyItem ?
Partially yeah, but it's not so big of a deal you have to worry about it that much
I think I have to replicate all those classes in game state once in the lobbyπ€
You definitely do not want to do that
Actor spawning takes time, that's just the way it is
You have to code around potential race conditions. That's the nature of multiplayer
Plus when you change map, all the previous NetGUID's are dropped anyway - so it wouldn't matter.
even seamless travel?
I have not used more than uin16 in my whole codes. now UE4 wants to send long path of my assets π
I wish they could use hash
π
tbh it might be smarter than that now.. it's been donkeys since I last looked
The engine stuff is honestly plenty fast enough, I wouldn't worry about it. I'm not sure off the top of my head if seamless drops GUID's but I'm pretty sure it does.
When you reference pre-placed stuff in the map it has to be done via the package name until a GUID is acked - so you wouldn't want old GUID's from the previous level
yeah
the one MaxNetTickRate=20
happens this
if i change it to 60-100 then i receive all messages even 100 times loop
@bronze arch have the server keep all the received messages in an array. Then at the end of each frame multicast that array to the clients (if it has any entries) then clear it.
any messages the server processes in the same frame will then all be sent via one RPC at the end of the frame
tbh though, the likelihood of receiving two client messages in exactly the same frame is extremely low
I would just use the engines built-in messaging
but not only about messaging, there have another client-server rpcs. like, if i use equip item rpc and send a message at same time. then wont it drop the "item equipping rpc"?
or someone did sent party invite etc.etc.
It won't drop them no (if they are reliable anyway)
You can send more than one RPC in a frame
Probably some other reason
Just looks like what you've got at the moment doesn't work properly
yeah just tried only client>server>all client rpc(client loop or multicast i tried both) on simple empty project.
just edited config that max net tick rate
can you try with simple project too? it can be bug?
gosh okay got it
i did smth wrong thank you for information
seem the server - client socket have trouble about ticking
ill contact to plugin owner
Hi, I have a problem - I have a Character which needs to change rotation at a specific point in time. I am using SetActorRotation directly on the Character. This works perfectly in single player game, but when I start a multiplayer one - For a frame my rotation changes, but then the server corrects it and reverts it back. I am calling the SetActorRotation only on the client, but calling it both on the server and client still didn't fix the issue. My take is that i need to make the rotation change predictive on the client and server should only authorize it, but I haven't found a way to do that currently. Any ideas how such a thing could be made ?
Using the Null online subsystem, is there a way to marshall/send a custom session id to the server so it can be used during the connection/login process? I can't find any way to send custom data at connection time.
HI there, I'm having an issue that seems to be pretty common but I can't find a fix. I'm trying to display a variable from my gamestate. This variable is an array of Controller.This array is updated when client click on a button on the UI. Everythings works fine on the server (the host) but ... my client has an issue. When getting the array from the client, there is a value inside, but the value is none. It's probably a null pointer but I don't know why. That array has been flagged as Repicated. So how value of Gamestate can be different from host/client if the variable is Replicated ?
wow ... make sense .... so, I just store playerstate instead and get the controller from there ?
There is simply no controller on client other than the local one
The others don't exist there
Only the server has access to all of them
I see, I was just using controller to get the playername but I can find another solution for that. I'm gonna check what happens if my array is of type playerState. Surely the value won't be NONE now ... thank you very much, I was losing too many hair !
Player name is part of player state, set to the correct value, and replicated, out of the box
Indeed, thanks again.
Hi Guys,
I would really appreciate it if anybody could provide a reference for how to implement OnlineSubsytem using Epic Online Services (EOS) SDK.
Well, copypaste the Steam OSS in engine source, and rewrite it entirely for EOS
Oh, that means I have to do lot of work. Why still Epic not providing this support in engine level (Something like OnlineSubsytemSteam)
EOS isn't ready yet
@austere ridge its pretty easy to honestly setup your own master server though
is steam broken on 4.25 packaged shipping games? I saw one person mention it in forums and I seem to be seeing the same thing
(can connect to dedicated server with steam auth in debug packaged, but not shipping packaged)
LogOnline: OSS: Creating online subsystem instance for: Steam
LogOnline: Verbose: STEAM: Steam: Starting SteamWorks. Client [1] Server [0]
LogSteamShared: Warning: SteamAPI failed to initialize, conditions not met.
LogOnline: Warning: STEAM: Steamworks: SteamUtils() failed!
LogOnline: Warning: STEAM: Steamworks: SteamUser() failed!
LogOnline: Warning: STEAM: Steamworks: SteamFriends() failed!
LogOnline: Warning: STEAM: Steamworks: SteamRemoteStorage() failed!
LogOnline: Warning: STEAM: Steamworks: SteamUserStats() failed!
LogOnline: Warning: STEAM: Steamworks: SteamMatchmakingServers() failed!
LogOnline: Warning: STEAM: Steamworks: SteamApps() failed!
LogOnline: Warning: STEAM: Steamworks: SteamNetworking() failed!
LogOnline: Warning: STEAM: Steamworks: SteamMatchmaking() failed!
LogOnline: STEAM: [AppId: 0] Client API initialized 0
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: OSS: Unable to create OnlineSubsystem module Steam```
@fringe dove im pretty sure steam only works in the debug package until you get your own steamAppID
thanks, I'll double check on that I have one but I was thinking I had been able to run it out of packaged dir before without uploading to steam etc.
not terribly sure what channel this goes in but anyone else confused by the PIE settings in 4.25? like if i set it to listen server, it says NetMode: Server on both windows, but server code only running on 1. it used to say Server and Client1. not sure how to tell them apart o_O
@steady briar I was a bit confused by that, in shootergame the little UI header overlayu they put on the screen still shows server vs client
but window title seems busted
you can detect if NM_Client and then modify the title with:
TSharedPtr<SWindow> GameViewportWindow = GameEngine->GameViewportWindow.Pin();
if (GameViewportWindow.IsValid())
{
FString TitleString = GameViewportWindow->GetTitle().ToString();
// then modify string
[...]
// then apply it
GameViewportWindow->SetTitle(FText::FromString(TitleString));
}
Yes. I was wondering about this. Worked in previous version but seems broken now
The title string, sorry
hmm... well at least its not just me doing something wrong not understanding a UI or checkbox somewhere
thx for the info
it seems steam is just down for me and that was likely the issue
yeah it's tuesday
I forgot they go down every tuesday for maintenance during east coast prime time.. gotta be nice having a monopoly lol
Anyone know why it crash my game when i join a session via steam ? (it work perfectly on lan)
https://i.gyazo.com/0f26467feaa40f7b74f0eafbd43365fc.png
Hello guys, I am pretty new on Unreal, and would need some advice on multiplayer topics. I am currently developing an AR app. I need to add a functionality where user can send to each other simple message. In my game, for now, there is no complex multiplayer flows, only multiple users, playing in AR, but I just want add a message functionality (send text and JSON to each other). I found this https://medium.com/swlh/building-and-hosting-an-unreal-engine-dedicated-server-with-aws-and-docker-75317780c567. But is sounds like made for a "real" multiplayer game with complex flows. Any idea to build this, other than this tutorial?
@quasi parrot i got the same sort of issue just now
i have set up advanced sessions and got a server browser working and everything
but i cant join my american friends and my american friends cant join me
anyone know a fix ???
What is called after restart player? Having trouble resetting references on respawn. For some reason OnPossesed isn't being called?
@hollow portal do you have the steams subsystem enabled
ye
have you set up a system where you can send invites to friends?
no i set up a server browser
is your find sessions set to lan?
no
my american friends can join each other but i cant join them
my aussie friends can join me but my american friends cant join us
its really weird
that is weird
you could try allowing invites and then inviting them to see if that works
haven't set it up cos idk how :/
can't join you or can't see the sessions?
the server doesn't appear in the server browser
add this to your game instance, and enable 'Join via presence' on the create advanced session node
might be steam filtering it by region by default
there a way to disable it ?
@random nymph We came across the same issue with GameLift in that the Server Files couldnt create the steam_appid.txt file on the AWS GameLift file system. Id say thats not allowed for security reasons but who knows.
Im now trying to manually package the steam_appid.txt file with it to see how that goes.
@fossil spoke I got the steam working on multiple processes on gamelift. Trick is to start the fleet with only 1 concurrent process. After the fleet is active change the minimum instance amount to 1 and maximum to your desired amount on the Scaling tab of the fleet. After that change edit the fleet and set the concurrent process amount to the same amount as the maximum amount on scaling tab
We dont have issues with multiple processes.
Unless your implying that the Steam integration has issues with that as well?
Yes. Steam was working initializing well with just 1 process, but the problems including the steam_appid.txt file started when trying to use more than 1 process
Ok, we will see soon enough if we have that same issue.
Clients are Not staying connected to the session on ServerTravel but still teleport to the map and are able to move and play the game. the only issue is that the client cant destroy session because there is no session
Is anyone able to help?
when my transition map is closing this is what the log says
which i think means that somewhere in the transition the session is ending for some reason
Has someone experience with google cloud Agones with Ue4?
Hello... I'm working on shooting game I want to make the bullet visible for both client and server I succeded in making the bullet shot from the server visible for the client but I have no idea to make it otherwise. here are some screenshots if this will be easier to understand the problem
this is the BP_BulletMesh
@frank mesa i guess you must call some rpc to remove it for every client
because replication wont work for visibility as people told me
how can I do this exactly
sending rpcs from server to client and then call on client the node "SetHidden" or something to destroy the bullet
Replication is very much what to use here
Has someone experience with google cloud Agones with Ue4?
Probably useful to have dynamic multiple levels on one game?
like aws gamelift
Server-to-client RPCs should only be used when you need to send a unique event in time, rather than update a state
ok so I should use replication in this situation
ah omg my bad. yes. you can remove it from the server
then it replicates to the client also. Sry, was brain afk π
Well, you should create the bullet actor on the server, and it will replicate to all clients. Add a replicate property for the bullet's trajectory (initial location / velocity / direction) and you're good
Ok thank you I'll try this out
@stray gull the problem is, that it crash constantly π
yea i managed to fix mine but probably differnet reasons. i had a tick that was printing whether the player was in a session so when they joined a session it crashed so i just got rid of it
How much players can be handled by one server? Just for example
Depends on the game, server hardware
Or does that scale with the Server good? So it could be up to 500 with a good Dedicated server hardware?
With a carefully optimized game code, a few years of work, decent server hardware, it is possible to get to 100 players
not more?
100 is not remotely easy in the first place and likely out of your reach
Okay so 50-70 players are βeasyβ to reach?
Get handled*
What means optimized? So the level resolution/size?
No it's not easy at all, because you'll need something like 50,000 sales of your game, which requires your game to be very successful
Optimized means the CPU time, bandwidth usage in particular
So is level one factor i should take care about?
The first thing you need to think about is your target sales on Steam
For example if i know i have 70 constant players on the server, on which factors of the game i should take care about?
You would ask your network team to profile the bandwidth usage, the gameplay team to profile the entire game for server performance, and the technical art team to profile the client performance of multiple animated characters
Thx π
@random nymph We are having more issues actually lol. Even running 1 instance on GameLift we still get this 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.
Have you completed every step in the onlinesubsystem steam documentation?
@twin juniper We've managed 100 concurrent active users + a few hundred networked actors on a single UE4 process without too much pain. But we've specifically designed all our server code around being as efficient as possible (nothing ticks except movement, a lot of client prediction, but all reconciliation on the server)
Well, you should create the bullet actor on the server, and it will replicate to all clients. Add a replicate property for the bullet's trajectory (initial location / velocity / direction) and you're good
@bitter oriole I still have problem with this I guess I didn't understand the solution very well the thing I did is to spawn the Bullet mesh on the server and then i made the replication multicast using new event so obviously the bullet always get shoot from the server even tho the client is the one shooting
Spawn the bullet actor (not sure why you talk of mesh - surely the mesh is part of the Blueprint for that actor) and replicate its firing data to it (regular property replication is fine)
@random nymph Yeah its all as it should be. Still no clue as to why its not letting Steam initialize.
Does the log say what steam app id it is trying to use?
And have you opened the 27015 udp port when setting up the fleet?
[2020.05.13-07.49.04:232][141]LogOnline: STEAM: [AppId: 0] Game Server API initialized 0```
We get this, so we are looking at how we can rectify that.
It certainly shouldnt be 0
Spawn the bullet actor (not sure why you talk of mesh - surely the mesh is part of the Blueprint for that actor) and replicate its firing data to it (regular property replication is fine)
@bitter oriole the mesh I'm talking about is a BP name i made that has one component which is the mesh I made this BP to make it replicated like to spawn it when one of the players shoot so it will be visible for the rest of them or that what I though is the way to fix my problem
@barren warren thx for the information π
Are there any commonly used patterns for cross server chat systems in UE4. I'm slightly leaning towards a barebones solution on top of redis' Pub/Sub model, but wondering if anyones solved the issue before and have some good suggestions. I don't believe we need to store a message history - though would be nice for audit purposes.
Can a struct that is replicated contain uproperties that should not be replicated? Is there a specifier that prevents replication of a struct member?
@stray gull I finnaly found it, i just added a print string between my join session and an enum giving the state of my player.
@meager spade Ah, that simple, thanks
https://gyazo.com/eb0bb0e429e4ea8b8c409d9248683231 how can i replicate this please ? when i take the cube sometimes it dont take it on the client screen and vice versa
@barren warren Redis Pub Sub is good for that but i am not sure how to use it in c++ or blueprints
If you know how, youre in the right way
Really struggling with multiplayer basics. The string on the title bar of each instance of the game all show NetMode: Server π¦
weird nonsensical replication bug happening
only yaw replicates
I can switch them around so that only pitch replicates but its literally only one at a time works, never both
Animations / Anim BP's can't replicate values
It probably doesn't replicate, it's probably getting it from somewhere locally
hows the best way to replicate aim offset then?
Pawns have a 'GetBaseAimRotation' function you can use
OH should I do this in the player bp instead of anim bp then
Which where possible will use some existing replicated values
Well you can grab and cache it from the anim BP's owner
Then use it in the anim graph
There's probably a tut for aim offset somewhere. If not the ShooterGame template has it
doesnt make any sense
@civic mirage check if you have **Replicated ** enabled in the cube blueprint
yes @cyan current is enables :/
How can I know exactly when GameState is valid on both server and client?
Can't find an OnRep for GameState. I guess I can use InitGameState on server at least.
BeginPlay() in the GameState
When they receive the gamestate actor that will be called (assuming the match has started)
Or PostNetInit() perhaps
Hm, don't know why I didn't think of that.
Wait so the gamestate actor isn't replicated until Unreal considers the match to be started? We're using GameModeBase, for what it's worth
Ah no it will be replicated but BeginPlay() is called on match start on all actors
The begin play thing is... a bit wierd
Aha. We're actually not using any built-in logic for starting the match though
Hmm okay
Im planning on adding AI to my Multiplayer project.
If i setup a behavior tree, have the server spawn the AI and run the behavior tree. Will I need to replicate the tasks that are in the behavior tree by hand when programing it?
Or if I have authority run the tree and it will all replicate?
I think it depends on the task. Server should handle movement and stuff, but I believe you'll need to replicate any functions that the behavior tree calls
@shut loom http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf this is a good place to start
in short: yes
@terse prawn AI is server only, but the Pawns do need to replicate what they are doing
as controllers are not Replicated
I've been getting this warning on my client's logs before random teleporting and in severe cases disconnecting from the server - anyone deal with this before?
it happens after client sends 96+ movement updates without getting a single ack
UPROPERTY(ReplicatedUsing=OnRep_InvWeapons) ADezWeapBase* InvWeapons[4]; UFUNCTION() void OnRep_InvWeapons(ADezWeapBase* pre);
'pre' points to a static array with 4 elements ?
@winged badger yea I gathered as much. I'll try to replicate it with a dedicated server
@winged badger ty
Have they removed the Option in the editor for "Auto Connect"? I dont want that my game automaticly connects to the server which is started in the background
i want to do it at my own
Does UE5 get a good new networking architecture
can we hold 100+ more players in one map ?
It's not that easy
No, and no
So we can build some servers on Epic Services?
No
what is this tweet then?
But isnt it the same?
No, this is backend
Also, did I read p2p?
afaik
You still have to host the server yourself

