DevBlog: Combat Basics II
Online Gaming in General
Networked games are pretty common place now a days, if not moreso than offline games, and Dark Nexus Arena is definitely an online game! But how do online games really work? When playing an online game, certain features like AI, special effects, and even simply moving your character around become way more involved. When you press a button on your controller or keyboard in an online game, this action first has to travel across the network to the host computer, the host computer then calculates what should occur, and sends the result back over the network to you, and all the other player's playing the game with you!
Marco ... Polo!
Network games are at the mercy of ping, or lag. Your ping is the amount of time it takes for a message to travel from your computer, to our server, and back again to you. Your latency, is always half your ping, that is, how long it takes for the server to be aware of your action. The quickest human reaction time for visual stimulus is roughly 0.25 seconds! So if you're gaming with a ping under 200 milliseconds, that's still faster than the average reaction time, you might notice a few strange hiccups but in most cases you may never notice.
Consider the following: Player A is playing his shooter game with a ping of 50 milliseconds, while his opponent is playing the game with a realy bad connection, his ping is over 500 milliseconds. If player A were to react and shoot, Player B is at a huge disadvantage because Player A's shoot message would hit the server way before player B has a chance to react.
Player B might have lost the game before he even knows it. This is because when player A shoots, his message arrives at the server in 25 milliseconds, but player B won't see this occur for 275 milliseconds( which is his latency, plus player A’s latency).
Hey! I Totally Hit That Guy!
So all this lag and ping can make for a pretty unfun experience, but thankfully science and math are here to bail us out. We can compensate for the lag by using information that we know to give you a smoother gaming experience. We know where you were standing when you fired your weapon, and we also know how fast that projectile moves, and where it can end up in its entire lifetime, and we also know your ping! So using this information, Dark Nexus Arena will immediately spawn a projectile from your weapon, and the message is simultaneously sent to the server, who calculates where the bullet should end up, and interpolates the bullet on your computer to the right spot.
This means you get instant feedback when you fire, and the server and your game compensate for any level of latency you have and corrects the projectile as it travels, giving you better information as to whats happening.
In Conclusion
We designed the netcode for Dark Nexus Arena to provide a fast paced gaming experience for all of our fans. We wanted to ensure that the experience for our players is the best it can be, and that games came down to a test of skill, not network connections!

















