dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: C++: about game loop: do we need take some time between frames?

  1. #1
    Join Date
    Apr 2009
    Posts
    1,231

    C++: about game loop: do we need take some time between frames?

    we create a game loop. but these loop can be more faster, depending on hardware efficiency.
    so my question, for i understand better, is: do i need create a timer between the frames or something?
    i'm totally new with game loop

  2. #2
    Join Date
    Apr 2000
    Location
    Lyon / France
    Posts
    351

    Re: C++: about game loop: do we need take some time between frames?

    Yes it is better to setup a minimum amount of time between two frames.
    Otherwise your game will permanently use 100% cpu power, which is especially annoying on laptops (keyboard becoming warm, noisy cooling fan...).

    Une erreur est d'autant plus dangereuse qu'elle contient plus de vérité.

  3. #3
    Join Date
    Apr 2009
    Posts
    1,231

    Re: C++: about game loop: do we need take some time between frames?

    and for avoid been much more faster between computers(if CPU\Graphics\RAM\others be more faster), right?

  4. #4
    Join Date
    Apr 2000
    Location
    Lyon / France
    Posts
    351

    Re: C++: about game loop: do we need take some time between frames?

    Indeed it is a good thing the game works the same speed across machines (that are fast enough to run it).
    I've seen old games running so fast they become unplayable

    Une erreur est d'autant plus dangereuse qu'elle contient plus de vérité.

  5. #5
    Join Date
    Apr 2009
    Posts
    1,231

    Re: C++: about game loop: do we need take some time between frames?

    thank you so much for all

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)