|
-
Aug 2nd, 2001, 08:05 PM
#1
Thread Starter
Frenzied Member
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.
-
Aug 3rd, 2001, 01:53 AM
#2
Fanatic Member
Try using a progress bar, or reduce the increment of the timer. By the way, what is the speed of your computer?
-
Aug 3rd, 2001, 02:29 AM
#3
Retired VBF Adm1nistrator
Timers are evil in games programming.
Use GetTickCount in a Do Loop.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 3rd, 2001, 08:32 AM
#4
Thread Starter
Frenzied Member
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.
-
Aug 4th, 2001, 03:57 AM
#5
transcendental analytic
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.
-
Aug 4th, 2001, 05:39 AM
#6
Thread Starter
Frenzied Member
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.
-
Aug 4th, 2001, 06:28 AM
#7
transcendental analytic
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|