For detecting collisions between sprites, I know a 2D spatial hash is a way to optimize the number of collision checks that need to happen. But is there a way to optimize even further for objects that we know won't be moving in the scene? My sensibilities tell me that there should be because:
- We know exactly where the object is at all times.
- (At least in my game) there are bound to be a lot of floor/wall/ceiling tiles, far more than would be efficient to include in the spatial hash.
So, is there a way to optimize collision detection for this use case?