timing in visual basic

Started by
6 comments, last by codefreak 23 years, 11 months ago
man, i just cant get my timing rite in visual basic, anyone got any ideas? or papers i can read, with refrences to visual basic. thanks
Its me!!
Advertisement
What do you mean, exactly, by "timing." Like fps timing, or using Do Loops and timers (which btw you should never use).

Check out members.home.net/theluckyleper. It''s a good VB site with lots of links if you don''t find what you need.

Alex
Atypical Interactive
www.atypical-interactive.com
------------------------------Changing the future of adventure gaming...Atypical Interactive
sorry for my incomplete question asking.

im talking about game timing in visual basic.

so that my game can run at same speeds on every machine?

thanks for the url

Its me!!
lock the speed of your game to your v-sync (thats how I do it in VC)

I have always been lost!
Sentence you never want to here: Is it ok to eat the fuzzy stuff in your belly button?
No, vsync is not a good option to slow your game down. What if you run it on a 60Hz monitor and a 120Hz? No good.

It''s also no good idea (IMHO) to limit the framerate to a specific speed, what good would my GeForce 256 DDR do then?

Look up timeGetTime() in Windows API, that return the time in milliseconds since you started your computer. If you make a start variable based on timeGetTime(), then measure the time passed, you''ll get a millisecond timer. Works great for animation updates and such.



============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
If you need a higher resolution timer, you can use QueryPerformanceFrequency() and QueryPerformanceCounter() which are Win32 API calls. Generally it''s a 1 mhz (yes, megahertz ) timer, although I don''t know how often it''s -really- updated.

adamm@san.rr.com
adamm@san.rr.com
Codefreak,
Please see my previous post here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=10452&forum_id=11&Topic_Title=speed+of+the+game&forum_title=General+and+Game+Programming+Discussion&M=False&S=True
Amazon babes are cool.
Over looking the post?
why shouldn''t timer''s be used?
I understand you have to fiddle with on and off
and loads of timers will interfere with each other maybe?
I have no other reasons why not to use timers.
Okay..second
how can you set a game to run of the v(orH was it) sync?
I have no idea or even thought of that...cool!

Most importantly?
where can a list of usefull win32 api''s be found???
that would be very usefull and helpfull.
thanks!

This topic is closed to new replies.

Advertisement