Jump to content
  • Advertisement
Sign in to follow this  

game logic

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

I am doing a logic flowchart for a breakout game.is this logic in the proper order?
check collision
brick collision
timer func
glut main loop

Share this post

Link to post
Share on other sites
That would work, i mostly did it this way :

In input handle key press and update the pad position. NOTE update the ball position too before collision checking
In collision check for ball collision with blocks and pad
Drawing comes next
repeat until won / lost

What i have questions about is :
(check collision) then you do (brick collision)
shouldn't you put this into one? i mean check collision invokes (ball to everything check) since that's only thing that moves in breakout game, unless you have powerUP.

(timer func) what is this used for?
If its used to get delta time it should be called first in loop or last

(glut main loop)
If you have (draw scene) already i am unsure what is this used for.
Edited by BaneTrapper

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.

GameDev.net 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!