Author Topic: Fullscreen?  (Read 20519 times)

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Fullscreen?
« on: May 15, 2010, 11:51:43 am »
Hi, SupSuper!

To start with, thanks for all your efforts on this project - I believe it has a bright future ahead.

Secondly, OpenXCOM being a reimplementation of the original game, I have no choice but to wonder - will there be al least SOME improvements, besides correcting bugs? I'm especially interested in the possibility to run the game at different resolutions or at least in fullscreen (with or without advanced scaling). Right now, with my 24" monitor and game's 320x200 window it feels like playing GameBoy, not a desktop.
Do you plan to implement such an improvement in future?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Fullscreen?
« Reply #1 on: May 15, 2010, 06:13:33 pm »
Yes there will be improvements. :) I just don't want to start hyping up unseen features before I'm even done implementing the original game, and I know how people get touchy over any changes from the original.

As for the screen, I understand it's a issue, I'm on a 21'' screen myself. There is code for fullscreen and bigger scaling (by default it's scaled to 640x400 otherwise I'd go blind), just no Options for it yet. I'll see if I can put that in somewhere.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Fullscreen?
« Reply #2 on: May 15, 2010, 08:41:06 pm »
Adding support for bigger resolutions in battlescape should be easier - you can just show bigger area. But tile scaling would also be needed, without that in 1600x1200 you probably could nearly see whole map in screen :P

So, for example scaling tiles x2 and showing 2x bigger area could work nice for resolution 1280x1024.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Fullscreen?
« Reply #3 on: May 15, 2010, 09:05:52 pm »
Adding support for bigger resolutions in battlescape should be easier - you can just show bigger area. But tile scaling would also be needed, without that in 1600x1200 you probably could nearly see whole map in screen :P

So, for example scaling tiles x2 and showing 2x bigger area could work nice for resolution 1280x1024.

Yes the Battlescape is easy to suit the screen, problem is the rest of the interface isn't, stuff like Geoscape and Basescape would mostly get a whole lot of blank space or heavily resized. Some more ideas for the future...

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Fullscreen?
« Reply #4 on: May 15, 2010, 09:20:31 pm »
Maybe you could rescale geo and base to highest multiplier of original resolution (320x200?),  and fill rest with black borders.

So, for example to support resolution 1280x720, you could scale image x3 - to resolution 960x600, and make 60px upper/lower border and 160px left/right border.

It isn't best, but it should keep original game aspect ratio and allow scaling with good effect i think.

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Re: Fullscreen?
« Reply #5 on: May 18, 2010, 10:30:12 am »
The recent build (59) works ok with -fullscreen argument supplied, however the screen is not stretched to the full extent, so to say. It does look like a window inside a fullscreen mode, limiting mouse movement on its internal borders. Yet it seems I have found a remedy while playing with the code.
Setting scale to "3" instead of "2" on line 42 of main.cpp does the trick - then the fullscreen works as intended.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Fullscreen?
« Reply #6 on: May 18, 2010, 03:15:29 pm »
The recent build (59) works ok with -fullscreen argument supplied, however the screen is not stretched to the full extent, so to say. It does look like a window inside a fullscreen mode, limiting mouse movement on its internal borders. Yet it seems I have found a remedy while playing with the code.
Setting scale to "3" instead of "2" on line 42 of main.cpp does the trick - then the fullscreen works as intended.
Looks fine on my end, though this probably varies from monitor to monitor. 640x400 is a non-standard resolution these days, so a lot of monitors will just put it in a 640x480 box instead creating the whole "letterbox" look (this is how the PSX version worked). Basically this kind of issues will keep popping up until I tweak the game to better fit standard ratios, it's just not a major priority.

I might add another argument to manually change the scale, but this can cause problems if you try to run the game on an unsupported resolution.

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Re: Fullscreen?
« Reply #7 on: June 02, 2010, 08:53:00 pm »
Well, setting scale with another argument works nice so far. Good work!

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: Fullscreen?
« Reply #8 on: June 17, 2010, 09:59:35 pm »
Chocolate Doom probably has some good GPL code for scaling 320x200 to modern resolutions via SDL.

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Re: Fullscreen?
« Reply #9 on: October 24, 2010, 01:20:01 pm »
Build 178 breaks resolution scaling for me. Trying to figure it now, but it seems to have something to do with changing arguments behavior. SupSuper, how did you intend to switch resolutions in the first place?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Fullscreen?
« Reply #10 on: October 24, 2010, 02:38:37 pm »
I changed the scaling code so you can set any resolution and the game will resize to fit, eg: openxcom -width 640 -height 400. Only proportional resizes will look good though.

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Re: Fullscreen?
« Reply #11 on: October 25, 2010, 12:23:48 am »
Nevermind, your code is perfectly fine. It turns out my problem lay in the lack of fullscreen resolution support of my 24" iMac below 640x480. Thus, switching it to 320x200 or 640x400 produces weird black borders, that definitely shouldn't be there. One thing to ask for though - if you could just initialize "width" and "height" variables in main.cpp with 960x600 it would definitely do the trick, namely so only "-fullscreen" argument would be required for things to work smoothly, without resorting to -width and -height arguments if no other specific resolution is required.