Jump to content
  • Advertisement
  • entries
    1212
  • comments
    1738
  • views
    1145145

Screen sizes

Sign in to follow this  
johnhattan

84 views

Working on making my stuff size nicely for monitors now. Up until yesterday, the client area of the game was about 760x520 pixels. That way the game would be playable on an 800x600 machine (allowing for title bars etc). Problem is, I also wanted the user to have a full-screen option. To do full-screen, I had two options:

1. Resize the window and stretch everything in it to fit the larger window.

2. Change the machine's resolution and don't stretch.

Option 1 is usually preferred in a Flash app (given that everything's vector and resizes with almost no performance hit), and it looks quite nice that way. Problem is that I have a lot of bitmaps in my app, and Flash needs to stretch 'em on-the-fly. Performance dropped a little on my machine, but I imagine it would drop a lot on a lower-end machine, so I decided to change the monitor resolution directX-style and leave the game at its current size.

That, however, was a problem too. If I drop the machine resolution and center the game, I end up with a big border of empty around it (given the aforementioned slightly-smaller-than-800x600 size I was using). And it really looked ugly after changing machine resolution. Making the client window 800x600 would fix that, but that'd make the game unplayable on an 800x600 screen as anything but full-screen.

So I implemented two checkboxes in the setup. One is called "smaller screen", and it shrinks the client area to 640x480 so it's playable on an 800x600 screen. This does cause the aforementioned problem of bitmap stretching, but since you're stretching things smaller rather than bigger, the performance hit isn't as bad.

When the game runs the first time, it checks the monitor's current resolution, if it's 800x600 or lower, "smaller screen" is selected by default. For everyone else, it's really not necessary (unless you just want the game to be smaller).

The other checkbox is called "full screen", and it kicks the monitor into 800x600, kills off the title bar, and centers the game. Thus you're full-screen without the performance hit of stretching.


Thus is the world of the discount rack --don't assume that your game's players will have as nice a screen as you do.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!