Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

codefreak

timing in visual basic

This topic is 6932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!