game logic

Started by
0 comments, last by BaneTrapper 11 years, 4 months ago
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
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.

This topic is closed to new replies.

Advertisement