Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

collision

This topic is 650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

well I have a very simple question.I am making a breakout kind of game. I just need another person's perspective on how to tackle the forthcoming problem. Well I can get the ball to strike a lower brick and turn off that brick and then move the ball off of the top of the screen. What I want is the ball to strike a middle brick and turn off that brick and then move off of the top of the screen. Then I want the same thing to happen to the upper row of bricks.

Share this post


Link to post
Share on other sites
Advertisement

Im not entirely sure what you are asking.

 

Perhaps it would be better explained with a diagram? Whenever ive played breakout or a clone, destroying a brick makes the ball bounce back (reflect) in the opposite direction?

Share this post


Link to post
Share on other sites

well first of all I am using opengl and c++. also I am making a space invaders/breakout game. I am unsure of how to make a diagram on this editor. (Sorry).

Share this post


Link to post
Share on other sites

Could you describe the problem more clearly?

 

What exactly do you want to happen, and what is happening instead?  Have you not implemented bouncing for the ball yet?  As is, your description doesn't make a lot of sense.

 

 

If you want to draw a diagram, use graphics software such as MS Paint and attach the image to your post.

Share this post


Link to post
Share on other sites

In general, just think of the ball as a separate behaviour and then determine the state of the various bricks relative to the position of the ball. Then it won't matter whether you have the ball bounce back, continue through, teleport elsewhere, or whatever. Because the ball holds the parent behaviour that dictates the brick's. To relocate a brick you just stop rendering the brick in location A and start rendering it in location B. If you want it to animate, just add that animation(s) as an intermission between the de-render and render events.

I'm no expert though, so I'm probably wrong.

Edited by Malabyte

Share this post


Link to post
Share on other sites
You can upload your image to an image hosting site and use the img tags to put it into the reply?

Share this post


Link to post
Share on other sites

This topic is 650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!