Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

game logic

This topic is 2022 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?
drawscene
check collision
brick collision
timer func
glut main loop

Share this post


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

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!