Results 1 to 3 of 3

Thread: Direct Draw Timeing +

  1. #1

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229

    Exclamation

    Im working on a simple game for a contest and i need help with this direct draw timing. My problem is on the game loop. When it runs through the loop it causes graphic coruption and is going faster then i need it. but when i had it on a timer it caused graphic coruption.

    What i need it a way to time it to 30 Frames Per Second and a way to check if it is done drawing the image, so it doesn't draw when it is drawing the image before.( i saw this feature in another code sample but i lost it)

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Is there point having to limit it to 30 frames? As it may not work for slower machines, you could have your graphics update as fast as possible and let the speed of the game be controlled instead,
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229
    I fixed it all and figured out a miss blit causing the graphic corruption.

Posting Permissions

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



Click Here to Expand Forum to Full Width