First of all, I'd like to get one thing straight. I'm NOT playing around with you all. I'm reading Tricks of the Windows Programming Gurus. With the example with the triangle and border, I don't see why restricting the fps makes it look smoother. Ok i8degrees? Get the picture? Also, if I used 14 milsec, I would be running it at appox 70 fps? 1/70? I'm just trying to get the concept of: what the use of fps is, and, how it works!
----------
Take it to the Xtreme!
----------
[edited by - Wachar on April 25, 2002 9:30:31 AM]
FPS?
April 25, 2002 09:01 AM
quote: Original post by Xanth
STFW = Search the < expletive deleted > Web
Nope, its suck the fucking wang
Restricting the frame rate will make it look less smooth because the frame is drawn fewer times per second. A very low frame rate will cause a jerky feel while a high frame rate (in which the frames are draw many more times per second) will have the frames progress with much less change between them and will thus look smoother to the viewer.
FPS is just the number of frames that are drawn per second. That''s all. Nothing else to it.
I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
FPS is just the number of frames that are drawn per second. That''s all. Nothing else to it.
I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
April 25, 2002 05:45 PM
Ok look,
you game is a loop. on each loop you update all the game objects positions and draw them. cool? this takes a certain amount of time. FPS is a way to measure how much time that takes. that is all it is.
you don''t want your FPS to drop below 30 (maybe more) because then people start to notice jerky motion and not smooth motion.
the reason you calculate FPS during development is that it will let you know whether you need to optimize more of your game loop or whether things seem to be working fine.
It simply measures how fast your game can render each frame. You could just time each loop and that would be fine too. then you could say well each loop takes 33 miliseconds on average to run. but FPS is a better way of thinking about it because in the end you are concerned with getting the highest FPS possible so that your users don''t see jerky motion.
also, guys common. this is the "For Beginners" section. i.e. its for beginners. i.e. people who get confused about things you think are easy and intuitive. be nice here. there are plenty of people to flame on other sections of this board.
-me
you game is a loop. on each loop you update all the game objects positions and draw them. cool? this takes a certain amount of time. FPS is a way to measure how much time that takes. that is all it is.
you don''t want your FPS to drop below 30 (maybe more) because then people start to notice jerky motion and not smooth motion.
the reason you calculate FPS during development is that it will let you know whether you need to optimize more of your game loop or whether things seem to be working fine.
It simply measures how fast your game can render each frame. You could just time each loop and that would be fine too. then you could say well each loop takes 33 miliseconds on average to run. but FPS is a better way of thinking about it because in the end you are concerned with getting the highest FPS possible so that your users don''t see jerky motion.
also, guys common. this is the "For Beginners" section. i.e. its for beginners. i.e. people who get confused about things you think are easy and intuitive. be nice here. there are plenty of people to flame on other sections of this board.
-me
the above post is from me
actually to get even more basic. something you also seem to not understand is that on every loop of the game you have to redraw the ENTIRE screen. you don't just redraw the things that are moving like in cell animation or something.
that is what a frame is.
cool?
-me
[edited by - Palidine on April 25, 2002 6:49:08 PM]
actually to get even more basic. something you also seem to not understand is that on every loop of the game you have to redraw the ENTIRE screen. you don't just redraw the things that are moving like in cell animation or something.
that is what a frame is.
cool?
-me
[edited by - Palidine on April 25, 2002 6:49:08 PM]
So...while((GetTickCount() - start_time) < 70) will look smoother than while((GetTickcount() - start_time) < 20) because there are many more updates in this loop(70) than the 20 right? Bigger number = smoother looks..correct? Thanks Palidine, for saying on my behalf. Can I hire you for a attorney??
----------
Take it to the Xtreme!
----------
----------
Take it to the Xtreme!
----------
Wachar's Eternity <-<-<-<-<- Me own site!
Am I correct in my example?
----------
Take it to the Xtreme!
----------
----------
Take it to the Xtreme!
----------
Wachar's Eternity <-<-<-<-<- Me own site!
you''re still messing things up in that example. you can''t MAKE the program run at a certain framerate. the program just runs and you measure the framerate to see if you are doing things efficiently.
so the way game loops look (in pseudo code) is:
you seen to still be thinking of FPS as something that you DEFINE. you don''t DEFINE it. you just measure how many FPS your program is running at.
i think perhaps we should go to a more base level and have you say what your interpretation of a frame is and go from there. so what is a frame?
(i''m not trying to be condescending i just think backing up a sec to something you know well can give a good starting point of figuring out where the understanding is)
cool?
and i hate law, so sorry, you''ll have to find someone else
-me
so the way game loops look (in pseudo code) is:
//while(1) is the same as while(true) i.e. infinite loopwhile (1) { calculateTimeSinceLastRun fps = 1000miliseconds / timeSinceLastRunMilliseconds doGameStuff}
you seen to still be thinking of FPS as something that you DEFINE. you don''t DEFINE it. you just measure how many FPS your program is running at.
i think perhaps we should go to a more base level and have you say what your interpretation of a frame is and go from there. so what is a frame?
(i''m not trying to be condescending i just think backing up a sec to something you know well can give a good starting point of figuring out where the understanding is)
cool?
and i hate law, so sorry, you''ll have to find someone else
-me
well actually ok you CAN make it run at a certain framerate but that''s only if you are trying to slow it down, which isn''t usually a good idea.
each loop of the game renders a frame and the speed with which that happens is dependant on you graphics card, the speed of your CPU and how tight your code it.
anyway, if you''re still paying attention to this thread you tell me what you think a frame is and hopefully we can clear this all up.
-me
each loop of the game renders a frame and the speed with which that happens is dependant on you graphics card, the speed of your CPU and how tight your code it.
anyway, if you''re still paying attention to this thread you tell me what you think a frame is and hopefully we can clear this all up.
-me
quote: Original post by Wachar
So...while((GetTickCount() - start_time) < 70) will look smoother than while((GetTickcount() - start_time) < 20) because there are many more updates in this loop(70) than the 20 right? Bigger number = smoother looks..correct? Thanks Palidine, for saying on my behalf. Can I hire you for a attorney??
----------
Take it to the Xtreme!
----------
The point of this loop it to do slow the game loop. In otherwords while((GetTickCount()-start_time) < 70) will wait for 70 milliseconds before going to the next frame. So using this method would result in a framerate of 1000/70. Increacing that number will slow down the framerate.
So in psudocode you could force a desired framerate by doing this:
while gamerunning {
starttime = gettime
do game code
while (gettime-starttime) < (1000/framerate) {
do nothing
}
}
Is that clear enough?
--------------------------Insert witty comment here!--------------------------
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement