I'm programming a Pacman game (how original ? hehe) mainly to learn how directdraw works.

Everything is perfect except for one small problem.

The framerate drops for about 2 seconds on the 3rd second of play and then goes back to normal for the rest of the game. If I start a new game the slowdown does not happen.

Ex:
1.Game starts
2. Frame rate is 33 for the first 2-3 seconds
3. Drops to 22 for about 2 seconds
4. Goes up to 33 and never change after that.
5. If the game is over I restart a new game..and no slowdown
6. If I close the exe and run it again I'll get the slowdown for the first game

It's really weird.

Any idea ?