Suppress Game Logic Updates

Hi,

I have a situation in a flip screen game where sometimes, changing room can take longer than expected, and I don’t want the game to play catchup with the logic when the new room is ready. So with IsFixedTimeStep set to false, is there a way to suppress updates for a short while? I’m thinking it’s something to do with ResetElapsedTime, but if I call that I get an object not set error.

Thanks ;o)

Here is an idea for a simple solution…

In your main Game1 class or somewhere else put

public static bool PauseUpdate = false;

Wrap the code you want to suppress in a condition using that boolean. Then you can control when you want it paused or running.

Honestly, I think in the end you’ll want to look into creating game states (running, paused, loading, etc…).

David

Thanks for the suggestion. I already have game states, and I’ve looked at doing pretty much what you’re saying. Just thought there might be something in the Monogame framework to achieve the same thing, especially as there’s that teasing function called ResetElapsedTime on the Game class, which suggests it might do it, but for me it errors.