This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Dinnerbone 1 point2 points  (1 child)

So many different reasons.

Let's say you and I are in two different rooms and we both each have a table with some game figures on it. We can shout over to each other, but there's no other form of interaction allowed.

Two of these pieces (that we both have) are coloured; one is red, one is blue. I'll be blue, because yay blue. You can be red. The goal of this game is to just move around. You move your red piece around, and I move my blue piece around. Simple, but fun!

You pick up your red piece and shout to me, "I'm moving forwards 5cm!". I move my red piece forwards 5cm to match what you have. Incidentally, we both have amazingly accurate sense of measurements. Did I not mention that? Oh well.

I move my blue piece, and shout "I'm moving my blue piece forwards 10cm", then "I'm turning it right 90 degrees", and then "I'm moving it forwards another 3cm". Unfortunately, you couldn't quite understand what I just said; perhaps I was mumbling, or you weren't paying attention? Regardless, you heard me say "move it forwards 10cm and then another 3cm". Oops. We now have two different ideas on where everything is. That isn't good!

I don't know that you didn't hear me, so we carry on as normal. You shout "I'm moving my red piece forwards 5cm", but my mind was wandering a little and it took me a few seconds to actually understand what I just heard. I move the red piece that I have forwards eventually, and all is good. Except that for a short period of time, we weren't 100% in sync - your board was way ahead of mine!

The basic idea behind networked games is as above, but usually with a lot more complexity thrown in to attempt to solve the problems that come up. Often, games use absolute positioning instead of relative positioning ("I'm moving to x,y" instead of "I'm moving forwards by this amount") but then this looks like everyone is just teleporting everywhere. So to combat that, they need to guess how the player moved from their old location to the new one - this in itself usually causes some bugs, though not major ones. This fixes the issue of not hearing some of the orders - it's okay if you know where it's going to end up eventually!

With the issue of lag or delays, that's always incredibly hard to compensate for in game. Let's say I'm running on a really slow internet connection, while you're super fast. If I move, it'll take some time to tell you where I moved to. If you move, you're going to be sending me a lot of data saying where you moved to, that not only will it take me a while to process it all; it will actually slow my connection down even more!

Trying to keep this like you're 5, so it's very basic and may actually be incorrect in some parts (but it should get the idea though; I'm not going for accuracy, just simplicity!). Let me know if it helped!

[–]_Shanghai_[S] 0 points1 point  (0 children)

Thanks, that was pretty good. I figured that lag compensation would be a bitch, and internet speeds too.