Jump to content

Clientside Simulated Physics


Guest Lamebot

Recommended Posts

Just wondering if blue might have it, this is what makes commercial games like UT have Multiplayer look smooth, whereas in MTA other players and cars don't smoothly tween from place to place.

The server still controls everything, but the client recieves some extra info on objects (Player Direction and Velocity, Current Model Animation, etc) so that it can extrapolate from this for smoother looking netplay.

I think this is also called Clientside Prediction.

Edited by Guest
Link to comment

the physics were always acting between packet updates since MTAVC 0.1, the jerkiness you see is actually caused by many different factors..

in BlUE the cars are much smoother, but this prediction you speak of has been there since the beginning.

the players movements is a little bit different, most other games will allow you to animate an actor without moving it , in VC any animations force movement... this can cause jerkiness if the animations are not 100% synced.. even with implementing interpolation between packets (which we have tried in testing)..

We are working on both of these in BLUE and vehicles particularly are looking very nice.. Players are coming along to and we will get them as smooth as teh cars if we are able to.

Kent

Link to comment

yes, I actualy did notice this implementation before, I was watching a car infront of me drive (with a high ping) and the car would ram into a wall, repair, move a bit, and ram again, because every two seconds its position was updated, but since it was in a turn it would go straight into the walls.

another time was when a dodo was driving down the main portland water-front road, and i blew it up yet it respawned and kept driving, because I blew it up while it wasnt being synced, even tho it kept moving

Link to comment
another time was when a dodo was driving down the main portland water-front road, and i blew it up yet it respawned and kept driving, because I blew it up while it wasnt being synced, even tho it kept moving

Gtatari is right, there are numerous accasions where I have shot a vehicle until it came on fire. Then you stand there waiting for the player to jump out, but sometimes the vehicle blows up and a new one appears. Then you have to go blow it up once more :P

This happens in GTA III mostly I think.

edit: and of course the vehicle isn't repairing itself, just a bit out of synch.

Link to comment

the reason why cars blow up and re-appear is because of this situation:

player 1 is shooting a moving vehicle, driven by player 2

player 2's vehicle is always moving ahead than what player 1 is seeing because its not in sync, lag, ping creates this, is player 1 ping is 50, player 2 ping is 75, there is a 125ms difference, player 1 is viewing player 2 125ms before where it actually stands

player 1 is shooting the vehicle, but on the screen of player 2, he is 125ms ahead, he sees the bullets flying behind him because hes ahead, on player 1's screen the car is on fire and blows up, player 2 however is still driving because bullets missed him, and are flying behind him

vehicle blows up, mta updates his position, re-creates the vehicle and player 1 realizes the car didnt really blow up

its all in sync, lag creates this problem

Link to comment
I think this is also called Clientside Prediction.

It is client-side prediction. An extension of this (which I believe all recent online games use) is server-side extrapolation, i.e. the server knows the current ping of the client very accurately, and when it receives an update, it forecasts the actual current position of the player from position, velocity and current acceleration. This forecasted value is sent to the clients rather than the actual received position.

Obviously, this isn't very useful if the server isn't aware of the physics and layout of the game (afaik, MTA servers are 'dumb', so they can't do this yet. Maybe never?). It also relies on an accurate (ping-aware) clock-sync between all clients and the server. Is this in place with MTA?

I think these techniques are what make other online games playable even with pings ~200, whereas MTA tends to be too warpy at any higher than ~50.

Link to comment

yes people's fps clearly have some effect on the lag, sometimes there are players with fine pings that "warp" around on the screen. This is rather caused by low fps than a bad internet connection. To make the game as smooth for myself and others I use a low res. :)

Link to comment
That is a patently innacurate statement, gameplay is smooth both local and remote with pings up to 150-200

:P - pull me up on the one thing in my post you don't agree with...

I was just trying to say that I don't notice lag in other online games until pings go above ~200, whereas I find the lag quite obvious in MTA when it gets above ~50 (though admittedly, not unplayably so). Just my opinion, and I guess it could be due to lots of other people having low fps.

Not trying to bash the devs - you've all done a fantastic job getting it to work at all, let alone as stable and as fast as it is. Just observing the difference prediction/extrapolation seems to have.

Link to comment
another time was when a dodo was driving down the main portland water-front road, and i blew it up yet it respawned and kept driving, because I blew it up while it wasnt being synced, even tho it kept moving

Gtatari is right, there are numerous accasions where I have shot a vehicle until it came on fire. Then you stand there waiting for the player to jump out, but sometimes the vehicle blows up and a new one appears. Then you have to go blow it up once more :P

This happens in GTA III mostly I think.

edit: and of course the vehicle isn't repairing itself, just a bit out of synch.

exacty. and yes I've noticed it in GTA3, as I prefer GTA3 to vice city so I play that more often.

its interesting to note that that the burnt hull of the car remains as well as the healthy car (after the lag ridden car blows, and a new one (updated) spawns in its place)

clearly this must mean that GTA3 treats the black car bodies as objects rather than vehicles with no drivability

Link to comment

I think its random if the black shell of the car remains, as this happens rarely when blowing up the car. I know this of a test I was doing in GTA III once. First off I collected a lot of cars on the beach, then I intended to make a bridge in the sea of this floating "black shells." (Which you can stand on in the sea :P) anyways the problem was that some cars left a black skeleton if you like, yet some didn't. So I ditched the test, too bad it didn't work.

Link to comment

The shell is just a dummy, one we make use of in the vehicle respawn method in gta3mta 0.4.1, your actual vehicle is never destroyed. Hence the visible panel damage carrying over. We are using a new method similar to the one used in mta:vc for the next release however.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...