Author Topic: At-The-Arcade Flex (multi-resolution / multi-aspect, MAME + pinball) [Release]  (Read 24436 times)

gsm2021

  • Newbie
  • *
  • Posts: 6
    • View Profile
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.

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
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.

sosimple

  • Full Member
  • ***
  • Posts: 57
    • View Profile
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).
« Last Edit: September 04, 2021, 06:51:17 AM by sosimple »

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
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)

sosimple

  • Full Member
  • ***
  • Posts: 57
    • View Profile
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.
« Last Edit: September 04, 2021, 01:54:38 PM by sosimple »

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
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.

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
I added a minor V1.1 update, just:

* Fix some potential crash issues
* Add automatic rotation for snap videos, in the case of Pinball videos that are landscape (i.e. sideways). I applied this logic only to "Pinball" emulators but not to "FX3", because there is a commonly used set of snaps for FX3 that are landscape but with the table oriented vertically.

I replaced the download with this version 1.1, but the layout.nut file is the only thing that changed.

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
To better manage any future changes, this theme is also now stored in GitHub at https://github.com/toddsay/AtTheArcadeFlex

Tungsten78

  • Newbie
  • *
  • Posts: 8
    • View Profile
Nice, open to merge requests?

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Nice, open to merge requests?

Sure, this whole project has been a collaboration, a modification and enhancements to the work of others. I can accept changes as long as they support the various aspect ratios (the hotkey setting can be used to simulate different resolutions).

punkfungus

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hi, it's an awesome Theme that I'll use but is there an option to show in wich FILTER I'm on like All, Favorites? it's just written Game for all filters if I enable the Game Information.

thank for the good works.

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Hi, it's an awesome Theme that I'll use but is there an option to show in wich FILTER I'm on like All, Favorites? it's just written Game for all filters if I enable the Game Information.

thank for the good works.

Thanks! Unfortunately no, there isn't currently a way to show the filter. But this is a good point, and Tungsten78 mentioned this too, that there should be additional details in that bottom section. I'd be happy to add more but I'm not sure how soon I'll get to that.

For now, if you're interested in editing your layout.nut file, you could look for the section where it says "Game: [ListEntry]/[ListSize]", and replace Game with "[FilterName]" (but if the result is wider it may require playing with positioning/size to make everything fit).

Mark Norville

  • Sr. Member
  • ****
  • Posts: 233
    • View Profile
As it is your fault, I thought that I would add in here lol. I had a look through your layout.nut and blew my mind on how complex it is, and without ripping off the code bit by bit, I am trying to do what you have done in your layout

E.G I am trying to remove Snk / Playmore Sega (A lot of text that I do not want)

The code that I have is basic, which is what I like

Code: [Select]
//MANUFACTER FINISHED
local genre_info0 = fe.add_text("[Manufacturer]", flx*0.10, fly*0.96, flw, flh*0.015 );
genre_info0.font = font_bold;
genre_info0.charsize = 90;
genre_info0.align = Align.Left;
genre_info0.set_rgb(57,255,20);
// MANUFACTER END
Is there a much simpler way of stripping out unwanted from the above code?

I have been trying to follow some of your code

However, I am going brain dead and I am still trying to learn as I am going along, but I have hit a brick wall.

P.S I love the skin, at first I thought that I wanted the arcade, but then I changed to Panscan and that is amazing. I am trying to recreate your dot matrix listings at the bottom, but I am doing it from very basic knowledge.

Code: [Select]
function strip_man( ioffset )
    {
        local m = fe.game_info(Info.Manufacturer,ioffset);
        return split( m,"/,(" )[0];
    }
    fe.add_text( "[!strip_man]", flx*0.15, fly*0.627, flw, flh*0.050 );

I finally worked it out, my code is above, I have tried it on MAME and it works.  The original code is below that I was trying to copy, but could not get it working. The skin that I am working on has very basic code, compared to other themes such as this, which leads me to believe that the more code you have the more optimised the theme will be. I am experiencing some slow down and crashes using basic code.

local name = split( name, "(" )[0]; // shorten the manufacturer name when one of the followig characters exist
//      name = split( name, "[" )[0];
//      name = split( name, "/" )[0];
//      name = split( name, "," )[0];
//      name = split( name, "?" )[0];


Regards

Mark
« Last Edit: January 12, 2022, 12:02:32 AM by Mark Norville »
Well I am back a new PC I7 4790K, 780 TI, 16 Gigs, Windows 10. Hopefully will get delivered at weekend.

Computer Specs : I7 3770K, 780 TI, 16 Gigs, Win 10
HD Specs : 1 x 1 TB SSD + 4 x 8 TB = 33 TB (fullish)
First system : ZX81 (Yes I am an old fart)
PS Network : MarkNorvile
Xbox : Mark Norville

punkfungus

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hi, it's an awesome Theme that I'll use but is there an option to show in wich FILTER I'm on like All, Favorites? it's just written Game for all filters if I enable the Game Information.

thank for the good works.

Thanks! Unfortunately no, there isn't currently a way to show the filter. But this is a good point, and Tungsten78 mentioned this too, that there should be additional details in that bottom section. I'd be happy to add more but I'm not sure how soon I'll get to that.

For now, if you're interested in editing your layout.nut file, you could look for the section where it says "Game: [ListEntry]/[ListSize]", and replace Game with "[FilterName]" (but if the result is wider it may require playing with positioning/size to make everything fit).

Thanks it's what I needed, good work almost perfect on my CRT Arcade Cabinet.

tsaylor

  • Full Member
  • ***
  • Posts: 58
    • View Profile
As it is your fault, I thought that I would add in here lol. I had a look through your layout.nut and blew my mind on how complex it is, and without ripping off the code bit by bit, I am trying to do what you have done in your layout

Ha, yes part of it is my fault and part it the previous author (both the good parts and the bad parts). I actually haven't done a lot to that text section, as most of my focus was around the multi-aspect ratio changes. Most layouts seem to do things as in your example of "flx*0.10, fly*0.96, flw, flh*0.015", but that doesn't work so well when supporting both portrait and landscape orientations, so a lot of my changes involved using formulas instead of hard-coded numbers. The main thing I changed in this bottom text section was to support one line vs. two lines (for landscape vs. portrait). I'd like to go back at some point and add additional information in that section, and possibly rework how it formats those lines.

But anyway I'm glad you were able to have some success! And of course, copy or modify anything you like. These .nut files definitely take some getting used to. I also wanted to make sure you were aware of the wiki at https://attractmode.gitlab.io/wiki/reference/magic-tokens, just in case you aren't using that already.