#multiplayer
1 messages · Page 705 of 1
btw .... just for your info. You might want to reconsider this advice.
in VR your going to use navmesh for teleport and for "responsiveness" you'll want to project the arc and get the navdata pathfinding point on the client. Make no sense to request the server to do this and wait for latency to return and teleport. Same would go for top down click to move. Yeah you could return server info but cpp will show that even cmc does server correction for client inputs and client received info.
Just bad advice
you can use navmesh for nav projections and pathfinding just fine without actually walking on it
so that point is moot
My point is you want client navigation on
To get that info on the client
Again if you read
also doesn't matter
Instead of assuming
im sorry, im tired of this, your comunication skills are on bluieprint weekend warrior level
My only advice here is that if your going to spend time helping then you should be able to help and be patient with all skill levels. It’s cool if you want to assume “my skill level as blueprint weekend warrior” but I’ve helped people who have opened the engine for the first time all the way to ppl who make weekly pull request to source. Might want to reconsider your stance on hanging out in slack “trying to help” if the best you can do is care about “yourself” if you need to reassure yourself by breaking down “blueprint warriors” you might want to find a different way to keep your self confidence in order
This is coming from experience with leading teams …. Helping others has nothing to do with you or the gap between you and them. If you recognize it then you close it and empower them. Not beat them down every step of the way.
Have a good weekend buddy ❤️
Hello! Anyone can provide any information about this?
@pallid mesa the way this is usually solved is by spawning a fake client copy
I'm steps ahead from that
On the server you can usually not rep
And multicast
For all but owner
Since it’s a bullet
Actor and Movement rep isn’t as clean as a multicast spawn
I need synched projectiles in my clients, so not an option to not rep movement
Server handles prediction logic anyway
correct and it needs to be brought to the clients, through movement replication (not event driven atm)
From cmc of client to projectile movement correction
??
what I'm saying is when you multicast the spawn of a projectile movement component from an owning client "even with the projectile not replicated" the server itself spawns a copy at its interpreted corrected vector
the server handles damage events based on that
the client will spawn a dummy local imediately
before the rpc to server -> muticast call
that will desync
nope
yes it will uno
it will be very very very close
correct if you don't care about synced projectile movement server->client
that's fine
your simulation will be representative in your clients
but not equal
I'm looking after solving a very specific problem
I understand
which is the halt in the spawn
which is caused by a low net update frequency in the projectile
so the interpolation kicks in late
the halt at spawn is the "server copy" that your client is seeing
correct
yes but if you do what I say and debug through it might help you understand
i understand it already x'D
I'm looking for a non-intrusive solution so when the projectile replicates initially
and it doesn't have enough data for interpolation
I can see it moving
my current solution is to enable simulation until rep data kicks in - which works but...
I find it a bit unelegant
just think that replicating movement and interpolating is a requirement imposed by a major authority
which you cannot change
so it's an imposed constraint which invalidates any of the poposed to find a solution to this problem
what I'm saying is if you set rep to false on the projectile. The projectile movement component from the local client copy will fire locally at the time the server multicast is called. The multicast tells everyone "other than owner" to fire the projectile with "the server's corrected" vector. Without rep on the actor movement it won't "jitter" or spawn late for clients. The server has authority and will make these calcs anyways. The client "is never correct" but because the server knows the CMC movement prediction and the projectile movement prediction the "client fake projectile" will be better even with high net pkt lag testing "vs" manually rpcing this from the client replicated actor
that's not why it jitters
also there is no cmc implied in the formula
and also I know that stuff 😄 https://gyazo.com/8919c42efcee74cc9cf3b6bf3e9d1d9a
correct, you suggest me to do what UT4 does, right?
you are suggesting pure prediction without corrections, I'm doing early local prediction + corrections
1 more sec
please
just 1 ssec
I'm making a gif real quick and if you want I can jump in a chat and explain this alot better than typing out paragraphs
I feel you are solving a different problem to the one I'm asking
I don't think so because you are ruling out corrections
I'm not
ah so the local player will receive corrections to its own projectile from the server
its just your looking at it without understanding fully what the projectile movement component combined with client corrected cmc does
trying to get my gif size down
1 sec
@pallid mesa by the time its in flight it doesn't matter?
the velocity is set
it does!
the arc is set
because i have things in server that don't exist in the client
here is 2 clients
look at the landing location on both
look at the fire response on the local client
yes yes I know, it's pretty sensitive, I got this working aswell
doesn't matter if your in full sprint
yes I have this same thing implemented
mine either when I do prediction 😄
but in this case
the constraint is different
you need to understand that
imagine this uno
I'm not ruling out I may not understand your use case 🙂
the server projectile sees a different world
than the client projectile
however the client projectile should adapt to what the server is seeing
"how does that make any sense?"
haha it doesn't, it's my use case!
ok wait 1 second
because this is very important
are you wanting server authority prediction
or are you wanting to force client
because forcing client will desync the other way
in this case is server authority without prediction
CMC predicts the client location of the sim proxy at the time the rpc is called
the projectile movement component calcs velocity and all vector and physics data based on CMC and the projectile component corrected values
it's cool to explain here how cmc can help in projectile prediction!
people will find it interesting
but not my use case- unfurtunately
because the world vector is based on the corrected server location
then I'm sorry
in that case you have to use client authority all together
and treat the server as another client
that's not my use case uno :(
i want the clients to see the path the server projectile does
because the server projectile will bounce around boxes
that aren't there in the client
you see? it's a very silly use case
I have simulated proxies that aren't replicated in my world
boxes
if my client copy hits the box
you want to see what happens?
nothing should happen in my use case
because the client projectile should do what the server says
so the projectile should go through client boxes
if they are not there in the server instance
you understand? @severe nymph
because the use case is quite peculiar
it doesn't make sense in terms of game design or whatever
I have that working
the problem is that my projectiles have a slow net update frequency and they don't get the data in time for interpolation
This is what you want
again I feel I may just not be explaining correctly
so projectile movement is server authorative and the client version of the projectile moves based on the server projectile
with the method I'm telling you this is exactly what you'll get
with the need to re-invent the wheel
Two clients
Two different worlds
instant spawn
server authority corrected
1 client sees it bounce back
the rest see what the server says
damage is only applied based on "what the server says"
as radial damage
yes idc about damage at all
multicast and fire local
multicast what
forget about spawning
how does the projectile bounce back in your client?
u send the correction from server to client?
the client dummy has no knowledge of the box
spawn local -> rpc -> multicast (skipping owner)
the client has the box
the server doesn't
the other clients don't
so the server doesn't bounce it back for everyone
the client copy bounces back
yeah that's not what I want
if the server had the box
i want ONLY the server to have the box
yes but I want it to bounce back in the local client
correct, so you are suggesting event driven corrections
correct
which is something on my todo list
but first...
use case: the corrections are done on a net update frequency basis with a replicated projectile and movement
with a replicated projectile
Your never going to get smooth firing or correcting with a "net frequency" updated projectile without a dummy client copy
there is interpolation functionality in the pmc
you can set it up and it works really well!
look:
yes but its very very sluggish and honestly I don't care for it
I understand
but I have penetration and event driven correction because it feels better for the client vs a movement repped projectile
i don't like the jitters or the late spawning
and I also don't like the bandwidth consumption for 50 clients shooting grenades
with a fully repped actor
bad for bandwitdh!
mhm, totally agree!
we both are in the wave
but uno, understand that this is a specific example
a specific use case
still you provided some cool info
im pretty sure others will appreciate it
I already knew it hehe, but I'm working on something which requires me to explore all of this
cons/pros/gotchas
so do you think enabling simulation until netupdate data kicks in is not that unelegant?
you can always sync on the owning client with everyone else suffering
or sync on the server spreading the love so to speak
its all up to you
yes , really it is
issues really come down to giving the client too much power
but I'm annoyed by the fact that I have to add a timer every time I spawn a projectile
x'D
if you trust them fully overriding server vectors
you end up like rust
I just let the server cmc and projectile movement component work off its "multicasted corrected vectors"
and leave it be
yes that's essentially the best solution from the ones explored
if the client dummy bounces off a box that is simulated out of sync
then its just their prob
I don't make it everyone elses
the best solution here is to keep movement rep on with dynamic world objects
so the sim proxy updates loc
but with all the clients and all the stuff going on ... I break that rule
I want more simulated explosions without the overhead
so i let the client just deal with them
the cool thing is that you can predict explosions and whatnot
in your client version pellet
my project "in this example" is still ue4.24
lol
I could turn the net freq way down on the simulated actors
or control them better manually
just hasn't been a big enough deal yet
I think that my solution is what I'd need to do, but rather than a timer... an acknowledgment of data
i got hundreds of mags, guns, weapons, ai
so i need every byte i can save
lol
can run 25 players on most listen server sessions .... so I'm not hurting too bad 😛
but dedicated 50+ starts hurting haha
mainly tick updates honestly
hahahahaha
ayy anyways uno, I'm sorry for losing your time with my crazy examples
that's usually how it goes with me I come with "non-sensical" use cases
i do alot of float to byte compression
pack them in netquants
etc
every little bit helps
haha
yeah no worries at all
was fun stretching my brain for a few
"what does he mean"
honestly.. its more common than you think
everyone is trying to do velocity/loc prediction at some time or another
most of the times you can do it event driven
if you really want to understand it in engine
go make a ping pong game
🤣
let me know how that goes
lmao yeah in that case it'd make more sense
don't ever let someone say "your better off making an easy multiplayer game like pong"
lies!
actually I will mutate the use case to be something more sensical cause i think people will understand
a ping pong will do
but honestly
its how i came up with the event based correction
get owner impulse vector
get owning client latency
calc the reflection
send the correction over "x number of frames" rpc into the server copy
can use serialization if you want
mhm
still thinking about a use case in which the one I mentioned
would make more sense and I think it would depend on having a system such that the server generates random events
very much so
event driven is almost impossible unless you have the events generated in the client aswell
so this thing might become handy in said use case
if you want to correct the client dummy then you get the server copy and correct into the client proxy
so a random stream of data that the server does
and replicating the projectile would make more sense, since the amount of rpc's wouldn't make much sense in such case
you can rep it
just not movement
you need to actually rep it
to event correct it
nono just saying that in this case replicating movement would make sense
since the stream of rpc's would be incredible
i mean you can batch them
but the netupdate freq does that already
so no need to rpc complexity
yes
but since its a random stream stream...
you can determine a fixed step
and replication will handle the rest
you think so?
yes because chaos already has support for fixed step
according to the last couple of source pulls i saw
ah yes, chaos... didn't even think about physics lol
still net prediction plugin is paralysed
so might need some heavy work in there unless things are done easy by default
haha
when has anything ue not been "heavy work"
I mean the basics for everything is there
its a great engine
but for anything substantial
it takes a bit of ingenuity
Predicted physics is, like, THE hardest prediction to do
I have a physics project but it doesn't need prediction. Way easier.
Watch the GDC on what it took to get Rocket League working.
right now my issue is
networked "remote controlled" actors
the closest I've seen ue4 have anything is the fortnite "fake posession" vehicles
but even then it doesn't allow you to control/posess it while having a physical controller
I might be approaching the problem wrong .... I've racked my head on how to have VR players with a gripped controller controlling drones in a way that doesn't feel like a big latent dog mess
hang on a second
if your using an interface or your not posessing the best you can do is wait round trip for the server updates
and it feels horrid
its like yeah ... I'll go write a custom cmc that can record and playback inputs without being posessed haha.
not!
🤣
After a long road and many attempts, we are dropping support for the async version of Network Prediction. We felt the
complications it introduced into the physics system were too much to maintain and performance was still too poor in
the worst/degenerate cases that it wasn't going to be a viable system for enough games to warrant the complexities.
Physics support could come back into this version but it would be
strictly opt in and only applicable to games with small number of objects and players.
This is a straight indication on how complicated that thing is
In this 2018 GDC talk, Psyonix's Jared Cone takes viewers through an inside look at the specific game design decisions and implementation details that made the networked physics of Rocket League so successful.
@pallid mesa yeah
It’s not surprising honestly
It’s not a task id wish on the best engineers I’ve had the pleasure of knowing
That’s for sure
For a single ball bouncing back and forth …. Sure
Just saying this about the Rocket League video, take it with a small grain of salt. While they do have an amazing game it falls pretty badly apart with high latency 😅
Still great fun
Still some good tips in there IMO
I applaud their magic 😂
That for sure 😄
The main crux of the issue in anything predicted us what to do when two clients predict conflicting things. Vs the server, every client is in the future on their own screen and sees others in the past. That's why we just said fuck it, our vehicles are slow anyways, just replicate inputs to server and let there be one source of truth.
No
Replication is supposed to happen in the Actor which owns the SkeletalMeshComponent
Yes, but no. You don't send them. The AnimBP simply polls them from the Actor
No
You have the replicated variables in the Actor
And your AnimBP in the EventGraph you get them from the Owner
Just have a look a the standard anim BPs from the Third person template for example
What's the gameplay thing you're trying to make?
Is your character described by one rotation or two?
No just explain do you want seperate body and aim/look directions or just the one?
Right now what is rotating your capsule/root bone
Is it using ControlRotation or orienting to movement?
Or custom rotation logic
K so what are you using ControlRotation for, the aim/facing direction?
Yaw of what?
Okay so the actor rotation is the facing rotation, and you are counter rotating the body
Just use Base aim rotation to have an automagically replicated pitch as well.
Does anyone know why there's this jump at the beginning when running as client but not stand alone?
Control rotation is a property of the controller, so it's only on the owning client and the server.
The actor yaw is already handled by the character movement component, so just add in the base aim rotation pitch and you'll have everything you need to aim
The camera isn't driving anything. It's just the camera and the actor are both being using the control rotation. You need to go over your setup and make sure you understand exactly what is driving what
hello all
I create a server for my game and it's working, except...
when I start the server, I don't see any log
normaly we see text rooling
I created a a shortcut and put -log at the end of the execute but.... still a black windows.. the server seem running because I could connect to it
any idea what could cause this ?
Im currently trying to replicate RTS style building placement, and i wanted to ask if somebody could spare a minute to see what im doing wrong:
the flow goes like this:
im very new to replication, so i would love to know what needs to be replicated and what is best practices in this case
i was not sure if i need to set some of the variables to be replicated or not
Don't multicast. Just spawn the building on the server and it should be a replicated actor
The data that should go from client to server is "Hey i wanna put this building here"
And the server does the rest
When in doubt, think about what should be traversing the network.
The client should just pass a message to the server requesting a building be placed somewhere (run on server event), and the server should just be replicating state out. If it's RTS style though, I'd start by making a generic Order RPC that can be used for movement orders, spawning orders, building orders, etc
hi all! Im here again to ask anyone about ALSv4 replication. As i got it right, ALS_BP using characted information, such as rotation, speed etc from Base_PlayerBP. And if got animation replication explanation, all i have to do is make all these "information" variables to "replication". But in my case, all these stuff going from Interface. So i have to move it to my main_character_BP or what? Thanks in advance! 🙂
Or maybe i missed something 🤔
@dark edge interesting, now it seems like its complaining about the ghost
is that because the server does not know the value of the ghost variable i assume?
It doesn't and shouldn't.
Make a run on server event that passes over everything the server needs to spawn the building
How do I stop a widget from showing for all players?
They don't. How are you showing the widget?
widgets are clientside only, but if you tell everyone "Hey show this widget", they will.
I figured it out, I was just being stupid
Hello guys... I have some issue with this
I have 2 level, 1 main menu with character selection
and the Arakas3D
when I create my character, I openlevel the Arakas3D map... but it enter into the map but not connected to the Arakas3D, I need tu put a triggerbox in Arakas3D et collid with it to openlevel to 127.0.0.1:7777
to be able to login to the server
What exactly is the issue?
@winged badger
UCharacterMovementComponent::SimulateMovement() it runs FindFloor(), which in turn runs ComputerFloorDist(), which runs FloorSweepTest() to do a capsule sweep.
For this sweep, it uses InitCollisionParams() on the UpdatedPrimitive to init the Query and Response params. However, this function sets the CollisionResponse filter on the ResponseParams to BodyInstance.GetResponseChannels(). Which has been set to ECR_Ignore for WorldStatic and Dynamic.
So the sweep finds no floor, and the character switches to Falling. Which means it leaves NavWalking, so collision response channels are now enabled again. So next frame it finds a floor. And switches back to NavWalking again.
Just an fyi
Reason for the is falling loop
And for anyone else looking to solve the issue
Hey lads! Hope you're all alright. I'm having a rather, I think, simple issue, but I'm at my wits' end here. I'm trying to generate a hud while using a dedicated server, using PlayerController. The problem is, no matter what I try, I can't seem to get it to recognize my player as the local controller.
I call this
if(PS)
{
class AWW3PlayerController* PC = Cast<AWW3PlayerController>(GetController());
if(PC)
{
PC->CreateHUD();
}
}```
in the PossessedBy function. CreateHUD() always returns false when checking IsLocalPlayerController(). The reason I'm so stumped is that I've found a project that does this the exact same way, but I can't seem to get it to work. I might be missing something small and obvious here. Would be lovely if anybody could point me in the right direction.
@thin stratus if you look to that section in cpp
It creates an infinite loop if client navigation is enabled
As the client will hit the navmesh check go into navmesh walking and fail the sweep go to falling swap back to walking and pass the navmesh check swap to navmesh walking and fail sweep again
Results in flip flop infinite loop on clients
Only if ai is spawned by authority btw if placed in the level it’s fine
so it's a bug
you can prolly fix it setting movement mode in begin play?
I’ve tried that
Also tried construction
Only thing that works is turning off client navigation
But then the clients use “walking” and server uses navmesh
And client proxies can’t lerp z correction
Resulting in horrid z vector desync
so nav walking doesn't get replicated proper
Navmesh walking has always been client navmesh assisted as far as I know
Without any navigation mesh on clients it results in constant server correction
it rings a bell somewhat similar to what I commented
but I haven't done AI in years I might be wrong
General “walking” is engine default
Navmesh walking is a performance saver and offloads calcs to client navmesh but when running replication (server/client) ….. it just doesn’t work the way it seems to be coded
mhm that definitely rings a bell
It’s like it wasn’t fully made with replication in mind
Based on what I’m seeing without client navigation the server is actually working harder to send client corrections
Vs walking sweep checks on client proxies
Either that or it wasn’t made for uneven terrain but still they have navmesh walking traces which again only happens on server without client navigation forcing correction constantly
Project navmesh walking has a param setting but actually makes the problem worse
For standalone non rep it’s perfectly fine
With client navigation the proxy hardly ever gets corrected but results in the falling loop
Hm we used NavMesh walking in The Ascent for the AI. Only issue we ever had was forgetting that the CollisionProfile ignores WorldStatic and Dynamic when trying to let them run into triggers. But maybe your game just shows the issue more and the ascent didn't encounter it
Yeah it’s because my ai uses the isfalling cmc function for jump loops
Was using walking and everything was fine
Hm we had no actual jumping despite some specific abilities
Which I'm not sure how they were implemented
Swapped to navmesh walking and didn’t have an issue until we did Nav links
There are so many little problems with CMC and ai...
Performance will be great both from savings in pathing and server correction
With client navigation keeping navmesh walking in check the server will get an excellent perf boost
We had issues where AIs had different agent settings than default. And AIs started to walk off of the NavMesh but not back on. Cause one of the Implementations of UE said "Yes we are still on the NavMesh." while the other said "No you aren't on the NavMesh so you can't walk there."
Which in the end got solved by just killing the enemies off that got stuck
Without client navigation the pathing is pretty cheap but man the correction batch rpcs
From the server
With normal walking …. Well your lucky to get 50+ ai
Plus 50 clients
Just hell on tick updates and sweep stack
But correction isn’t bad at all
Just a matter of tradeoffs
But I see potential for improvement 😂
Your his class should just be automagically instantiated for you.
You doing anything weird where that wouldn't be the way you want to do it?
Pretty sure I'm not doing anything weird, but I was just following tutorials, and I was wondering why that wouldn't work. Either way, I somehow managed to do it by calling IsLocallyControlled() in BeginPlay and it all seems to work now. Probably not the most stable solution, but seems good enough for me right now
hi guys, i know this seems ridiculous, but lets say i got $1000 montly dedicated server (i still dont know which server to use).
how many players this server can held in one instance (average numbers)?
and the game complexity is like PUBG PC gaming. and lets make the game is not that optimized well.
I don't think anyone can really tell you or even should. If you want to have for example a hundred people on one instance then you'll need to try it out for your self, we can't guess how powerful of a server you'll need. Maybe your game is in general more demanding than PUBG because of all the features you have, maybe it's less. Maybe you'll find out that it won't even run in the first place with that many people no matter the server and you'll need to optimise, there are just too many things we don't know about that could end up with you needing a more or less powerful server.
I would even recommend not taking people their opinions on this, dedicated servers are expensive in general. If it turns out that someone here says "maybe this works" and you could have gotten a cheaper server then you're wasting a bunch of money 🙂
Profile the performance of your game, do some playtests and see what works and what doesn't.
Any way to make a system that allows client to join using a code ?
Host can share the code that lets you join the lobby
i see, thanks for the reminder bro.
yeah so i still on making my 1st game...maybe i should start with a small test
Does GetLocalRole() work in standalone?
Hey guys, Im using the Steam API Advanced Sessions framework to host my server, and a player from India tried to connect and got this response: "ConnectionTimeOut" - I'm situated in Europe. Is this an inbuilt region-filtering by Steam or something?
I use an array, when I remove an item from it, it’s order is different on the client from the server, any idea why?
hi all, running into a weird issue w/ replicating TSoftClassPtr. It seems that if I sent an RPC from client to server w/ a softclassptr, it will arrive as invalid unless that class has been loaded on server
but the whole point of softclassptr is to pass class ref's without loading them
what might I be missing here? do unloaded assets not get a netguid? Isn't a softclassptr just a string ref under the hood?
I guess I could just RPC the string of class... but that seems hacky
does anyone have a generic ue project where a character with the ue4 rig is holding a gun in first person?
Doesnt the 1st person example project have that?
it has no body though for multiplayer
What's the problem, exactly?
Does anyone know how I can test this game online that I designed through steam, I get it to show up, but when I go to add people to it, it won't let them have any input, they just watch me!
It is in Alpha currently*
is there a way I can show you privately my network settings.... I am so ignorant when it comes to this stuff!!!
Hi ! I wanted to ask, how would someone go about saving items that he gets when he joined another player's session so he could use the items in his singleplayer world after? (for listen servers)
Like I'm joining other's player hosted dungeon and I get some weapons, then after the dungeon is done I return to sp and can see and use the items I got from that session.
Any idea is appreciated 🙏
You could same them locally in a data asset. Easily hackable etc.
so, the dedicated server is the way ?
You could have a dedicated "item server"
Basically an online database of what items each person has and just let them run their own servers.
Or if it's not competitive, just let them do what they want because who really cares?
and not even those subsystem plugins on the market could do the trick right
If it's just saving data locally, it can be easily hacked. If it's loading data over the internet, it can be easily hacked.
Cheat prevention is tricky business.
Is it a game where you play solo or co-op?
solo for the most part, then you can team up for some dungeons
Just with your friends or with randoms online?
The latter thing is where cheating becomes an issue.
with randoms 🙈
I'm not really qualified to answer that question then.
But an online character server (whcih has items, characters, etc) might be a place to start if you want to try to avoid people cheating while playing with ecah other.
Thanks in advance 🙂
I guess it`s a class interface
im new at ue4 and multiplayer at all, so don`t know any differences between them 🙂
Well, generally, a class interface is part of your class hierarchy, so it'll be on the server and client by default?
It's not something you change at runtime.
Are you coming from unity?
Coming from high school 😄
So if my animations depends on variables which returning through interface, it`s not allow me to use these value in variables in every single client?
i just wanna play my animations and every single player will see them
Sounds to me like you are looking to replicate a variable down to clients. Unless the animation system has something built in, which I never used so am not sure about 🙂
im new at all this multiplayer stuff, but i guess it`s like a "cached" data, which will be using in the next frame
@thin stratus what I did was do a check against walking mode & isfalling
figured it was faster than writing a new child class of character with a cmc override
just to fix the isfalling phys state
for navmesh walking
so if walking mode is walking isfalling can play the jump loop
if navmesh walking mode then i use a montage blend
Is there any built-in functionality to auto-destroy actors when their owner is destroyed?
Try to use IsValid owner and then destroy it`s child
Hello! I'm having problems understanding something I thought I'd already understood. Basically, for some reason, my Server Reliable RPC is being called on the client.
My player controller establishes 2 functions. The first one is called on the client from the input system (confirmed by the VS debug break as Role_AutonomousProxy), however the second one is ALSO called on the client :
UFUNCTION(BlueprintCallable)
void TryAssignPlayerSeat(int32 PlayerSeatIndex);
UFUNCTION(Server, Reliable)
void Server_TryAssignPlayerSeat(int32 PlayerSeatIndex);
void AFirstProjectPlayerController::TryAssignPlayerSeat(int32 PlayerSeatIndex)
{
Server_TryAssignPlayerSeat(PlayerSeatIndex);
}
void AFirstProjectPlayerController::Server_TryAssignPlayerSeat_Implementation(int32 PlayerSeatIndex)
{
//Called on... client? Why?
}
Maybe in EventTick
I'm using basic ue5 PIE with 1 single client in a net mode "Play as Client", if that has anything to do with it.
@hard hinge You can bind on destroyed, targeting the owner, in the child and then destroy the child when the delegate is fired
EndPlay is usually a good place for such stuff
Does anyone here have any experience replicating gravity using the ninja character plugin? Or experience with things being replicated properly in the editor but improperly when the project is built standalone?
yeah i know that, i was mostly just wondering if there was a built in functionality for this in multioplayer
it would be nice to have built into the engine
that all actors spawned by the player are destroyed when the player disconnects
helps with cleanup of stale actors
I would like to ask for advice on setting initial velocity dynamically of a replicated projectile.
What I mean is, the player can charge up the velocity before the projectile spawns and all the clients will know what the spawned projectile's velocity is going to be from the constructor or initializer.
But this is tricky to achieve in multiplayer. I did try by passing over a value to clients to apply to the projectile, but it seems that projectiles don't like to have their velocity changed after spawning. Unless I'm just doing something wrong?
Setting replicated movement will only resolve in laggy movement, because for clients the projectile is 'still' while the server is trying to tell them where the proj is. I will need to set the velocity for clients to the accurate amount that was charged up.
Anyone got some good ideas?
are you having the server spawn the projectile or the players?
If I used deferred spawning and set the properties before spawning it into the world, can I trust that the clients will have those properties set to? Or will I need to use replicated variables and use ForceNetUpdate? (because I dont need it to update otherwise)
sorry, to be clear, the server is spawning the projectile?
Haha no worries. Yes the server is spawning the projectile.
The player does a charge up locally, then tells the server through an RPC server call with a parameter. The parameter tells the server how much charge up was built.
I'd be down to try and help figure it out, wanna hop in a call?
Yes lets do it. I'll be there in 1 min
From a cheat protection standpoint, I would have the server actual track the charge time rather than trust the client. Just have the client send a Start/Stop charging call to the server.
I've managed to replicate this behavior with only blueprinted events inside the player controller. Is this a known bug?
By called on the client, you probably mean execute on the client?
Yeah, sorry. Client calls a event that should be executed on server, but it's executed on client instead.
If you execute a server rpc on the client on the wrong object, it is called on the client iirc? Because it doesn't have permission to send it to the server from that point?
You have to call a server rpc on an actor that can actually send it: player controller, owned pawn, player state
Yeah, I saw that a lot in the doc, which is why I do it on the player controller, which is the "best" object.
You're calling it on the PC, not from the PC, right?
It doesn't matter where it's called from
I'm doing both.
(you can call it from the PC, what I said sounded a little ambiguous on that point)
Here:
Then it should work.
Notice top right is client, not server.
You need to send an 'execute on server' rpc which then calls 'execute on all' from the server
Even with execute on server, I still get it only on client 😦
Are you running 2 separate instances?
A client is the server if it's just 1
(aka listen server)
This is what I'm using :
Yeah, PIE
How do you know it's on the client?
Oh it says it there, nevermind.
Well, I'm out of ideas. It should work!
Thanks for the sanity check!
No worries.
Hi! Does anyone know what you need for a online multiplayer game like fortnite/apex/warzone etc
Dedicated servers around the world, some kind of matchmaking service, an account system with your own servers to store player progress, a good anticheat, large art teams and a solid gameplay team
(and billions in marketing since those games only work when you have millions of players)
Okay👍🏻 thanks!
1 question, what is the price of a dedicated server actually?
You can go with about $1 per hour
Oh nice!
Though arguably that's going to be less than that
A figure a c6g.2xlarge on AWS can run a dedi and that's only about $0.3
But overall server costs aren't why indies can't do Fortnite
How do I (can I) declare replication callback for a uint32 bit property? Compiler tells me that BaseHumanoidCharacter.h(203): Replication notification function OnRep_Mantling has invalid parameter for property bMantlingRep. First (optional) parameter must be of type uint8. But changing the param to an actual uint8 doesnt fix the error
ok, thanks
When using servertravel is it quaranteed that server will load the map before clients?
It's not
I only know because we had plenty of issues in our game when clients loaded levels before the server
Is there any function that waits for all players to load the map before starting the game?
Hmm maybe check in the GameMode, but if not, shouldn't be too hard to implement it, just have the clients notify the server if "everything" is loaded
Okay, server is the one spawning player controllers for the players so at least player controllers are quaranteed to exists only after the server has loaded and spawned the controllers?
I really need help... I am trying to prepare my game for multiplayer. I followed a tutorial on replication, and it works all fine and good. However... My game has a bit more complexity to it that is making it really difficult.
Basically, players will be able to fly with physics simulation on tick that turns on and off (off when they're not flying). The server can fly just fine, but the client is not able to, and I'm not exactly sure how to make it replicate for the client. I tried a few different ways and had a bit of luck, but it was just really buggy and de-synced a lot. Anyone have experience with this? Walking and such works just fine, but I need flight to replicate as well.
I'm really new to this, never done multiplayer before and this is my first game that I programmed myself.
I have code for a double jump mechanic, on the third jump is when flight initiates. But I needed a bunch of other events plugged into the jumping code in order to make it reset when it needs to be, and it ended up being a bit of a pile of spaghetti, so I'm kinda going crazy trying to clean that up and make it work for multiplayer.
Is there a built-in solution for having multiple levels on a multiplayer dedicated server so I can have a main open world and then if I wanted to have instances of a new session based level where several players could join, like a lobby session, I could spawn them as needed (like after 4 players have requested to join a game, the server will create the new level and make the players join it) ?
Nope
I considered making new UWorlds but I'm not sure it's the right option, or if I should be spinning up a new dedicated server for the instancing of a specific map
Your lobby session probably works best as purely clientside
This is my code that makes you enter flight. I know it's really hard to look at. 😭 But I'm a noob
so the general plan for multiple levels would be a new instance of the dedicated server per session?
One dedi for each session on a level, yeah
that truly puts me in a spot lol
Dedicated servers are the worst thing you can ever need, imho
yeah unfortunately I can't do any peer to peer for this.
Possibly, but the business case for dedicated servers with 4 players on them is gonna be weird 🙂
that side should be fine as having them auto-spin up/down as required would optimise it, and its a headless system so it's not too taxing on the virtual machine
Using steam is always an option, i really recommend "advanced steam sessions" plugin
Steam doesn't do hosting
yeah that and I'll be using EOS
oh you want to do dedicated servers, mb
i am not sure about this, but you might be able to use the clienttravel
thanks ill try that
i have no idea if this will make it so that if you were to call this for two separate clients if they would connect to two instances of the same map or to the same instance of that map though
strange thing is I can't even find client travel in the list
How are your characters moving around on the ground, Character Movement Component?
Yes. The walking replicates perfectly, and since I posted I also got my doublejump to replicate and am trying to work back in flight. It switches to physics simulation when you fly.
Why aren't you using the CMC to fly as well?
On the third spacebar hit you enter flight
You're gonna have a bad time mixing physics and CMC in multiplayer on your first project
It just makes the flying feel more realistic
I have it working nicely and it's really fun
Other than the clients, sure.
It's possible and I'm determined to figure it out 🙂
You can replicate physics pretty easily but it'll be pretty hard if you want clientside prediction and you'll have to work around the CMC
I already have disabling/enabling physics sim working, just need to make it replicate
it completely disables physics when you touch the ground
Are you ok with ping lag between the inputs and seeing the guy move/turn?
I'm sure there will be issues like that, yeah
IDK if it'd be possible for characters but I have a multiplayer physics project that works by sending all input to server. You really DON'T want to go down that route for characters though, use the flying or a custom movement mode and do it right.
You can still get the exact same movement mechanics
How?
I'm a noob just cobbling together tutorials I find, I followed a plane pawn one that showed how to make the physics calculations and I adapted it into what I need
Multiplayer is a COMPLETELY different animal. Since you have a cobbled together system, you'll have to cobble together the networking for it. The correct way to approach it would be to make flying a movement mode. Honestly, if you're new, stick to a single player project and you might finish it.
Is there any way to do that without C++? I don't know C++. Everything I looked into about custom movement modes requires it
Nah, going to be C++ intensive
I'm not sure what all you need but the CMC has flying mode
Does it have to be cheat proof? You could also just let clients decide wherever they want to be and in which state, not the best solution of course but better than nothing if you can't use C++ / custom CMC stuff.
yeah you can have seamless travel on PIE, Standalone and connecting to Dedicated server. Make sure its enabled in your project settings
So im not exactly sure where to ask this question but seeing as thought its happening in GetLifetimeReplicatedProps(...) I will put it here first. I'm simply trying to put a class member variable inside the DOREPLIFETIME(). I am able to compile this just fine, but when I try and open the editor it gets to 93% and fails with the crash shown above. The line described in the crash is shown above the crash window and the second image shows how LifeTime is getting declaired. If i comment this line out then it opens just fine but of course the LifeTime does not get replicated.
it's hard to tell with these cropped screenshots if it's actually declared in the correct class or not
the compilation will not validate that property is actually valid since it looks up the prop name by name via reflection
The LifeTime is being declaired within the AItemParent class
this is the same cropped screenshot
oops didnt mean to attached that one
thats a big more backed out so you can see it within the class
Doesn't it need the "projectname_API" macro next to the class to properly work? Could be wrong though.
Along with the "UCLASS()" one which seems to be missing(?) or may be outside the screenshot.
it is just outside of the screenshot
I have found that it is not neccessary, as non of the files in the project have that _API and I've never ran into any of this with prior replicated variables
Once thing I wanted to note is that this is a parent class. This class also has a child that gets derived from which also has the GetLifetimeReplicatedProps thats it overrides (but still calls the parent super and everything. I was currious if this parent child both having this function could cause any issues?
There's a backslash after your BeginPlay line btw 😛
I looked at that, the fly mode isn't really what I'm looking for. I need realistic flight
Oh? How would you do this?
Well what I was thinking of is just quite literally sending the location through a RPC, but that's probably not too great either if you already have the setup for everything with the Character system 😅
Hello, i have a gamemode that spawns a ThirdPersonCharacter for every player controller in OnPostLogin event and i want to assign a player name when the character is spawned, but i need to be able to input that name in a main menu and then get it when i open the level, and get the specific name for every client that connects to the game, anyone has any idea on how i can make that? This is my OnPostLogin event
So you're talking a clientside name? Or rather, a name a client picks?
Hmmm I can probably look into this? My game is super early, all I have coded is the flight system and nothing else, so I could try it I guess?
A name that the client picks in the main menu and other players can see in the game
I haven't done it but you probably want to get it through a client RPC in the PlayerController. Either save it in GameInstance or in a savegame so it can survive the load transition.
I'm trying to make a chess type game. I have a basic drag and drop mechanic set up, but it only works properly on the sever.
Client side when I select a character to move, it falls through the floor, and nothing happens on the server.
Drag and drop logic it in the player controller
Chess is a perfect game to learn multiplayer with. What you want to do is make a Run on Server event in your playercontroller that does the move. Think of how corrospondance chess works. Just send the move, let the server do everything else and replicate stuff
Anything turn based is a great first multiplayer project as you have to do zero (0) clientside prediction
That was the idea. So I should try moving the drag/drop logic somewhere outside the player controller? Because thats client owned right?
Do the other players need to physically see the drag and drop?
or do they just see your move happen once it's happened
If they just need to see the move once it's happened, do the drag and drop clientside with the playercontroller (and possibly some stuff on the piece actors, idk, depends on what you're going for), and just Client->Server the move (A4 to B3)
Congrats on choosing a game design that's actually doable in multiplayer for a newer dev. I wish I had done a turn based game lol
Hey everyone 👋
So I'm doing a multiplayer parkour game and a few months ago I asked about whether changing the movement component's MaxWalkSpeed at runtime messes with the movement replication, and apparently it did!
So I changed my custom character movement component to modify the incoming Acceleration from the MoveData to allow for speeding up or down while running and replicating properly.
After some modifications, this works just fine, but there's an issue:
I'm using FInterpTo to modify the Acceleration the same way I was using FInterpTo to modify the Max Walk Speed, which causes the increase in speed to be very different (modifying acceleration vs speed).
Can I make it so that the Acceleration increases in such a way so that it mimics the increase in speed I had before, or another (maybe simpler) way to modify the character movement component's Max Speed at runtime?
Thanks for the help 🙏
guys, anyone know what causing this issue?
@still coralhttps://youtu.be/RtQRMcupJs0
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
Is there any built-in client-side prediction functionality in unreal?
I found the probleme. Apparently EnhancedInputSystem flags all calls as Local instead of letting remote calls be remote calls.
Damn.
@twin juniper he was using an input bind to trigger a server rpc... which wasn't being sent to the server.
Yikes
It's the new version of the EnhancedInput that got pushed to ue5. You can disable the behavior with a define in the build.cs, not to bad a fix for a problem I do not understand -_-
Anyone know what would be causing jitter with the Projectile Movement Component? I'm spawning a fake projectile on the client, RPCing to the server, spawning that projectile on the server, ticking it forward in time by client ping, then when the projectile replicates it replaces the client's fake projectile. This all works correctly but the replicated projectile has some jitter on clients. It's not terrible but it's definitely choppy. I have ReplicateMovement checked in the BP, replicated velocity/rotation set to 2 decimal places. The interpolate movement checkbox doesn't appear to do anything.
That sounds like interpolate movement not doing anything
You sure you're not updating the position on client directly as well as having the server update it then re-replicating it back?
I'm honestly not very impressed with the projectile movement component, you are probably a lot better off making your own
I'm not touching anything on the client, I spawn the projectile with an initial velocity value (just set in the projectile movement details panel) that's the same on both client and server and then never touch velocity at all after that.
actually, since the client is only spawning a fake projectile, the real replicated projectile doesn't even get an initial velocity from the client, its just a server-spawned object being replicated down
you need to pass in the mesh to the interpolation system
i seem to have fixed it by following the steps someone laid out for calling MoveInterpolationTarget in the actor's PostNetReceiveLocationRotation function
if (ProjectileMovement && ProjectileMovement->UpdatedComponent)
{
ProjectileMovement->SetInterpolatedComponent(Mesh);
ProjectileMovement->bSimulationEnabled = true; // optional if you want only interpolation without collision traces
ProjectileMovement->bInterpMovement = true;
ProjectileMovement->bInterpRotation = true;
}
ah yes
and you need to do this:
I'm assuming that setting the component would just do basically what i'm already doing but just using the component's location and rotation?
void AProjectilePredictionProjectile::PostNetReceiveLocationAndRotation()
{
if (ProjectileMovement && ProjectileMovement->UpdatedComponent && ProjectileMovement->bInterpMovement)
{
const FRepMovement& ConstRepMovement = GetReplicatedMovement();
const FVector NewLocation = FRepMovement::RebaseOntoLocalOrigin(ConstRepMovement.Location, this);
ProjectileMovement->MoveInterpolationTarget(NewLocation, ConstRepMovement.Rotation);
}
else
{
Super::PostNetReceiveLocationAndRotation();
}
}
possibly
just less lines of code, likely
although @vivid seal with this setup and your setup
if you reduce the net update frequeny of your projectiles
and disable simulation
you will see the projectiles halt for a sec when they spawn
while it waits for the next interp location?
makes sense. its weird that this isn't just on by default like it is for CMC
i mean tbh... you probably don't need any of this unless its a very slow projectile that requires continuous corrections
i have a few slow projectiles and the jitter was noticeable enough
the interpolation should remove all the jitter, but the halt will be there
Just make your own deterministic projectile movement component that uses line traces, I like it much better.
just adding ```
void APredictableProjectile::PostNetReceiveLocationAndRotation()
{
Super::PostNetReceiveLocationAndRotation();
ProjectileMovement->MoveInterpolationTarget(GetActorLocation(), GetActorRotation());
}
seemed to fix all my jitter even at 200 ping with fairly bad net settings
didn't notice the halt but i also have a fake client projectile in the way for that first tick i think
do you have bsimulate to true in your projectile?
dont think so, just ReplicateMovement and the interpolate checkbox
also... that... what you are doing might give you issues I would suggest you use the replicatedmovement property as I showcased above
bsimulate is on by default in the projectile component
take a look
i had closed the editor let me reopen
also you'd want to set bsimulate to false only for everyone but authority
Actually Adriel, do you know of any public example about this?
after rewriting most of GAS from scratch myself, I think i'm tired of reinventing the wheel 😦
well it would be as easy as having a public example we all can use and reuse
but unfortunately we need more strength in the open source world
uhh disabling simulation causes my projectiles to never move
they just spawn and float there
plop
read that
void AProjectilePredictionProjectile::BeginPlay()
{
Super::BeginPlay();
if (GetLocalRole() != ROLE_Authority)
{
// Set movement interpolation setting
if (ProjectileMovement && ProjectileMovement->UpdatedComponent)
{
ProjectileMovement->SetInterpolatedComponent(Mesh);
ProjectileMovement->bSimulationEnabled = false;
ProjectileMovement->bInterpMovement = true;
ProjectileMovement->bInterpRotation = true;
}
...
}
}
then you'll have the same issue I mentioned some days ago
which you can solve by simulating until full round-trip-time
actually... you'll find the said halt diminishes the higher your netupdatefreq
Quick question, I have an intiger variable in my thirdpersoncharacter blueprint, if I want another local multiplayer user to be able to change that variable for themself, how would I go about doing that to make sure their controlled thirdpersoncharacter only changes it for themself? (working with blueprints)
you could ask the server to change the value on that specific character
Make the replication condition for that property as nvm, just what @polar solstice saidOwnerOnly
if you need something to happen when the int is changed you could make it onrep as well
You're asking how to get a player to change THEIR OWN variable right? Just change it.
in local multiplayer would that variable be replicated?
Am I missing something?
Character/Pawn class exists on both the server and the client. You need to make sure your integer replicates and you change that value on the server and you're good to go
Local multiplayer is the regular PIE multiplayer I guess?
I believe so, I guess what id like to know is if the int changing has some affect on anyone but the character with the int. because if not, then it doesn't matter and they should just change the value
That's what my assumption was. He said "make sure they can only change it for themselves", so I assumed he wants to be sure if he's looking at a variable it's THIS player's var and not someone else's. But I guess we'd need clarification
@fierce fiber care to clarify?
Sorry for the sort of vagueness of the question, here is what Im doing, I have a class chooser, and I want to apply the class number to the player. In the player blueprint, I have a Class Number Variable that I want to have changed for each local controller to their chosen class, for example, Player 2 would walk over a platform, the thirdpersoncharacter blueprint would change to class 2, but only for player 2. Hope this make sense? Im new at tackling multiplayer in ue4 so apologies in advance.
I've never done local multiplayer but if it's anything like networked mutliplayer, you could set the int as a rep_notify and using the rep_notify function, you could update the class. assuming local multiplayer still has a server you'll have to ask the server to set the integer for that specific character
Local multiplayer is split screen?
ya
I see
I'm not 100% sure, but i believe it acts like a listen server?
Yeah I haven't done local mp either, but I would guess it has a same/similar approach
I can't tell, don't wanna mislead somebody
Hmm, I'll give it a go and see what happens, thanks!
Just as I expected, I added a print string to the player to tell me when they become a class based on the assigned ID, but it still assigns the class ID to all players anyways
@fierce fiber might be able to assist you better if I can see whats going on, wanna hop in a call?
Yeah sure!
@fathom aspen we figured it out, does not work like networked mutli confimed lol
Guys a wizard, literally
Nice, what was it?
you just set the variables on actors directly like @blissful saffron suggested. his setup wasn't split screen though so not sure if there is a change there
Ah I see. Yeah in split screen you specify index for GetPlayerXXX and stuff like that
I have built a dedicated server but my client is unable to connect to it. I am able to connect to the server if it runs in editor though. Am I missing something?
No way to know without a shitton more detail on what you're doing
It's a small project and I am just trying to connect multiple clients. When I run the clients standalone in editor with a separate dedicated server the standalone and the built versions of the clients can connect to the server. But they are unable to connect to the built version of the dedicated server. What information will be more useful?
How are you trying to connect?
Direct IP
So you have no online subsystem enabled?
No
Are the server and clients on the same machine or network?
The clients can connect to the server on the same machine and over the local network
I have not tested outside of my network
The client can connect?
I thought there was an issue
Can connect to the dedicated server that is ran separately from the standalone launched from the editor
But not to the build
Okay so I'm gonna ask again specifically about the scenario where it does not work
Are the server and clients on the same machine or network?
So packaged client + packaged server, both outside editor, on same network, with open <ip>
Yeah
Check the dedicated server's logs
If the connection fails for Unreal-related reasons there'll be logs
The last thing on the logs for the built dedicated server is first time updating LLM stats.
Dunno what LLM is, but you're saying repeated attempts to connect from a client do not produce logs
Not on the dedicated server, it makes me think that it ain't hosting right or something.
The bind address is 0.0.0.0 and the port is 7777, not sure if that is how it's meant to be
The clients log just says it timed out
So we're looking at a network layer issue and not say invalid build etc
Check that the IP is correct, try pinging that IP from client
I need to pop off now for a bit, thanks for the help! I shall try that when I get back.
Can a Playerstate do Client RPC's ?
Should work
Server ones too
They'll only work if the player state has replicated successfully to the client at the time you call it, though
I figured... it takes ages for playerstate to update
you can increase the player state net update frequency
Yea I did that :o I missunderstood the value there i thought the value would determine how long one update takes rather than how many updates it does in a second so I set it to 0.1 lmao
hello guys any one have any idea
how to use ALS (Advanced Locomotion System) for multiplayer games
because current als will not come with multiplayer in it
right
Ask the plugin's developer?
are they good for full resale
A nice little silent bug is that if you set it to anything less than 1, it'll never push a network update
release*
it did tho
But generally, I prefer to set the frequency as low as possible then call ForceNetUpdate() when changing a replicated property
Maybe you had MinNetUpdateFreq still set higher
That seems to be a pretty optimized way indeed
aslong as you know when things update :o
ForceNetUpdate doesn't actually force anything, all it does is reset the last compared time
So it will at the very least compare at the end of frame, even if it doesn't send it
For stuff that moves though, best to leave it somewhere higher
guys can any one help me with this ?
The thing doesn't do multiplayer - if you're proficient with C++ and multiplayer movement you might be able to add it, but it'll be weeks of work for competent people
They already have this
With the community plugin
Still wouldn’t be ready for a full game
But is a good start
Is there a recommended way to create a UniqueNetId for purely LAN Sessions? I'm using EOS so I have the EOS net drivers set in the DefaultEngine.ini but I'm looking to make sessions calls with the NULL_Subsystem for LAN, however if I bypass all auth and everything, the UniqueNetIds are empty/null and things like CreateSessions/JoinSession/FindSessions etc throw exceptions.
is there any pack which i can buy from market place?
ok
iam not that good with multiplayer
new to multiplayer
If ur new with multiplayer I would recommend learning more rather than paying for packs
I mean you can always try - get the plugin from github and see how things go
MP is hard work
Most packs I've purchased aren't really production ready
At least packs that involve code
Much of the marketplace in general
I've been able to adopt concepts from them, but usually have to remake them anyway
thx dude
Personally I try to avoid plugins or marketplace assets like the plague - you then become tributary of what they support, when they are updated, etc
ya thats true
Been running some tests on my linux server with the networking profiler that exists in the engine.
I was hoping that the results was going to give me something that I could easily look at, but the biggest culprits for these tests have been
WorldSettings , and an rpc called FUpdateLevelStreamingLevelStatus
Does anyone know anything about these 2, im finding it difficult to understand from the documentation, and worldsettings just seems impossible to understand from the profiler what it is doing?
@opal fox check out UnrealInsights
and run the network profiler with that
FUpdateLevelStreamingLevelStatus I believe is clients/hosts communicating the status of level streaming and travel
I would also search for instances of SetLevelVisibility
Yeah i suspected its something about the level streaming, its just a bit unclear what
the worldsettings is the one im most confused about
its so ambigous
How's the MP stuff looking in Lyra? Really excited to try it out
Still using OnRep vars for stuff like weapons firing? Or moved to Multicast RPCs or even auto handled by GAS?
I wonder if it actually implements proper rewindable shooting mechanics or just the same thing as the old shooter game did where it kind of guesses.
Unreal tournament shows that btw
Unreal Tournament has full rewindable hit detection?
wait what, last time i looked at UT it didnt do rewinding
Can I disable hit Events for replicated actors?
I have a Problem where... I spawn an actor on server (that actor replicates) and once it Hits a wall it spawn additional replicated projectile however it seems that they are being spawned locally in the client
Check if projectile has authority before doing the hit wall logic
Let me try that
Wait... that wouldn't make sense... I'm binding the OnActorHit Delegate only on server anyway
Perhaps the projectile's owner is the player.. and that player has authority.. so an authority switch would be binding that actor hit event?
I want to enable player to player communication. Whats an effective way to handle it? (basically I can walk up to any player and trade inventory directly from that player)
No need to worry anymore already resolved
ALyraGameState
High-level game phase logic is managed server-sde by Lyra Game State (ALyraGameState), located in your C:\Lyra\Source\LyraGame\LyraGameState.h file. Game States only exist on the server, and use an Ability System Component with Game Phases that are implemented as abilities.
Is that a typo in the docs ?
GameStates only exist on the Server?
Or is that not the "AGameState" ?
That definitely sounds like a typo, I think they meant AGameMode...
the benefits of just looking at the source
because I'm sure they wouldn't change a part of the framework like that
especially one as fundamental as game state
that would have been a big break from the previews lol
Hey guys, regarding anti-cheating on a listen server-solution game, should I be setting variables such as speed, ammo, health etc., in a 3rd party actor, or maybe in the level blueprint? Need a way to ensure the server can't hack 😅
Look into 3rd party anti-cheat tools? If you don't know how to stop cheaters (as is clear by you asking here) then the experienced hackers will get around whatever workarounds you add.
Except just implementing correct and rigorous code to make it function correctly.
If you have a listen server there's absolutely no way you can prevent the host from hacking, the best you can do is a client side anti-cheat. But it's their game running on their PC which you don't have any control over 🙂
And we all know how well client side anti-cheats work 😅
If you need guaranteed 'safety' / control you'll need dedicated servers.
Another thing you should consider, if it's just a game you play with friends and it's not competitive / no global leaderboards, etc., does cheating even matter?
Thanks for your input @latent heart and @hushed stirrup (hope you don't mind the pings) 🙂
I've implemented Steam API and Advanced Sessions into my game with listen server (followed an integration tutorial on Youtube by Ryan, a partner of VirtusHub). If I were to make the move to dedicated server at some point (which I'd prefer doing in the long run as it has competitive aspects), I'd need a source-build of the engine right? Is it as easy as that to add dedicated server support, or would I need to rewrite the whole Steam integration? Maybe better to ask the person who wrote the setup 😅
Wrong Thom 😛
But yes you need a source build for building dedicated servers, whether that setup works out of the box I don't know.
hey hey, for some reason the 'visibility' of my paper sprite component is automatically replicated and I can't seem to figure out why and how to not automatically replicate it, any idea where this is set up ? ('replicate' is unchecked on my paper sprite component)
You want only the owner of the component to be able to see it?
No but I want to toggle on/off the visibility with a multicast function
and doing that with 'set visibility' on a multicast function seems to bug (visibility is sometimes incorrect), my assumption is that it's because it's somehow already automatically replicated
like I don't get why 'hidden in game' isnt replicated but 'visible' is
That's it. That's why you should use SetVisibilty
Also doing multicast for such stuff is something you want to avoid
multicast RPCs aren't good for state changes
You need to replicate your component instead for this to work iirc
Can I ask why are you doing that multicast?
I'll try thanks
Still. It's something the server is changing too, so I would make it replicated instead and change it on the server. I'm not sure if that is what causing your issue, but as I said above, this might break your game if other players are out of relevancy
multicast fires only on relevant clients
Wrong channel. Ask in #lounge
What are you doing with this?
with your timesincelastpunch info
I may not be understanding your situation very well, so correct me if I'm wrong here, but I don't think you want to handle it that way
Your punches should execute based on the punch speed, right?
So just have it play at its speed when they are replicated that a punch occurred
Rather than working to sync up exactly in real time when it happened
Alright, I think I'm getting lost here, apologies
What's the issue? You have delays on the listen server?
Gotcha
The initiation of the punch is delayed right? Not play speed or anything
Yeah
I don't know, I'm sorry, that's weird
Absolutely, I'm going to try to listen in for someone who may know the solution on this, it intrigues me
The CPU on the listen server isn't struggling is it?
Have you verified the inputs it uses on all clients and LS? Printed out the variables and times you're getting to ensure things seem as they should?
Put something else on your multicasted Punch() to confirm that the RPC is not delaying
To ensure there isn't like a "time since creation" you're relying on from the clients that's different on the server