4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by 0x69
0

What programming language are you intending to use? decide then post in the forum for that programming language.

0

Hey, bounding-boxes is most simple collision detection method. What you didn't understood in that gamedev code exactly ?

Ok. If you want even MORE simple collision detection you can use this-
circle-circle collision method. Collision will be when: d <= r1 + r2 , here
d -> distance between circles centers.
r1, r2 - radius of first, and second circles respectively.
Assuming that you have images square-like, collision condition can be written as ((x1-x2)^2 + (y1-y2)^2)^0.5 <= 1/2*(Width1+Width2) here x1,x2,y1,y2 - coordinates of image centers.
Width1, Width2 - Width (or height) of those two square images.
Even when you have rectangles with edges approximatelly equal- you can still use this collision detection method, by setting Width1,Width constants to bigger rectangle edge, or something like (edge1+edge2)/2. So at first you can try this. When required you can switch to bounding boxes method.

Good luck.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.