Jump to content

  • Log In with Google      Sign In   
  • Create Account

game logic


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 04 December 2012 - 10:46 PM

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


Sponsor:

#2 BaneTrapper   Members   -  Reputation: 1246

Like
1Likes
Like

Posted 05 December 2012 - 07:27 AM

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, 05 December 2012 - 07:32 AM.

Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS