Poll

What is your screen aspect?

4:3     (like old TV, CRT monitors, and of course arcade cabs,  example: resolution 1024x768 or 648x480)
5 (31.3%)
16:9     (widescreen, like HD tv, example: resolution 1920x1080 or 1366x768)
8 (50%)
16:10     (slightly taller than above, example: resolution 1920x1200 or 1440×900)
3 (18.8%)

Total Members Voted: 15

Author Topic: [poll] What is your screen aspect? Is there a need for widescreen layouts?  (Read 10716 times)

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
I was wondering how many of you are proud users of good old 4:3 screens and how many have 16:9 or 16:10 screens.
The purpose of this poll is mainly to see if there is a need for widescreen layouts (16:9/16:10).
« Last Edit: June 15, 2015, 04:32:39 AM by verion »

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Definitely. Maybe at some point I will get a nice good 'ol 4x3 :)

I'm plan on making a tutorial that talks about making it easy to do layouts for multiple resolutions

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
I do my best to use either 21" 4:3 LCDs if I can find them. Something like the old Samsung Sync-Masters. or 17-19" if it's a smaller cab.

Otherwise I'll do my absolute best to find a large 16:10 screen, which just isn't as easy as it should be either.
16:9 are a last resort, I hate them as they waste far too much screen real estate when you play only 4:3 games on them. Perhaps not so bad as vertical screens, but still not as good as a 16:10

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Remember - the poll question is what aspect are you using RIGHT NOW.
Not what is your dreamy setup in this-year-i'm-REALLY-gonna-build-my-cab. :)

---

Right now all layouts (that Ive tried) are in 4:3 aspect. And even if the layout coordinates are in numbers relative to screen size - you're gonna end up with ugly stretched layout in 16:9/16:10

---

Quote
liquid8d: I'm plan on making a tutorial that talks about making it easy to do layouts for multiple resolutions
Resolution is less of a problem. I think that the main problem is the screen aspect.
It would be great is object could be positioned like in HTML - align left / center / align right - with margins set in % of screen width or height - but AFAIK this is not possible right now - right?

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Resolution is less of a problem. I think that the main problem is the screen aspect.
It would be great is object could be positioned like in HTML - align left / center / align right - with margins set in % of screen width or height - but AFAIK this is not possible right now - right?

It's possible. My animate module already has helper functions that can calculate those positions for you. But there is two ways to go about it really - positioning by percentage, or ideally describe separate setups for different aspects. I haven't worked on one yet, but it would be rather simple at least for positioning and sizing objects.

Technically you can create separate layouts for different aspects but then managing different ones can become a pain.

Think like this - sorry for a code explaination :)

Code: [Select]
//have a table that defines your position/sizes/settings for different aspects
local objects = {
   standard: {
      size: { w = 640, h = 480},
      title: { x = 0, y = 0, w = 400, h = 30 }
   },
   wide: {
      size: { w = 1920, h = 1080},
      title: { x = 0, y = 0, w = 400, h = 30 }
   }
}

//make aspect a config setting
local config = fe.get_config();
local aspect = config[ "aspect" ];

//if user is set to "standard", it will set width/height and get locations for standard

fe.layout.width = objects[ aspect ].size.w;
fe.layout.height = objects[ aspect ].size.h;

local loc = objects[ aspect ];

//now when you add your objects, reference the objects table
local title = fe.add_text( "[Title]", loc.title.x, loc.title.y, loc.title.w, loc.title.h );

This could be expanded to have defaults which would apply to all aspects, if the settings don't exist for a certain aspect. It could also load resources from a directory specific to that aspect.


Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Try the layout I did quite a long time ago. https://github.com/Luke-Nukem/attract-extra/tree/master/layouts/swapper

Exactly!

I've come to realize tables in squirrel are awesome. If you bundle all the variables settings into tables - it could hold vertical/horizontal/different aspects/different resolutions settings easily and give you a nice and neat one-stop place to go for altering them.

Not only is it much better then hunting down something in code but it forces you to keep different aspects/rotations in mind when you are designing it :)

You can also throw all this into a separate shared .nut and use it across layout.nut, layout-vert.nut, layout-*.nut like I did with objects here:

https://github.com/liquid8d/attract-extra/blob/master/layouts/sample_animate/resources/shared.nut

We could open up a thread in scripting to discuss more :)

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Try the layout I did quite a long time ago. https://github.com/Luke-Nukem/attract-extra/tree/master/layouts/swapper

Exactly!

I've come to realize tables in squirrel are awesome. If you bundle all the variables settings into tables - it could hold vertical/horizontal/different aspects/different resolutions settings easily and give you a nice and neat one-stop place to go for altering them.

Not only is it much better then hunting down something in code but it forces you to keep different aspects/rotations in mind when you are designing it :)

You can also throw all this into a separate shared .nut and use it across layout.nut, layout-vert.nut, layout-*.nut like I did with objects here:

https://github.com/liquid8d/attract-extra/blob/master/layouts/sample_animate/resources/shared.nut

We could open up a thread in scripting to discuss more :)

That might be an idea. I'm going to re-work  that old layout soon.

Can we get the actual screen resolution from AM? If not, perhaps there should be a way to start AM with a set operating system native res, and grab that in script.
Hang on:
width - Get/set the layout width. Default value is ScreenWidth.
height - Get/set the layout height. Default value is ScreenHeight.
This tells me that both of these are set to the start-up screen res. (if no layout is loaded)

As a test, I tried this. Works fine.
Code: [Select]
orig_width <- fe.layout.width;
orig_height <- fe.layout.height;

print("Rotation = "+actual_rotation);
if (( actual_rotation == RotateScreen.Left ) || ( actual_rotation == RotateScreen.Right ))
{
    fe.layout.height = fe.layout.width;
    fe.layout.width = fe.layout.height;
    title_Y = (fe.layout.height / 1.08);
    wheel_Y = (fe.layout.height / 1.20);
    wheelXDiviser = 2.8;
}
else
{
    fe.layout.height = fe.layout.height;
    fe.layout.width = fe.layout.width;
    title_Y = (fe.layout.height / 1.10);
    wheel_Y = (fe.layout.height / 1.33);
    wheelXDiviser = 2.4;
}

On reload, it grabs the actual screen res and stores it as a global var that doesn't get touched. Now we can change the screen width and height for a rotation, by just swapping them around.
The globals retain the original res incase we want to switch back to the original orientation.

I just spent 6 months studying Python at University, I'm finding that Squirrel is quite similar in a lot of ways which is great, I can easily transfer my knowledge to it.
« Last Edit: June 15, 2015, 08:48:37 PM by Luke_Nukem »

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
I'm going to open a discussion over in scripting to continue there.. :P

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
The discussion continues here - http://forum.attractmode.org/index.php?topic=273.0

---

But hey... don't forget to vote in the poll :D
« Last Edit: June 16, 2015, 01:25:02 AM by verion »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
4:3 for my mame cab i'm building.
I also have some 20" and bigger 4:3 CRT's with component in I plan to use.
I'm building a windows PC for steam & other games and that will be on my widescreen.
I may end up going attractmode route instead of steams interface just to make browsing emulators easier.