Original Post
Right now, I have a loop for the game. I'll post some pseudo code to illustrate it.
while(playing) {
frames++;
if(frames>FPS) frames=0;
if(frames==FPS) {
// All game functions for displaying the player and map and stuff.
}
}
Am I going about this the right way? It has really slowed the game down, but there is still a lot of CPU being used. How can I cut down on that the right way? Is this a good way to limit the FPS? Thank you. :3
while(playing) {
frames++;
if(frames>FPS) frames=0;
if(frames==FPS) {
// All game functions for displaying the player and map and stuff.
}
}
Am I going about this the right way? It has really slowed the game down, but there is still a lot of CPU being used. How can I cut down on that the right way? Is this a good way to limit the FPS? Thank you. :3