RevEng Posted May 19, 2018 Share Posted May 19, 2018 I've noticed a few people struggling with software collision detection in the past, so I went ahead and backported the boxcollision routine from 7800basic, to a bB function. It can be used to detect collisions between different height and width sprites. Included are simple examples for the standard, multisprite, and DPC+ kernels. Box collisions are a bit expensive, so don't try to do a bunch in one frame, or you'll run out of cycles. And if one of your objects is one pixel wide and tall, it would likely be quicker to use a simple if...then, instead of this routine. As always, enjoy! boxcollision.zip sample_std_wideplayer.bas.bin 8 Quote Link to comment Share on other sites More sharing options...
jeffry Posted May 27, 2018 Share Posted May 27, 2018 Hello, I wanted to say thanks for this. About a week ago you replied to my question in another thread with a link to this post. I found this extremely beneficial. This helped me with a better solution than I had created for my collision struggle, In adition it helped me gain a little insight into creating my own asm file. Thanks!!!! Quote Link to comment Share on other sites More sharing options...
RevEng Posted May 27, 2018 Author Share Posted May 27, 2018 I'm glad that it helped you out, and that you learned something along the way. You're welcome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.