I am writing an top down 2D game like agario/diep.io and I am using spatial hashing for detecting on screen objects. However I find it is too expensive to do a spatial partition a few times a second. (I do it at an interval of 250ms) I have about 5000 objects on the map and 150 objects on screen on average at the same time. I find a post by agario developer on reddit.com which mentioned that we can do spatial partition less often by tracking the player's position and do object insertion on a specific node (using quadtree). I wonder if this can be done using spatial hashing too.