Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

pseudocode and breakout

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

Draw bricks on the screen.
Draw ball on the screen.
Move ball on the screen.
Bounce the ball on the edges of the screen.
Check to see if the ball hits the bricks.
If the ball hits the brick then turn off the brick.
If the ball hits the brick then bounce the ball off the brick.
Then register a score.

Here is some pseudocode for a breakout game, and its ball and brick interaction. I am just wondering if this pseudocode is lacking anything.A second pair of eyes is always helpful.LOL

Share this post


Link to post
Share on other sites
Advertisement
Where are your graphics coming from? Why no game loop? The ball never goes out of bounds?

Kind of a hard thing to post a response too, since there can be countless things missing. Like power-ups, obstacles, some bricks are indestructable. You're better off just programming this sort of game than focusing really hard on engineering a solution on paper. Then, when things go awry look at other peoples code and tutorials for solutions. If that fails and you still really really can't figure it out, then ask on the forum in a specific question pertaining to the functionality of your code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!