Porting 2D Game Play to MonoGame

I’m working on two games at the moment, one of which is a 2D Phsyics Sandbox in the theme of the Incredible Machine from way back in the day.

4

Porting over 2D scenes too MonoGame turned out to be incredibly simple and Farseer physics library had no issues being ported over too. I had a working Proof of Concept working in no time flat.

5

Farseer worked between Platforms without a hitch.

The only thing that’s giving me a bit of grief is custom viewport clipping different than the bounds of the window. I use viewport clipping in some of the GUI items because this allows for scroll clipping. In OpenGL on windows it does this fine, but then OpenGL under Linux it doesn’t clip the items:

3

The clipping along the bottom works in Windows, But not in Linux. Obviously a little tinkering is going to be needed.

One point which shows how MonoGame is actually optimizing on Microsofts work is that MouseState in MonoGame gives a ‘Position’ property, which is absent in XNA. I didn’t realise until after I’d done some large amounts of coding in Linux, only to be given errors when compiling for XNA a few weeks later.

I was impressed how easy it was too port from XNA too MonoGame it was just for 2D. That said though, porting too 3D is almost just as easy until one starts toying with Shaders. But that’s a struggle-and-a-rant for another day.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s