Re:How we built a back end system for Uber-like maps with an...
by yeukhon on Tuesday February 21, 2017 @02:08AM
(#13693863)
I 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.
Re:How we built a back end system for Uber-like maps with an...
by nojvek on Tuesday February 21, 2017 @02:17AM
(#13693903)
Why 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.
Re:How we built a back end system for Uber-like maps with an...
by Nition on Tuesday February 21, 2017 @02:31AM
(#13693969)
How 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.
Re:How we built a back end system for Uber-like maps with an...
by yeukhon on Tuesday February 21, 2017 @11:04AM
(#13696463)
How 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...
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.