How to render preview screen in VS2019 MonoGame?

Trying to make a graphical output where I can display a preview in my game like in Unity/Unreal. I just want to display a basic screen showcasing what is happening right when I press play. How do I do that?

Check out this link.

It shows you how you can make a control that renders monogame stuff and drop it inside a form :slight_smile:

Will try. Thanks.

Is there a way to… reverse this method? I started off with a MonoGame project first.

You can create a WinForms project in the same solution as your MonoGame project, then you can add the MonoGame project as a reference. You can’t use your Game class in from the Control since that does all the stuff that launches it as a Windows or Full Screen application, but you should be fairly easily able to isolate your actual game code outside of that, then use that.

Maybe make a class called Engine that contains all the stuff your Game does, but is just called by Game’s various methods. You can then call those from your WinForms project to render to your render control, or from your Game class to render the actual game.

That kind of thing :slight_smile:

If you know some c++, you could do it with vsix. I tried it once (I think with xna) and had some good results but cannot remember anything but it was hard finding documentation.

Good Luck,
Bubba

I spotted this on twitter and it made me think of this thread :slight_smile:

https://twitter.com/mtaulty/status/1339572776525590529?s=19

Not really what you are after, but still, interesting :slight_smile:

1 Like