Attract-Mode Support Forum

Attract-Mode Support => Themes => Topic started by: tsaylor on May 16, 2021, 05:33:22 PM

Title: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on May 16, 2021, 05:33:22 PM
For my arcade cabinet, the theme "At-The-Arcade Multi-Cab" was nearly perfect! But then I ruined everything by getting into pinball games -- a problem because I turned my monitor vertical, but also because I needed to display pinball tables as well. With that, I undertook a months long project of learning how to write Attract-Mode layouts and shaders, and modified At-The-Arcade Multi-Cab to become: At-The-Arcade Flex! A flexible version of the original, supporting (in theory) every resolution and aspect ratio, and also adding support for the display of pinball cabinets.

First, a note of thanks! This layout is definitely standing on the shoulders of giants as they say, and it would not exist without the excellent work of:
Features added with this layout:

Demo:
https://www.youtube.com/watch?v=8IdFfWR30RI

Download the theme:
https://mega.nz/file/vkYxBCIB#YlLO7kQx82o-YbxR9gd5yYMrtuFYqO2z4uCNOusjxHc
For install instructions, please see the ReadMe.txt file in the download zip (thanks again to Yaron2019)

Download the updated cabs:
https://mega.nz/file/rA833QiL#dqhQFfdh608n1pAdJdNnngajGSFI1NktuBkc37bJzMw

If needed, download other art from Damonxxx's original post:
http://forum.attractmode.org/index.php?topic=3778.0

Download fanart (optional):
https://mega.nz/file/gQlkBKia#Hz87o3SeV2I8GmR52aFCF-etVmJO-kjPWEt1VzBbVk0

Download bezels (optional):
https://github.com/thebezelproject/bezelproject-MAME


Examples shown below for:
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on May 16, 2021, 05:34:02 PM
And one more screenshot showing a "square" resolution
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: Yaron on May 16, 2021, 11:59:20 PM
My name is Yaron2019 and I endorse this layout  :D

Now seriously - this is what At-The-Arcade was missing, a more dynamic approach to resolutions and aspect ratios. On the way tsaylor did an excellent job to also enhance other features. I love this, well done!
Community effort FTW!
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on May 17, 2021, 12:02:49 AM
Indeed, community and collaboration is where it's at! Go team! 8)
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: P47 on May 22, 2021, 07:16:56 AM
Fantastic theme, but works on PI4 ?
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on May 23, 2021, 12:47:31 AM
Honestly I've never tried running Attract-Mode on a PI at all, so I'm not sure what the platform differences are. I've only tested on a PC, but now I'm curious how it looks on other platforms.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: Jontox on May 25, 2021, 11:08:41 PM
Amazing contribution effort!
What a theme !

Just a quick question, how can we adjust the ambient music volume in comparison to videos snap volume ?
Attractmode volume settings ambient doesn’t seem to work.

Thanks a lot for your combined works
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on May 25, 2021, 11:44:38 PM
Thanks Jontox! I hadn't really experimented with that, but it seems like the global sound settings are the only control available. Doing some quick tests, the "Movie Volume" setting controls the snap volume, and the "Sound Volume" controls the ambient sound volume (or music) and wheel sounds. It seems that "Ambient Volume" doesn't control anything in this case.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: Jontox on June 05, 2021, 11:50:26 AM
Hi tsaylor,

Is there a way to fix the theme resolution to 320x240 P ?
Any settings in the layout.nut to modify? Would the theme be compatible?

I’m currently running an arcade computer box within a candy cab with a crt arcade monitor.
For now, attractmode seems to start at desktop resolution 640x480i of win10.

Interlaced mode is not suitable, visually speaking.

Many thanks in advance for your thoughts on this

Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on June 05, 2021, 01:34:01 PM
Hi Jontox. I don't have experience with that type of monitor so I'm not really sure what the options are. As far as I know, AttractMode wants to run at the native Windows resolution. In theory you can force it in layout.nut by doing something like this:

Code: [Select]
fe.layout.width=320;
fe.layout.height=240;
fe.layout.preserve_aspect_ratio=true;

However I haven't had luck with that on my system, as it still seems to use a larger resolution than that. And I suspect it won't do what you want anyway since AM is still starting with that 640x480i resolution.

The other thing you can try is switching AM to windowed mode in the General options. That should allow you to size the window. Trying that I was able to get a 320x240 window, and this theme did look correct there. But in that case you'd just be using part of the screen so I don't think that is what you are looking for either.

Unfortunately I suspect that none of this will give you what you are looking for. Really it seems like you'd need to somehow configure the native Windows resolution at 320x240, but I'm not sure if that is even an option for your hardware.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: Jontox on June 05, 2021, 10:58:11 PM
Thanks for your reply tsaylor.
What you replied confirms what I found out on arcadecontrols forum.

Here the answer:

 http://forum.arcadecontrols.com/index.php?topic=158043.0 (http://forum.arcadecontrols.com/index.php?topic=158043.0)

I’ve read also on another thread on arcadecontrols, but don’t have the link right now that the way attractmode is coded it is dependent on the win7/10 desktop resolution chosen.

So thanks to crtemudriver, you can inject first with vmmaker an additional custom resolution below 640x480i thus 320x240p, and use it.
I’ll test it and report back here.

N.B.: From what I read, and these are the words from “substring” the nice guy behind GroovyArcade (Linux iso including all is needed Grovvyarcade, crtemudriver, ….for setting up a computer box in a arcade cabinet) the best progressive low res resolution would be 384x288 @ 50Hz.
http://forum.arcadecontrols.com/index.php/topic,160023.120.html (http://forum.arcadecontrols.com/index.php/topic,160023.120.html)
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: cybermat on June 06, 2021, 01:24:52 PM
Regarding Pinball, there are cabinets pack for Visual Pinball and similar ? I just found video snaps for pinball.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on June 06, 2021, 02:33:21 PM
Hi cybermat. The images I found were at emumovies, and called a virtual machines pack, like this https://emumovies.com/files/file/3734-pinball-fx3-virtual-machines-pack. If you have such images you can put them in directory identified by "pincabs" in your emulator .cfg file.

This "flex" theme also includes a generic image of a machine, where the snaps and backglass (using the "marquee" images) can be rendered, so it should be possible to get the correct effect by supplying only the snaps and backglass images. I did notice that many pinball snaps are oriented sideways (horizontally wide rather than vertically tall). This theme does not currently try to rotate them so only vertical snaps will look correct.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: Jontox on June 08, 2021, 01:26:30 PM
Thanks for your reply tsaylor.
What you replied confirms what I found out on arcadecontrols forum.

Here the answer:

 http://forum.arcadecontrols.com/index.php?topic=158043.0 (http://forum.arcadecontrols.com/index.php?topic=158043.0)

I’ve read also on another thread on arcadecontrols, but don’t have the link right now that the way attractmode is coded it is dependent on the win7/10 desktop resolution chosen.

So thanks to crtemudriver, you can inject first with vmmaker an additional custom resolution below 640x480i thus 320x240p, and use it.
I’ll test it and report back here.

N.B.: From what I read, and these are the words from “substring” the nice guy behind GroovyArcade (Linux iso including all is needed Grovvyarcade, crtemudriver, ….for setting up a computer box in a arcade cabinet) the best progressive low res resolution would be 384x288 @ 50Hz.
http://forum.arcadecontrols.com/index.php/topic,160023.120.html (http://forum.arcadecontrols.com/index.php/topic,160023.120.html)

Some feedback after testing for all those that would be interested.

Definitely this theme is better in 640x480i @ 60Hz than lower progressive resolution.

My VMMaker refuse to use 384x288P @ 50 Hz on my Nanao MS9-29. Anyway, I won't get below the first mentioned resolution.



Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: sosimple on September 03, 2021, 07:13:43 AM
Thanks for this amazing mod. But i have a small problem. I run it in a 4k 65 inch tv (3840 x 2160 pixel) ..  ;D
The original theme (the arcade multicub) is working perfectly. This one is extremely luggy in this resolution. If i first change tv resolution to HD then it works fine, without the lug. I can create an autoit script to change resolution before run attract mode, and restore it after but it isn't the best approach.. If you or anybody has any idea how to change the resolution to something lower (hd for example) it would be fine.
Thanks anyway.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: gsm2021 on September 03, 2021, 10:52:12 AM
in the display options of the flex layout, at the very bottom, you should see an option that says "Enable key for resolution testing". Set that to "Custom2" for example. Then go into Control Settings in Attract options and set Custom2 to whatever keys you want that aren't assigned to something else. Then while in the display you should be able to hit those set keys to change resolution. Hope that helps.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on September 03, 2021, 05:56:12 PM
sosimple, my 4k system runs this theme fine, but it's using a fairly modern GPU (Nvidia 1660ti). What does your CPU/GPU hardware look like? And when do you notice the lag? I assume it's when scrolling through the game titles?

gsm2021's suggestion is good advice for testing different aspect ratios, but I don't think it will help in this case because it is simulating different aspect ratios but still based on the current resolution.

I'm trying to think of what would cause the most slowdown. Most likely suspect is the shaders, which are used by several settings:
You could test whether disabling any/all of those makes a significant improvement. Perhaps some of those are more of a GPU burden than others.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: sosimple on September 04, 2021, 06:36:18 AM
sosimple, my 4k system runs this theme fine, but it's using a fairly modern GPU (Nvidia 1660ti). What does your CPU/GPU hardware look like? And when do you notice the lag? I assume it's when scrolling through the game titles?

gsm2021's suggestion is good advice for testing different aspect ratios, but I don't think it will help in this case because it is simulating different aspect ratios but still based on the current resolution.

I'm trying to think of what would cause the most slowdown. Most likely suspect is the shaders, which are used by several settings:
  • Enable CRT screen glow shader
  • Enable CRT bloom or lottes shaders
  • Enable lighted marquee effect
  • Enable wheel background
  • Text glow on "Show game information" and music player
  • (the top drawn above the cabinet for narrow resolutions)
You could test whether disabling any/all of those makes a significant improvement. Perhaps some of those are more of a GPU burden than others.
As you already have noticed, i don't have good gpu. I use a mini pc i7 10710u (6 core 12 threat) with it's internal gpu.. 16 giga ram. I also test your theme to a i5 7200u laptop (also the same internal gpu) and it is working fine there but the resolution of the screen is HD there. Also if i set the tv resolution to HD it works fine. Actually you can't tell what is lugging as it is everything lug, even the videosnap i think.. I already have set a button to change aspects ratio (i think this is what is changing, not the actual resolution) but no improvement.. I'll try to change some things to see if things go better. Until now whatever i changed, may improve things but not much. The solution would be if theming has the option to change resolution. I think it haven't until now.
At past i had written a script in autoit which changed the resolution - run attract mode - wait until attract mode stops working - changed resolution back.  But i doesn't know where i have it now. I can always re written it but i need to remember some coding..
I'll posted if/when I'll do it again although it may be a non universal solution as changing resolution may not work in all monitors by same code.
I actually using your theme instead of original at the arcade multicub mostly because cabinet are a bit bigger in your theme and i like it more. Otherwise its almost the same for my use. The original doesn't lugg in 4k.
(i also like it better because i have pinball games).
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on September 04, 2021, 11:37:29 AM
Ah ok, so you have a strong CPU, better than mine, but no discrete graphics card. I don't believe AttractMode has any way to set screen resolution. The resolution of the layout can be changed in the scripting, but that just changes the area within the window not the resolution of the screen itself, so you'd just end up with black borders which I don't think is what you are looking for.

You could use an external app to switch resolution as you mentioned, but I'm also interested in improving the performance if we can find a way. Thinking about what is different between the original multi-cab and this flex version, but main thing that comes to mind is the shader that does the wheel background. I could see that one causing poor performance, so I'd be curious how much improvement you see if you turn that feature off. The other thing that comes to mind is the shader that draws the cabinet top, depending on your aspect ratio -- do you run this in portrait or landscape?

It's nice to see the pinball feature is useful to somebody other than myself. 8)
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: sosimple on September 04, 2021, 01:49:11 PM
I'm also interested in improving the performance if we can find a way. Thinking about what is different between the original multi-cab and this flex version, but main thing that comes to mind is the shader that does the wheel background. I could see that one causing poor performance, so I'd be curious how much improvement you see if you turn that feature off. The other thing that comes to mind is the shader that draws the cabinet top, depending on your aspect ratio -- do you run this in portrait or landscape?

It's nice to see the pinball feature is useful to somebody other than myself. 8)
Ok i found the "guilty". Its :Crt glow shaders. I changed everything one by one. Although everything seems to have a small reduction in performance (so if you don't use anything will be the fastest possible - probability someone with worst hardware might find it useful -), but crt glow shaders does an huge lugginess.. I would say 20-30 times reduction speed than all other options together :). You press a key to show next game in cabin and it shows it 2 sec later... By disabling this its fast enough for me.
I run it in landscape (65 inch tv). It looks wonderful :)
Thanks again for all.
Title: Re: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]
Post by: tsaylor on September 04, 2021, 02:42:20 PM
Excellent! Thanks for running those experiments, it is good to know. I think that glow shader does some sort of overlapping gaussian blur (and it extends out over the whole screen to some degree, so probably operating on way too many pixels in the 4k case). That option also exists in the original multi-cab theme so perhaps it would slow that one down too if enabled. But I would definitely regard that as one of the optional effects, not really critical to have, so I'm glad that was able to get you "good enough" performance.

Maybe eventually we could get the newer wheel logic in there, as I understand it performs much better. But that's a project for another day.