Results 1 to 3 of 3

Thread: [RESOLVED] timers!

  1. #1

    Thread Starter
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    Resolved [RESOLVED] timers!

    hello. I am working on a game and am currently programing the screen to scroll to the next one when you walk on it. I think I got the code worked out but it zips way too fast. I need to know a simple way that I can put a time loop that will be standard for all computers that play my game. Oh and If anyone is interested I can give you the code for the scroll. It reads every value on the map and displays all the sprites and scrolls the screen to the right in 5 for loops and 3 lines of code. Thats it!

    Also I can read an infinite amount of map text files and save them to an array in 1 line 2 loops, same with loading an infinite amount of sprites into the memory.

    Its awesome, so little code!!!

    but anyway anyone got a timer (an easy timer) loop?

  2. #2

    Thread Starter
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    Re: timers!

    does no one know how to use timers?!

    i could probably figure it out myself but i was reading somewhere that some
    timer functions are not that accurate and you can even freeze the
    system.

    So help would be nice

  3. #3
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: timers!

    If you are after using Timer objects in VB, then that is not the way to go, especially in games. It is not accurate, hideously slow, and occasionally skips on you. The best way to go is to use Do...Loop or While...Wend, locked at 60 fps. Here's how you do it:

    http://www.vbforums.com/attachment.p...chmentid=38488

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