N
N
Nikolay Marinkin2017-02-19 02:38:17
Database
Nikolay Marinkin, 2017-02-19 02:38:17

What, free, spatial database to choose for MMOG?

In the process of building the backend of the architecture of an MMO toy, the question arose of working with 3D objects and the space of the game world (I write all the logic of the game on the server side) ...
For example, one of the tasks:
Given a three-dimensional coordinate system (game world) on which points are scattered in random coordinates (characters). We need to implement chat. A message sent by one character must be sent to all other characters within a certain radius from the sender.
Right now I'm using Elixir as my programming language and PostgreSQL as my main database.
You can always, of course, reinvent the wheel... but surely there must already be wonderful tools for these tasks? I know that PostGIS exists, but something tells me that it will slow down with a large amount of frequently changed data (moving characters).
As the main criteria, I consider (in order of priority, from the most important):

  1. Scalability and replication. Preferably out of the box.
  2. performance. The data will change very often and quickly.

Who can faced similar tasks? How did you solve them and what did you use to solve them? Which database was used for long-term data storage, and which one was used for real-time work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2017-02-19
@xmoonlight

Just loop through the distance by the coordinates of the centers of the characters or get them by sampling from the operational data.
Another option is a system of triggers for the interaction of players' spherical colliders.
That is, the intersection and clipping of other colliders of players with the collider of the current player - the addition or removal from the array of the current player of other closest ones in the radius specified by the collider (all must have the same radius in this situation) is triggered. Distance The maximum distance between players is 2 spherical collider radii.
When you need to send a message, all the necessary data is already in the array: to whom to send.
Base - needed in RAM: Redis.

S
sim3x, 2017-02-19
@sim3x

Take postgis - until you reach the values, when it slows down you will have money for iron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question