New games every week!
JSE - Collision Detection Blog
30th May 2022
An error with JSE Collision Detection? Surely not!?!


After Dan pointed out some incorrect functionality in my Collision Detection yesterday, I started thinking of how to do the functionality a little better.

I've always hated having half a dozen CollideXtoY types of functions. Sure would be nice to be able to make that work a whole lot less.. .. messily!
I started thinking about other possibilities, and decided to try my hand at a whole new method of doing things.

Instead of CollideCircleToCircle(x1,y1,r1,x2,y2,r2), what if the command set was... Collide(Circle(x1,y1,r1),Circle(x2,y2,r2)).. And that also allowed for lines, rects and other things..
That'd be "better", right!?
I'm going to be trying my hand at reworking the functionality later today, and since "Collide" is a whole new command, I'll be able to leave everything else where it was, for compatibility's sake.

Wish me luck!! I think I might need it!
Views 14, Upvotes 1  
Daily Blog , Jse
New games every week!
Site credits : All of the above : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed

Blog - JSE - Collision Detection - AGameAWeek