What is the database technique for video games similar to pokemon go?

What is the database technique for video games similar to pokemon go?

To begin I’ve to say that I’ve not performed pokemon go, and I’m truly not attempting to copy one. However it’s one of the simplest ways for example my query.

I’ve the concept within the recreation there are pokemons located everywhere in the world. So I suppose there should be a central database of those objects to which the gamers join and show those which might be shut to 1 location.

Even if the database is native, there should be a database with information concerning the location (and different information) of those objects.

What is the algorithmic technique to question the DB and show these pokemons?

I’m imaging that the best could be to question an inventory of all pockemons after which in your program show solely those which might be under a threshold by way of distance to the participant. However this appears very expensive!

Or if this situation is put on the question (is that even doable), can this cut back the price in efficiency to this system?

Or is there one other technique on methods to merely select what (pockemons) to show and what not?

EDIT: Thanks to Clive’s suggestion I discovered this text and in there you’ll be able to see the next code for finding the closes workplace to the person (in our case it might be the closest pokemon)

var Offices = GetMyOfficeList();
    for(int i = zero; i x.Distance).Take(1).Single();

As you’ll be able to see the creator is iterating by all the objects, discovering a distance after which utilizing LINQ to pick out the closest.
Is this advisable? Isn’t this too costly computationally?

See on Reddit

Leave a Reply