#multiplayer
1 messages ยท Page 598 of 1
thank you @empty axle and @thin stratus
By the way @thin stratus, are Beacons a solution to implement a Party system for matchmaking/etc in main menu like PUBG/Fortnite/Rocket League?
Yes
Specifically, Paragon used PartyBeacons to implement reservation systems so that people could queue into party sessions without joining them if they get full all of a sudden.
Thank you ๐
Is there a way to use the SpectatorMode and states and still be able to allow the player to attach/follow other Pawns?
a simple AttachActorToActor isn't working
If I have my Dedicated server exe running, and I play Standalone from the editor after editing something in BP, Should I still be able to connect to the server? or would I need to RePackage the game?
does anyone know for a fact if NetConnection's AvgLag is roundtrip time
i would assume so but it could be half that
and i don't have a convenient way to test right now
ah
Is there any function like OnConstructionPostNetSerialize that I can use to load and cache some data of mine?
there be PostNetInit and PostNetReceive
thats some good stuff, thanks @winged badger ! Is there a PostNetReceive for structs? 
Can not for the life of me get the dedicated server to show up in th steam server browser
its for actors
Anyone here happen to be good with networking and knowing how to calculate IP addresses?
I thought VOIP requires sessions.
It needs some sort of connection. Sessions are just info.
Is the default VOIPTalker going to work without sessions? I just want the players to be able to talk to each other on a dedicated server. I use steam subsystem, but not steam networking.
@eternal parrot you must be in the same session for the built in VOIP to work I'm afraid.
You might be able to hack it with engine modifications.
having a bit of an issue with a client function
so i have a client function that spawns a niagara function, very simple
i call it inside a server function that is triggered on damage taken
my logic is that since that server is being called in the server then it would be correct to call a client one from the server
client function:
{
UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), bloodParticles,GetActorLocation());
}```
heres the server function
{
if(isDead==false && isInvunerable==false)
{
OnDamageTaken();
SpawnBloodEffect();
....```
this is being called in the character class and i have confirmed with a break point that the SpawnBloodEffect function is being called
blood effects don't need to be super accurate, usually
and also, client is notified it took damage
so why the separate RPC?
well, if i call the effect in the server it wont spawn in the client right?
point it
blood effect is atomic to getting shot
if you have the fact of getting shot networked
you don't need separate networking for blood effects
i could call it on a change of HP but i am not sure if i want every hp change to be represented with blood loss
but still
isnt this suposed to be working?
but what do u mean, "the fact of getting shot"
first one is client, second is server
that would only work on owning client
the take damage is only running on the server so the player doesnt know
ideally you'd simulate the entire thing
you somehow replicate shots
or the fact that you are shooting at very least
but when other players shoot it needs to be seen too
so there are hits being made on clients, you just choose to inflict damage on server only, which is fine
but clients can calculate their own shots and spawn blood effects themselves
without waiting for server to tell them to
that makes the whole thing feel a little bit unresponsive
but if bullets are replicated
so far that has not been the case
yes but damage is not limited to bullets
minor edge case where client would hit and server misses so client has extra spurt of blood
doesn't really matter in the grand scheme of things, health still stays in sync
theres stuff like poison which does dmg overtime
which is also replicated
separately
and can trigger particle or w/e effects when it is, locally
no need to send an RPC for that either
smoke&mirrors
if i spawned bullet actors on server and replicate them
my game would die in less then 5 seconds
i am aware that i can check the HP for example to spawn the blood but it just feels sorta weird since it feels like i would lose control and it would be a bit "hackish"
actually
well, my game has 6 players per server
it would look better
so theres nothing to worry about
yes
so
that bullet flies in generally the same direction at the same target on client and server, yes?
yes
so if you were to let bullet collide with the target on client, what happens?
that is all fine and dandy but i dont deal damage only with bullets
that would work if the game was only based on bullets tho
you also don't spawn blood effects from poison
why not
they serve as visual cues for whats happening to the enemy
i have a spinning chain around players to represent a root effect so i might just go with blood on everything
also theres AOE kind of spells that will do dmg and they will need the blood effect 100%
but again, you have the explosion actor replicated for those
or something similar
that can do their own blood effects client side
true, but i would have to call it every time i code a new character
thing is if you have a visual cue on client that it suffered damage, you probably replicated what caused it before that
i might just go with the HP change
and you can absolutely overload the network with 6 palyers
feels kinda "meh" of a solution thp
tho''
i can?
please tell me more about that
i dont wanna get caught with my pants down
i am not replicating much stuff now
we have 8 players, with 2000 interactable actors, 150 active AI and listen servers
what are you working on if i may ask
how far from realease are you guys?
less then 6 months
how big is the team?
12ish + few people on the side when needed
golden rule is, never replicate anything you can infer on client from the data you already replicated
especially via RPCs
i will keep that in mind
bandwidth is the 3rd most likely chokepoint on the network
after overflowing the RPC buffer and having too many Actors considered for replication
everyone obsesses about bandwidth
and that part of the networking is actually difficult to fuck up
i rly should read the docs, but i get bored easily haha
I assume that's why the GAS uses stuff like the RPC pooling. Saw Kaos talking about that the other day. I will look at that system someday. Maybe.
@winged badger game looks amazing btw.. great work
@heady beacon is responsible for most of the fancy kabooms you see there
Team is clearly incredibly talented. The VFX scream AAA.
how do you approach rpc buffer problems (diagnosing, knowing you even have one, etc)? I feel like this is information that should be documented somewhere
is there a difference items are placed on a map opposed to when an item is spawned on the server?
@distant talon You can use Unreal Networking Insights to profile your network usage during Editor sessions.
we've had problems in the past that were solved just by going through and optimizing rpc call counts using the network profiler. I dont think there was anything that (at least recognizably) jumped out as "rpc buffer problem" though, is there a tell?
Well you should be seeing high send rates of lots of data if its being overflowed.
Make sure your not calling Reliable RPCs on Tick or something silly like that.
Avoid Multicasts as well.
Multicasts tend to end up flooding the buffer if not utilized correctly.
Since they have a maximum limit per connection i think.
Thats quite low.
Hi, I've been struggling with dedicated servers for a couple days now, I posted a question in here earlier about opening level with the ip and someone said, I forget their name mentioned that i do not need to use this as the Join session will open the level. This however is not working for me so was hoping for some insight on to how I would go about fixing this
Should this work in theory?
@gloomy sedge I believe you need to set the Result variable on the "On Success" path. As it stands, you're probably not getting anything set in the variable.
@sinful tree Like so?
Datura is right
Yeah, the other thing is by setting it in a loop, you're getting the last result of the results array.
the results pin becomes valid only OnSuccess
So I should just se the variable as a single result?
when the top exec out pin fires
no sessions were found yet
its an async node, and top exec pin is synchonous
so the Results pin is as a result, empty
only when OnSuccess fires did it find the results you can use
i have no idea what you're hoping to accomplish with that foreach loop though
You may want to do some checking of data with those results... They contain more data, like how many players are present in the session etc....
Ignore that pic..
This one is right
This would only look at the first result back, but it's also checking if current players < max players.
Okay, Thank you very much you two. Great help!
So when calling JoinSession with the found result, Will is take the player from the MainMenu to the Server Level?
that foreach loop
will keep setting result until you reach the last result
so it basically iterated the whole array to find the last element
yeah, that looks saner
haha saner
So now this is looking better, should this transfer the player from the menu to the server map?
That looks better, but again, you may want some verification before trying to join the session... like...
This would iterate all the results, filter out all that are at max capacity or have a ping > 500, then loop through them until it successfully joins one
Probably getting ahead of what you're looking for... Which is just to at least connect using the join session thing, but yes, what you have should work now.
@sinful tree wow! Thank you very much, You are a very helpful
Is that 'GET' a ref or Copy version? or does it not matter at this point?
@sinful tree You still available?
@gloomy sedge Yep
Are you able to answer a couple questions?
I can try. No master of all myself ๐
Okay, So i followed the Epic tutorial on how to create a dedicated server
I have the server up and running
On the correct level
I have packaged the game and run the .exe
I click Join and the get the print string Unable to Join any servers!
Meaning that the Join Session is Failing to join any of the servers found
However, when I use the console command 'Open 127.0.0.1' It connects
I'm not really familiar with the particular tutorial you're talking about and I haven't really messed with the default Online Subsystem...Going out on a limb, but my guess would be that attempting to join a session would be trying to connect to your own computer using your external IP address, which doesn't work too well from what I've seen. Do you have another computer you could try running the client on?
how can I make my windows open up even when testing multiplayer?
right now they open one on top of the other and I have to manually set them
does anyone kknow
Unfortunate I do not have another computer to hand ๐ฆ
Even production games have this kind of problem - Conan Exiles as an example, trying to join a server that appears in the server listing that's provided in-game that's running on my own network would fail, but I could join it using a manual internal IP address without issue. Do you have a link to that tutorial?
Actually, might just nab my dads laptop
How to set up and package a dedicated server for your project.
They use the simple Open Level to 127.0.0.1
Ok, I'm guessing your server is calling this node somewhere in its game mode or instance?
Nope, I didn't think I would need to as the server is being hosted through a sepereate Server.exe
Oh, I have just seen that I may need to Port forward
@sinful tree I'm heading to bed now 3am.. ๐ฆ Thanks for all your help. Very much appreciated
Sorry I couldn't be more help. Sleep well.
My understanding of the "reliable" option on something like a multi-cast is that it would "try" to run it, but if the server is really busy or something, it could fail. Just working on some combat effects, one of which is the small explosion particle when a player dies. The apply damage is being run on the server, so when it applies damage to a unit, if the health is less than zero it should explode, which links to a multicast which spawns an explosion particle effect. Without reliable ticked, it never ran on the client, not even once. I tried it about 20 times in pie, and nothing. I ticked reliable and of course it shows up. I feel like a pie environment should be ideal for testing something like that. Shouldn't this be playing some, if not most, of the time?
@somber glade IMO if all in stat unit is showing green it should. IDK if it does though but that'd be what I'd expect
Very strange. Everytime I think I'm starting to get a handle on this, it just acts even weirder.
I've used to tick reliable on everything, and grown fond of using "WasActorRecentlyRendered" node to cull everything not needed to be shown/triggered
That's probably what I'll have to do.
Don't suppose you know any way to get both windows in PIE to produce sound at the same time do you?
I want to make sure the impact sounds are playing but sound only seems to play when a window is focused.
I've been playing around with that WARR thing for controlling ticks to make my colonists walk at 5fps when outside of view f.ex. but if you do multiplayer note that it runs on client server but if you set f.ex. tick interval, it sets it for the actor both on server and client :S So I tried timers instead, but it doesn't seem to work well enough.. I could have separate timer on client and server, and change the interval based on WARR but it seems timers are less reliable than ticks in my case anyway
Nice thanks. that's helpful
Sadly it didn't seem to work even after a restart.
well..it sort of works.
it works if the focus isn't the other pop up window
if I select a window and then click on my browser for example it keeps playing a sound, but if i click on the other Editor window, the sound stops
"There's an editor setting for Allow Background Audio" all I found quick heere
only works in Editor
Yeah I've got that checked already apparently. Ah well
I'll just test it in a built version I guess
I'm guess this probably works in built games and controls volume when you tab in and out of a game.
all, i have an issue in multiplayer that iโve been battling for many months now.
i really hope some kind soul can give me a push in the right direction:
https://answers.unrealengine.com/questions/958705/physic-issue-in-multiplayer.html
basically as soon as the client also sets physics disabled, the listening server moves the mesh to 0,0,0
if the client does not disable physics, no issue.
Could that be related to you not disabling the movement?
The CMC is not happy with Physics Simulations
@thin stratus I have tried so many things since then... I actually do disable the movement, complete code when I enable is:
when I disable is:
the weird thing is that it really seems related to movement, since the server sends the mesh to 0,0,0 when the CLIENT calls "set all bodies..." to disable physics
if I do not disable physics ON CLIENT, then the server is ok
Imagine this scenario, My client calls server spawn actor SomeActor Inside SomeActor I create an input binding, whose input will it trace for? Owner's? Everyone? No-one?
@ember needle Honestly, have thought about just spawning a dummy actor?
I don't know why that bug happens to you, but at this point it sounds like you could just spawn a Dummy Actor and give it that skeletal mesh and hide the character
What?
@meager fable Input is local. So per machine. If that actor has an input key bind, it would be able to be used by whatever PlayerController calls Enable Input on that actor.
Thanks
@thin stratus yes I can go this route, but then I have to replicate the pose. That said, I am able to reproduce the "bug" with the TPS UE4 project, if anyone would like to take a look.
Any tips on lowering Steam sockets latency? I know it routes through Steam relay servers but one of the advertised features of the service is that it reduces ping yet it's going from an average of 10ms ping without steam sockets when testing with a friend in the same city to 100+ms ping. I wouldn't even mind if it's slightly higher ping but this is like it's routing from EU to US and back again to complete the connection. I'm not sure if I'm missing some kind of detect region functionality or something and it's automatically set to an overseas routing server
Hi guys! I'm creating a BP actor with RepNotify bool var. I change this var on server, actor itself has Replicating enabled, but OnRep_ function fires only on server world. Any ideas why?
If I spawn an actor on the server, does its begin play only get called on the server?
if its not replicated yes
if its replicated, then it will be called on server and all clients
thanks
@meager fable by all clients, i mean all clients it replicates too
like you may only have an actor that replicates to owning client
Always prints "Server" but never "Client".
is the Actor replicated?
show me the property details
he did say actor is replicated
btw if client changed that property locally, then its likely that wont fire the onrep. going to need more details @royal sigil
Ah, I didn't see the first message
does UFloatingPawnMovement replicate out of the box like UCharacterMovementComponent ?
no
f
if you look at the new Network Prediction plugin
it has a replicated floating pawn
using the new Network Prediction
is it stable yet?
stable yes, feature complete, probably not
but Dave Ratti mentioned on UDN that it is stable
because I'm using the flying template and none of its pawn movement is replicated. WTF?
Whats the easiest way to get the movement in that template replicated?
The only other thing that is somewhat replicated is the ProjectileMovement one
and try it out
Replicating the Movement is the easier part :D making it smooth is the other story
@thin stratus read your doc, good stuff.
yeah, network prediction is going to replace a lot of the CMC
probably as a different class
to keep compatibility
Glad it helps
so should I try to convert my flying pawn to a character then?
well, you can, but, CMC is kinda built more for characters
Characters can fly though, so that would help you :P
that is true, though network prediction does have a replicated flying pawn, and i would rather use that ๐
probably a lot cheaper also
its a straight up aircraft, is there an aircraft character example somewhere?
maybe somewhere on the interwebs
honestly, go look at the network prediction extras flying pawn
it works, really well
@thin stratus don't know if you saw this before:
He probably did
thats the problem
that compendium needs a revision ๐
@ember osprey Look into rollback/replay, prediction, and do your own multiplayer stack for that mvement
About a month of work
or do what i said
c'mon
One of the paid Udemy courses on UE4 goes through pretty much that
Or that
I actually have not, but I also don't follow this stuff a lot lately.
What was that from again?
Is that official Epic stuff?
I know a few years ago that Jess had a presentation to introduce peeps to UE4 and the community and they mentioned me in it.
Was cool, cause I was randomly sitting in the audience. Not so cool that she pointed to me and everyone rotated.
I was just chilling ;_;
Sort of, I guess, still weird to me, even after all those years. Also don't have the time to actually interact that much with people.
Yeah you can't take two steps around the multiplayer world without someone mentioned the The UE4 Network Compendium ๐
@ember osprey https://www.thegames.dev/snaps/4ep3nTUNAD.mp4
network prediction plugin flying pawn
Noice
did you just build this?
where are you getting examples from?
Didn#t know it was that far already
Did they state anything on how long it takes to be more or less feature complete?
At least in terms of a "version 1.0.0"
dave stated its a point where no more changes to the underlying code will happen
at a *
so boiling it down.....switch to character or use that plugin? Which is the best choice?
Which means, you can use the underlying code to do all sorts of things?
yeah
And they will use the same code now to maybe fix that mess of a cmc?
hah
@ember osprey If Character works for you, switch to that
well that should have happened before the end of this year, but with the current world situation
that will take some work to untangle
probably next year mid or end ๐
Gotcha
that's the info i saw on UDN anyway from Dave.
haven't tried either, but I'm trying to walk down the correct path.
@ember osprey i would use the network prediction
for flying pawn
it seems a better choice than CMC for flying stuff
has anyone packaged/released with the network prediction plugin you know of?
nope
Idk how easy it is to debug it and extend it. CMC is a mess, but atl east people fought with it in the past
CMC is a royal PITA

i still fight with it daily, that and the navigation system
it also tightly coupled to both character and playercontroller
and has code tendrils in both those classes
which is awful
and you need to override half of it if you want the autonomous proxy to be controlled by AIController
that was just... yuck
So with this plugin am I still gonna have to replicate everything in the pawn and then just have prediction with the plugin, or will that plugin basicallly make the replication handling as out of the box as using the CharacterMovementComponent?
it will replicate the movement
no need for CMC
look at NetworkPredictionExtrasFlyingPawn.cpp
you will need to create your own version of that (as that has hardcoded input bindings, etc0
but its based on APawn
and is really easy, and its commented quite well
ok, thanks for the help!
enabled both plugins and nothing shows up in content browser:
yours:
In the bottom right you need to check "Show plugin content"
Yeah or engine content actually
thanks! got it
oh nice, gotta use the heck out of it
If I have a dedicated server running on my PC following the guide on the UE docs site. Do I still need to 'Create Session'?
kaos!! you should have told me before hahaha
I would presume no, But I keep getting 'Unable to join server'
can I have the link to the guide you are following?
How to set up and package a dedicated server for your project.
The guide only uses the Open Level node to localIP
And this is how I'm joining the Server
Ah I see, the setup for the guide is a much simpler tutorial since it's joining the local server instance you created through open level
so it's a bit like cheating
if you do want this to work over the internet with an OSS you do need to take a look into sessions
I can't find much on the upcoming Network Prediction plugin, anyone here got an elevator pitch for what it does?
if you are a Blueprint consumer, I do recommend you using the AdvancedSessionsPlugin from mordentral, it's really narrow, and if you have any question, probably someone has already had it before in this forum thread https://forums.unrealengine.com/community/community-content-tools-and-tutorials/41043-advanced-sessions-plugin @gloomy sedge
Advanced Sessions Plugin
Updated 12/03/2020
Plugin now has two modules, one is AdvancedSessions and one is AdvancedSteamSessions, this will allow me to tie more Steam specific functions in without forcing the steam subsystem to be packaged out with projects that don't want it.
New
Parvan/Metahusk has made a menu
@meager spade You called it:
replicates movement w/ prediction
From the official Epic github
the plugin is supposed to replace UCharacterMovementComponent
Here is a break down of the plugin: https://www.youtube.com/watch?v=_rdt-v1nFlY
Video explaining WIP Network Prediction Insights
Part 2: https://youtu.be/18BNvoGP-E0
Does it look like it's movement specific or a more general property prediction system?
dave ratti
The plan is to replace the current UCharacterMovementComponent
are delays broken in multiplayer? My Replicated actors begin play gets called untill debug on the client and then stops, runs perfectly fine on the server
delay/timers work fine in both server and client
This doesn't seem to be replicated/working on remote clients, is there another way to determine otherwise if a character is on the floor or not?
yeah this seems to be the same result, the server and owning client only seem to know about this, remote clients dont appear to be aware of the current mode
Server prints that magma burst is valid and client prints that it's invalid how come this happens?
because your spawning a replicated actor
then running a multicast
RPC's can arrive before the replicated actor arrives
so welcome to networking and race conditions
oh boy
why don't you just spawn it on each client individually on the multicast?
or let beginplay of the replicated actor handle it?
as that will be called on clients its replicated too
happy friday everyone, when working on a mutliplayer map with streaming levels are we suppose to keep the lights on their own level? when streaming out of levels lights bleed sometimes
Hello everyone, is there a way to use the SpectatorMode and states and still be able to allow the player to attach/follow other Pawns?
a simple AttachActorToActor isn't working
RE: https://answers.unrealengine.com/questions/659688/how-does-a-client-determine-when-playerstates-are.html Is there really no way to OnRep notify PlayerArray from AGameStateBase? What do people tend to do to fire events when a player joins/is observed on a client.
(think updating list of players in a lobby UI)
Seem odd that the engine doesn't provide OnRep_Notify for this
but I guess I can make a parallel synchronized array? Just seemed wasteful to me.
@gusty slate what pawn do they have in spectator mode?
A pawn deriving from spectatorpawn
With an CMC
@tidal crown There is a function in GameMode called when a player connects and is assigned a controller, I think it's OnPostLogin
@gusty slate the CMC is probably overriding movement, are they meant to ever move around on their own or just follow players?
I tried disabling the CMC before doing an attachment but it didn't work. Ideally I would offer both player follow and free roam, but Player follow is more important
Yes, but that doesn't tell the client when state is replicated to them for use in a widget for example, thats only server-side.
GameMode events aren't replicated to the client.
you can start your implementation from there
Hi everyone;
Quick question; I have some cubes on my level. I want to set a cube selected on the dedicated server when I clicked on it. I tried to make an rpc call with the cube actor as a parameter but it came null on server. How can I achieve something like this? The cubes are replicated of course, and I'm calling a function marked as Server.
Thanks.
@short cliff What actor are you calling the ServerRPC in?
One major thing, make certain that you're ONLY spawning the actors on the server, or that they're loaded from the level and set to replicated. So that the client itself isn't spawning it without it being told to from the server. If that's the case, you should be able to pass it's pointer to the server. Should come up valid.
Can someone help me out with getting a dedicated to server to show in the stem server list. I can't get it to work..server runs just fine..but wont show in list at all
Wow delays are really bad to use Timelines/timers are always the way to go. Or so it seems
does replication of actors (or movement components) extrapolate/predict positions or something? like say a client has 100ms lag and an actor begins to move. does the client see the actor 100ms behind where the server sees it or not? because i would expect it to yet i'm seeing results inconsistent with that expectation
sometimes the clientside actor is ahead of the serverside one
edit: haven't tested on a real network, just with net pktlag
Hello everyone, I have been stuck on a stupid thing for a long time, I try to set in place a leave game button, work perfectly well when the client leave, but when the host do I can't make client leave from a PClist done at their connection. Any ideas why?
btw does net pktlag add a delay from server to client? or only client to server
i think that would explain the problem i just mentioned as well as another issue i ran into
dedicated multi builders - what source do you pull from to do a build for 4.26? release? master?
@wise bridge When doing "Get Game Instance" you're getting it only from the computer that is running the game. So when a client leaves, it'll work just fine, but when the host leaves, your loop goes through the list of PCs, but it's looking at the hosts' Game Instance.
What you need to do is have an event on the player controller that is called instead, and that event can then get the game instance and run your destroy session caller
Oh ok thanks, I had a feeling about that, I was starting to do the thing on the Game Instance on the PC before I realised it was stupid and asked my question here ๐
@wise bridge unreal knows how to go to the default level when the host disconnects
so you can just wire destroy session on your main menu level beginplay
and do nothing else on clients
Any prediction is beyond the basic replication. What you're seeing is a movement component with prediction built into it.
I gonna check that tomorrow, but I had some issues with this method
Ty
hey, weird issue here. I can't set the visibility of a component even using a Multicast
it works on the local client but it's not replicated to other clients
why the fuck is the only way to do seamless travel in BP to use "execute command"?
that is...hacky as shit
I need answers on this as well. My head is gutted
it feels very gross to do that
@winged badger Oh no...
like fuck it we're gonna use a text-based API ??
c++
Ok, follow up question. Should that server command live in Game instance, for any good reason?
oh
would take entire minute to make a BPCallable wrapper
Yeah, I guess tho like there's C++ modules behind "servertravel" right? Why is this the only public API
How do you guys fix rubberbanding?
I'm desyncing on my own local server, it's embarrassing!
what are you doing exactly?
That seems pretty hard to do.
are you doing a lot of stuff w/ server ticks? BPs?
I'm just trying to walk, jump around in my map
Yeah my game is built entirely in blueprints
do you have a lot of timers/tick-based things happening?
that can cost you performance, especially in BP
I have event timer delegates and stuff
a lot? are they really high frequency?
I don't think I have many though
have you done any network profiling w/ the tool provided?
The ones that fire, don't fire often and fire only on input and when it's done
I didn't know that existed
oh yeah check out the builtin network profiler
you can get a file that records network events and see if theres something weird
Alrighty I'll look into it! Thanks a lot
Just curious, you think it'll be the same if I'll redo everything (everything reasonable anyways) in C++?
could be
BP is I've been told 8x slower than C++ but I bet its not likely the case for u
i have a BP based game and its not desyncing
i bet its something simpler
network profiling will tell you more for sure
that's an understatement, depends on the use case but it can be much much slower than that
I had a question about Multiplayer when it comes to blueprints, is it possible to create a fully functional multiplayer game with just purely blueprints?(Including plugins)
i would not count on it being smooth with more then 4-8 or so players and very limited world size
How limited do you think the world will have to be?
you literally have only 10% network functionality in BP
Gotcha
plugins on the marketplace can kinda get past that though
100-150 replicated Actors tops
Damn
with 8 players
Would AdvancedSessions and other plugins people usually recommend solve some of the problems?
they have nothing to do with in game networking
I see
i honestly believe its less painful to learn c++ then network a game in BP
Time to throw a year of my life away lmao
how long it takes depends on your existing skills
if you're already familiar with unreal API
it will be easier, as you don't need to learn API and c++ at the same time
if you have unreal-unrelated programming experience
that helps tons
Iโve been using BP for about almost two years and gotten the hang of things, will that help??
yes, even more so if you learned good practices along the way, and don't do spagetti
c++ function names are same or similar as BP function names, generally
hmmm so transferring over wouldnโt be that hard
and you know at least a part of what engine offers
if you're serious about making games, i would definitely recommend it
c++ can do so so much more then BP, and unreal is designed to work with combination of c++ and BP really
I see many videos from epic using BP for their multiplayer examples and it seems like it runs perfect without any C++
we can spawn a 30k Actor procedural level and have it networked and ready to play for 8 players in a few seconds
most of techniques we use are not available in blueprints
Def gonna think about swapping over
we have 1200 interactable actors replicating using only 16 actor channels
which allows our server to cope with the sheer number of them
a lot of stuff, even basic stuff is just not exposed to blueprints
for example, you want to know when your Pawn is possessed on client, in BP
in c++ you can use OnRep_Controller
in BP you have to gimmick a Client RPC for it
which just uses extra network resources
and OnRep_Controller is part of the engine, so it will happen anyways
What if you created a small LAN project?? Would BP be able to run it just fine??
or Iโm guessing C++ is the way to go for that
small sure, but when im talking about creating a game, i am talking commercial
Ahhh i see
cause thatโs what I want to create first
just something me and my friends could play
Obviously if iโm doing a commercial product I would need to learn the industry standard
Hey I'm working on continuous fire abilities for my combat system and I am thinking of ways to deal with packet loss. Should I use reliable RPC for the cancel action or is it better to have unreliable RPCs sending on an interval in terms of network usage?
you'll still probably benefit from c++ just because of sheer amount of extra tools you get
@twin juniper how to handle something like that depends on so many things
I was hoping you wouldn't say that ๐
my simulated proxies, for example, just know the character is firing
what is a continuous fire ability?
and have a fairly accurate idea whats it firing at
weapon shooting?
nothing else
yes like automatic weapon or channeled spell
then they just guess on their own
they are both different things
In my system I handle them both in a similar way
you should definitely simulate, rather then replicate, everything you can get away with
I'm planning to have them execute a routine on a timer until a cancel action is received
except minigun
that brings the question what is accurate enough
game Kaos and i are working on for a living
is an 8 player co-op shooter with isometric camera
it doesn't generally matter if one shot ends up missing on client while it hits on server
hi anyone know what cause pawn not spawn on remote client?
as there are so many bullets flying around, you really can't tell
how do i get the create chat thing miunte 1.08 https://www.youtube.com/watch?v=8NtpIcbCrkw&list=PLXBIyoKwiri1NxwGouMS5w7ziCoT7Yx7b&index=10&ab_channel=AlenLoeb
I'll post link to part 2 here when it comes out (around 1 week after this one).
Let me know if you had any problems.
Discord Server: https://discord.com/invite/ZhR2ecf
Thanks for watching!
My concern is that players will find that they have lost resources because actions kept executing due to a lost packet
what type of game is it?
but perhaps I can do something similar to @meager spade and rpc a batch, and then if the next RPC is not received for the batch, it cancels the timer and does not execute
third person action/shooter
Kaos uses GAS there
somewhat of a premium on accuracy but not CS GO important
ya
so he has built in prediction
he has hooks to roll stuff back if something goes to shit
I've made my own predictive system so I can handle that myself
I don't have experience in running a multiplayer game though so I am unsure what is the best mechanism over the network regarding unreliable and reliable RPCs
I would prefer a single RPC to cancel a continuous ability as the alternative may tick one or two extra times after the client chose to cancel
GAS handles that nicely
single RPC is fine, and that one should be reliable
also, timestamped
you don't want the variance in network latency causing it to cycle an extra time on one end
it will probably be one of the few reliable RPCs I use tbh
probably not the end of the world for bandwidth
@meager spade I did think about using GAS but decided against it in the end. A few things about it bothered me so I just rolled my own. It isn't as efficient no doubt but it works pretty nicely.
bandwidth
is usually the least of one's problems
both the RPC buffer if you overdo it
and server's time evaluating actors for replication
are much harder to manage then bandwidth
the RPC buffer on the server for receiving RPCs from clients?
for sending, receiving is easy
ah
So number of actors living on the server is the most important concern?
Hmm, I've just realised I don't really RPC from the server
So I suppose that isn't an issue for me so much as the number of replicating actors on the server
That is a plentiful budget for my game, I think I'll be okay
fortnite has 50K replicated actors
on dedicated server ofc
Listen Server is a whole other ballgame
(as server and client logic has to be running the same time)
I'll be using dedicated servers if I can
i wouldn't go dedicated on first game
that 50K is optimised a lot though, isn't it?
the cost is immense
unless you have deep pockets/backers
or only expect 10 people to play ๐
it's a concern, but does the design change a lot if you wanted to design for listen server after having expected to design for a dedicated set-up?
yeah
in what ways?
well you normally gate stuff of with HasAuthority etc
or !HasAuthority
but then you need to check for things like IsLocallyControlled whilst being authority
for listen server
Hmm, couldn't you just run a server and a client on the same machine?
that is not listen server
but sure
seperate dedicated server instance + client instance is fine
Hello ! I would need someone used to compiling dedicated server and client. It compile again the engine every times, even without any change on it... Need some help to understand why and fix it.
I think that is how I would do it since it would mean I can be lazy
people have beasty PCs these days anyway
@ancient moth build a project, not a solution
https://www.thegames.dev/snaps/AtSv3myxf9.png make sure you build just your project
I did it, it build the engine anyway.
mine never rebuilds entire engine
I know... 3 months I try to understand why it do on mine :/
I saw thousand of forums where people have this problem, but no solution...
you deleting things?
like intermediates folder?
you accidently changing engine code without knowing?
just a single space could trigger a big rebuild
As per my experience it only rebuilds that particular module not entire Engine.
I think I need a multiplayer expert I need to know why is unreal giving me errors for a line by trace for this reference ? I have a mesh on a character I use to interact with an elevator button it works but when in client mode it gives errors
how else am I suppose to get a reference??
@meager spade I didn't delete any file and if I modified an engine code, I don't remember it... There is a way to reset all engine code to be sure it don't ?
how is it possible im getting an access none from my player controller for a button press? is there some other way I need to access my player controller to use the is input keydown?
Also, when I do modification on the editor (blueprint) and try to build the dedicated server, it tell me the target is up-to-date and don't build anything...
It's like if it can't check if a file is modified
Maybe for this it rebuild the engine each time ?
@halcyon totem I would suggest you cast to your playerController class as well
Should always cast to pointers before using them. I'll end up saving you both computing and debugging time.
Well, check if they're valid more than cast. But in blueprint most people use that as validity checks.
Hi there, I have a rubber banding issue that I have discovered when joining a dedicated server. https://gyazo.com/a6e019c0c1580b276cc422cc7c31e0bf
The character's Movement Comp is Replicated
Using a very simple movement
@gloomy sedge You don't have to replicate the CMC. It does all of it's replication through the ACharacter class. Rubberbanding is usually due to lag between the server/client and the client predicting it's movement too far and the server correcting it, or the client and server having different movement speeds.
Yeah, your client also needs to set Movement Speed.
Oh, does. Missed that. Hmm.
I admit, I do this by just replicating a single bool of something like "SpringButtonDown" and have that RepNotify and let it change the speed on both.
I also check the Stats Net CVar and ping was around 15
Okay, I shall try the RepNotify and see if any changes
Using your way of replicating the single Bool still creates the rubber banding
@gloomy sedge What are your movement speeds? Are they something crazy?
150 walking, 300 sprinting
Hmm. Not likely that then. It only happens with the sprinting stuff?
it does also happen with the standard walking
Someone experienced in the difference between ListenServer and Dedicated is going to need to help then. :/ Cause simply setting the speeds to about the same, and making sure that the client isn't passing the distance setting thing with too fast of speeds is all that's really needed on a Listenserver. I can't see why that should change on a Dedicated server. ๐คทโโ๏ธ
yeah very confusing, unsure whether it is just my internet speeds everything being hosted on it or what. but can't even find anything online about rubber banding on dedicated servers
guys i have an actor that spawn and then does a raycast and dies, i use this for hitscan bullets
i also have a regular projectile actor
the both replicate
and when they apply damage the player is suposed to simulate phisics so that i can do physical hits
the issue is, while both actors are replicated the hitscan one doesnt work
since it is replicated i was under the impression that it should spawn in the client and do the raycast there aswell
maybe i am wrong?
@limber gyro You're likely killing it too fast. If you spawn something on server, and then set it for destruction before it even replicates, it won't get replicated to clients.
You'd be better off just doing the trace in the weapon and letting that persistent actor replicate whatever it needs to it's client version.
Not sure then. Should work in theory if there's less than .2 seconds of lag.
But it's still a pretty brutal way to do that. Spawning is semi costly for something as simple as a line trace.
maybe i shouldve gone with a regular bullet with 999999 speed with CCD
ye doesnt work even with the bigger timer
The spawned actor is replicated and only spawned on the Server?
yes
That's odd. While maybe not a good idea, it should still be working.
Are you doing a lot of networking? If so, have you upped the 10,000 bit per second limit?
i dont think so
i havent even heard of that before
also ive had people from india play in us server while having less than 50ping so i am assuming my network is pretty light
the default scene root does not replicate tho
let me check that
still the same
Is ping even related to that
Not really no. It's an engine hardcoded limit that the engine itself will enforce.
@limber gyro Add this to your project's DefaultEngine.ini
ConfiguredInternetSpeed=1000000
ConfiguredLanSpeed=1000000
[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=1000000
MaxInternetClientRate=1000000```
what does that do
That setting is a Megabit, you can lower it if you like.
but how is that relevant to the issue?
The default is 10,000. Basically it will not allow any data to be sent via replication or RPC if you have reached 10,000 in that second. So if you send 30,000 bits instantly for immediate replication, you're waiting for three seconds before ANYTHING else gets through, like actor replication.
It might not be, but you're having trouble having an actor replicate. It's a step to try.
i am 100% sure that is not the issue my friend, if that were the issue the regular projectiles woulndt be working too
Likely not, no.
im going to check it if it is indeed replicating by giving it a cube or something to see if it shows up
yep the cube shows up
could it be that the raycast is being made in the server and not in the client
??
maybe the server thinks that since it was already done in the server it doesnt need to be done again
Really depends on how you've set up the spawned actor?
What event is the cast done on? How does it know to do it on the Client?
i am using a hasauthority
its spawns a raycast on the tick
because the begin play was too fast for stuff to work
Hi, I would appreciate any help. I need help understanding multiplayer pawn possession. At the moment I calculate one transform for each player controller in my game mode on 'event onpostlogin', then I cast to the each player controller and inside each player controller I do the following
but doesnt seem to work.
This script is inside my player controller so 'self' is a player controller.... or do these PCs not exist on server or something?
@limber gyro But if you're using HasAuthority, won't that only run it on one or the other?
doing it on the else part
@twin juniper i think in theory u are correct, in practice i have followed a tut from an apic guy and he passed the controller
so i dunno
@twin juniper Normally GameMode handles Pawn Spawning, but that should work in theory. Is it not possessing?
i am doing it in the game mode aswell
if the PC spawns a character he will the owner no? so when u try to posses that wont there be any issue with you possesing something that the server doesnt won?
tbh i dont know
I'm pretty sure that the possession call also sets owner though.
I now set the script all to run in my game mode
Regardless, what is the issue? Is it not possessing, or is there just no input?
Here is what I use, I set number of players to 6 and 'hello' prints 6 times on server
The pawn is only spawned on server, none of the clients have pawns the controller controls
oh wait - I can see the other client pawns on server so I guess they are not replicated to client
LOL
so I need to replicate spawn actor somehow
Pawn class should be replicated by default.
it is
ummmmm
so you can see the pawn spawning in the server, but it doesnt show up in the clients
?
and its replicated
maybe I need to multicast the spawn, but execute the possession just on server
Yeah dont see any pawns on client.
if you spawn something on the server and its replicated every one should be able to see it
try the same function in the game mode
see what happens
Spawn is replicated by default if the actor class is replicated.
I am spawning inside my game mode
How much other networking stuff are you doing at the moment?
i have no idea then
Cause you might have the same thing I just described to Sonic even though that wasn't his issue.
I need to replicate the pawn movement, I had rotation working but movement was a problem, I thought a problem was the fact the pawns were not being possessed properly, so I removed default pawn class and started to spawn and possess the pawns manually (also will need that for later anyway, since I want variable pawn types depending on what the player picks)
Also my animations replicated fine
Animations don't replicate. You use replicated conditions to simulate similar states on clients.
Ah well maybe I misremembered, but I'll cross that bridge when I get to it
Game mode only exists on server right?
Correct.
That won't have any bearing on the spawning though. You can spawn replicated actors from any class anywhere on the server and they'll replicate to clients.
Here are the replication settings. The character I am spawning is a subclass of a more general character class (with the exact same replication settings)
and am I right that I have 'auto possess player' disabled in each character? since I am doing the possession manually.
@kindred widget i figured it out, turns out i was hitting myself in the client with the raycast
hehehe forgot to add an ignore actor
i have no idea how this didnt create any bigger issues before LOL
Oof. Done that one before.
@twin juniper It's extremely odd that you can see those on the server, but not on clients with them being replicated...
Like, you can consistently see them on the server, all the time, no issues there?
yes, whether or not I use dedicated server
Is it possible that you're doing a ton of other networking anywhere else? What else in the game is networked?
oh I think I could be spawning wrong
take a breath, rapidly making guesses as to what went wrong is rarely the most effective approach
putting a breakpoint on event BeginPlay is a good start
I think Im using a foreachloop where I should be using foreachloop with break
you should have 1 hit on server 1 hit on all clients for every replicated player pawn
yeah fixed
Now I have the problem I had yesterday, I am using 'addworldoffset' to move which I have managed to replicate but it is choppy. I would like to use 'addmovementinput' or 'addinputvector' but these do nothing
those work out of the box unless you did something weird
@twin juniper AddMovementInput requires a MovementComponent. Such as FloatingPawnMovement.
Oh I know I have a movement component I have tried 100 ways, I also tried adding a vector to floating pawn movement
my pawn is of character class which has movement component by default no?
I have a level which contains many stream levels, each one with their own PlayerStarts. I need to randomize their count & position, so that everytime it's a different map (though composed of instances of the stream levels).
What is my best option to do that? ATM I'm considering having the server randomize the stream level count & position and broadcasting a replicated variable from GameState. OnRep of this variable, an event is called that triggers a "create instance" loop for these stream levels on every client. However, I'm not clear on how then to spawn the players since the creation / location of PlayerStarts happen only after all of this has happened, and in general it happens in the GameMode.
So AFAIK I have the GameState run before the stream levels are loaded on the clients.
What would be a good way to achieve this?
c++?
@winged badger me?
yes
I'm in BP but can do C++ if needed. I'm trying to understand a proper course of actions
@twin juniper Characters do have the CharacterMovementComponent by default. And you just have to call AddMovementInput from the client.
is seamless travel involved?
yes
so there are few key points here
standard lobby etc as per @thin stratus lobby on the marketplace
each PC when its player loads a level (note: this will be departing lobby PC, not game PC if its not the same class)
first calls NotifyWorldLoaded, then ServerNotifyWorldLoaded
when server finishes the seamless travel, it calls PostSeamlessTravel
(not the same class PC lobby vs PC game FYI)
This is the BP I have in my character. (I recently added the switch has authority didn't make a difference). The disconnected node is what I had before which worked but replicates badly.
in it, it iterates over all controllers that reported in, and calls HandleSeamlessTravelPlayer for each
this will be before any of your streaming levels are loaded
and that is very much not desirable for your setup
as that will start the players up with what player starts it has on persistent level
players that finish seamless travel after server have the HandleSeamlessTravelPlayer called on them as they call ServerNotifyWorldLoaded
what you need to do is prevent HandleSeamlessTravelPlayer to be called at all, for any player, before your streaming levels are setup
and run the iterating over all controllers thing that AGameMode::PostSeamlessTravel does after they are all ready
ontop of that you should not let GameMode start a match before all streaming levels are up and running and all players have finished travelling
ouch
@twin juniper Don't use SwitchHasAuthority.
you can hook up into AGameMode::StartPlay or AGameMode::InitGameState
preferably 2nd one
That'll only run if you're using a Listenserver and the Listenserver is using that Pawn
to start your level loading
sure but makes no difference.
@twin juniper This is your character class?
you have one convenient guarantee in all of this @ember needle - no Actor on the client will ever call BeginPlay before the GameState Actor has replicated
its in my more general character class of which the specific character I control is a subclass of
I had no idea that GS MUST be loaded before any beginplay is called
and yes you should definitely use your GameState to do any replication you need done before BeginPlay repated to level generation
its OnRep_MatchState
in GS
that tells client world to call BeginPlay on its Actors
@winged badger i'm not sure I got all of that, but this is gold.
you have very few guarantees with order of things in networking
so that one is awesome
ideally you'd get that running, then not start the match until all clients report via RPCs they finished loading streaming levels
@winged badger i'm trying to understand all of this, bear with me
thats an upgrade though
@twin juniper This is all you need for a character to move from input. Should work for walking or flying movements in the CMC.
^
@winged badger so:
- override PostSeamlessTravel so that it does not call HandleSeamlessTravelPlayer (hopefully there's a BP equivalent)
- Use GS from server to broadcast the list of stream levels and their position
- Clients create streaming levels based on this info, when they receive it (GS is replicated when BeginPlay of level BP is called)
what I'm not sure I got: "run the iterating over all controllers thing that AGameMode::PostSeamlessTravel does after they are all ready"
look at the function in gamemode
you can just put a boolean in GM when all streaming levels load
and override HandleSeamlessTravelPlayer so it does if (!bFinishedLoadingStreamingLevels) { return; }
instead of overriding PostSeamlessTravel
so i can use PC to report back when levels are loaded in all players
you get unintended bonus there
if you send an RPC each time client loads a streaming level instead of when it loads all of them
you get the data for the loading progress bars
lol
IF i get this running then I'll get to that
...any idea if part of this can be achieved in BP?
then you just transfer that data to their PlayerStates
and then it replicates, so each player can see everyones loading status
gamemode stuff best do in c++
the rest i'm still pretty much... digesting
you can't really split PostSeamlessTravel in 2 functions in BP
my C++ is extremely basic, i program in other languages (erlang mainly)
what you need to do in c++ is fortunately pretty basic
so let me rephrase
void AGameMode::PostSeamlessTravel()
{
if (GameSession)
{
GameSession->PostSeamlessTravel();
}
}
and you need the rest of that code from it in a separate function you would call when all streaming levels load
and also return from HandleSeamlessTravelPlayer if the streaming levels haven't loaded yet
i have physical animation that happen when something overalps or hits the player but i only want the enemy players to see it, i dont want the player itself to run those animations, whats the correct "if" to use in this scenario?
you can override ReadyToStartMatch in GameMode from BP
?
i meant this ^ what for
so it doesn't start play (call BeginPlay on actors) before everything is ready
you want NumTravellingPlayers == 0 and bFinishedLoadingStreamingLevels == true
you don't
start everything from AGameMode::InitGameState
right after Super call
its always before BeginPlay
i'm a little lost, let me see if I can write down everything and if you can confirm
you can just shoot yourself a BlueprintImplementableEvent from InitGameState
and start the streaming level loads from BP
@winged badger first of all THANK YOU. please give me a couple of minutes and I'll get back to you
to double check, before I loose 2 weeks on this ๐
people keep telling me i should write a blog about that stuff
YES
๐
@winged badger
- override
void AMyGAMEGameMode::PostSeamlessTravel()
{
if (GameSession)
{
GameSession->PostSeamlessTravel();
}
}
- separate all the rest in another
PostStreamLevelsLoadedor something function:
void AMyGAMEGameMode::PostStreamLevelsLoaded()
{
// We have to make a copy of the controller list, since the code after this will destroy
// and create new controllers in the world's list
TArray<AController*> OldControllerList;
[...]
}
- Have the server send a RepNotify variable with the stream level data, which calls an event on the Main Level BP to load streaming levels.
- Each client notifies the server that the stream levels have been loaded via PS.
- When server has all clients reported for duty, call the
PostStreamLevelsLoaded
@winged badger this correct? Also, will this work for players that join in later on?
might get a little choppy for late joiners
but it won't break them
don't forget starting the streaming level load from InitGameState override
(you can immediately set the variables on GS for clients to receive then)
does any 1 know the line of code to check if a pawn is localy owned or not?
ANy idea why this would return 'hello' (sorry for repeated repost kept noticing errors with presentation)
can't I just use the OnRep of the stream levels data?
and overriding ReadyToStart match to halt BeginPlay
thats the idea
but server has to use something else
ah, fucking BP OnReps fire on server as well
yep
yuck
you can, but you still need pre-beginplay post-intializing gamestate hook
to set that data
so override InitGameState, call Super, and fire a custom BlueprintImplementableEvent
to start the rest form GM blueprint
so then I need to call ReadyToStart after all players have reported their levels to be loaded?
no, GM calls that every tick
but if I override it?
ah ok
as for streaming levels themselves, not an expert there, haven't used them much
we brute force generate and spawn the entire level
using similar methods
@winged badger ok so the end of that would be:
- Have the server send a RepNotify variable with the stream level data
- Override
AGameMode::InitGameState, call Super, and fire a custom BlueprintImplementableEvent to start the rest form GM blueprint - Each client notifies the server that the stream levels have been loaded via PS.
- When server has all clients reported for duty, call the
PostStreamLevelsLoaded - Override ReadyToStart match to halt BeginPlay if not all players have reported their PS.
out PlayerStarts are not random though, so we don't have to delay HandleSeamlessTravelPlayer like you do
they won't be in the pool unless the levels are loaded before the starts are selected
oh and also
but why do I have to Override AGameMode::InitGameState instead of using the OnRep of the stream level data?
{
return (Player != nullptr && Player->StartSpot != nullptr);
}```
this abomination
just override it and return false
but you have to set the StreamLevelData from somewhere ๐
in order for it to have OnRep called
that is what you do from InitGameState override
AHHH ok so I set it in there
gotcha, lost that
@winged badger SO, the summary:
- override
void AMyGAMEGameMode::PostSeamlessTravel()
{
if (GameSession)
{
GameSession->PostSeamlessTravel();
}
}
- separate all the rest in another
PostStreamLevelsLoadedor something function:
void AMyGAMEGameMode::PostStreamLevelsLoaded()
{
// We have to make a copy of the controller list, since the code after this will destroy
// and create new controllers in the world's list
TArray<AController*> OldControllerList;
[...]
}
- Override
AGameMode::InitGameState, call Super, and fire a custom BlueprintImplementableEvent to populate the stream data that gets replicated to clients from the GameState - Each client notifies the server that the stream levels have been loaded via PC.
- When server has loaded its own stream levels, call the
PostStreamLevelsLoadedfunction extracted from the originalPostSeamlessTravel. - Override
ReadyToStartMatchand return false if not all players have reported their PS. - override:
bool AGameModeBase::ShouldSpawnAtStartSpot(AController* Player)
{
return false;
}
few minor corrections
you don't have to wait for all players to report to call PostStreamLevelsLoaded
you can, but don't have to
server has to finish before you call it, clients are optional
HA
server has to have all playerstarts generated
EDITED ^
you also don't have to server RPC client progress through the playerstate
you can do it via PC as well
its safer, as PlayerState usually takes its sweet time to replicate
one last question (at least for now...):
"Override AGameMode::InitGameState, call Super, and fire a custom BlueprintImplementableEvent to populate the stream data that gets replicated to clients from the GameState"
does GameState exist at this point?
you use PlayerStates to replicate progress if you want to show loading bars
it exists as soon as Super is executed
you can also do a bit of a convenience there if you like
UPROPERTY(BlueprintReadOnly) AMyGameState* MyGameState;
UFUNCTION(BlueprintImplementableEvent) void GameStateInitialized();
virtual void InitGameState() override
{
Super::InitGameState();
MyGameState = Cast<AMyGameState>(GameState);
GameStateInitialized();
}
ok, yet another question: what if I create all of the StartPlayer and then teleport the players after the server has loaded the stream levels?...
this is better
doesn't create problems if you don't have enough player starts on persistent level
humour me, this is a learning exercise for me ๐
let's say I have max 30 players in a game.
I create 30 player starts in the main level (empty)
every stream level has some references (actor arrows for all I care)
when server has finished loading the streams, teleport all players where needed, and also have ReadyToStartMatch return true
...bad?
you could spawn all actors on persistent level without delaying HandleSeamlessTravelPlayer then
not questioning you, quite the contrary
indeed
the teleporting itself
yes
definitely less elegant, however I've an added complexity that I didn't tell you about
the players equipment varies depending on where they spawn
closer to a center, less equipment
then definitely no on teleport
HandleSeamlessTravelPlayer goes into HandleStartingNewPlayer
its default implementation spawns the player pawns
(you can override it from gamemode, have to call parent to have it spawn default pawns tho)
ok gotcha
so you're introducing a third option ๐
so first option: all of the above
2nd option: teleport
3rd option: spawn manually (after server has loaded streams)
this is what you meant?
spawn manually is only if needed
only if default implementation is not good enough
i imagine that it kinda kills all of the normal flow