• Content count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About lyleunderwood

  • Rank
  1. 2D Networked Physics Simulation

    Thanks. Is detecting desync ever accomplished using some kind of [url=""]locality-sensitive hashing[/url]? My concern is that if I'm using a physics engine like box2d then there's no guarantee that the two simulations will have strongly similar results even given the exact same beginning state and inputs. The more I think about this problem the more incredibly complicated it becomes. Also, what the hell happened to
  2. losin hair? grow a beard! #tips
  3. I've put together a simple simulation of a chess board with 2D physics. Really simple, just top-down colliding squares. Right now all of the simulation is on the server. This actually works surprisingly well with little chop, but of course there is significant latency. I want to also run the simulation on each client, but the more I think about it the more complicated this gets. 1. The position of each piece needs to eventually end up synced. 2. If a piece is being moved by a player, it can collide with a piece, which can collide with another piece which can collide with a fourth piece which is being moved by another player. One common solution is to only send manipulation events to the server. Get the changes made to a piece by direct interaction from the player and send positional information about it. The problem is that if I let the server just apply those changes then the likelihood that other pieces which were collided during the course of the manipulated pieces movement would closely sync with the client simulation is very low. This would break #1 above. So let's say I can get a list of all "awake" bodies. In this case that would be any pieces that are being affected directly or indirectly from input by the player. I would then send updates for each of those bodies to the server. The problem with this arises when two players are both indirectly affecting the same piece, as in #2 above. It's possible to receive two distinctly different updates for one piece. Maybe I could average the updates together in some way? But this would lose accuracy and I feel like there would be a lot of fighting between the client and server simulations. The ideal is to have client prediction and have a configurable small amount of latency. I just can't see how it could be accomplished in this case. Is anybody else working on this? Suggestions? Is this impossible to do well? Thanks.
  4. wow, fark the american academy of pediatrics.