I’m still feeling a little burned out, so today I decided to tackle the issue of how to make the game play properly in full screen. I tried this a while back, but the game was automatically stretched out in an ugly way then.
After looking around online, it sounded like getting XNA games to not stretch games out in full screen like that is tough, and that making your game scale to the user’s resolution is a big pain in the butt (and apparently impossible according to some people). Luckily I was able to get it working with almost no trouble at all.
The problem, though, is that monitors come in all shapes and sizes, so I still had to do some simple magic to scale things up or down properly. What’s more, since I kind of half hope to release this on the Xbox indie games service sometime (and maybe other stuff), I have to adhere to some annoying rules about “safe areas” of the screen. This means that on the Xbox, I can only use 80% of the screen – no important stuff can be on the outside edges.
So, to deal with this all, I made it so that the game will scale up as far as possible depending on the player’s system/screen resolution, and if there’s any extra blank space, a simple background is shown there.
And since I only have one monitor to test on right now, I made some simple tests to see how different screen sizes might look. The video above was just one small test.
All of this required me to create two more giant full-screen textures that stay permanently in memory, and a bunch of extra code, so I’m surprised there isn’t much lag at all, even on my cheapo computer. Even so, I might need to optimize how this works at some point.
Here’s the current build – to switch between full screen and normal mode, press the 0 button (the one in above the letter keys, I dunno if the numpad 0 works or not)