Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi,
    Please could someone explain what dead reckoning is, and how to do it using Lacewing?

    From what I gather it is predicting what a players next movement is going to be, or something along those lines, but I am not sure.


    Thanks in advance!

  • Dead rekoning is using math to smooth out play (used for games where you are constantly moving) So instead of sending too much net data which will clogg up your connection, Use math to create splines to plot the co-ordinates of where objects are expected to go/be based on 2 or 3 time spots also taking into account your net latency (Ping)

    See this link for examples.
    Please login to see this link.

    Practice simple movement engines and then edit your send recieve to be less frequent but use the methods described in the link to overcome the lag barrier

    It's been put on the forum before.

    Regards

    Ross

    Please login to see this link.

  • ^
    ^
    ^

    My game uses a method of which smooths the X,Y positions. It does this by comparing the current position with the position received, and divides the difference into 14 different stages. So, if the X position was to be increase by 140, it would move 14 times, and each time 10 pixels. This isn't the greatest method if ping was to be 100ms+ and it was a fast paced game where speed and accuracy is essential, so you could also program the game to determine where the next point of movement might be.

    Good luck.

  • You can predict forward by the latency (if you know it) to keep the players closer in sync. If you predict forward again by the same amount of time as your blend time, you can keep the players nearly perfectly in sync. Ideally the forward prediction would take turning etc into account.

    Please login to see this picture.

  • Dead reckoning is all about predicting the PATH the player just took, and the amount of time they took to complete it. Acceleration can also come into it.

    So you could work out that if the players average ping is 100, and they are currently at (0,0) and you get a new message saying they are at (50,50), you know they have moved roughly 1 pixel every 2 milleseconds.

    Its all very interesting and complicated :)

  • If you have your movements as vectors, or think about them as such, dead reckoning just works by extrapolating your (next) position from your (current) position + vector. Two possibilities are to either feed into your reckoning (position), (velocity), and (acceleration), and even more derivations if they are relevant, jerk/jolt/etc. Another is to use verlet integration just feeding in the (current) and (previous) positions and (acceleration) to find the next timestep.

    Overall it all has the same effect. Inbetween the period when your program receives a packet containing object positions and the next such packet, the program "smooths" the movement by predicting the positions over that timeframe, then resets the positions when the packet arrives. The effect will smooth movements, but can lead to a desyncronization between server & client- on the client's side, he may see objects "jump" from place to place, when packets are interrupted or when an object is moving in an unpredictable pattern. Depending on if you handle things like projectile collisions graphically on the clientside rather than serverside, this can create the "invisible projectile syndrome" where clients might be struck by objects that they can't see, or might pass harmlessly through objects they shouldn't, or might shoot objects that don't exist, etc. When you use dead reckoning, you have to be very careful about what parts of your projectiles/players/etc collisions are handled serverside to avoid desync issues.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!