Advertisement Jump to content
Sign in to follow this  

pseudocode and breakout

This topic is 3016 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
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!