problem with the gameloop

Started by
3 comments, last by gamedev90 14 years, 5 months ago
hi, I am new to game programming.I am developing a simple sprite based 2d game.I have problem with my game looping.In the looping when I run the animation at the same time I have to receive the user input and all the other things running at the same time.How can this be done in a single loop??
Advertisement
I can simply be done in sequence. You can receive the user's input, update the sprite positions, and draw the sprites. When it is executed it will seem to execute at the same time.
so even if I have long animation in a particular method running in a game loop It works??
The length of the animation doesn't matter, you don't render the whole animation each loop, you render 1 frame (or whatever) of the animation each loop.
Quote:Original post by Grantax
The length of the animation doesn't matter, you don't render the whole animation each loop, you render 1 frame (or whatever) of the animation each loop.


Thank you very much. Now I got it.

This topic is closed to new replies.

Advertisement