Defining Awesome — New network test
  • Status Updates

  • New network test

    Written by . Posted at 11:57 am on August 13th, 2010

    Death to the nonbelievers! Finally I can drink a beer for my efforts!

    This is a video showing the new netcode. First I run it without any lag just to show how it works “perfect”. Then I run Quality of Service, a program that simulates a real internet network, to simulate a 400-500ms ping and 25% out-of-order (dropped) packets. This is an environment nobody should attempt playing. Watch the video to see how it works.

    For the whole week I was attempting to make a very precise algorithm to deal with smoothness. It worked on paper but not in the game. The animations and movement were very choppy. Finally I made a heuristic-like approach. It seems an approximation is always better than the real thing. This seems to correspond with Carmack’s experiences ( Although I use a completely different algorithm than in any FPS game. I update the players only based on the key strokes and mouse controls. A full update based on the servers data is made only if the position or other important variables change “significantly”. The measure of this significance is a matter of a good guess. This method “just works” as you see on the video. The errors appear because of packet loss. But they are very quickly fixed and the game can continue.

    The netcode is still not complete. There is a lot I have to do in terms of syncing game objects, weapons, bullets etc. I will be doing this in the following week.

    Be Sociable, Share!


    1. Awesome!

    2. Underline

      Really nice! it is working smooth!!

    3. (hail odin) and odin helped you.

      nice job! :)

    4. Very well done. I’d love to see how well it works with hit detection. I hope it doesn’t end up like in Soldat.

    5. always nice to see something shaping up like this.

    6. Death to nonbelievers indeed. :)

    7. It would be impossible to hit that soldier. I know a 400ms ping is high.

      But isn’t the only reason soldat’s hit detection is so bad because a soldier can move about once his own height and 4 times his width in 150 ms?

      Another question: Are you able to make a 400ms lag look like a 300ms lag with a good netcode or are you able to decrease the lag to 300ms with a good netcode. How could you possibly decrease the effects of lag? Movement prediction? Wouldn’t that make a nice ‘worm-evasion’ bug?

    8. LadyLoe: yes that’s why soldat netcode is hard cause it’s very fast. High lag is not a problem in itself, lag spikes and varyiness is the problem. If it varies from 300-400 it will be very hard to predict were the player is.

      2nd question: I can make it look like 0ms. Look at the server screen, if I didn’t tell you what the lag is and you wouldn’t see the client screen you would not know where the player really is.

    9. Hey MM, congrats! Glad to see all of this amazing work, especially with something as complex as networking code.

      Keep rocking the world, get us a demo soon!

    10. nice ๐Ÿ˜‰ really

    11. Oh yes, a Demo or a Beta version would be awesome!
      But do not rush, just take the time you need, we can wait for the best game ๐Ÿ˜‰

    12. O_o….looks fine to me. I see what you may be trying to fix though. But in all honestly, most great games have the same ‘choppy animation from lag’ thing too. Your progress looks awesome keep going =D

    13. Blacksheepboy


    Post a comment.