#### Archived

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

# Vertex Buffers and Breakout

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

## Recommended Posts

Ok, I''m doing Breakout. So, if I have a vertex buffer that has a square made up of two triangles, can I duplicate that square numerous times and load in the paddle, ball and blocks? I''d like to take a texture and texture each copy differently whether it''s a block, paddle or ball. Is this the best way to do this? What other ways are there? Much greatness is achieved thru perseverance and faith.

##### Share on other sites
And, how does this affect a basic bounding box collision?

Much greatness is achieved thru perseverance and faith.

##### Share on other sites
It won''t effect bounding box collision at all. You should not be storing the x/y information in the vertex buffer duh. You should have a seperate brick/paddle/ball object. Each object should store it''s x/y position.

Your probaly going to have trouble with bounding box collision, and a ball regardless. Circles + bounding box collision don''t work to well together, I just finished implementing my collision detection and it was a pain in the ass because I first used bounding box collision detection.

##### Share on other sites
hi hope you don''t mind me asking, what is wrong with sphere-to-box collision? i used that and it works very well in my app,

i got the article from gamasutra and just used the formula there,

##### Share on other sites
I know this was a newbie question, maybe not well thought out as far as asking, so I apologize for that ph33r (in reference to the "duh"). Basically, I know how to use a vertex buffer and have done lots of little demo programs over the last 2 years, but I''ve never gotten to where I''m making a full game like this one. So really, my vertex buffer just needs to have two triangles in it consisting of one square and I''m guessing I can reuse that square "model" over many objects.

I probably will make my "ball" a square with a round texture texture filtered to make it appear like a ball, so bounding box collision should work.

I think right now, all I''m trying to do is get from Vertex Buffer to multiple, individual world objects to use for collision detection. Since I''m duplicating the same VB square over ALL the objects in my scene, I''m just a little confused on how to get it work. Any help is appreciated, but I will ponder on this more over the weekend.

Thanks.

Much greatness is achieved thru perseverance and faith.

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 18
• 20
• 14
• 14
• 9
• ### Forum Statistics

• Total Topics
633377
• Total Posts
3011565
• ### Who's Online (See full list)

There are no registered users currently online

×