A Critical Problem With MonoGame

Seems it’s impossible to in a cross platform manner know what your rendering surface size is actually going to be.

In XNA, in Initialize() you can query the ViewPort dimensions and they will be correct.

Seems that in many other targets you don’t really know this for sure. Most likely it will return 800×480 till you get to LoadContent().

On some devices what you ask for is not what you get.

Some consistency would be nice.

In the meantime I’ve had to give up on semantics and move all my¬†Initialize() code that needs to know the Viewport size (like all of it) out into LoadContent().

Also, beware with the current Xamarin Studio on the Mac. It does not copy and paste properly if you have Windows CRLF ending in your files. It will mess up the end of your paste..



About James McParlane

CTO Massive Interactive. Ex Computer Whiz Kid - Now Grumpy Old Guru.
This entry was posted in Uncategorized. Bookmark the permalink.

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 )

Connecting to %s