Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Aspect ratio for distribution  (Read 8031 times)

0 Members and 1 Guest are viewing this topic.

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Aspect ratio for distribution
« on: September 06, 2012, 09:24:45 pm »
When I finish my crapsgame (if I ever do), I would like to distribute copies to my family and friends who like to shoot craps in Las Vegas.  Some are still using old 4:3 aspect ratio monitors, while others are using modern 16:9 aspect ratio monitors.  I myself am using 16:10 aspect ratio monitors on my desktop and laptop.

A FEW QUESTIONS:

1. When you code your SFML projects, what aspect ratio do you use?

2. What pixel resolutions do you use when you create the SFML window?

3. Do you resize your SFML window to match the monitor being used, or just stay with a small screen size that will work on every monitor?

Thanks,
Raptor (C++ beginner coding his first SFML game.)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Aspect ratio for distribution
« Reply #1 on: September 06, 2012, 10:00:56 pm »
A FEW QUESTIONS:

1. When you code your SFML projects, what aspect ratio do you use?
2. What pixel resolutions do you use when you create the SFML window?
3. Do you resize your SFML window to match the monitor being used, or just stay with a small screen size that will work on every monitor?
I mostly start of with a 800x600 (4:3 ratio) window, because that's about the smallest size I would want to support. I also mostly develop in window mode, because my screen is obviously bigger than 800x600. ;)

This all largely depends on the game you're making. But you could mostly support all the possibilities, it's just a matter of handling things right (i.e. view scaling for the right aspect ratio).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #2 on: September 06, 2012, 10:13:52 pm »
Eduard Engine starts as 641x641 window, but it's resizeable and there is options screen planned that gives a choice to switch to one of supported fullscreen modes. View's size matches the window's size automatically now but there will be a scaling option of x1 x2 and x3.
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Aspect ratio for distribution
« Reply #3 on: September 06, 2012, 10:17:09 pm »
Eduard Engine starts as 641x641 window...
May I ask why such a 'strange' number? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #4 on: September 06, 2012, 10:21:00 pm »
EEGameMaster::EEGameMaster(void):timestock(0)
{
//      Renderer.create(sf::VideoMode::getFullscreenModes()[0],"Aha..!",sf::Style::Fullscreen);
        Renderer.create(sf::VideoMode(641,641),"Test");//641 so halfsize of view has 0.5 at end, for testing evil quad bug
        Renderer.setVerticalSyncEnabled(true);
        def_font.loadFromFile("Resources/Main/arial.ttf");//Laurent Gomila and the Kingdom of the Lost Font!
        game_screens.push(new EEMenuScreen());
}
Ironically, the first fix to quad bug introduced a scrolling bug that appeared only with even resolutions.
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Aspect ratio for distribution
« Reply #5 on: September 06, 2012, 10:37:28 pm »
Ironically, the first fix to quad bug introduced a scrolling bug that appeared only with even resolutions.
I see, although I don't really know anything about those bugs. ;D

def_font.loadFromFile("Resources/Main/arial.ttf");//Laurent Gomila and the Kingdom of the Lost Font!
lol xD
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #6 on: September 07, 2012, 12:04:34 am »
I mostly start of with a 800x600 (4:3 ratio) window, because that's about the smallest size I would want to support. I also mostly develop in window mode, because my screen is obviously bigger than 800x600. ;)

This all largely depends on the game you're making. But you could mostly support all the possibilities, it's just a matter of handling things right (i.e. view scaling for the right aspect ratio).

That's interesting that you start with such a low resolution (800x600).  What does "develop in window mode" mean and how does one do that?

I'm rethinking my decision to have my "half a crap table" in the 16:10 aspect, although everything fits so nicely using the 16:10 aspect.  I'll change it to the 4:3 aspect and go from there.  At least 4:3 aspect will fit on every monitor.

Thanks,
Raptor

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #7 on: September 07, 2012, 12:07:46 am »
Eduard Engine starts as 641x641 window, but it's resizeable and there is options screen planned that gives a choice to switch to one of supported fullscreen modes. View's size matches the window's size automatically now but there will be a scaling option of x1 x2 and x3.

I Googled "Eduard Engine" and the finds were mostly about airplanes.  Where can I find the sample C++ code for that?

Thanks,
Raptor

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #8 on: September 07, 2012, 12:20:29 am »
Quote
I Googled "Eduard Engine" and the finds were mostly about airplanes.  Where can I find the sample C++ code for that?

Thanks,
Raptor
Eduard Engine is my sfml project, there's no source code, there's only win32 exe in my other thread, sorry.
All I do there is catch the resize event and update the view's size.
Maybe you can choose some reasonable resolution or few and do the same(like 1024x768 maybe, small enough to fit on small screens but big enough to not to look too small on bigger screens). That'd not streach anything but there would be blackness on the outside. It's really complicated issue with a bilion of different solutions.
Back to C++ gamedev with SFML in May 2023

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #9 on: September 07, 2012, 03:09:36 am »
Eduard Engine is my sfml project, there's no source code, there's only win32 exe in my other thread, sorry.
All I do there is catch the resize event and update the view's size.
Maybe you can choose some reasonable resolution or few and do the same(like 1024x768 maybe, small enough to fit on small screens but big enough to not to look too small on bigger screens). That'd not streach anything but there would be blackness on the outside. It's really complicated issue with a bilion of different solutions.

Yes, I think I'll do that, and have my initial screen size as 1024x768.  I can work on having larger screen resolutions available after I get my craps game working.  I'll just design all of my screens at the larger resolutions and resize them down to 1024x768 in Photoshop.

Thanks,
Raptor

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #10 on: September 07, 2012, 09:46:09 pm »
Yes, I think I'll do that, and have my initial screen size as 1024x768.  I can work on having larger screen resolutions available after I get my craps game working.  I'll just design all of my screens at the larger resolutions and resize them down to 1024x768 in Photoshop.

While 1024x768 displays fine on my 1680x1050 desktop monitor, the bottom portion of SFML's window is covered up by Vista's taskbar on my 1280x800 laptop screen.

Actually, if SFML's window size is set to 1024x768, it appears that if a window frame is used, the total window size will be larger than 1024x768.  This would make the window too large to fit on 1024x768 screens, let alone that the Window's taskbar will cover some of the SFML window.

If I set SFML's window to a non-standard resolution like 990x700 (to accomodate Window's task bar being at the bottom or the side), will there be any negative effects?  FRex mentioned that he's using 641x641 resolution so I suspect that using a non-standard resolution is OK, but I just want to confirm this before I recreate all of my .png images.

Thanks,
Raptor

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #11 on: September 07, 2012, 10:59:18 pm »
If you want to cover entire window, use proper, real fullscreening and create a state/screen like a one in attachment(but not as ugly, this is just screen of working resolution and window/fullscreen switcher I have going on, it's still work in progress  :P)

[attachment deleted by admin]
« Last Edit: September 07, 2012, 11:07:07 pm by FRex »
Back to C++ gamedev with SFML in May 2023

Raptor88

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • Email
Re: Aspect ratio for distribution
« Reply #12 on: September 08, 2012, 04:20:53 am »
If you want to cover entire window, use proper, real fullscreening and create a state/screen like a one in attachment(but not as ugly, this is just screen of working resolution and window/fullscreen switcher I have going on, it's still work in progress  :P)

Aside from using proper fullscreen, anyone know if using custom screen sizes will cause any problems?
By "custom screen sizes" I mean screen sizes that are NOT standard screen sizes like 800x600, 1024x768, 1366x768 etc.

For example:
App.create(sf::VideoMode(932, 699, 32), "TEST SCREEN");
if (image.loadFromFile ("Images/Menu-932x699.png") != true) {

Will this cause any problems?  Or does SFML have to use standard screen sizes to run reliably?

Laurent, if you read this could you share some insight on this?

Thanks,
Raptor

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Aspect ratio for distribution
« Reply #13 on: September 08, 2012, 07:41:58 am »
Aside from using proper fullscreen, anyone know if using custom screen sizes will cause any problems?
No, otherwise it wouldn't be supported. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Aspect ratio for distribution
« Reply #14 on: September 08, 2012, 09:25:57 am »
"Standard" video modes must be used only in fullscreen mode (because you directly change the resolution of the monitor). But in windowed mode, it's just a window so it can be any size.
Laurent Gomila - SFML developer

 

anything