Original Post
Hello guys.
I have been trying to figure out if I should cap the max. number of frames there bust be each second in my SDL game. All my animations is moves according to delta, and is not effected by the number of frames each second.
I would cap the FPS with SDL_Delay, I tested by looking at the windows 7 task manager how much CPU my game would use under different circumstances:
I first tested to see if indeed SDL_Delay also spared the CPU, by setting it to SDL_Delay(20000), and the CPU under "Processes" showed: 01.
With a cap on 60 FPS, the CPU showed around: 25.
With no cap the CPU showed around: 50.
I wonder if it is important to cap FPS. Gamers around the world brag about how many FPS there games play with, so I guess there isn't a CAP on those games.
So would you cap it? or let it run as many times as you would like?
a little extra curiosity question:
I noticed a game I made in SDL used 250.000K memory when running under winXP32bit, but when I switched to win7 it used 150.000k. I had a lot of images. But anyone know why the different on the to OS?
I have been trying to figure out if I should cap the max. number of frames there bust be each second in my SDL game. All my animations is moves according to delta, and is not effected by the number of frames each second.
I would cap the FPS with SDL_Delay, I tested by looking at the windows 7 task manager how much CPU my game would use under different circumstances:
I first tested to see if indeed SDL_Delay also spared the CPU, by setting it to SDL_Delay(20000), and the CPU under "Processes" showed: 01.
With a cap on 60 FPS, the CPU showed around: 25.
With no cap the CPU showed around: 50.
I wonder if it is important to cap FPS. Gamers around the world brag about how many FPS there games play with, so I guess there isn't a CAP on those games.
So would you cap it? or let it run as many times as you would like?
a little extra curiosity question:
I noticed a game I made in SDL used 250.000K memory when running under winXP32bit, but when I switched to win7 it used 150.000k. I had a lot of images. But anyone know why the different on the to OS?