• Create Account

Posted 30 April 2012 - 08:12 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm a complete newbie (warning), but I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= diRadius && (yMario + yMoomba) / 2 <= diRadius) {
// Die/Demorph else if code
} Else {
// No change
}

(diRadius is the estimated distance between the center of Mario and the center of Moomba.)

Posted 30 April 2012 - 08:11 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm a complete newbie (warning), but I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= diRadius && (yMario + yMoomba) / 2 <= diRadius) {
// Die/Demorph else if code
} Else {
// No change

(diRadius is the estimated distance between the center of Mario and the center of Moomba.)

Posted 30 April 2012 - 08:11 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm a complete newbie (warning), but I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= diRadius && (yMario + yMoomba) / 2 <= diRadius) {
// Die/Demorph else if code
} Else {
// No change

(diRadius is the estimated distance between the center of Mario and the center of Moomba, obviously.)

Posted 30 April 2012 - 08:10 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm a complete newbie (warning), but I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= z && (yMario + yMoomba) / 2 <= z) {
// Die/Demorph else if code
} Else {
// No change

(z is the estimated distance between the center of Mario and the center of Moomba, obviously.)

Posted 30 April 2012 - 08:08 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm a complete newbie (warning), but I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= 10 && (yMario + yMoomba) / 2 <= 10) {
// Die/Demorph else if code
} Else {
// No change

Posted 30 April 2012 - 08:08 AM

More specifically how would the collision detection work with these non-rectangular shapes, since I am under the assumption that I should be able to load up an image into the game and someone get the player or an object to collide with it somehow.

I'm thinking that the collision detection is proximity based and the visual shapes are just superficial eye-candy.

Distance between the reference points of the objects Mario and Moomba < x, where x is the condition for dying or demorphing to mini-Mario.
Simply put, the two coords are basically just compared up against eachother, and it's up to the programmer to sync this up with Mario and Moomba's image sizes. If they're too close on the x and y axes combined, then you die or demorph.

Boolean if:
If ((xMario + xMoomba) / 2 <= 10 && (yMario + yMoomba) / 2 <= 10) {
// Die/Demorph else if code
} Else {
// No change

PARTNERS