Ideas About Lag

by Simon Crewe
    |     AvP 2 by Monolith
 
How to deal with the issue of lag in online gaming [Discuss in Forums] Intro Once again, I find myself sitting in front of my computer, shouting at the screen. My heart is pounding. They’re everywhere. Leaping, snarling, clawing. Inhuman beasts, Merciless and lethal. I overcome my fear and make a dash for the weapon I can see on the floor in front of me. In it lies my only hope of survival. I Grab it and run into a small hut, adrenaline pumping. I crouch at the window and see one of the creatures standing right in my line of fire. I aim my weapon, squeeze the trigger and……. Uh? What happened? The creature is stood over my dead body clawing at my remains. Lag-killed again! I’ve been playing computer games for as long as computer games have been around. It scares me to see the copyright dates on Space Invader and Defender Coin-Ops and know that I was queuing outside the arcades when they were first unveiled. I have seen the landmark PC games as they emerged. Played them and beaten them. We return with a bump to the present, my carcass littering the floor of an AVP2 map once more. I quickly press the “Tab” key and stare jealously at the scoreboard showing some players with pings of around 80 to 100. My own ping of 560 seems to mock me. It’s telling me I either need a faster internet connection or a crystal ball if I am to stop getting splattered all over the screen by foes which I barely have chance to see, let alone defend myself against. The Thought I sit back with a cup of (now cold) coffee and begin to dream of a better world. I only have a 56k dial up ISP, and I’m stuck with it. Cable is not an option around here. I dunno what the figures are but I suspect that the majority of people still connect to the internet at 56k or lower, so, coming slowly back to the point of all this, what can we do to make playing AVP2 (and other games) better for people with slower internet connections? I am no stranger to the various AVP forums and would admit that some of the things I say have been known to cause controversy. I do try to be constructive though. I read through each and every post I write and ask myself “Does this actually add something, rather than just moaning?” Hopefully, the answer is “Yes” or, at least “Maybe” most of the time. I get really tired of reading pages and pages of moans with no ideas for solutions. I’m not a computer programmer, but I have a fair idea of what’s do-able and what’s not. The Ideas Well, the first thing I thought of doing was asking all the people with fast pings to move around more slowly to give the rest of us a chance. I kind of thought they might not play fair though, no matter how much they wanted to, so I guess I’d have to come up with something else. Looking at my scoreboard on AVP2 I can see that there are 8 people in this game all together. I can see that 3 of them have pings less than 100, 3 have pings between 100 and 300. One other unlucky sap and myself have pings higher than 300. Doing some quick sums I worked out that the average ping for this game was exactly (and conveniently) 200. Ok, now we know the average, what can we do with it? Well, the first (and most brutal) thing that I thought might be possible would be to buffer all the players with pings faster than the average (5 in this case) down to the average. At least this would decrease the advantage for the faster players. I thought about this for about 3 seconds before dismissing it as silly. The best game I have ever played online is dying on it’s feet because of lag issues, so I guess the last thing we want to do is introduce more lag deliberately, even in an attempt to even things up a little. I poured myself another cup of coffee, and had a biscuit too. A digestive, covered in plain chocolate. Where was I? Oh yeah! Baseline Ok. I think that the idea of using the average ping in a game to define a “baseline” is still valid. For example: In this game, where the average ping is 200, a player with a ping of 160 is 20% “better off” than the average. Equally, a player with a ping of 300 is 50% “worse off”. I’m deliberately leaving the better and worse ideas very broad right now. We can tighten up on what we mean later on. Ok. We need solutions. We need ways to bring equality to faster and slower players. We need to help players with slower pings and we need (I bet you all hate me already) to handicap the players with low pings. And, we need to do it all without slowing the actual game down in real time. The first way I thought of to do this is with guns. I know this is bad news for all the people playing as Aliens, cos they don’t carry guns, but maybe we can sort that out too, later on. I figure that a player with a fast ping is more likely to be able to see his opponent and start shooting at him faster than a player with a slow ping. I would like to see the damage potential of each weapon to be handicapped dependant on the player’s ping. This calculation would be done during the pause between games. Each player would be assigned a “damage constant” based on his or her own ping, compared to average. This would, at it’s simplest level mean that the player with the ping of 160 finds his bullets do 20% less damage than standard, and the player with the ping of 300 finds his bullets do 50% more damage. Ok. Ok. Don’t start shouting at the screen. None of this is set in stone. I’d like to play-test this and if it turned out that the advantage or disadvantage was too much it could be tuned to be fairer. I’m particularly worried how this would apply to Aliens, who rely on claw and tail strikes. Again, the damage their attacks cause would be multiplied depending on ping, but maybe by a different amount. You might be wondering what the whole idea of all this is, but what I’m trying to do is minimize the damage a “fast” player can cause to a “slow” player in that half second or so advantage he has, and also compensate the “slow” player for the half second of return fire that he loses. Lag Compensation Ideally, I’d build a “compensation” slider bar into the server menu screen so if you wanted a game with no compensation for ping you’d slide this down to zero, or you could set a percentage of compensation. Don’t forget, too, that this calculation is totally transparent to the game in that if you are playing on a server where everyone has super-whizzy pings then the average is going to be low and each ping will be close to the average so the compensation will be minimal. Also, to reiterate. There would be no in-game calculations taking place, to slow things down. A +/- percentage constant would be applied to each player during the gap between games. The only exception might be if a new player joined, in which case the server would have to calculate his handicap mid-game. I really think we’re getting somewhere. Maybe there’s more though. A player with a faster ping is better able to track someone through the map. He should be able to aim his gun at a moving target more easily than a player with a slow ping, who sees the opposition warping and skipping around the screen. How can we use our “compensation effect” to assist with this? Well, you won’t be surprised to hear I have a plan. And the bugs out there’ll really love this one. Lets zoom in on a single bullet (Matrix style, in moody slow motion) as it hurtles across the screen. We see it fired from the gun of a player with a fast ping. It’s flying through the polygonal space of our map, straight at a poor unfortunate Alien (with a slow ping) who won’t even know it’s been fired for another half a second. If the bug dodges this bullet it will be because of something actually did before our bullet was fired. Are you confused yet? I certainly am. Well, there’s not much we can do to help things out in that situation, so I guess that becomes our worst case scenario. Looking at the same scene in reverse: We have a player with a slow ping firing a bullet at a player with a fast ping. Mr. Fast-Ping has already traveled half a second through time and space before Mr. Slow-Ping even pulls the trigger. What I’m proposing for this idea is that we take the bullet as it travels through space and draw an invisible sphere around it. The size of the sphere would be dependent on the players Compensation Constant. Basically, any player with a fast ping and a negative Compensation Constant gets no invisible sphere at all. A player with a small positive Compensation Constant gets a sphere the size of, ooh…lets say a football, around his bullet. A player with a big Compensation Constant gets an invisible beach ball wrapped around his bullet. Ok, I propose that as our bullet, complete with it’s invisible sphere is flying through space, anything moving that gets in the area of the sphere counts as a hit. Now, the bit that bugs’ll like: This applies to them too. I get really hacked off, playing as a Bug, when I sneak up on a guy and claw or head-bite him, then I hear BANG! And somehow he’s now standing 10ft in front of me, shooting at me. With this system, the bug’s sharp pointy bits (Claws, tongue and tail) would also grow an appropriately sized, invisible “sphere of influence”. That way, when a bug with a slow ping creeps up on a marine with a fast ping, hopefully his claws or tails “sphere of influence” would still reach into any distance that the marine managed to put between the bug and himself in the half second advantage he has. I know this would help on occasions where you are trying to chase a marine around a map and he’s changing direction, which Mr. Slow-Ping doesn’t see until half a second later. In-game adjustment Ok, I know this one is more complicated, and harder to explain. It would also need tuning like crazy to work well. I also have a feeling that you would have to take into account the speed that the target is moving etc, but I’m sure it’s do-able. Yes, this one would require in-game calculations for every bullet fired, which might be a problem, but there’s only one way to prove it. To me, that is. Ok, there are some items of hardware which can’t be covered by what I’ve talked about so far. I’m thinking of the “One-Shot Kill” weapons in the game. The Sniper rifle, the Disk, the SADAR and the spearguns are the ones I’m thinking of. You can’t really reduce the power of the shot, as we did for the other weapons, without stopping these from actually being a “One-shot Kill” weapon. My solution to this problem would be simply to slow down the projectiles fired by these weapons based on our Compensation Constant. I guess if Mr. Slow-Ping throws a disk, or fires a rocket at Mr. Fast-Ping, there’s no way to hurry it through time and space in order to compensate for the delay, but When Mr. Fast-Ping shoots a rocket or Disk back at Mr. Slow-Ping I’m sure it’s velocity could be slowed down so he, at least, sees, and hears, the shot before it kills him. Ok. I’m sure that there are players with fast pings jumping up and down, tearing their hair out, screaming at me for coming up with all these advantages for players with slow, hick, internet connections. Well, to you I say: If you ever notice that a player with a slow ping seems to have an advantage, then my ideas haven’t been implemented correctly. I would want this to be COMPLETELY transparent. All I am trying to think of are ideas that will stop whatever happens in the half second between a slow and fast ping from causing a difference in the game. Testing the theory Three tests I would like to try, in order to prove all this: First I want a big room, with lots of PCs. Junk food and beer (for the over 18s). I’d want to set up a LAN game with 20 players of varying skill. I’d let them play until patterns were established. Boffins would discover who is the best, worst, fastest, slowest, how many shot were fired, kills, ratios for kill against shots etc. Lots and lots of statistics. Now I wanna unhook all the network cards. I want to connect 5 of the PCs to 56k modems, and then into the phone line. I wanna connect another 5 PCs to ISDN lines. I wanna connect the rest of the PC’s to Broadband and ASDL lines. I’d then sit the players back down, with AVP2 as it is now, and see what happens. We’d rotate the players around the different PC’s and rate their performance on each type of connection. I’d be willing to bet that a few of the more godlike players would be very upset about what happens when they are faced with the prospect of doing battle over a 56k connection. Next we’d load up my new improved version of the game and everybody would play it, secure in the knowledge that once again, all was right in the world. In the background, our boffins would look closely at the statistics appearing for this new match, and hopefully find that the same trends appear as occured during the LAN game, thus proving that the changes cause just the right amount of compensation for poor internet connection, but no actual advantage. So, could it work, or what? Cheers. Hissing Sid [Discuss in Forums]

All copyrights and trademarks belong to their respective owners. This site is for the promotion of selected material, no infringements are intended. All reasonable efforts have been taken to credit the respective owners and/or authors.

AbsoluteGamerzNetwork