QuadTree vs Spacial hashing; which to use? : r/gamedev
The subreddit covers various game development aspects, including programming, design, writing, art, game jams, postmortems, and marketing. It serves as a hub for game creators to discuss and share their insights, experiences, and expertise in the industry. I am quite new to these concepts. I am making a 2.5d tilebased game. I was wondering if one of these methods has particular advantages over the other. I have static entities that I want to check collisions against and I will also have moving entities that will be checking collisions with eachother and the static entities. I'm just not sure which if either would be better to use. Trees (whether quad or oct or etc) are particularly good when you have sparse (or highly clustered) data and large searches, since the higher levels of the tree can abort out of a test if their lower levels don't contain any objects. This means that (for example) in a broad collision test against an empty tree, you test exactly one "bucket". In a spatial hash
Explore this link on the map →