Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

0nighthawk0

Brick Rendering and Collision

This topic is 5213 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

Hi all, i''m creating a very simple breakout clone. At present i have created the windows, used a vertex buffer and mapped a texture onto it to create the bat. I can get movement of the bat from left to right and the view matrix was predefined for me so that is also working. However, i am wondering how i am going to get the ball and bricks to interact. At present there is no ball, but i am pretty certain i can rustle up something and get a moving ball. The collision detection with the edge of the screen i can also do. However all examples i have seen of this game are old examples using brushes etc, and i cannot seem to get brushes and pens and vertex buffers to co-exist, to many device handles, and generally get myself confused. What i really need are ideas on how to create 3 lines of blocks, each line of a different colour. Say 10 to a line? and then how to destroy individual blocks when the ball hits them. I had a look at some code by PhilVaz but again this is all brushes and pens. i am in no doubt it all works, but i need to do this using vertex buffers and direct3d. Preferably dx8.1 methods and functions even though i have dx9 installed. If you have any ideas on this please post, its probably really simple, but i just dont know where to start with the blocks. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I have thought about drawing them, and would draw both ball and bricks as i can make code to destroy bricks upon collision if its just pens and brushes etc.

However, because the bat is drawn using a vertex buffer and a texture. I was hoping to be able to draw the blocks as a textures also, but it is not neccessary...please help as i have scoured these forums and there are literally no examles of this in action for Direct3D, only for pre DX8 material. As i said....any clues, and ideas, no matter how simple.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!