Online gaming

Started by
4 comments, last by brechtjah 15 years, 10 months ago
Hi I was just wondering, like all types of online games, do they get your x,y,z position then send it to a database update it so that other computers can download that information and view the other player on their computer? How does it work? Like if I'm moving towards you in an online game does it store my position every somewhat miliseconds and your computer downloads that information and renders me?
Advertisement
That really depends entirely on the game. Some games, like FPSs, need a high frequency update of positions. Other games, like RPGs, are primarily statistics-based and you actual visible position is updated less frequently. Client side predictions and the like also factor in to smooth out the movement.

In client/server games the client generally only sends the input from the player (not the new positions) because the client is exploitable and should not be trusted. The server will generally process the input, update the positions, and send that position back to the client so the client knows where to draw everything.

You have the basic gist of things more or less on target, but the details vary widely and are highly sensitive to the nature of the game.
The biggest problem with online games is coping with lag. It takes time for information to be sent from one computer to another.

There are various ways to combat this, but it's a very big field, and a big problem.

To try to answer your questions simplistically, there are two main methods of communication. Client-server or peer-to-peer. Which works best will depend on a lot of factors, such as data size, number of players, server architecture and so on.
So, a database is really the only/>best< way to go?
Not the only way or the best way. It all depends on your game.

e.g. a simple two player version of pong would certainly not need a database, wheres a WOW wannabe would almost certainly use one.
Quote:Original post by OldProgie2
Not the only way or the best way. It all depends on your game.

e.g. a simple two player version of pong would certainly not need a database, wheres a WOW wannabe would almost certainly use one.


It's really a online game with much players so I'll have to go for the database, ok thanks for all the replies!

This topic is closed to new replies.

Advertisement