collision detection

Started by
14 comments, last by phil67rpg 11 years, 4 months ago
The 'code' button actually uses 'source' tags to wrap your code.

Looking over what you posted, I still don't know what's representing a brick in your code.

Looking at your first post it seems like you're just using sprites and treating them like objects. If you want bricks that do things then you should make a class for bricks that encapsulates their behavior.

Separate your drawing from your logic: Do the logic for the frame and then draw the result.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Advertisement
ok thanks for all the help, actually the hard coded numbers represents the bricks.
So the bool array there represents a grid of bricks?

What do the true/false values indicate?
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
yes, the true/false values indicate that the ball hits one of the bricks.
So if you make that an array of objects or structs then they can have more than one property (was it hit, is it alive, etc).
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
ok I will do more research, any other ideas would be helpful

This topic is closed to new replies.

Advertisement