Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to implement a custom game loop in XNA/Monogame. I know that one can re-implement the Game class using WinForms (with the caveat of having to also redo the content manager, etc.).

I don't wish to do that, so I was wondering if it there would be any drawbacks to simply doing both the game logic and rendering (with the custom game loop) entirely in the Update method and either calling SuppressDraw() or doing nothing in the Draw method. I suppose there'd be no need for the former if I were to do the latter?

share|improve this question
    
If you would go all the way to do such thing then just hack into the Monogame main class. Just download the code then search for the call to Update() and Draw() in its main loop. I think that having Updates and Draws separated is the right thing to do, and Monogame already do it for you, but if for some reason you need everything to happen in the same method, maybe because you design needs exactly one draw and one update per iteration, having an empty Draw() implementation should suffice. Consider adapt what you have to separated Draw and Update if it's not to late. Also I'm fan of fixed FPS. – Hatoru Hansou Dec 28 '15 at 9:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.