0
\$\begingroup\$

I need to know whether it's possible to create a XNA game for Windows Phone 8.1 (which I've already) using monogame with a custom game loop.

OpenGL ES has this possibility (GL_RENDERMODE_WHENDIRTY or sth. like that).

Is there anything like that RenderMode for XNA/MonoGame on WP 8.1

Note: I'm new to Windows phone game programming.

\$\endgroup\$
2
\$\begingroup\$

1-Create an xaml page
2-Create a new GraphicsDevice
3-Put your own game loop

\$\endgroup\$
  • \$\begingroup\$ You didn't give any details but was helpful to search right things on google :). I created a blank xaml page and added a game view on it using XNAs renderer. I call render() function only when necessary now. \$\endgroup\$ – Ahmet Zambak Oct 23 '15 at 16:26
1
\$\begingroup\$

Although I may be misinterpreting your question, you are trying to make a loop that doesn't draw when it does not need to. XNA has this capability.

if (needsToDraw == false) {
   this.SuppressDraw();
}

The SuppressDraw() function is part of the Game class (you can read more at MSDN). In this case, you need to determine if the game needs to be drawn yourself. If it does not, you simply call SuppressDraw during the game's Update loop.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.