Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Screen Resolutions  (Read 5607 times)

0 Members and 1 Guest are viewing this topic.

Aritz

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
    • AritzArt.com
Screen Resolutions
« on: June 03, 2007, 06:19:58 PM »

It would be great to have a system to run the games in any resolution/aspect like in full 3d engines. Seeing the games in LCD without its native resolutions is really anoying. Or at least a system to have a native resolution, plus a customiced borders for different resolutions if you don´t want to play in windowed mode. For example, I have a 1680 x 1050 resolution monitor and I would like to make/see may demos in full unscales quality  :-\.
Logged

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Screen Resolutions
« Reply #1 on: June 04, 2007, 01:18:23 AM »

Well, a developer can always render out multiple resolutions for the background and use rescale code (always scale down) for panels and text, but that's a semi-major task (not so much if you have the right scaling function) and can lead to lots of storage space issues.

Here's an example of code I use for panel rescaling in a 3D Gamestudio project. I create a single set of panels at my largest supported resolution and go from there:

Code: [Select]
var maxRes[2] = 1600, 1200; //0 = represents your maximum supported X; 1 = represents your maxiumum supported Y
panel* pnl; //pointer

function panelRefresh (pPanel)
{
pnl = pPanel;
var tempScale[2];

if(pnl)
{
tempScale[0] = pnl.scale_x; //store current panel's X scale
tempScale[1] = pnl.scale_y; //store current panel's Y scale

//Scaling
if(blackpanel_pan)
{
   pnl.scale_x = screen_size.x / 639; // smallest supported mode is 640x480
   pnl.scale_y = screen_size.y / 479;
}
else
{
   pnl.scale_x = screen_size.x / maxRes.x;
   pnl.scale_y = screen_size.y / maxRes.y;
   }

//Modify position:
tempScale[0] = pnl.scale_x / tempScale[0];
tempScale[1] = pnl.scale_y / tempScale[1];

//Apply modification
                pnl.pos_x *= tempScale[0];
pnl.pos_y *= tempScale[1];

//Switch the filter flag off if the current resolution = maxRex.x
pnl.filter = (screen_size.x != maxRes.x);
}
}

function scaleAllPanels()
{
    panelRefresh(pause);
    panelRefresh(loadmenu);
    panelRefresh(savemenu);
    panelRefresh(gameSavingScreen);
    panelRefresh(mainmenu);
    panelRefresh(credits);
    panelRefresh(filmGrainPanel);
    panelRefresh(blackpanel_pan);
}
Logged
The Disenfranchised™ - coming later

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Screen Resolutions
« Reply #2 on: July 18, 2007, 05:10:31 AM »

I'm going to second this request. It would be fairly awesome to have this.  O0
Logged

Uhfgood

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 117
  • No pain, no game!
    • View Profile
    • Indie Flux
Re: Screen Resolutions
« Reply #3 on: August 09, 2007, 10:15:38 PM »

I third it ;-)

For 2D games we're talking about resizing the whole frame, so you might not have to resize the individual graphics, just have it rescale after the frame has been drawn. 

The other thing is aspect ratio.  This would be a kind of problem, but i think the solution would be, to set a resolution that the monitor could handle, and then scale the frame into the correct aspect ratio.  In other words, if i'm doing a 16:9 game, using a resolution of say 800x600, would squish the image to fit, however, if you resized the aspect ratio to remain fixed, but only scaled the frame, the res of the monitor would still only be 800x600, but the frame would be something like 800x450 centered... (sort of what you do with matted widescreen on some older letterbox movies -- and matted means they adjusted the aspect ratio in the studio, and outputted to a 4:3 aspect ratio display, verses using true anamorphic, where it squishes the image, and the un-squishes it when you watch it on a 16:9 tv)...

i'm really considering highdef tv resolutions myself, but my tv only is running 720p, and i don't have a way to output to it at the moment, and my monitor is not a widescreen monitor, nor does it go over 1280x1024 --  So it would be useful to make a game in say 1980x1080 -- and then have it scale to my monitor's 1280x1024 and keep the aspect ratio intact... for 1280x1024 it would be 1280x720 (which is pretty much 720p hidef resolution there).

Things to think on at least... I'll build my background first, to see if i can't find some system that will do this for me.

Keith
Logged
--------------------------------------------
Keith Weatherby II
uhfgood -AT- frontier -DOT- com
Games Afoot Software
Indie Flux - Previews, Reviews, News and more!
--------------------------------------------
 

Page created in 0.017 seconds with 19 queries.