Jump to content
  • Advertisement
Sign in to follow this  
brett01

problem with the gameloop

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

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??

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

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!