I guess I have some explaining to do:
- I'm fairly new to game programming, so please don't get mad if I don't understand a concept immediately
- The game makes use of DirectX 10 and is written in C++
- It's very simple 2D game
The situation: Despite of being very simple in both game logic and graphics, it still takes my CPU and GPU load to 100%. Even the menu is displayed with more than 2000 frames per second.
My problem is not that the game runs too fast. I already timed sprite animations and game logic using the QueryPerformanceCounter function.
The actual problem is that the game calculates the same code numerous times without anything happening on the screen, therefore putting a massive load on my hardware.
In what ways can I decrease the hardware load of my game? I feel like using Sleep is "cheating".