3 ms·
I might be wrong but I think you're sort of confusing the way game multiplayer works for the local player, and for the other players they see. If we're talking
by Nition 10y ago
I might be wrong but I think you're sort of confusing the way game multiplayer works for the local player, and for the other players they see.
If we're talking FPS games:
The local player is moved instantly based on their local inputs, and the server will also move them using the same rules. The local player will be corrected in any case where they don't match.
For other players that the local player sees, extrapolation in twitchy multiplayer games like FPSs is notoriously bad as the players are so hard to predict, so usually you have them running e.g. 100ms behind so you can (hopefully, depending on latency) interpolate between two data points from the server instead of trying to guess the future at all. So you still have the "behind real time" problem. The only reason the local player can avoid that is they have the benefit of local inputs. In an Uber sense they are the car.
Obviously that's a problem in games too, because now the player is shooting someone who's behind where they are on the server, so they miss. Latency Compensation fixes that - having the server rewind time to see what the client would have seen. But that won't help the cars-on-a-map problem.
Having said all that, I do agree with your point. Taking a couple of old data points and extrapolating from there should work pretty well for the cars problem. You'll see them snap back when they stop at intersections though.
- yeukhon 10y agoI find programming games in general, esp FPS, fascinating because their real time requirement is so critical big lag in request/response, dealing with hotspot in code.
- nojvek 10y agoWhy can't the driver phone be connected to rider via peer to peer. Driver sends position updates to rider in almost real time while occasional batch updates to server. The fanciness regarding position, why not show a halo like most gps apps showing degree of accuracy? You could all show a slight tail of previous path to give an idea of direction and speed. I think the current uber/lyft ui experience is subpar and can be improved.
- Nition 10y agoHow about the opposite: Show the car with a nice interpolation using the last two positions, but with an extrapolation arrow with the point located where you think it is now. Then when the system thinks the car is moving fast and it actually comes to a quick stop, it can cut down the extrapolation arrow instead of moving the car icon backwards, and it shouldn't look as weird.
- yeukhon 10y agoHow do you do P2P? There needs to be an intermediate. You can't just ask the rider to open up some port. They need to subscribe to a channel they both can communicate over, so we are back to the server owned by Uber / Lyft. But I don't think this matters to end-users. As a frequent user, I only care whether the car will arrive on time and whether it is on the opposite side of where I am waiting...
- nojvek 10y agoServer can be initial handshake initiator and then p2p can take over. Webrtc already does this.