Answer the question
In order to leave comments, you need to log in
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):
Answer the question
In order to leave comments, you need to log in
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question