Well, someone asked me for it so... I made one, Im not requesting this as a tutorial in the section since it isn't long enough to match the others

sorry about that...
Anyway, this tutorial was made by me (SG57) and it will help you set up bounding boxes for collision... next up are bounding circles...
************************
Collision Detection: *******************
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Bounding Boxes/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
_______________________
C_R_E_A_T_E_D__B_Y_:_________________
-----------------------------------------~~
SG57 ~~-----------------------------
Since the PSP just draws pixels on the screen to make the images, it doesn’t know or care where they are in relation to each other, but as a programmer, you need to be able to tell if two or more objects collide. This may seem like a simple concept but you will see that it is more complicated than you think. In order to detect a collision you need to check if any part of one object is in the same position as any part of another object. In order to find this, an if-statement will work, but it will be very complicated and long. In the following code we will check to see if two pixels are colliding, the simplest of cases.
If( pixel1x == pixel2x && pixel1y == pixel2y )
// do something
Here we have used two pixels (pixel1 and pixel2) and we have simply checked to see if they are both in the same position. Notice that we first test the x position and only if they are the same we test the y coordinates. Only if the y coordinates are the same AND (indicated by the && operator) the x coordinates are the same is the if-statement true.
This is fine for pixels, but how many images are pixels? Not many. The next simplest image to check for collisions is the rectangular images.
If( pixel1x >= rectangle1x && pixel1x <= rectangle1x + rectangle1width && pixel1y >= rectangle1y && pixel1y <= rectangle1y + rectangle1height )
// do something
This block of code tests to see if a pixel collides in a rectangle. Now that we have a range to work in we must not only switch to > and < instead of ==, but we must also have more parts to the if-statement. This is getting complicated now, but there is another situation we need to know about. If two rectangles collide the statement gets even longer:
If( rectangle1x >= rectangle2x – rectangle1width && rectangle1x <= rectangle2x + rectangle2width && rectangle1y >= rectangle2y - rectangle1height && rectangle1y <= rectangle2y + rectangle2height)
Confused yet? Just be glad we are only working within two dimensions. This gets even longer in 3D, but we won’t go into that here. In fact, this is as complicated as we are going to get for the purposes of this lesson, but it is possible to test collisions on lines, circles, ellipses, and any other regular shape using equations. Notice, however, that we subtracted the width of rectangle1 from rectangle2x. This works because as the right-edge of the rectangle collides with the left edge of the other rectangle, the x-coordinate of rectangle1 is at the x-position of rectangle2 minus the width of rectangle1.
And for all those lazy programmers out there who don't want to go through and calculate all this raw collision detection, I have written a prototype (Ravine too) that all you need to input are the parameters... Here is my 'Home Made' Doxygen and function:
/*
1ST IMAGE FOR COLLISION
x1 - X-Co-ordinate of 1st image
y1 - Y-Co-ordinate of 1st image
w1 - Width of 1st image
h1 - Height of 1st image
2ND IMAGE FOR COLLISION
x2 - X-Co-ordinate of 2nd image
y2 - Y-Co-ordinate of 2nd image
w2 - Width of 2nd image
h2 - Height of 2nd image
*/
int CollisionDetection(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) {
int Collide = 0;
if ((y2 >= y1 && y1 + h1 >= y2) || (y2 + h2 >= y1 && y1 + h1 >= y2 + h2) || (y1 >= y2 && y2 + h2 >= y1) || (y1 + h1 >= y2 && y2 + h2 >= y1 + h1))
{
if (x2 >= x1 && x1 + w1 >= x2) {
Collide = 1;
}
if (x2 + w2 >= x1 && x1 + w1 >= x2 + w2) {
Collide = 1;
}
if (x1 >= x2 && x2 + w2 >= x1) {
Collide = 1;
}
if (x1 + w1 >= x2 && x2 + w2 >= x1 + w1) {
Collide = 1;
}
}
return Collide;
}
This function I havent used in about 6 months... It's from shear memory, so if there is something off, just let me know and ill fix it...
Anway, this function will check all possible forms of collision when having all 8 values needed (4 per image: X co-ordinate, Y co-ordinate, Width of image, Height of image). This function ,obviously, return a value... that value is: 1 = Collision Detected; !1 = No Collidion Detected
Here is an example I have just thrown togeather that will print "Collision Detected" to the screen when returning 1, and "No Collision Detected" when returning != 1.
Taken from my Kitten Cannon Teaser Demos (Ive abandoned the game, so if you want my source, feel free to ask)
int catx=0, caty = 0, w1 = 32, h1 = 32, explox = 430, exploy = 222, w2 = 50, h2 = 50, cat_collided = 0;
if(CollisionDetection(catx, caty, w1, h1, explox, exploy, w2, h2)) {
cat_collided = 1;
} else if(cat_collided==1) {
printTextCentered(134, "Collision Detected with Fireball");
} else {
printTextCentered(134, "Collision with Fireball isnt Detected yet");
}
Now of course, there are many ways to go about doing this... I for one, like bools and such, so I set up a check to see if the 'cat' had made contact with the 'fireball', and if so, then print the string to the screen... If not detected, it by defualt printed it wasnt detected... I also had more things happening, but this is just an example again... (I had the score be manipulated and such...)
Here is the tutorial in .TXT form for anyone wanting it 'on-the-go':
http://www.psp-programming.com/downloads/files/Collision_Tutorial.txt...Just trying to do all I can for the scene you guyz

...