Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
The Ringmaster
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: Cyberspace
Posted: 6th Jul 2005 03:56
Howdy! I have finished the PONG tut in the stickies, and I was wondering how to start on a BREAKOUT clone, as was recommended. I realise that it should be a simple matter of playing around with the PONG code, but I have trouble with collision boxes, etc... Help?

Clouds float the exact same way bricks don't
- Douglas Adams
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 6th Jul 2005 21:34
well dpc help menu should
Quote: "help"


New episodes of family guy sunday!
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 11th Jul 2005 04:58 Edited at: 11th Jul 2005 04:59
Ok here's how I'd begin, just a layout of what you need to accomplish:

- Using a for/next loop create and position a given amount of blocks properly near the top of the screen.

- Use 5 for/next loops to create the boxes. Each loop will create 10 objects and color them properly. Eg:

Loop 1 will create boxes 10 to 20 and color them red
Loop 2 will create boxes 21 to 31 and color them blue
Loop 3 will create boxes 32 to 42 and color them green
Loop 4 will create boxes 43 to 53 and color them yellow
Loop 5 will create boxes 54 to 64 and color them purple

Then, use the PONG bouncing code you currently have to calculate bouncing with the paddle and with each box.

When a collision is detected, if the object collided with's number is anywhere from 10 to 64 then delete the object and increase score by x amount of points.

The reason I said to use seperate for/next loops is because then you can change the scoring and amount of hits needed for each color. Eg:

If the ball collides with a block object and the block is blue then just delete the blue object and give the user 10 points. BUT if the ball collides with a block object and the block object is yellow then increase the user's score by 30 and delete the object.

Finally, do a check to see if all of the block object's are deleted, if so, go to the next map.

If you get far enough into it you could create a map editor yourself and distribute it to others to make their own block sets.

Goodluck!


Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | COLD - Polygonal Collision Detection
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Jul 2005 11:13
Make a map editor first. By the time you finish that, it'll be easier to do the rest of the game. You'll understand how to setup the structure of the game better.

PETA - People for the Eating of Tasty Animals

Login to post a reply

Server time is: 2024-11-27 22:33:37
Your offset time is: 2024-11-27 22:33:37