0
\$\begingroup\$

I have been looking at the development of MMO games for a while and have got stuck up on one thing. Player Movement. If we have an area with 10 players, each player needs to be able to see the orientation and position of other players. But when players start moving I need to update the ten players locations simultaneously. If I were to use an MYSQL database it would be slow and laggy to send coordinates and get coordinates from the database everytime a player moved. What would be the professional and proper (more efficient) way of doing this?

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

You wouldn't store the positions of any currently ingame-players in a MySQL database. Databases are for data at rest, not for data in use. You would use a database to persist the state of player-characters when they go offline and retrieve it again when they come online again. Data in use (anything which is relevant for current gameplay) should be in the game-server's memory for fast access.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .