How do online video games work?

63 viewsOtherTechnology

I know how building a solo game works, with models and interactions coded, but how are games made so that those interactions happen on many players screens with just tens of milliseconds of difference. Is it code or is it putting your game files (models + code + whatever else I am missing) on a server that can be accesed by peoples devices?

In: Technology

7 Answers

Anonymous 0 Comments

For slow games (turn-based or whatever) you can just run everything on a server and let the computers of the players know what happened as result of their actions. For faster games that doesn’t work. There the game runs both on the server and the computers of the players. Your local version will try to predict what happens as result of your input (e.g. you jump if you hit the jump key), and later check with the server if that was the right result. Usually that will agree with what your local game made. If not (let’s say another player prevented you from jumping in some way), you might suddenly find yourself at a different location in the world.

You are viewing 1 out of 7 answers, click here to view all answers.