Results 1 to 7 of 7

Thread: Skill bar

  1. #1

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    Skill bar

    You know those skill bars you get in 'Track and field' type games or almost any sports game for that matter, where the nearer you stop the bar to a certain line the better the result.

    I'm trying to do one of those but have so far only tried using a line moved by a timer, but this way is either far too slow or the increments have to be so big that it doesn't look smooth.

    Any ideas?

    Cheers.

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    Try using a progress bar, or reduce the increment of the timer. By the way, what is the speed of your computer?

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Timers are evil in games programming.
    Use GetTickCount in a Do Loop.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Working on a P233, I've come to realise that timers are EVIL, but am new to games programming.

    I'll have a go using gettickcount and let you know how i get on.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Timers aren't evil, Do Loop's suck all your CPU, If you want more precise timers you can Settimer and stoptimer to set a global callback function trigger by the system
    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.

  6. #6

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Cheers keda, Does the settimer API still work accurately at very short intervals as this seems to be the problem i'm having with the VB timers, While the timer is active the program is doing very little so it shouldn't use too much CPU.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    VB timers won't fire with less interval than 53ms. You can go down to 1ms with settimer i think, but that's a bit too frequent for most cases.
    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.

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