Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi!

I try to set the resolution within the constructor of the "Windows Phone 8" application. But this resolution will not be taken. Also I can see that my "graphics._graphicsdevice" is still "null".
Is there any known issue with MonoGame (3.4)?

Environment: Windows 8 + Visual Studio 2012 + Monogame 3.4
(MonoGame Installed by the installer - not by NuGet!)

Just open a "new project" -> "MonoGame" -> "MonoGame Windows Phone 8 Project".
Go to "Game1.cs" and update the Game1 constructor like
C#
public Game1()
{
   graphics = new GraphicsDeviceManager(this);
   Content.RootDirectory = "Content";

   graphics.PreferredBackBufferWidth = 600;   // only new line!
   graphics.PreferredBackBufferHeight = 300;  // only new line!

   //  graphics.ApplyChanges(); // not needed - but tried without success!
}

Using XNA the new resolution is set to the given values. Using Monogame 3.4 the "default" resolution of the choosen emulator is used.

It would be great if somebody is able to help me with this problem.

Thanks in advance!
Agenor
Posted

1 solution

OK, I found this:
MonoGame doesn't do anything with graphics.PreferredBackBufferWidth or graphics.PreferredBackBufferHeight – if you used their 800×480 defaults in your XNA game, you'll find that they're zeroed in MonoGame and setting them to anything else has no effect on the game's behavior.

So I will follow the instructions here: http://social.technet.microsoft.com/wiki/contents/articles/27180.windows-phone-auto-scaling-wvga-xna-games-to-wxga-720p-with-monogame-for-wp8.aspx[^]

Didn't expect such difference between MonoGame and XNA and missing some samples. But I guess this change is mainly caused by Windows Phone 8.x.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900