This is much needed for car games that require any type of proper interaction. I’ve worked a lot with demolishion derby gameplay in Car Crushers 2’s derby mode, and really the lack of this is the only big limitation to making the gameplay work and feel as good as most of the players want it to be.
It sucks to commonly get complaints from players who avoided attacks/didn’t get hit by an enemy vehicle but still took damage, and not being able to do anything about it except explain that I can’t provide a good fix for it on roblox.
I wondered if you’ve gotten any further with this?
I see a member of Developer Relations has seen this post but there still haven’t been any follow-ups after that. This problem is a big issue with my game and I think what you’re proposing is a really good way to solve it.
Nah, good luck ever seeing them getting around to dealing with this.
The answer for years has been more or less that developers need to take a crack at creating a system like this for themselves.
RunService.Heartbeat:Connect(function()
for _, Car in workspace.Cars:GetChildren() do
if Car.NewPosition.Value ~= Car.PrimaryPart.Position then
local PlayerPing = Car.Player.Value:GetNetworkPing() + LocalPlayer:GetNetworkPing()
Car:PivotTo(Car:GetPivot() + (Car.PrimaryPart.AssemblyLinearVelocity * PlayerPing))
Car.NewPosition = Car.PrimaryPart.Position
end
end
end)
(basically pseudocode, I know it won’t work because :GetNetworkPing doesn’t function for other clients - only local player, but if you set everything up then what was described should happen, players should be moved forward by their velocity and ping to be more representative of where they are on their screen).
That’s unfortunate, racing games especially need something like this because I’ve just created race positions for my game. I calculate them on the server because if it was calculated on the client people would be confused when it says their first but they finish in second or third. But because it’s calculated on the server, it could be telling them they’re in second when it looks like they’re in first, I’ll try creating my own system but I’m not really good with this kind of stuff. (physics)
Also, @Judgy_Oreo I looked at your code for an example of how to do it and I found this post which lets you see everyone’s pings from the server. I was wondering if I’d need to change anything else or if it would pretty much work with just changing the bit where you check people’s pings?
Edit: I just realised that we need to see others players’ pings from every client separately, I could send everyone’s pings through a remote event though…
Hey there, another developer here struggling with the same issue on collisions in racing games. The way it is now, it is impossible to create a realistic car racing game on Roblox. Collisions without vision lag is necessary to provide an immersive experience.
I wonder if this was a problem pre-PGS… Probably.
It’s interesting that this has not been addressed yet in the physics system. Currently, the only solution is to set the network ownership to the server, but input lag will make the gameplay horrible.
Well I don’t see why you can’t account for each of the player’s ping now that workspace:GetServerTimeNow is available. :
Meaning you would have to move the players who are a bit behind the certain intervals accounting how far the difference is between their time and server’s time.
At this point, it’s down to the developer to develop some form of system to “fix” this. That said, it’s an uphill battle.
You’d be better off supporting my other thread, here. Staff responded pointing out that UDP is already how the physics are ran, so forget that part, but there is still currently no good way to get ping in real time to propogate to the clients & make adjustments to where cars should be.
You’re on a right track & I took a stab at it using your code idea with some extra additives to make your psuedocode into proper code.
When reviewing the footage, I measured the difference between me reaching the line and them reaching the line, I got about 6 frames [60 fps]. That’s about .1 of a second but the margin of victory was recorded at about 1/3 of that.
So still not perfect, but it’s closer one could suppose. My thing is, I’m still just not so certain one can get a reliable enough ping of all players, to be readable locally, to output accurate results.
Reviving this topic here…
i dont know how but the guys at Avenue Vance Empire claim that they successfully solved this issue and could do real time collision physics on A-Chassis, no lag at all on their pre release ION Apex Racing, i wanted to know how they did that and if its really true, because the beta game costs 500 robux and i dont have the money to buy the game to test
I’ve seen it in the videos and I can hazard a guess at how it’s done but it still has some drawbacks considering this isn’t actually great ways to obtain ping still. (GetPing is still not a perfect function for this use case)
Something I noticed with this lag is that the physics system seems to “tween” the last seen position of the vehicle (sent by that driver’s client) to the next seen position, which when owned by the network of the player can cause the car to suddenly stop if not having a stable connection with the client, or if the server cannot handle too much physics items.
A built in system for predictive physics would be very beneficial for competitive racing, especially those with collisions and destruction physics. George in the forum explains very well how said predicting system would work, and I think it would be quite effective for vehicles, but will present some rubber-banding issues.
However, I noticed a phenomenon when dealing with this; The velocity of the car would still be present, and you could touch the car with an object, and that object would inherit the velocity. I believe that the physics system should allow an option for a client to simulate another client’s vehicle’s movement, without affecting the other player’s gameplay. This should at the least prevent sudden stopping, but will make turning rubber band as presented above.
Another change that might be beneficial for game development would be open-source systems. While this may be proprietary information ROBLOX would want to keep, it will also allow developers to further expand the capabilities of their said system, pushing it to bounds not seen before. But that’s a topic for another forum.
I don’t think there will ever be a solution for server-client connection delay, nor will predictive physics, but I think rendering physics for clients (Without effecting eachother) similarly to a peer-to-peer connection, paired together with server detected inputs will make collisions sync a lot better and make physics-dependant games a lot more fun in general.
Hopefully the future’s hardware and software will allow us to make a better solution to this problem that plagues competitive games, but for now a solution like this would be a great addition for the ROBLOX engine.
Here’s a newer thread, about more or less the same thing.
You’d be able to achieve “predictive” pathing with this. The issue is this isn’t a one size fits all thing and I imagine the current issue is due to interpolation rather than extrapolation for physics.
If you want to do it in-engine as of today, you’d need to make your own custom physics simulation, like Chickynoid.