#multiplayer
1 messages ยท Page 478 of 1
for example, people report that error happening often when they connect in HTTP to a server, that just plain redirects all requests to go to HTTPS instead
and that redirect causes issues
Hmm, I've managed to do a POST with https://ptsv2.com however
Idk if that's a redirect
What do you guys suggest?
solved my issue :/ turned out the building class was using an event beginplay which was self sabotaging itself, so it was replicating correctly but this forced it to do it's own thing on clients
cool
I think I figured it out, thx
can anyone help me understand how to do linetracing with multiplayer in BP
probably a dumb question, but does it matter if servers are compiled for development and clients for shipping? is there a performance or stability gain if we also compile servers for shipping? how do you do yours?
Idk if they even are cross-compatible, but a development build will probably have a more chunky log size due to print strings and whatnot
they are compatible and yeah, logs will be a bit bigger because of the prints
but i'm curious about the performance and/or stability though
The logic behind the replication
Its just that hwen I shoot a linetrace it doesnt actually "hit" the other characters
the other clients
it just kinda passes through @high current
well a line trace won't replicate on its own
you have to send an RPC to actually do anything
Designating function replication across the network
@lost inlet mentioned BP, so the equivalent is Replicated Custom Events
are you familiar with custom events
The general logic is that you have to manually specify who gets what information and when
The server has authority over clients in most cases
you can read more about it here
but to get your line trace to show up on other clients, you most likely have to run it via a custom event in order to replicate it
can you tell me if your server is actually a player, or do you intend to play your game with a dedicated server, meaning that every player is a client
Alright, how is this line trace happening
what is initiating it
is it player input
Yeah so you press Mouse 1 and it draws a ray
line
From the player
Well the ray is getting casted from the gun
actually
should there be any logic preventing some client from seeing the ray?
No clue
The rest is just the actual drawing of the linetrace
Last one, this is what happens when it hits an actor
Ok first of I would advise to get rid of all get actors of class nodes
ok the prob i had with that was the refrence obj I need to pass in to the cast
under the greyed obj
yeah, ofc, but we can save these variables
and use them later to access those BPs
can you show me where you spawn the BPs
I just have em inside the level already there
are they like pickups or something
nah soz
Aight np
WEll what we have is the BPs of the Pistol and shotgun
already in the level
but when u switch to them all it does is change an empty mesh on the character
its weird
Ok, instead of spawning them in the level, it is best if each character(pawn) spawns its own Pistol and shotgun, and attaches them properly
unless they are supposed to be pickups by design
well in the end you pick up the gun
wait so its better the just have the actual BP gun move ot the character?
well yeah, you would want your gun attached to the character no, as if they are holding it
well we have this
its an empty mesh that changes based on what gun you press, it passes ina int and changes it based on that
but anyway now I understand why you did it with get all actors from class. it is still wrong but as long as there is only one pisol and only one shotgun, and you have made sure that if one player has them, the other can shoot trough them
then its fine and we can move on to the replication which is what you asked for help with
Yeah
Ok then have you enabled actor replication on either the pistol or shotgun
uhhh where do i find that
when you click on self in the blueprint, and then the details panel
Ok, now the events which you showed me earlier, can you set them to execute on server
can you move to the left, i want to se how this is being executed
you mentioned it is from an input?
well the ray is being casted from a function that is being called from an input ye
can you try setting this to execute on server rather than owning client
because you haven't configured steam authentication or you're using an older version of the engine that doesn't support steam auth
An overview of Online Subsystem Steam, including how to set up your project for distribution on Valve's Steam platform.
if you're doing a multiplayer game that supports steam then having steam authentication is must or else pirated clients can join your normal game servers
can also allow for spoofed IDs
would anyone know how to cast to a specific clients player controller from the gamemode?
could i use the on post login with the new player pin???
what type of thing is "specific client" referring to?
does blueprint based physics work poorly in a dedicated server? I created a 100% physics based helicopter BP and I did all of the things required for it to be replicated but when I fly it, it's jittery and the controls aren't responsive half the time
well i have a player join a game and the server will spawn the clients pawn for it. but i need the server to look at that joining clients player controller to find out what pawn to spawn, but what happens for me is it uses the server pawn that it selected. so i need a way to find out what pawn the client needs to play @lost inlet
well the player controller is usually what you think of when you refer to a "client"
if PostLogin is appropriate then use that
well this is where my problem is. ive pluged this new player node into a cast to playercontroller and the variables come out fine, but it still seems to be using the servers player controller and not the "New Player" @lost inlet
if you call a replicated server event from the client, you could try passing in the controller as an input
my best guess anyway without trying to do it myself :/
ill mess around with it
i'm not sure what else you expect it to be
it can't magically know what the client has set in their player controller
in C++, the gamemode login will have their travel URL if you're passing parameters that way
and another way is using an RPC like suggested above
yep
this is what i was thinking btw, not sure if it will work or do what you need, but that is what i would try first
wouldnt that require you to cast to the server gamemode from the playercontroller????
whoops
i worded that wrong
i do most of my server stuff in a player state, so wouldn't know personally, for me usually it is like player controller sends it's info to the player state, then player state uses the execute on server to make the server spawn and do what is needed
ok ill do some digging, i think i have a way in
cool
does anyone here have experience with multiplayer blueprint physics on a dedicated server?
if anyone does, I've got an issue where my physics based helicopter is jittery and the controls work some times and then randomly stop working
@cerulean escarp are you doing server-authoritive?
If you have a dedicated server when using subsystem Null. Can UE4 detect them when finding sessions?
Awh crap
Any subsystems that can detect them?
I don't use steam so that's not an option
Well, you need some kind of online service for matchmaking
Steam is the biggest
If you're not on Steam you basically need some of Steam's functionality
Basically you need a known server that every game connects to to advertise servers and request slots, and then you need to create your own OSS to integrate that to UE4
Should be a few weeks of work once you understand the OSS code
Supporting said backend is pretty tough too
Really though, using Steam is a pretty good idea
It's basically free and it's widely used by players
And you don't want a multiplayer game to not be on Steam
Steam is not really an option since the game will be on Xbox too
If you want cross-platform play you've entered a world of hurt.
uh oh
The Xbox and PC version are the same
Just ported to Xbox
Controller support is already almost done here
So I don't see a big issue
Could I make a database. Where every server registers it self
There is so much more to it than that. Xbox has it's own online service for matchmaking and connecting players which is entirely separate to Steam
That's exactly what the session subsystem stuff is for.
If you want cross-platform, you have to manage matchmaking and an online subsystem of your own.
That costs big-dollaz to host and support that kind of thing
I saw Google's agones
Which looks promising to easily scale and I thought it has a matchmaker
But dunno for sure
If you don't see the issue, you're in trouble ๐

Like TheJamsh said, currently, there is zero bridge between XBox and PC
Epic is promising that some time next year, they will have their own OSS using Epic accounts that might work on both
Yeah I saw on trello
You can also try using the XBox infrastructure on PC
But there is no UE4 integration for that
Might figure that out with the Xbox team in that case
And finally, crossplay is a can of worms - PC will have cheaters while XBox players won't stand for that, balancing gamepad vs keyboard is hell, etc.
Not to mention you still need a distributor on PC
So start with Steam, you'll be able to matchmake immediately
By the time your game is on Xbox and mature enough you might have access to Epic's OSS
I'm setting a value on my pawn from server. I'm passing an enum (basically a category), yet I'm not seeing it at all.
Is passing an enum problematic as a setting or is it more likely a multi issue and I'm not passing it to client?
Actually, it shouldn't matter. I'm setting that value on the server and yet I'm not seeing it on the server. Hmm
there was a UWP version of UE4 once upon a time
that theoretically was supposed to support XboxLive, I tried it and had cross play working between a pc uwp build and an xbox build
but it was abandoned
zero support for that MS branch
and everything was janky af
this was early 2017, way old
Yeah I remember that, that was after Tim was taking big-time poops on UWP
MS created a Git branch which I thought they were still supporting but I guess not
I mean, I can also see Tim not wanting to support Microsoft's competing strategy of "our online service on every platform"
They're doing exactly what Epic does with EOS, except it's already available
I would seriously consider using the Xbox online services for PC matchmaking if there was a built-in OSS, since I know that service will work on the Switch, XBox, and I guess PS4 too
could probably look into gamelift, though I am not sure how stable/feature complete that is
Gamelife is just server hosting isn't it? You still need to use some service to find them
There was Gamesparks, but that recently hiked it's prices to near absurdity after being bought out by Amazon. A lot of folks we're using it but abandoned it after that.
GameLift, I think, has some opinionated matchmaking stuff
Exposed via REST, if I recall correctly. It's been awhile
Think it's built specifically for lumberyard, but kinda-sorta 'open' for others
So I'm unsure of the extent of the features/how much of a pain they be in UE4
I know there's a plugin/binaries for it
How up to date they are, though, I dunno
'FlexMatch' would be their server discovery solution
uh oh... is there any new setting for net culling on 4.22?
I have migrated a project from 4.18 to 4.22 and I can't get net culling to work correctly in a trivial case
however when I migrate this same actor to content examples it works correctly
^^ somehow the net cull sphere is much little than it should be, the actor starts being relevant when I am super close to it, it's working erroneously.
here is totally fine
unless it's camera based ๐คฃ
aight, seems to be camera based, one more thing I've learned
Are delegates on multiplayer based on where you're calling the delegate? For example if I bind my PC with a delegate via GameMode, will that only call on the server?
Or is it based on the PC's function - if it's client / server ? Bit confused.
So there's no 'Client' Delegate and 'Server' Delegate?
no
if you bind a delegate from the game mode, which only exists on the server, the binding will only happen on the server and thus run there
but the reason for that is just that your code creating the binding never ran on the client, not that delegates have any multiplayer functionality
Yeah, I worded my question poorly
But that's what I meant - in short, does binding a delegate via the server only mean (IsBound() ) returns with something on the server.
with delegates
always look at each machine in isolation
there is no server, don't even think that way
if bound will return true if you bound something to that delegate on that machine, on that instance of the object of which the delegate is a member
hi,i m updating linear and angular damping on every tick in my carbp should i need it to multicast or leave as it is
never multicast on tick
so is this correct my function on tick
Got a if (GetNetMode() != NM_Client) check.
Calls twice in a ListenServer/Client setup.
Out of confusion placed ENetMode NetMode = GetNetMode(); in front of it.
Result: Calls once.
Is that just the breakpoints failing?
I sometimes really dislike VS
GetNetMode seems handy?
Jesus christ, if I break point when I shoot, the game deals 2 times the damage
At which point can I blame VS ?
-_-
Probably never
Printing to the log it is
I'd look at the code tbh
I don't see the code being a problem.
It calls once, it has a check for NetMode.
It works if I don't breakpoint in VS.
Gonna start printing stuff now
Only thing left to do is drink 1000 beers
So yeah it calls twice if I breakpoint and once if not
wtf
It is failing the GetNetMode check if I breakpoint
It's not failing the check. it's freaking executing my input twice
nvm then
-_- Can this week be over
I reiterate my solution.
One of these days ill show my UT replication shinanigans, so yall can roast me :d
Not today tho
What's the replication process for updating a dynamic material instance? I have a CCTV camera that can be disabled and reeanbled. when it gets disabled, it sets its render target as a disabled black screen .When it's repaired it sets it back to what it should be. The camera also pans. The panning seems to be replicated. It starts and stops both host and client. When it's disabled the client just sees the image freeze. but not blacked out. When it's repaired the host sees the image update again. The only thing really missing is that the render target part doesn't seem to be replicated. Everthing else is
I do cosmetic things like material changes and such via RepNotifies
Current it takes in the event from an interface, then calls an event that is "run on server" this tells the camera to stop panning (replicated) it then goes through and finds its entry in the array of cameras and changes it's struct from the normal render target to the disabled one.
the render target though is in an array and not a variable.
can I rep notify an array change?
it looks like the array can rep notify
Change the array
the camera calls to the monitor (two different actors) and the array is held on the monitor
it's actually 8 monitors inside one actor, so I could just rerun the function that applies the textures to all the monitors and it'd update with the new texture
If you have two states, which are both known, replicating a simple bool is cheaper than repli ating an entire array
Is that the case
but it still needs the information from the array
to set the new texture
it's all contained within the struct
I have 8 cameras and 8 monitors, so I needed to write something efficient to set that up at the beginning of the game.
Ok so if you just replicate the array, does thst fix your issue
I just noticed that the array wasn't replicated, that might have been the issue. I wont be able to test again for a bit, I can't test this in flat screen at all at this point because too many functions are connected to the VR characters.
I'll try replicating that
and if that doesn't work, I'll just try to rerun that function on a repnotify?
Sounds like a plan
would the other more expensive option just be to run the whole process of changing the render target as a "multicast"?
Well yes
But a repnotify in the example i gave you is kind of doing the same
As a multicast
Okay, I'm still getting the hang of exactly how this works. Sometimes I get my head around some parts of it, but othertimes it's not as clear.
This is the setup I have for the weapon/tool. The tool actually has multiple functions so after this it basically goes to a select where it then chooses which function to run based on what the player has selected. The projectile seems replicated and fine. I've set up a "repair" function for those CCTV cameras. It's a particle effect that shoots from the gun to the CCTV to make it look like it's repairing. It mostly works, but in some cases the client said that it didn't stop. sometimes it did, sometimes it didn't.
when the particles are called, they're set to a variable. When the user stops repairing or the repaired item detects that it's repaired it calls back to the gun and tells it to stop and destroy those particles.
I think it might have been my overlap event
if the user just stops that event "runs on server" but if the user points the weapon away the overlap event just stops it
should I put an intermediary "run on server" function in the middle?
maybe this switch has authority isn't do what I thought it would
If no one knows the answer, that's okay, I sometimes figure things out as I'm typing them out. This function, seems to work. When the player activated it, he disappear. The issue was that it took way more than 25 seconds to be over. That timer is set for a value of 25. It was well over a minute before he popped up. That calls to a function which sets the the "cloaked variable" which has an onrep function which should hopefully make him visible for everyone else after 25 seconds.
is there anything server/client related that could cause that timer not to fire properly after 25 seconds? I don't have any other functions dealing with it.
it was probably more than a minute as well. We'd basically given up on him coming back and then he was suddenly there.
@somber glade Have you tried your blueprints without all the branches/booleans?
I haven't, but I can put that on the list as a way to test them.
good deal
it's a fairly necessary check though, I have two types of characters sharing the same BP, just some initial setup is different and a couple checks like this. The other kind of character can't cloak
maybe you will find one problem by bypassing some of the checks
if you also mean the particle ones, those are necessary
There may come a situation where the repair tool ends overlap but the repair is finished. I need some check to make sure it's not already done, or it goes and tries to unset the particles again and throws an error on th at
crossmr for abilities like this 'cloak' you may better of getting familiar with the gameplay abilities sytem which is not only replicated but efficient as well for such things. and you don't need custom timers it works alright.
Thanks for the suggestion. I'll add that to the list
sadly I gotta have a lot of this tightened up for tomorrow
so no time for new systems tonight
good luck to you
ga system is a whole new world, and it is responsive, multiplayer friendly etc you most likely want that in a mp game
Next monday I'll look it up. In the meantime any suggestions for band-aids I can stick on this for tomorrow? haha
I'll have another testing partner in the morning, so I gotta patch up as much as I can tonight and have a package ready for a test, then I'll have the rest of the day to fix what's still broken
@high current yes all of the functions are being handled by the server
@high current would it just be more efficient for me to make the helicopter all kinematic instead of physics?
Should the Character Movement Component be replicated?
Seems like it should, but if I do enable it, I get my player jittering badly
If I dont enable it, it seems like the client and server are running very differently
It should be
Then my jitter issues are probably elsewhere
If I bump the pktlag to something like 50 it is already very noticeable
thanks
Do you change the MovementSpeed of it runtime?
yeah, but I have prints to show me the speed on both client and server and they are always the same
with the exception of the ms of lag that I specify
And you are changing the speed on everyone?
I think I am, but I'm going to go ahead and add all of the debugging info I can think of to see if anything is different
If i dont change pktlag all of the clients see exactly the same
but I guess the "corrections" happen so often it wouldnt really show then
You shouldn't need it to be replicated, there's no rep properties in there
All the RPC's go through the character class as of a couple of versions ago
although it being replicated and not shouldn't make much difference :/
@cerulean escarp a kinematic helicopter would definitely look better for clients
k then Iโll do that instead
So if I have a custom movement component class with replicated variables, it being replicated wouldn't break anything, right?
Iโd rather it be smooth than realistic
Oh if it has replicated vars then yeah you want it replicated
Otherwise none of those properties will replicate
yeah, what I was wondering was if it was some kind of special component that actually needed to not be replicated
thanks
You can still sync the kinematic stuff to be affected by the driving forces of the helicopter
would that be more resource intensive than just making it all kinematic?
or about the same
not realy, in order to drive most animations, you need an anim blueprint with a blendspace, that anim already has access to (whatever you give it access to) in order to blend animations, you could easily read the physics linear velocity and control the play rate and tilt of a rotating wing based on that
huh? Iโm not using any animation blueprints, the only animation is the rotors turning which is in a loop
I was just asking if the dedicated server will handle kinematic movement better than it will handle physics movement
If you build a prediction/rewind system like character movement then kinematic is your only option
If you want at least mildly realistic collision response however (i.e. physics), then go client-auth (with some server-side verification / anti cheat etc.)
it doesn't
assuming you don't log 1000 messages per tick
I've no idea why logs disabled is the default, a build with no logs is like useless
Btw, question for my own sanity, is client-auth movement and well, events, physics, possible within blueprints
Hello, is a source built Unreal engine version still required to build a dedicated server?
I'm getting client lag using the steam subsystem and also 9999 ping when I see lobbies. Is this my own net code at fault or is the Steam subsystem to blame?
steam doesn't have a system for reporting ping to lobbies so yeah you will see 9,999 ping
Lag is likely the games fault
Steam doesn't handle any of the gameplay networking
there are no "pings" to lobbies
a lobby is just a server side chat room ๐
it depends on how the game will be played after
if you are making a P2P game based on that lobby, you need to open a P2P connection to each players inside to even measure the ping you'll have with them
What I mean is a listen server will be a "lobby" as far as Steam is concerned
which isn't something you can do on the lobby browser because your players will DDOS the poor guys inside a lobby
maybe that is the game, you never know...
the guys inside the lobby have to fight back
Lol yea I'm just using listen servers and everytime to pull up my server browser widget I see a list of servers to join, even others that are not my game but still show up because we're all on Spacewar on steam and every server has 9999 ping.
do sessions timeout? seems like after an hour or so of playing the session just vanishes, then i cant invite anymore...
So in pretty sure I didn't replicate my fire weapon logic properly that's why my game is lagging. As a client sometimes I can't shoot my weapon no shooting sound plays. What's the correct way to replicate shooting a weapon?
Right now clients have to execute the run on server event in order to shoot
how does your shooting work
is it hitscan or projectile
i.e are you spawning a bullet actor or is it a line trace
I have both but mostly hitscan
I do it the typical way. FireweaponEvent-->>switchHasAuthority-->> server can fire, client has to run on server.
Maybe it was just a bad host. I need to test again with a different host to make sure
i hope someone knows, im making a zombie shooter. it doesnt always happen so im a bit baffled where to look. my destroy actor isnt always working
from the projectile
so sometimes they hang mid air
and keeping hitting my enemy
and never despawns
most of the time it works
but sometimes they stop mid air
where they should get destroyed
but it seems the destroy actor isnt firing
everything set to replicated
but as i said its not always the case
it both happens on server and client
ok, but in general (at least how I do it, IMO), if it is an actor your are spawning, I would spawn that on server, and have the spawned actor replicate, and if it is a line trace, i do like bool RepNotify and do the line trace there, doesnt have to be a bool tho, like if the line trace needs a specific start and end, which aren't known and need to be replicated, I would have the RepNotify be one of those vectors @cedar finch
do Net PktLag = 200 and see if it happens more often
- verify single process is off aaaand don't hot reload
yes
same result
though way more
more earlier occurs
and way more projectiles hanging in air
i do play on pie btw
i dont know if that matters at all
should be ultra fast on local host
1gb network
i mean
ping should be really low
okay so if you say your projectiles don't get destroyed, be sure first the destroyed function gets called
you can check that by overriding "Destroyed"
call Super
always
and then hook there a UELOG
ok
lemme check
im a bit confused about the override destroy, how am i suppose to hook up the event hit
or is it there where i allrdy go wrong lol
uh?
okay so... first of, does hit get called on the server or both
if it's on both you need to be called only when authority
and after that "destroy"
theeeeeeen to see if "destroy" is working, go and override "Destroyed" function
call super and put inside a UELOG
you should see a log every time you destroy one of your projectiles
hmmm
earlier in code destroy actor
seems to work
with authority
need to test more
thx man
i didnt knew it was possible to run code after destroy actor :S
wtf..
how is that even possible
when it has no memory reference to it
or am i retarded and dont understand enough yet
started only 7 months ago
well, it gets deferred.
so thx for beeign so kind enough to explain
anyways, the proper way to do what you are doing is to play with the lifespan
because you have more time to deal with extreme use cases
if you look at any actor CDO it has a property called Lifespan
ye there gonna be ton of zombies
read the description and you'll understand it
no problem, I'm compiling stuff hahaha
I'm all fancy and available while I compile things
๐
class default object
Set Life Span
What are the Life Span Nodes in Unreal Engine 4 Source Files: https://github.com/MWadstein/wtf-hdi-files
\
for theory mathew wadstein is quite dope
for example if u shoot in the air
ill test a bit more and see if its fine
thx again m8
๐
hi!
We're having a bug when replicating and actor that uses Gameplay Abilities
Thing is that, on replication of an actor, at some point the code generates a replicator within FindOrCreateReplicator.
In this part
// Make a copy of the net properties
uint8* Source = bUseDefaultState ? (uint8*)GetObject()->GetArchetype() : (uint8*)InObject;
The code fails because it can't find the Archetype of a subobject of the actor (specifically the archetype of derived class from UAttributeSet).
We're trying to understand what the Archetype is and why does it fail, but we can grasp it.
Can anyone help with this? Any advice on what to look at?
sound like a reference issue to me
but i can be totally wrong
im still a noob
i was struggling with 1 last 1 aswell
last night
wtf..
@late wharf is it a BP class, and if so is it loaded?
yep, a Character Actor child class (custom, c++) is the parent of the BP. What do you mean by loaded? Possesed and on the world?
No i mean if you are using soft asset pointer, you have to load it manually if itn not c+ร
If any c++ or loaded BP class has a hard pointer to it, its loaded
ah right. no, it's not a soft reference. It's an actor placed on the level. So no async loading of assets on demand involved
Does it compile? The BP?
yeah yep. It compiles and runs. No erros when PIE
I have never seen an error so deep in network engine
Try duplicating the BP, then delete the originsl one, replacing references with the duplicate
Just to eliminste any BP serialization errors
is not a problem of duplicating. This actors' comonent fails (it's the enemy base class, happens with different enemies)
Blueprints occasionally break, i know of several ways to break then in ridiculous ways
And without a full callstack, i dont have any other ideas
Missing UPROPERTY on a reference might normally do it, but not for an Actor from the package
Anything that can decide to destroy it off game thread too
ta.self!FDebug::CheckVerifyFailedImpl(const ANSICHAR* Expr, const ANSICHAR* File, const int Line, const TCHAR* Format, ...) Line 416 + 23 bytes C++
ta.self!UObject::GetArchetype() Line 172 + 52 bytes C++
ta.self!FObjectReplicator::InitWithObject(UObject* InObject, UNetConnection* InConnection, bool bUseDefaultState) Line 288 + 5 bytes C++
ta.self!UNetConnection::CreateReplicatorForNewActorChannel(UObject* Object) Line 2197 C++
ta.self!UActorChannel::FindOrCreateReplicator(UObject* Obj, bool* bOutCreated) Line 3687 C++
> ta.self!UActorChannel::ReplicateSubobject(UObject* Obj, FOutBunch& Bunch, const FReplicationFlags& RepFlags) Line 3776 C++
ta.self!UAbilitySystemComponent::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 1458 + 8 bytes C++
ta.self!AActor::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 415 + 23 bytes C++
ta.self!UActorChannel::ReplicateActor() Line 2841 C++
ta.self!UNetDriver::ServerReplicateActors_ProcessPrioritizedActors(UNetConnection* Connection, const TArray<FNetViewer,FDefaultAllocator>& ConnectionViewers, FActorPriority** PriorityActors, const int32 FinalSortedCount, int32& OutUpdated) Line 4005 + 5 bytes C++
ta.self!UNetDriver::ServerReplicateActors(float DeltaSeconds) Line 4365 C++
ta.self!UNetDriver::TickFlush(float DeltaSeconds) Line 506 + 21 bytes C++
ta.self![Inline Function] TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>::operator()<float&>(float& Args, float& __formal0) Line 156 + 27 bytes C++
ta.self![Inline Function] UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter<TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>,float&>(TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>&& Func, float& Args, TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>&& __formal0, float& __formal1) Line 415 C++
ta.self![Inline Function] TBaseUObjectMethodDelegateInstance<false,UNetDriver,TTypeWrapper<void>(float)>::Execute(float Params, float __formal0) Line 617 C++
ta.self!TBaseUObjectMethodDelegateInstance<false,UNetDriver,void(float)>::ExecuteIfSafe(float Params) Line 677 C++
ta.self!TBaseMulticastDelegate<void,float>::Broadcast(float Params) Line 977 + 16 bytes C++
ta.self!UWorld::Tick(enum ELevelTick TickType, float DeltaSeconds) Line 1721 C++
callstack of the problem
UPROPERTY() failing is a point to a component. Property is private marked as Transient
Actor is not being destroyed. It's an enemy, standing there in both, client and server
then replication fails and crash
with that callstack
ta.self!UObject::GetArchetype() Line 172 + 52 bytes C++
fails for
ta.self!UAbilitySystemComponent::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 1458 + 8 bytes C++
when it tries to replicate the subojects
so... appart from that, I don't have much more information right now I'm afraid
Anybody messed with 4.23 yet and getting really weird behaviours with dedicated server checked with PIE? Not done an awful lot of testing yet but almost seems like HasAuthority() is failing for client1
As soon as dedicated server is unchecked, the HasAuth check completes without any errors
My biggest knowledge hole about this is 'what is the archetype and why does it fail?'
its a template for the object
thats why i asked you if the thing was loaded
show me the declaration of your component?
inside the header of the problematic Actor
don't have the code right now (not at the pc) but classic CreateDefaultObject in constructor
i was testing what happens if i remove [bReplicateMovement = true;] from one of my classes and nothing happened . i was expecting some movement problems due to removing that code. what is the reason? both server and client can see the change of movement in that staticmesh
hi all, how would I go about updating every player's UI from a non-player object?
For context I have a king of the hill control point where I want to update player ui on state changes/capture progress for all players.
i'm trying to iterate thru game state player arrays and calling each player's respective ui update function from there but it's only updating the server player's ui.
The function calls a client-only RPC within a widget blueprint
My assumption is i have to instead have the player controller call RPC events instead of the widget, since widgets are client only
it seems my assumption was correct now that i've tried it out
how come when I'm in my editor or playing a level without dedicated server ticked, but when I tick the dedicated server box to test out the same level, the FPS goes from 120 in the editor to 34 in the actual game? this FPS drop only happens when playing on a dedicated server
also my game is made from blueprints if that has anything to do with the FPS drop
I'm trying to figure out the best way to replicate my weapon fire sound as well as the muzzle flash. Right now I just use a RPC but that caues issues for clients when they shoot because the sound is either delayed or doesn't play everytime. What should I do? Play the sound locally then try to RPC for others to hear?
@cedar finch could you screenshot the code that has the RPC?
Nope. Would that make a difference?
it might
I think I had them checked earlier but unchecked them. I'll give it another try though
it could also be something not triggering properly in the code that activates the RPC
that's my guess
It's in the fire bullet function and I tested that too because I was thinking the same thing. But my bullets were firing and hitting targets but the sound was being derpy.
It's mainly when a lot of stuff starts happening like tons of enemies attacking and lots of shooting from everyone in the game.
Is there a way to visually see how "optimized" your net code is while testing? Like a ping or something meter? I know listen servers can't use ping but I was just curious
yeah hang on lemme find exactly where the setting is to turn that on
@cedar finch in the editor press the down facing arrow next to the box that says 'Perspective' in the preview window, and press 'Show FPS' (shows FPS and ping in ms), and if you want more details like packet loss hover over the 'stat' button and go into 'advanced' or 'engine'
Nice! Thanks man. Will this show up in a packaged build?
nope, but you can press ~ to open the console and type 'stat' then you can type in FPS or packet or whatever you want to show
and np
optimizing sucks, I'm having major issues with dedicated servers right now
the lag just becomes insane (fps wise)
Ok cool I'll definately use that when I test again. Yea I don't like having to optimize lol I wish it would just work and be good to go. lol Oh well that'd be too easy
yeah and everyone always says blueprints aren't as efficient as c++
but idc cause I can write code in blueprints so much faster than c++
Yea I suck with c++ and other languages. I think it's because i'm a visual person so I just can't wrap my head around it. I also hate the syntax I usually fight tooth and nail trying to just get my crap to compile so I can run it
@cerulean escarp Don't mix up "BP aren't as efficient" and "working with BP isn't as efficient"
It's all fine if you don't run into high ms for your gamethread, but if you do and the code is already quite performant for BP standards, then C++ it is.
i think well balance blueprint and c++ code is necessary
We recently moved GameMode, GameState, PlayerState, Pawn, Controller and now also Weapons, Projectiles, and their managers.
All to c++, to save ms by optimizing the code even further in c++
hey are FName that are SomePrefix_Number also replicated fully as a string each time ?
just a side note to what exi said, if you are getting a very bad performance with BP's is probably your fault. Use the profiler
i want to implement an overlapping event. fyi i have a Gun class and i want the Players to get the gun by overlapping it. its like an inventory system, any tips or code examples?
check this out https://github.com/tomlooman/EpicSurvivalGameSeries
@brittle karma
that project includes a very simple interaction and inventory system
so it might work as a starting point
@pallid mesa thank you so much, great help ๐
So..3D widgets in VR. Im running into an issue where clients can't use them because they aren't owners. LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Top_Sliding_Door3. Function SetOpen will not be processed. LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Top_Sliding_Door3. Function SetOpen will not be processed. is the only solution to wait to spawn them after the game starts and pass their PC as the owner when spawned?
What you probably want is some kind of interface for some interactable object, so the player controller can tell the server "I interacted with this thing", and then the server runs the functionality.
I'm about half following you there.
It's been a long day at the end of a long two weeks haha.
I know how interfaces work. instead of buttons, I should put like 3D objects there? like cubes? and then subscribe them to an interface.
when the player does it's thing, it interacts and calls the function on the object, which can run as server and call to the doors to open up?
@chrome bay Just for fun..I set up a little function to get the client player controller and set him as the owner of the 3D widget. It actually works and the door opens.. for the client. oddly the server can't see it. Very interesting.
Well widgets are local, they're created locally and are owned by a local player or game instance whether they are 2D or 3D
So whenever you create a widget, that widget exists on that game instance only - so players won't see each others' widgets, they'll see their own.
The 3D Widget Component may exist, but the widget they render will be different and unrelated.
So is there anyway I can put some magic on the buttons themselves to work this out? I've already got my players interacting with everything via a widget interaction componeont on the wrist
You may need to show a screeny or something so I can understand the setup fully
no problem
The 3D widget is already in an actor and set before game starts. Because it has 8 variables for the 8 doors that are in the level. Those are set by a level designer.
But, RE opening a door - my advice is to create some kind of interaction component or interface which you can drop onto an actor. Client can then have a ServerInteractedWith(AActor* SomeActor); function in the player controller, and when they interact with say a door, they call that function with the door, the server can then decide to open or shut the door etc.
the actor that holds them has the variables and on begin play it sets them on the widget
since the widget can't have defaults set
Controlling multiple sets of doors so that makes it more difficult
I think the main thing is the interaction setup, you can't call RPC's on actors you don't own as a player, but you can still pass them in as the arguments for another RPC
That's what a function looks like on the widget.
These are what it calls to on the door
Yeah so that's what won't work. Unless the player 'owns' that door, that RPC will fail.
They need to own the door, not the widget.
so if I set that player as the owner of the door it should work?
It would - but that has to be done on the Server, then another player can't interact with the door.
A better approach IMO is this
Make a Server function in the Player Controller, and have it take an actor reference. Call it something like "ProcessInteraction" or whatever. In the widget, get the owning player, and call that function on the door.
The Server can then decide whether the player is able to interact with the door, and open/close it accordingly etc.
if I don't se the player as the owner of the widget, can i just get player controller 0 and cast to the PC?
Yeah I don't see why not if you're not doing split-screen
Although technically calling GetOwningPlayer should still return the local player
nope, no split screen in VR
In theory anyway, I'm not sure how 3D widget components handle creation of the 2D widget.
there is no where to obviously set the owner except to call it as a function that I can see
What i mean is I'm not sure if the widget component automatically creates the 2D widget proxy with the local player as the owner already, or if it just belongs to the game instance
Either way though without splitscreen getplayercontroller should be fine
ah okay. I'll give that a shot and see what happens
But overall the advantage of this is that if later on you want to add like, a chest that players can open or something, you can reuse that functionality and just pass in the chest actor.
Then the server says "can they interact with this thing, if so do it"
And you don't have to have manage ownership etc, you just place interactable stuff in the world and it behaves accordingly
Wouldn't go that far ๐
Did anyone explored how Timelines replication works under the hood?
this on the PC does it
Yeah exactly
So from that point you could expand it and create some kind of "interaction component", then make the object your interacting with abstract to the player controller, and let the actor component or interface process the opening/closing etc.
Sky's the limit..
@pallid mesa I don't know if it's handled at all
They don't have any replicated properties anyway
Yeah it's just a 3 v 1 game with the 1 controlling them. It doens't need to be too abstract
if you checkout the BP node, you can set to "replicate" a timeline.
so is that just a "fake" property? ๐
Ah it's just getting that from the base Actor Component class
So while it would make the component replicated, they don't have any replicated properties
Timelines are weird, they actor components for some reason I don't fully understand
how should I do the setup? My setup works like: Actor in the world has variables set by designer, begin play-> variables are copied from the actor to the widget, on the widget a function runs that opens 1 door in each pair. The doors seem to be open, but I sometimes see errors in the log
I'm trying to get around my head over them, I find them highly useful to drive some motion over time, but I guess I should not just use them on production until I know exactly what these do under the hood
@pallid mesa they're literally just animated curves and that's about all they do. Networking wise there's no functionality there.
It's just a handy container for being able to get a curve value over time, rather than having to set it up manually
yes, but that property confuses me, since what's the goal on replicating a timeline?
that's new to me aswell
even tho I've been using the engine for some years now
I guess it's r&d time to avoid doing stupid things hehe
Oh ffs I found it
oh you did
So it does have replicated properties as it turns out, I couldn't find it because of the old GENERATED_UCLASS_BODY macro
๐
Okay yeah so they replicate whether the timeline is playing, it's play rate and current position
I can't imagine that replicates particularly smoothly though
Then when it replicates, they fire the corresponding output pin for that timeline with the replicated value
interesting
so if I want to have let's say a door
synced with precision between clients, I should replicate it
i guess so.. although for me personally I'd rather just replicate a bool of the doors target state (e.g. open or closed) - and let the clients run the timeline locally
I can see it being horrendously jittery otherwise
It might not be that bad if the connection is okay though, or if the timeline is relatively short
Over long periods of time it might lose a bit of accuracy
I'll test both approaches and empirically I'll choose what to do. I have a bool for late joiners and net cullers to update the memo anyways
Yeah just be sure to test with a bit of packet loss etc, in pie it'll probably be pretty smooth
@pallid mesa if you want to replicate a timeline just do what I did
it works, it moves smoothly between client and server
๐ค I have successfully used replicated timelines in 4.15, works as advertised, run a timeline on the server, and the update tick gets replicated to clients along with return values
okay I'll try with some pktlost ๐
But yeah check out Timeline.cpp if you wanna look at the details. Why they didn't call it TimelineComponent.cpp I don't know
timeline.cpp?
well okay not quite.
out of the box?
instant on the client. woops
okay, thanks, good find ๐
@pallid mesa do your timelines only replicate in one direction?
my door replicates the timeline going up, but when it's closed it doesn't.
it slides up slowly then instantly slams shut.
which seems really odd. Why would it work one way and not the other, that's both for client and server
are you sure that you execute the reverse timeline from the server again
It looks like to work properly you only trigger the timeline server-side
The client receive the events to play/stop etc. and the direction
It works going up, but not down, they're 2 different timelines
The sequence has 3 steps. First it stops the opposite timeline, then it calculates the position (in case the door is interrupted mid transfer) then it starts from that new position
the timelines go opposite directions
for both the client and server, they go up smoothly then slam closed
when told to close
Too low res to see but is the opening and closing door set to multicast?
never mind..
i fixed it
and yes
that was from testing
i was having issues with replication but those were finally solved
thejamsh got that solution
If they are, do set then to server only
Yes, I did thanks ๐
they are working perfectly now
now one of the big outstanding issues is my CCTV monitor texture
I have CCTVs connected to monitors. They can be disabled with an emp blast. This should set the texture to a disabled black texture i have. It works on the host, the client sees the camera stop updating (it pans) but it doesn't turn black on the client.
Did you try fixing that with RepNotifies?
๐ค
What is your rep condition on that notify
It should be none
oh okay then
So you are fine
I'm doing it perfectly
let me see if I can arrange another test, problem is I need a gun and my FPS test pawns don't have those
If it doesnt currently work, i would go and look at how the monitor manager array is being changed
It might not be happwning on the server, thus changes to it are not replicated
Yeah it isn't working right now. I rigged up a big capsule to turn off a camera. Let me get the updating stuff
A little background: Certain objects have an "EMP" interface. This gives them a couple functions one of which is "EMPReceive" in the case of the cameras it does the following:
Now this part works on both server and client, as the unit stops panning
next up he sets himself disabled, and makes sure he has a reference to his texture target (so that it can be put back when this is all done)
after that he gets the monitor manager from the CCTVmonitor (only 1 in the level) and starts to go through it looking for his entry
When he finds his entry he replaces his texture in the struct with the disabled one and keeps a reference to his position in the array and he sets the texture parameter on himself. Maybe that part needs to be multi?
finally he goes and resets his his repair amount on a timeline to 0
I just tried adding a mulicast event to set that texture parameter, but that didn't work either, it doesn't turn black
Does anyone know what this actor named "BP" could be?
there is no actor by that name anywhere in my project
and the stats are very strange
could it just be an aggregate of many unaccounted for actors?
@somber glade hey, I tried the approach where I call the timeline from the server replicating it, and you are right it only works when you play it normally
not when you do reverse it
Yeah, so I just run two of them, it seems to be okay
whats the max bandwidth and the recommended bandwith of a ue4 game?
๐ I don't think that's an intended behaviour, gona fill a bug report
@somber glade From looking the screenshots, it seems that either the replicated array, or the texture target variable isnt replicated properly, resulting in them not being equal for clients
can you for example have a timeline in your actor but call it for each client separately
@pallid mesa run the open and close events on the server
@quartz panther You can, but you might have mismatch due to ms lag and the driver wouldnt be aware of it so it will try to correct it (just speculating here), someone more experianced should confirm or deny this
@pallid mesa now you are multicasting
exactly
in your first screenshot the events werent replicating at all thats why I noted, soz
when they join the netcll
exactly because begin overlap gets called already on the server and the client
so I don't need to do an RPC
the only thing you need to do to filter out clients is to add an authority check (as I did in the picture)
right, I am blind...
np ๐
@high current Thanks, They're all set replicated.
instead of relying on a check between two textures, why not have a bool which states ON/OFF
okay I'm dumb. hehehehehe
so the replicated timelines were working erraticly because of my net update frequency
what I don't get is why it wouldn't work worse with my settings (once a second)
You might be confused because I never said I have two types of doors for the sick of this experiment
Doors A: have a timeline replicated and I call this timeline from the server
Doors B: timeline is not replicated and I call the timeline from a multicast
The issue I was having with the doors working erraticly was is Doors A
the issue happened because on a previous iteration I decided to set the net update frequency to 1
and I forgot I made that change
I just tested on an old MP project
so I boosted up the net update frequency and the replicated timeline worked correctly
both play and reverse worked on clients
mhm, yeah that's expected
what happened is that I didn't realise that my net update frequency was set to 1.
don't worry there are no issues xD
it was just a missconfig on the cdo
it happens
Anyone here had a problem where, when replicating components of an actor, the outer Private is null?
Can someone tell me the best way testing multiplayer when using number of players = 2 on Dedicated Server checked and the node Get player controller? Im having issues using client 2 because I dont actually have a 2nd Controller. example, Client 2 rolls a dice but Im getting client 1 information because I only have keyboard and mouse lol
also I have it setup with default pawn just controller problems
I would suggest reading through EXI's network compendium. Should lead you in the right direction.
I have read the pdf and I'm also aware of the widget's get owning player controller. Should I stick with that Im lost
I just didnt want to package everytime lol
Are you updating UI via GetPlayerController?
I use Owning but it seems the same
If you are updating stuff in the character blueprint to the controller, you should use "GetController" ->(CastToYourController to get the reference) and use "is locally controlled" to check to define if its the local player . Of course that depends how your project is setup.
As for testing Dedicated server with 2 players not sure i quite understand your problem. Do you want to run 2 standalone versions of the game through editor?
I guess is Locally controlled would do the trick and yep on testing in editor 2 clients
Thx for the help Sam
anyone has implemented AddImpulse for jump (I'm using a Pawn) and replicated it? I have trouble to replicate it properly ๐
or should I remake my own custom jump?
normally you don't replicate the impulse but just the position/velocity
my transform and jumpforce are replicated
but the smulated proxy looks terrible
laggish
@maiden vine theres away to get 2 (or more) standalone windows open at the same time through the editor. The functionality is hidden under "use single process" in the settings. Un check that, set the player count, window size etc. Recheck the "use single process" setting. Now you should be able to run several standalone windows in editor
could check out how the movement interpolation for characters works as an example
All movement related stuff should be done in the custom charactermovement component if you want smooth predicted movement.
I got it working I routed the widget controller throughout my custom events bingo sometimes I need to talk it out. And yea that is how I run 2 clients thx all I'm moving along now great
๐
I had a barrier to allow 1 client through and it would always let all clients through but Not now haha
๐
trying to just adding a Z vector with set netactorlocation and a lerp
Character Movement has a "Launch Character" function
I'm on a special setting 3D planet so it's not recommended for me to use character movement
The only things that work "out of the box" with network prediction in the charmovement comp is crouch and jump. Everything else needs a replicated flag and custom code in c++ if im not mistaken.
Does anyone have charactermovement working properly on Android?
We're having massive choppiness issues, and they seem to replicate even on basic ThirdPersonCharacter template
Hi there, I'm having some network failure (log below) and I am new to multiplayer so I'm not catching everything here.
I think it might be because this specific line appears like a thousand times before crashing :
[2019.07.19-14.22.31:495][ 40]LogHandshake: Ignoring restart handshake request, due to < 10 seconds since last handshake.
Can you override a replicated function in Blueprint? Doesn't seem to be working. ie BaseWeapon has a replicated fire function, which then calls SpawnProjectile. But SpawnProjectile should be implemented by the base class ie AssaultRifle, RocketLauncher, etc where the subclass has its own implementation. Again though, the replication fails when I override the replicated function
If anyone has time I've run into an issue with a spawned projectile having different rotations on the client vs server
the actual cast ability event is ran on the server
there a line trace at the starting half of this function
line trace from the clients pov
client's line trace from the server's point of view
Does a UE Dedicated Server running on Linux require a GPU at all?
@ebon nimbus looks like your pawn's camera rotation isn't replicated, try clicking od the FP camera component, and set it to replicate
quite uselessly expensive, but if that works then we can find a cheaper solution
i have that adjusting the aimoffset animations
as for the FP Camera I do have the component replicates ticked
I also tried promoting the output of the Find Look at Rotation node into a replicated variable but saw no difference
@high current
are you sure that you tried with the forward vector of the camera
by the looks of it, that is what's causing the issue here
i will double check
so if i add a replicated rotation variable that is gotten from the impact point generated by a line trace
that uses the FP Camera's location and location + forward vector for its start and end points
it doesnt change anything
but it has to be value not getting set somewhere in the pipeline
this function is called within an event thats run on the server and then multicasted
as shown in the earlier screen grabs
whats crazy is that the rotation does change on the client
but its like its clamped or reduced
you can print string the rotation, and check in the log if it matches
you dont need the look at rotation, you just need the forward vector to be correct
Hi, i have question, i want to know the Game state of the play (the GameMode state (inProgress for example)) I know the gamemode exist only in server (online game)
i get in the client the GameState and try to get the state of the game, is possible?
on post login im taking a newly created controller(new player), and with advanced sessions getting player name and setting it on a widget actor (which is set to net load on client) which sets up the name above the player... im wondering, is this going to work, will newly added players see those widget actors that were previously created? and do i need to set ownership on those widget actors?
i figure since the server is spawning these actors
it will work
and that i dont need to set owner, since its the server doing all of this anyways... am i wrong
im going to test in a few over 2 steam accounts but just wondering if anyone spots anything wrong
@high current the forward vectors do match when comparing the client and server values across all windows
but they are different from each other
so i will get that across all screens
as to where if i go a little further along in that function and look at the rotation its just printing for the server
@ebon nimbus i see the line trace hit location on the server is going to 0
probably meaning the server is not getting that value
since it points to the floor (which is most likely 0 z)
scratch that last pic i left out a print string
How would it be hitting the floor AND drawing the line trace?
in offline mode, the client can't access to the gamestate?
the end point @ebon nimbus on the client is correct, but on the server, its not.. you can see it hits the floor which is at 0.. meaning that end point is null on the server and thus returning 0
what the other guy said
you dont seem to be replicating the cameras rotation
therefore it knows the start location
but not the rotation that the client is using
I'll get to searching on how to do that because im at a loss how I am currently not doing it.
one idea is you dont need to run the line trace on the server, if you trust the client to do it he can just feed the value of the start and end locations to the server .. im not worried about cheating in my arch viz though , but thats literally what i do, run a line trace and just feed the server the start and end points for a laser beam
@ornate crescent game state and game mode shoupd both be accesable in offlind mode, as offline its the server playing...
@ebon nimbus why the get socket location node
Why do you need that specific location
@high current I'm just trying to spawn a spell out of the player's hand
can someone help me, my thing didnt work, it seems like the newly joining players dont see the previous name actors
only the previous players see the new players names that just joined
i guess i need to set it to replicates probably
here goes another 30 minutes build (and deploy to another machine) process
yeah its where i want to shoot from
replacing it with the actor's location ends with the same result
yeah, sorry bad internet re-pastes my msgs
anyway, it is still the forward vector's issue
did you try setting the camera s a replicated component?
yeah its been clicked this whole time
btw the event executes on the server right?
yes, specifically a multicast event called from an event that runs on the server
Im about to the point of just trying to find someone to pay for a hour to look at the code, find the problem, and then explain it to me. It would be a better way to spend my time than burning all my free time looking for some kind of actual lesson plan or learning tools
well setting it to replicate did make it appear
but the actual player's name did not replicate from the existing player
to the new player that just joined
it was still the default value
ive now set player name to replicate, so maybe thats it
@copper grove The reason the new players don't see the previous players is because they were handled before the new players joined. You need to update the player list on everyone's machine when they join.
yeah thats what im going to do now @hollow stirrup (but its also not a player list, its an actor that is set to replicate, with the name of the player above him). and its spawned by the server set to net load on clients, so i dont understand why when it net loads it doesnt update the name...
will this do it?
so it will run after every new player gets spawned by the game mode
@ebon nimbus I would suggest moving the linetrace start and end vector code, before the replicated events, and pass them as references(trough the custom events) to the line trace, that way you can make sure that you are just sending the proper info to everyone
anyone know why my map only has FPS lag when running on a dedicated server? I checked some other levels that I have and they don't have any FPS lag. in the editor it shows 120 FPS and when I play the map is shows around 34 FPS with constant stuttering
use the profiler tools, figure out what exactly is causing this low fps
k
it seems to have magically fixed itself
nvm
I wasn't running a dedicated server damnit
is there a way to stop meshes from being draw called on certain clients? right now my client is rendering an excess amount of meshes while running on a dedicated server but in singleplayer the mesh draw call count is a ton lower
are you sure that you arent simulating 2 or more players, their windows might be in the background
it could b that its being spawned repeatedly by every player instance
I'm certain only one player is being simulated
what could be spawning repeatedly?
the meshes?
yea cus u mentioned excess amounts of meshes
well they're all foliage
so they shouldn't be respawning
or spawning repeatedly
ive only just started messing with multiplayer so i cant say much haha, lets wait for an expert to chime in
where's a good place to do asset loading? player state class? pawn class? controller?
never tackled it, but it would make sense for it to be in the player controller, as its something which happens client-side
Methods for loading and unloading assets during runtime.
is that for me?
for @harsh lintel
oh
@cerulean escarp in the editor settings, under play, there is an option called use single process
try to untick that and try to play again, it will take time and probably start a console version on the server
But generally, PIE dedicated testing will be laggier than non dedi, as it runs the game twice
albiet not with 2 viewports, but still
it worked!
ohhh so when I had that ticked, the dedicated server was running the entire game instead of just the non-graphical backbone stuff?
no, but because they are on the same process, my guess is their cpu management is less than ideal...
ah
idk havent exactly read about it, there is a bunch of ue4 optimizations going on in both versions
but using separate process-es is how your players will play the game...
k
anyone know how to set these macros as of 4.22?
and what the STEAMGAMDIR one should be?
whats the max bandwidth and the recommended bandwith of a ue4 game?
as low as possible is always gonna be the answer
Depends on the game, but really 1-2mbp/s is about the maximum you'll be able to hit
But you shouldn't be hitting that
run a few playtests and average out the bandwidth usage, then but like 10-30% buffer on top of it
Hello...
Has anyone ever had issues with adding a card for payment on Amazon aws console? I tried to activate my account for gamelift but it won't work.
hi,this is my protocol for nitro effect in multiplayer car
update nitro function for making thrust effect
pressing button to activate phys force to make thrust effect
stop nitro
is this correct procedure for nitro effect in multiplayer i m not having much confident whether is this correct procedure or not
any suggestion friends...
this is modified update nitro force function
How do I transfer location vector variable from Client's Pawn to Server's Player Controller? I'm making a fighting game and camera actor created on server cannot see the server's pawn on the client.
I Want to all character location variables to be distributed between both server and a client
If your character pawns are set to be replicated with movement, every client and the server should have the correct locations
@high current @hollow stirrup @copper grove Ended up swapping the line trace start and end from the camera location/forward vector to actor location and control rotation. Which solved the issue. Thanks for your guys input to help get me over the hurdle!
@high current how do i get the location? If i try using โget actor locationโ on the serverโs pawn it returns 0.0.0.
On client
Are you seeing the pawn correctly in game
If you are seeing it via different clients correctly, then perhaps you are getting the actor location from the wrong blueprint?
Screenshots always help
hello I'm having trouble with setting a character's component to 0 as default. When the character is first spawned, a player posseses it and the visibility of a component inside it is set to 0 as I specify in the class properties. Then, to respawn the player, I destroy that character, spawn a new one of the same class and make the player posses it. The problem is that after this happens that component's visibility is set to true. If I am trying to manually set it in beginplay, it will only work on the server and not on the clients. I've tried multiple combinations with server and multicast fuctions. What should I do?
Unless you have authoroty switches on begin play, it should work
Another option you can try is to set that variable as instance editable and exposed on spawn
That way you can modify it as you spawn the character with the spawn actor from class node
All right, worked all week at the real job, and now I finally get to take a stab at setting up my vehicles in a client authoritative model!
oops
nevermind
put a screen shot of the blueprint ๐
Oh sweet, I just figured out how to add latency and such into my PIE simulation, I bet this lets me recreate my problem!
It is hard troubleshooting stuff when you can't recreate it in UE4 ๐
I assume I need to add this to all 3 files?
actually I think I can add lag via the console
yeah you can add via the console, but it will be only active for the current pie sumulation, if you want it to work every time you hit play, then defaultengine is your answer
and you only need to plug that in for the one in FirebreakStrikeTeam/Config, the rest should auto generate with the new lines afaik
Thanks partner!
lol, I feel so silly, I see the path in those is saved ๐
slap, I've worked too much this week
well, I played around with a combinations of settings and couldn't recreate my vehicle snapping
but I know they do it
I'll mess with it more after lunch
Calling Client_ on the server doesn't necessarily mean it'll play on a player's machine, right? It just means it'll play it on the local machine.
Depends on the context of the call
I'm on playercontroller, it's running on server, but I'm calling a Client_ call on a pawn
Which means it's just updating the servers version of that pawn?
So the pawn is RPCing to the Server?
If so then yes.
That RPC is being called on the Servers version of that Pawn.
Assuming the RPC is allowed through, so long as the Pawn has a NetOwningConnection.
Hmm okay. So I gotta get back to the client's version of the pawn for some local stuff. I could either make a NetMulti call from the Server's version of the playercontroller to update the pawn, or make a NetMulti directly to the server's version of the pawn.
Or use a Replicated variable set to OwnerOnly.
Favor Replication over RPCs
RPCs dont preserve state, Replication does.
Unless you manage modifying that state correctly yourself.
Yeah okay, that makes sense.
does anyone know how fortnite does live events? somewhat like so [https://youtu.be/D1OgwR7JuTg?t=153]. Is that a sequencer timeline?
Fortnite Battle: Royale - ROBOT vs MONSTER LIVE โบ ALL my Fortnite: Battle Royale videos - https://www.youtube.com/playlist?list=PL1XXHtwbB06kkGsHz17V9Ch0TA...
Hello there everybody! Does anybody here do Multiplayer blueprint tutoring?
@umbral adder I was also thinking about a sequence. Dunno. Fortnite does magic stuft
Like updating the map in an event
@next warren does your nitro work?
On client for example
๐ค
They will probably flex with a new UE tool which we will get in like 4.24 or something
yeah mabye...
Fortnite event generator
When doing add force. should I execute on server only or also on the client
@viral raft yes its working
If that is on a character with replicated movement
Adding it on the server should replicate, as in the location changes get carried
If you are adding it on the client as well, and you dont have a client-auth model, it might result in some desync
Hi guys, do I need to verify every parameter I get in a server func for security?
I have a "place structure" server func that gets a transform. it's pretty annoying to verify that: 1. its not overlapping with other buildings, 2. the character is close to the location 3. it's not in the air or underground etc..
@high current But if I add force on the server only it gets a bit jittery at 50ms I thought. So should I add client too?
You can try, but the thing is that physics calculations are never the same on 2 machines, therefore event at perfect sync between server and client(which is impossible) 2 identical physics inputs can lead to different outcomes