1
vote
1answer
146 views

Is it more efficient to store my tile grid as a dictionary or an array?

I've just started making a video game in AS3, and I'm trying to keep the graphics, sound, and actual game state in three completely different spots and sets of classes. That being the case, the ...
1
vote
2answers
237 views

How to track and find entities within radius in realtime game?

What is best approach to implement tracking in real time for, say, 1000 npcs? Every frame update simple a square grid (remove or insert into linked list) and every time check in square radius? I tried ...
11
votes
4answers
2k views

How to continuously find all entities within a radius efficiently?

I have a very large number of entities (units). On each step, each unit needs to know the positions of all units near it (distance is less then given constant R). All units move continuously. This is ...