The thing I’m working on involves wadding a bunch or early eras of gaming into a ball and making them play well together. Up to this point, everything’s been axis-aligned bounding boxes and I’ve enjoyed the simplicity, accuracy, and performance of the SDK’s stock checkCollisions() system. But I need to add circle colliders for some stuff (heck, even Spacewar had octagonal colliders in 1962!) and I can’t trust myself not to add bitmap collisions and even unaligned bounding boxes for some really dumb reasons.
So it would seem it’s my turn to implement my own collision detection more or less from scratch, and the most I can retain from the SDK is sprite:overlappingSprites(), which buys me collision groups and a coarse detection pass using the old collision rects. Which I’ll take! Those are very nice to have!
This bothers me, though, because nearly everything in my world is still going to be axis-aligned bounding boxes anyway, and I’ll end up with a worse-performing implementation of restitution for those. There are these hints littered in the docs for sprite:collisionResponse() and sprite:alphaCollision() (not to mention bump.lua’s addResponse() for custom collision callbacks) that suggest that the existing bounding box restitution system was meant to be a bit extensible. But when I game out doing something like running checkCollisions and re-resolving all the non-AABB collisions encountered in a step, things get really gross. Smuggling side effects into sprite:collisionResponse() seems like the only way you could really get away without redoing the whole collision pass from scratch every time a non-box object got approached, but you don’t have access to enough information inside of the pending collision to make meaningful determinations there.
Is anyone actually extending moveWithCollisions() or checkCollisions() to correct fine-grained collision behavior, or am I just consigned to redoing the same old collision code from scratch but for my purposes like everybody else who gets to this point?