Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Defeating lag

Sign in to follow this  


My day job involves writing the multiplayer code for a XBox 360 shoot-em-up game over Live.

My biggest hassle revolves around having to deal with Lag.

Now, normally we can tailor the multiplayer side of a game around the fact that it will be played on a network with some bad lag. This might involve lowering the number of actors or applying some special rules to help get around some of the technical issues we encounter - all aimed to giving the player a smooth ride.

However, by a sheer accident a single sentence was left in the design doc that committed us to implementing full co-operative single player levels over live - and to make matters worse our publisher announced this at a trade show and on television.

So, rather than go find the nearest oven and stick my head on gas mark 7 I rose to the challenge. Now all I have to do is come up with a method of coping with hundreds of actors on the screen at the same time with 2 players running around shooting them.

How do we keep all those actors in sync? Well, for the most part we can rely on events happening on both sides to produce the same results on both sides as long as no random values are used - or if they are used it is the same random value. Another method I will be using is deferred actions.

A deffered action in our case is the server saying to the client 'in 3 seconds I am going to launch a new beastie - you do the same'. If the server/client handshake has sucessfully negotiated what the lag time is then both sides should launch the beastie at the same time.

All I have to cope with now is actors tracking the players and players shooting actors.

It's all fun at the end of the day...
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!