   Handling alternate monitor resolution
  My game currently only plays in 800x600. Now if the users monitor doesn't support 800x600 what should I do? First of all, are there monitors that don't support 800x600?Is it reasonable to pick the smallest resolution size that is bigger than or equal to 800x600 and just implement letter-boxing if I need to? Or should I scale the game up to larger resolutions?Also what about refresh rate? Currently I'm using D3DPRESENT_RATE_DEFAULT, (I'm writing to DirectX8).   
Quote:Original post by jwezorekMy game currently only plays in 800x600. Now if the users monitor doesn't support 800x600 what should I do? First of all, are there monitors that don't support 800x600?In a way. LCDs work best only with native resolution, which is HDTV these days 1920×1080. These values are not multiple of 800x600, so the results will be blurred.Personally, I consider anything that cannot run in a window broken. On multi-monitor setups full-screen is simply annoying. Especially for anyone that likes to multi-task.Quote:Is it reasonable to pick the smallest resolution size that is bigger than or equal to 800x600 and just implement letter-boxing if I need to? Or should I scale the game up to larger resolutions?If not using vector graphics, then any scaling will look horrible.800x600 is unfortunate choice since it's 3:4 ratio, while most screens today are 16:9 or 16:10. Netbooks might have 1024x600, and some have even 800x480.Quote:Also what about refresh rate? Currently I'm using D3DPRESENT_RATE_DEFAULT, (I'm writing to DirectX8).Again, LCDs tend to run at fixed 60Hz, or perhaps even some multiple of that.D3DPRESENT rate is something different though, it's mostly intended for handling multi-buffered updates.   ;  I started this project a long time ago when 800x600 was the natural choice...It's graphics are raster-based. So you're basically saying to have the option of playing in a window and in fullscreen play in the monitor's native resolution and letter box? How do I determine the native resolution of the monitor?Quote:Again, LCDs tend to run at fixed 60Hz, or perhaps even some multiple of that.D3DPRESENT rate is something different though, it's mostly intended for handling multi-buffered updates.Oh, okay, I guess I'm not setting refresh rate then. Should I set it to something?[Edited by - jwezorek on May 10, 2010 2:20:38 PM];  I would not worry so much about it.Just get the game done before it ages even more. :-)Your question if of course hard to answer. There are many ways to brink a game up in resolution, but it depends on the game. Not every game is suited for all ways.Personally the stretching I find must funny looking. So for that you could offer to support the next ratio that matches the monitor and add borders around the game screen.How about you attach a screenshot?   ;  You should take a look at EnumDisplaySettings() and ChangeDisplaySettings() api's.Here's some example code:DEVMODE DisplayMode;memset(&DisplayMode, 0, sizeof(DisplayMode));if(!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &DisplayMode)){MessageBox(NULL, "EnumDisplaySettings Failed ???", "Error!", 0);return false;}DisplayMode.dmPelsWidth = pInitInfo->Width;DisplayMode.dmPelsHeight = pInitInfo->Height;//DisplayMode.dmBitsPerPel = 32;int ChangeDisplayResult = ChangeDisplaySettings(&DisplayMode, CDS_FULLSCREEN);if(ChangeDisplayResult != DISP_CHANGE_SUCCESSFUL){MessageBox(NULL,"Error: Failed to change display mode.", "Vortez3DEngine", 0);return false;};  If its an older game, and all the logic is designed around pixel-based units of measure, then your best bet is to enable windowed play, fullscreen it at 800x600, and offer to scale up to whatever mode the users desktop runs in normally (and optionally scale to any desired resolution).You may have to impliment logic to letterbox the sides on some LCDs, as some will only run 4:3 modes stretched across the entire screen.Depending on your game's art style, a naive scaling of the graphics may not look horrible, but if it does (lower-color, cartoony graphics, ala' NES or SNES sprites tend to look bad) consider scaling to an up-sized multiple of the game's native 800x600 resolution, letterboxing what's left, and using either a naive 2x upscale, or implimenting the Scale2x or Scale3x filters used in MAME and many popular emulators to add aparent detail to old sprite games.If you used more nuetral units of measure for the logic, then you can do a lot more -- such as re-drawing the graphics at different scale, or over-scaling the resources (twice as big as the largest resolution calls for is good, typically) and then scaling down to fit the desired play reslution. The only caveat there is that you have to be mindful of how details will be lost in the lower resolutions (don't make text, or any other important detail too small. Make important graphical elements have a high contrast compared to their background so that they don't wash out when scaled down. Even shifting the alignment of a sprite a few pixels can make it pop more when things scale down.)   ;Quote:Original post by RavyneIf its an older game, and all the logic is designed around pixel-based units of measure, then your best bet is to enable windowed play, fullscreen it at 800x600, and offer to scale up to whatever mode the users desktop runs in normally (and optionally scale to any desired resolution).You may have to impliment logic to letterbox the sides on some LCDs, as some will only run 4:3 modes stretched across the entire screen.Thanks, for the detailed response. The game doesn't use pixel-based units of measurement, everything is based on a timer -- I think I'm using timeGetTime() -- and it doesn't really use sprites per se. It's kind of hard to explain ... here's a screenshot.(It's kind of hard to tell what's going on in a static picture. It's a puzzle game based on the Four Color Theorem of graph theory and the paintings of Piet Mondrian. All the rectangles are constantly in motion. The player is attempting to color them with white, blue, yellow, or red, such that no two rectangles of the same color are touching. To the extent that the player is doing a good job the painting calms down and becomes stable; too the extent he's doing a bad job it becomes unstable and starts spawning rectangles in areas of the board that aren't four-colored. Properly colored rectangles have a lifetime; they'll hang around for awhile but will eventually shrink away and die. There's an algorithm that's running periodically, sort of like a game turn, that comes up with a canonical layout based on a graph-drawing compaction algorithm and the rectangles move to the current canonical layout.)So it's pretty clear that I could come up with a general routine to draw the board at any size. The problem is that the frame of the painting is "burnt into the background" not an independent image with alpha shadows and so forth. So to make a bigger version of it I'd have to re-render it but I don't have 3D Studio Max anymore or the original (granted simple) model. Also not sure if I have the photoshop files for the glass control panel, which slides in and out at various times.Anyway I think I'm going to use getting this game, Mondrian, out the door as an excuse to buy a fancy new laptop with a 16:9 screen and just try to get it running well both on the laptop and my old desktop.   