Hi, Could you give me some good and bad things about having a higher screen resolution in my game? I had it at 640x480, but I moved it up to 1024x768 (my screen's resolution) and it looks much better except things are smaller, which I expected. Thanks.
Things are more like they are now than they've ever been before...
Seriously, you should expect a drop in frame rate, if it's still 60+ fps don't worry about it.
Things are more like they are now than they've ever been before...
Ok...
Seriously, you should expect a drop in frame rate, if it's still 60+ fps don't worry about it.
But other than that it is fine?
Well, if you like a retro look, that's ok to back off resolution too.
Ok thanks for the help. One more things. What if someone has a lower screen resolution? What would happen? Would it crash?
It wouldn't crash. It would look ALOT different though. The terrain, sprites, and everything else would be larger and probably more pixelated/
Only if their monitor is able to show that resoloution. And if it does I don't see any reason why things should be larger.
Whether it crashes or not will depend on your code. If a graphics card or monitor can't show a particular resolution and is correctly reporting its supported modes back down to user space, then Allegro will be unable to set the mode, and set_gfx_mode will give the appropriate return result. In ye olde ancient history, it was possible that trying to set an invalid mode would result in an unstable or unrecognisable image, but all that should be long since banished.
If you end up having to set a lower resolution and you're using pixel-based graphic resources, then obviously you'll either need to substitute lower resolution graphics or accept that all your graphics will take up a greater percentage of the screen than they otherwise would have done.
In today's age of LCD monitors, the best looking program will always run at the native resolution of the user's monitor.
However, this can be as high as 1920x1200 now... which is also a widescreen resolution.
When working with non-accelerated graphics and Allegro, you have two options when making a game. You can opt to build your game around a specific resolution, or you can allow the user to choose their resolution and arrange your graphics dynamically to the resolution selected.
If you limit your game to a specific resolution it's extremely important that you choose common resolutions, such as 640x480 and 800x600. I don't know a single system once the Pentium processor was invented that couldn't handle those. Going lower than 640x480 is generally a bad idea anymore unless you run in a window. Most machines can handle 1024x768 too.
If you allow the user to select a resolution, you have to remember that everything looks smaller when the resolution is higher, unless the graphics are scaled. Without hardware acceleration though, scaling can look really ugly or will otherwise be fairly slow.
Or, you can opt for hardware acceleration, at which point the boundaries of the screen become arbitrary values and you can thus do all sorts of things and still have the game look correct at any resolution.
The only convention with resolution that's remained constant is that the higher the resolution you run, the lower your maximum framerate will be, and that's about it.
I will only launch your game once if it runs full screen at anything except my desktop resolution. If the game is good enough I may give it a second chance if there's a configuration option, but it has to be damn good. So, in short, windowed mode with the opt-in option for full screen is best, IMO.
So, in short, windowed mode with the opt-in option for full screen is best, IMO.
I need to start remembering that. I've got to get the idea of full screen as a default out of my head.
I usually prefer full screen to windowed.
My favorite way of handling multiple resolutions is to switch to the current desktop resolution, and if it is bigger than the resolution the game was meant to be played in, then just draw to a centered rectangle of the correct size. (Which is exactly what you'd get if you set your monitor's scaling option to "center desktop")
Depending on game, you might also get away with just showing more stuff (like DF started supporting in some recent version).
Oh, I like full screen mode. I just hate small resolutions resizing/rearranging/etc my other windows. I prefer to be able to select full screen and my native resolution at the same time, and having everything be good.
Two things to consider with today's hardware:
- Each LCD monitor has a native resolution, and everything that is not the native resolution or one that evenly divides it, looks like crap. If the native resolution is 1280 x 960, then 640 x 480 looks good, likewise for 1600 x 1200 with 800 x 600.
- Back when everything was better, 4:3 was the only physical screen aspect ratio you could expect. Today you need to accommodate 4:3 (most desktop machines), 16:10 (many notebooks), and 16:9 (most widescreen TV displays, and many notebooks). The good thing, though, is that you can expect the native resolution to have square pixels, that is, the logical aspect ratio is the same as the physical one; also, most users that care about these things have their desktop resolution set to their hardware's native resolution.
I bought my current computer two months ago along with a 1330 x 768 flatscreen monitor. Windows safe mode and Linux without the Nvidia binary blob driver show the GUI desktop as "stretched" out of shape. Due to paranoia from working with mode 19 in DOS caused me to be careful about aspect ratios, but I still come across errors in my old programs now, such as this non-centered Mandelbrot set. (I was surprised the window adopted the aspect ratio though)
{"name":"598562.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/a\/3acec48ffc9a61d3c7483c003c80c3a4.jpg","w":410,"h":233,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/a\/3acec48ffc9a61d3c7483c003c80c3a4"}
Moral: ALWAYS try to test on all hardware you can get your hands on. I'll try it again in safe mode (stretched) soon as my roomie loads this winduhs up with spyware as fast as he can find "social networks".
Radical suggestion. If you find 640x480 too low a resolution and 1024x768 too high, you could always try 800x600
you could always try 800x600
Yes, but that will only look OK on CRT screens or LCDs with a native resolution of 1600 x 1200 (or 2400 x 1800, or 3200 x 2400, etc.). Or on an 800 x 600 netbook screen.
My size is consistent with the 4:3 ratio of the two he previously mentioned 
Widescreen support should be based on the game, for example platformers or games where knowing what is offscreen could be a benefit should not support different widths. Of course without scaling 800 and 1024 gives you more than 640 but scaling sprites is up to him.
... windowed mode with the opt-in option for full screen is best, IMO.
How do you feel about programs that start windowed, and play music or sounds?
Though I'm an extreme hardliner about most things, I always found that watching DVDs fullscreen is fine and recently discovered that World of Goo is similarly completely engrossing fullscreen, even though I'm aware that it isn't using my native resolution if I stop to pay attention. I guess it's because the style of graphics they employ doesn't lend itself to harsh edges, so upscaling doesn't tend to introduce false signals. It's like if you create a 10Hz signal and then upsample it to 15Hz, it'll sound pretty rough. If you create a 2Hz signal and upsample it to either 10Hz or to 15Hz, it'll sound much the same.
Something I detest is games that specifically and deliberately stretch their output to fullscreen irrespective of the output ratio. I know for a fact that my computer won't do this unless the programmer makes that explicit request (which, I accept, isn't true of all computers, but is certainly true of mine), and it just makes everything look so incredibly poor that I find it a real barrier to playing a game.
Actually, if the native resolution of an LCD monitor is high enough, and the resolution you run your software at is low enough, the blurring between pixels as the image is rendered isn't too bad. So long as the native resolution is high enough, and the assigned resolution is small enough that at least 1 pixel in each direction is a solid colour instead of blurred, then there's not too much to worry about. (IE: With 1680x1050 monitors, the horizontal must be 1120, 840 or less, and the vertical must be 700, 525 or less.)
My current project forces 640x480 but I have seen it running on both 1680x1050 and 1920x1200 monitors. Thanks to the way my game is designed graphically, it actually looks OK scaled up to these resolutions by driver, especially at 1920x1200 which is exactly 3 times the horizontal and 2.5 times the vertical. And it can always run windowed. It also has a 2x windowed mode, running 1280x960, for people with massive desktops who don't want to run full-screen.
BTW: BAF, Allegro closes full-screen video modes below desktop res fairly well. I rarely run into the issue of stuff being mispositioned afterwards. There are some exceptions, generally programs which greatly customize their windows, such as instant messaging programs, so I just close such programs before running a full-screen app. I make it a point to allow screen modes to be adjusted with the push of a button in my apps. I'll probably also add ALT-ENTER shortcut support from now on too.
Something I detest is games that specifically and deliberately stretch their output to fullscreen irrespective of the output ratio
My video driver (nvidia gforce 8400) has an option of whether to stretch or not to stretch when displaying fullscreen and the default is to stretch.
How do you feel about programs that start windowed, and play music or sounds?
If it is a game? Fine. If it is an office app? No way.
BTW: BAF, Allegro closes full-screen video modes below desktop res fairly well. I rarely run into the issue of stuff being mispositioned afterwards. There are some exceptions, generally programs which greatly customize their windows, such as instant messaging programs, so I just close such programs before running a full-screen app. I make it a point to allow screen modes to be adjusted with the push of a button in my apps. I'll probably also add ALT-ENTER shortcut support from now on too.
Windows 7 seems to be better in this regard, but it is still unacceptable. It messes up desktop icons too (again, Windows 7 seems to handle it better, but I'ev only tested it once).
The bottom line is it screws up my workflow. I'm not going to close out stuff just to run your game, so if it isn't implemented in a way I think intelligent, I just won't play it.
Well, the video mode settings in my game are saved so if it screws everything up once it won't do it a second time once you put it into windowed mode. 
It's also most likely going to be my last non-accelerated game, at which point every future hardware accelerated game I make will run at desktop res by default.
Well, I said if the game was good I'd play it again if it had an option to fix the video mode, so your games would be safe.
Thanks for the help everyone. Sorry it took so long to reply, but I had a busy weekend.
Ha, I'm late...
My video driver (nvidia gforce 8400) has an option of whether to stretch or not to stretch when displaying fullscreen and the default is to stretch.
Well that's obviously a different situation. On my machine the default modes are non-stretched, but a programmer may programmatically opt for stretched. What will almost immediately kill a game for me is if the programmer makes an effort to write their code to use the stretched mode without offering an option to disable this behaviour. I find it more surprising given that neither of the things that come with the OS that can go full screen with 4:3 aspect output (ie, the DVD player and Quicktime) opt to stretch by default. So such programs are forcing a subjective decision to break the normal convention. Irrespective of the merits, If you're going to force [objectively harmless] subjective decisions then I'd say you should always go with the prevailing convention.
In vaguely related news, I was messing around with the stuff that will become the basis of my games from the near future onwards. Since I settled on OpenGL for everything years ago, I don't face the same sort of issues as are the main thrust of this thread. What I have is an application window which may be drag resized using all the normal controls, or will go full screen by expanding its content to optimally fill the resolution of whichever screen the majority of it is on at the time.
If the window is set to contrain its content to 4:3 then it does so while still a window (well, the OS does, but you get the point) and takes up only a 4:3 region of the screen when full screen, with black bars covering whatever area is left over (which may be left and right or top and bottom if you have a portrait display).
The glViewport is handled by the view class, so the model (ie, the actual game) need not consider pixels at all unless it wishes to. It can just draw OpenGL (with all the usual hints about how to deal with different resolutions contained therein) and not worry about it.
[objectively harmless] subjective decisions
Back when wide screen TVs were introduced, one customer wouldn't want to understand why he couldn't watch his favourite TV show (which aired in 4:3 format) in a non-distorted, black-bar-free, non-clipped full-screen mode. He took an employee hostage and demanded they fix his brand-new TV set. If I'm not mistaken, he ended up killing himself.
Am I completely wrong here, but I can remember reading a few months ago that the reason why a lot of (commercial) games still use 4:3 is that the majority of American homes don't have widescreen tv's/monitors? I think the opposite is true in Europe.
Virtually every single PC sold here (Netherlands) is wide-screen.
Notebooks are wide-screen, too.
Desktop machines are usually 4:3, especially for the business market, but wide-screen monitors are available as well, and some consumer models even ship with them.
I think that overwhelmingly, Americans waited for digital television before going widescreen. Possibly there's even no official NTSC extension to support analogue widescreen broadcasts? My understanding is that PAL squashes the main part of the image to take up a large proportion of the main part of the frame, then hides the information it took out in the borders so that a suitable equipped TV can reconstruct the entire anamorphic frame...
For computer programs, I tend either to lock to 4:3 (usually when I'm writing an emulator, as someone else has already made the decision for me) or to just support any old aspect ratio. Though I think I possibly capped windowed display at 2:1. Anyway, that was under my SDL code with all the usual "cross-platform library from a few years ago" inadequacies (such as not being able to provide live rescaling of the in-window image, not being able to restrain resizing dimensions but merely to reject them and turn them into something acceptable after the fact, being stuck in a single window, etc).