Frames Per Second?
In his book, Andre LaMothe the French kid mentioned about 30 frames per second.
1) What is 30 frame per second?
2) Why do we need sucha'' thing?
3 When do we need to use it?
4) Also, in his book, he occasioanally make a funnt remark, and after that particular remark, he put a tag behind. For u kids who''ve read his book, u''ll noticed that there''s quite a lot of s in the book. What does all these s means? Bill Gates? Or what? Thanks!!!!!
Good luck, pals.
Xeon.
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
He wrote multiple books. which one are you refering to? 30 frames per second means that''s how many time the program loops (renders, updates, gets input, et...) in a second. 30 is considered minumum. for most games you''ll want around 60+
HHSDrum@yahoo.com
Polarisoft Home Page
HHSDrum@yahoo.com
Polarisoft Home Page
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
The book is "Tricks of the Windows Game Programming Gurus".
Now, ye'' know what those
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
30 frames per second is critical because that is the point near whitch the brain stops seeing a collection of pictures and start to recognize fluid movement.
Any game that deals with movement should strive to 30+ fps, or to be even better they should strive for the refresh rate of the display device. Most monitors are 70-120fps so the closer you are to having a new frame for each cycle the more realistic it will be for your brain.
Any game that deals with movement should strive to 30+ fps, or to be even better they should strive for the refresh rate of the display device. Most monitors are 70-120fps so the closer you are to having a new frame for each cycle the more realistic it will be for your brain.
FPS, Frames per secound, how many frames, or still screens are shown in a secound, for example movies are filmed at 24 frames per secound, I think TV is the same, 30 is the minimum for a smooth game, you will want to aim for 60 FPS thought.
have you ever been in a chat? do you know what emoticons are? ( example:
)
thats what those tags are, I am not sure exacly what the interpretation is, but I figured Big Giggle for "BG", is nothing that will help you on learning to make games.
and God! do I wish you stop calling everyone a kid! what is that the catch phrase in your school now?
see ya.
have you ever been in a chat? do you know what emoticons are? ( example:


thats what those tags are, I am not sure exacly what the interpretation is, but I figured Big Giggle for "BG", is nothing that will help you on learning to make games.
and God! do I wish you stop calling everyone a kid! what is that the catch phrase in your school now?
see ya.
THANKS EVERYONE!!!!!!!! :-D Ok, I''ll try not to call u pals "kids" if I can, but I just can''t help feeling that the word is real cute and tender, nice and juicy, sweet and cool!!!!! For example, "U kids!!!" Oohhh!!!!!!! :-D
And yes! I''ve been in a chatroom before, but dunno what''s really. :-D Of cos'' it doesn''t help me make games, but I just feel sick when Andre kiddo(not kid) keeps mentioning and I dunno the meaning!!!!! So, my ego points really fell, guys. :-D
And oh! In the same book,(Tricks of the Windows Game Programming Gurus) Andre created a sample "Screen-Saver" at the last parts of Chapter 4. I can understand the code, but the thing I find weird is this code :
.
.
.
.//some irrelavent code...
.
.
// move to end one of line
MoveToEx(hdc, x1,y1, NULL);
// draw the line to other end
LineTo(hdc,x2,y2);
// lock time to 30 fps which is approx. 33 milliseconds
while((GetTickCount() - start_time) < 33);//***this line
There! The LAST line in the code snippet(from the Screen Saver program in Chapter 4)!!!!!! I realised that if I DECREASE the 33 value to 10 or even 1 as in the last line of code above, the screen saver moves very very fast! But if I increase the 33 to 60, or even 100, it moves much slower. Can anyone tell me why? Thanks!!!!!!!!! :-D
GameDev.net has never really been better!!!!!!! The golden age of GameDev.net!!!!!!!!!! :-D
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
And yes! I''ve been in a chatroom before, but dunno what''s really
And oh! In the same book,(Tricks of the Windows Game Programming Gurus) Andre created a sample "Screen-Saver" at the last parts of Chapter 4. I can understand the code, but the thing I find weird is this code :
.
.
.
.//some irrelavent code...
.
.
// move to end one of line
MoveToEx(hdc, x1,y1, NULL);
// draw the line to other end
LineTo(hdc,x2,y2);
// lock time to 30 fps which is approx. 33 milliseconds
while((GetTickCount() - start_time) < 33);//***this line
There! The LAST line in the code snippet(from the Screen Saver program in Chapter 4)!!!!!! I realised that if I DECREASE the 33 value to 10 or even 1 as in the last line of code above, the screen saver moves very very fast! But if I increase the 33 to 60, or even 100, it moves much slower. Can anyone tell me why? Thanks!!!!!!!!! :-D
GameDev.net has never really been better!!!!!!! The golden age of GameDev.net!!!!!!!!!! :-D
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
July 13, 2001 09:18 PM
|
This forces the CPU into a do-nothing loop until 33 milliseconds have passes, forcing the frame rate to about 30 FPS. Extremely crappy thing to do. If your loop only takes 10 milliseconds to perform, the CPU does nothing for 23 milliseconds. That is a lot of wasted CPU time.
But his books are for newbies, and it is the easiest way to lock the frame rate.
If you change 33 to something else, you are making the CPU wait different amounts of time.
Thanks, Anonymous Poster pal!!!!!! :-D
Do u know why he coded the "while" loop at the end of the code and not above all the calcuations and drawing part? Thanks!!!!!
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
The reason he put the while loop at the end of the code, is to allow the application to perform all the necessary things such as rendering, sound, input, and what not first, then if necessary, delay the cpu a little until you reach 30 frames per second....
Once you get the hang of all of this frame locking stuff, read up on timing... Timing is what you will want to use in the future. With timing, you don''t sleep and waste cpu cycles. You let the cpu run at full speed but perform timing to make everyones computer simulate running at a specified frame rate..
Hope that helps...
Once you get the hang of all of this frame locking stuff, read up on timing... Timing is what you will want to use in the future. With timing, you don''t sleep and waste cpu cycles. You let the cpu run at full speed but perform timing to make everyones computer simulate running at a specified frame rate..
Hope that helps...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement