🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lesson 23

Started by
0 comments, last by OtakuCODE 23 years, 11 months ago
I''ve got a couple questions regarding Lesson 23. Right now I''m trying to pull out the timer stuff so I can put an FPS counter into the current game I''m doing just to get a handle on some OpenGL concepts (its a clone of the extremely rare (and extremely simple Atari 2600 game Boing which you can probably only find and run on an emulator, I think only 1 cart was ever produced). I was looking through the code in the downloadable CHM file (very very convenient BTW, I wish more people made them). First off, I found an error. This line is missing a parenthesis: while(TimerGetTime()GetDeviceState(sizeof(buffer), &buffer); That shouldn''t compile (I haven''t tried, I''m using my own win32 shell app). Anyhow, the real question is... is the timer code in his tutorial complete? Near the bottom of the code he grabs the value of the timer.... and proceeds to do absolutely nothing with it. He does absolutely nothing with the value he gets... I know the basic workings of the performance counter now and I can get the math to work out a frame/sec rating, but I''m just wondering if I''m missing some code? He has float start = TimerGetTime(); and then the variable start is not referenced again anywhere in the program... ----------------------- Go for it. OtakuCODE
-----------------------Go for it.OtakuCODE
Advertisement
that''s basically the same thing as while(getTickCount()-start_time
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911

This topic is closed to new replies.

Advertisement