Optimization and new spawning method

Optimization and new spawning method which counts the near by entities
instead of basing limit on the number of entities in the whole map