This thread is dominating my Google searches so I’ll just post in here. Lol
Is this method good for things other than pawns. What if I just want a regular actor to simulate physics smoothly across a network.
This thread is dominating my Google searches so I’ll just post in here. Lol
Is this method good for things other than pawns. What if I just want a regular actor to simulate physics smoothly across a network.
I would like to know the same thing
This would work fine. But bear in mind it’s client-authoritative, so clients *can * cheat and really there’s not a lot you can do to prevent it other than checking for legal moves on the Server.
The ultimate solution would of course be Server-Authoritative with client-side prediction/reconciliation - but that’s a whole other ball game of complexity.
Client authoritative is quite good for co-op games where it doesn’t matter if one of the players is cheating, it should be noted.
can we read a tutorial or download this project somewhere ?
If the actor is not player-controlled, you dont need movement prediction, and you can just use regular replication, I’ve found this works quite well for things like rolling balls and other shapes, where you want to simulate physics and have the position replicate
Just make sure
The focus of this thread is a situation where the player is providing input, and therefore the motion of the actor is very unpredictable and cannot be strictly server controlled since the client player wants to control their own character
Very nice to hear from you!
I posted some extensive info in the first page of this thread, when I get more time I can expand on it.
In the meantime I do offer tutoring sessions in UE4 C++ !
You can PM me to schedule
Nice that you do tutoring session for people ! but sadly not for me because i sux in english i wont communicate (france here :o)
i work only in blueprint because i am to noob and afraid of the blank page code in c++ without knowing which keyword to write :o
(do you think we can reproduce your player ocntrolled replication physics movement in blueprint only?)
and as someone said, google bring us here :rolleyes: everywhere :rolleyes:
thanks for your sharing
Massive Update! ~ Hybrid Algorithm, Multiplayer Physics Simulating Platformer Realized
Dear Community,
Using a new algorithm that is a hybrid of both input replication and interpolation, I’ve now accomplished my goal of a game based on replicating player-controlled physics-simulating characters that can also platform freely!
I can now fully support the network coding for a physics-based platformer multiplayer game!
You won’t believe it but in the video below I am testing with 200 millisecond simulated lag!
The results are that good!
I am using a completely custom pawn for this, with my own skeletal mesh component! I am not using ACharacter replication system at all.
You must forgive my extreme happiness in this video.
I’ve been trying to achieve this goal of a physics-simulating multiplayer platformer for a looong time!
Dream Fulfilled ~ Physics Multiplayer Platformer!
Dear Community,
Using my hybrid solution of input replication and interpolation,
I have finally coded the C++ network backend to support my dream game of a physics-based multiplayer platformer!
This video is filmed with 200 ms lag the entire time!
I test using an accelerating platform, it is not linear movement!
The player-controlled unit is a completely custom pawn, extending APawn, it does not use Character class or character movement replication system.
Notice in the video my system even handles the most complex replication case of when the client jumps from one moving platform to another platform while the first one is still accelerating!
Real Multiplayer Game Using Steam
Dear Community,
My C++ Dream Goal achieved, physics multiplayer platformer, this is a real game with my friend using Steam!
!
!
!
Great stuff Would love to see how this was done!
! I seen this on the ole youtube a couple days ago, I was amazed. I cannot wait to see how this evolves. , you are literally my favorite person I’ve never met.
Thanks! Again the core of my system is hybrid solution of replicating player input and also interpolating, both parts were required, and I started from scratch with just Pawn superclass, so no character class movement rep code involved.
Actually my critters dont even use a movement component, I do everything in the pawn class itself.
Both player controlled unit and proxies use the same data structure to actually process input, so it doesnt matter if the data was filled locally via input or the data was first passed over the network to that unit
“, you are literally my favorite person I’ve never met.”
Hee hee!
Thanks SaxonRah!
Lovely to hear from you!
Does epic staff or yourself plan to add this “player-controlled physics-simulating characters” into the engine so we can use your character into our game too ?
epic staff made a rolling ball example project, but when we try it in multiplayer its not working at all, i think they need your stuff to correct their rolling ball project for multiplayer!
you have no problem doing “moving platform” and having client authorative on their position ?
watching other player ball playing on a lift / movable platform will cause some issue like seeing them levitate, going through the platform, … or u found a solution ?
if you have physics pawn simulating physics locally, then your moving platform must be animated locally too ?
how to sync all this things together? so each client can see each pawn correctly standing on moving platform / not going through walls
i try to make a multiplayer rolling ball game, and all this problem are blocking me :o
Yeah that would be sweet… I’m just starting to look into this and if this not working well by default - that’s huge!
Now where’s that petition for Epic to hire again?
This stuff is pretty awesome!
I managed to implement a similar system thanks to the information you provided on the first page of this thread.
I tried to implement something like this for quite some time but it was always somewhat laggy with rubberbanding and/or desyncing players. With the concept of replicating player input and interpolating to the correct position/velocity I have smooth physics body replication now which is exactly what I need for a project.
Thanks , you totally saved me a good amount of time.
twinflyer
To be honest, I don’t think that is an acceptable solution for competitive games. The server always should be authoritive and calculate the final positions for all players.
It might work well for your game with simpler physics, but for our game with physx driven vehicles, we needed a better solution.
My approach was, to receive transform and velcocity data by the server with a timestamp, and then hack into the physics engine and replay physics from that point in the past, using the input history of the client, so it recalculates where the client now should be, when he would be at position X at time Y, with the input he did before, that is not yet processed and send back by the server.
This results in a server authoritve input-latency free solution
The only problem I see is the non-deterministic physics engine used by unreal. The physics simulation might output different results on the client and the server even with the same inputs on both machines. By checking for a maximum offset between the position calculated by the server and the position calculated by the client you could verify if the players position is plausible. If the offset is too big you could set the client to the servers location.
Tweaking this maximum offset could lead to a lag free, smooth gameplay. But in case someone cheats the server still has the final say.
twinflyer