Use a small Box interface instead of a full Thing for collision detection #190
Labels
difficult
This is a hard issue. You'll want to get a few smaller ones done before trying it.
status: accepting prs
Go ahead and send a pull request to resolve this issue!
type: cleanup
Improving code architecture and/or cleanliness.
Packages that deal with the physics engine (i.e. QuadsKeepr and ThingHittr) take in full
IThing
s and look at direct members such as.left
. It'd be better to move space-related things in theIThing
interface to a member, likebox: IBox
. At its simplest it would probably look something like:This might be dependent on #189 so that the box doesn't require offsets (so that things just barely not touching each other's quadrants can still collision detect).
Open question: should this box contain
xvel
andyvel
? If so, is "box" the right term? As with Thing->Actor, what does everyone else call this thing?The text was updated successfully, but these errors were encountered: