Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tsaylor

Pages: [1] 2 3
1
Hi minkage... I notice you have a typo in your
Code: [Select]
artwork    cabinents section (extra "n" in that word).

2
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.

3
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.

4
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.

5
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.

6
Indeed, community and collaboration is where it's at! Go team! 8)

7
And one more screenshot showing a "square" resolution

8
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:
  • Render at "any" resolution or aspect ratio (tested at the most common aspect ratios 16:9, 16:10, 4:3, 1:1, 3:4, 10:16, 10:9)
  • Hotkey to cycle through various resolutions (useful for testing or simulating other screen sizes)
  • Change most everything to rely on formulas and a table of positioning rules, instead of hard-coded numbers/percentages
  • Add support for displaying pinball cabinet/snapshot/marquee images (in addition to the existing MAME arcade cabinet support)
  • Allow cabinet to be horizontally "squeezed" up to a point, to make things fit better
  • Beyond that point, resize the cabinet smaller (resulting in a mix of some squeezing and some shrinking, for portrait resolutions)
  • Synthesize a cabinet "top" for resolutions where the cabinet is not full-height (necessary because the cabinet images do not include a top)
  • "Wheel" logic is formula-based, using shaders for the wheel background
  • Color choice for wheel background
  • Rework bezel rendering to show entire side bezels (with some compression)
  • Don't show scanlines for vector-based titles, or over bezels
  • For portrait screens, extend game information to two lines
  • Box art location depends on screen aspect (portrait vs landscape)

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:
  • Landscape/widescreen MAME
  • Portrait MAME
  • Landscape/widescreen Pinball
  • Portrait Pinball

9
I've updated the enhanced "multi-resolution" version, mainly to fix some issues with the shaders, but also to rework how the cabinet top image is built when the cabinet is not full-height (that logic is now shader-based as well). New download is attached.

* Edit * Updated this file again with a few minor fixes.

10
Thanks Yaron2019 and jedione! I had no idea about the discord channel (I suppose I saw a reference to it somewhere but never checked it out to see what was there).

I'm attaching a file which should include everything I changed in the "At-The-Arcade Multi-Cab" folder, so it can just be dropped there (overwriting the layout file). Of course most of the work is in the layout.nut file, but there are also two new shaders, a pinball cabinet image, and the little "top" image that is placed above the cabinet when it isn't full-height. I'm open to suggestions. I feel like things are all holding together pretty well now, but it's never been tested outside of my PC, and I've probably missed an option or two somewhere.

As for pinball, the layout switches to those alternate cabinet settings whenever the name of the Display includes the word "pinball" (not case-sensitive). Let me know if you can think of a better way to know that. For pinball it will use the included pincabs.png instead of cabinets.png, adding the snap/marquee images to the appropriate regions of that cabinet. Snaps are assumed to be vertical; I've noticed a lot of pinball snaps are horizontal so we may need a way to detect and rotate somehow (I tried this once but didn't have much luck so far). It will also look for a "pincabs" setting in the display's .cfg file, in case you have specific cabinets for each game (as I have for the Pinball FX3 tables). This mirrors the "cabinets" setting that is used for arcade cabinets.

Let me know how it goes, and I can make corrections as needed.

11
Hi @Yaron2019,

Many thanks to you and all the others who had a part in this theme... I've adopted your amazing theme but I had a few special requirements, stemming from the fact that I decided to add pinball games to my cab. As part of that project, I added things like solenoids, flippers, and a plunger. More importantly I also ended up changing my monitor and its orientation, ending up with a vertical 1200x1920 screen (after some other more physical challenges with cutting and mounting). Amazingly this theme did work at that resolution, but it wasn't as perfect as I desired so I embarked on a long project of making improvements. I've learned a lot about using Attract Mode, squirrel, shaders, and finally I have the results I wanted, and good enough to present publicly.

My initial goals:
  • Support any resolution but retain all features of the original theme
  • Allow an alternate type of cabinet presentation (for pinball, but in theory for other uses as well)
I ran into some challenges, and ended up changing far more lines of code than I expected, but I wanted to present this version back to you, if desired. Sort of a massive "pull request", if you will. I hope you don't mind. Basically there are a few approaches we can take now, and I'm fine with any of them:
  • I provide my updated files to you and you include them in your official version
  • I treat my version as separate, releasing this "any resolution" version myself
  • I keep my version to myself, as my own modified version (in case you prefer not to have a modified version of your work released)
Now on to the details of all the changes I made:
  • First, add the ability to display the theme at any aspect ratio - this was critical to my goal of supporting all resolutions, letting me test everything at 16:9, 16:10, 4:3, 1:1, 3:4, 10:16, 10:9 (which is hopefully all typical resolutions)
  • Add a hotkey option to reload at the "next" resolution, allowing me to quickly cycle through examples of all the different aspect ratios
  • Change most everything to rely on formulas instead of hard-coded numbers/percentages
  • Render all components of the cabinet/snap/marquee/etc at a standard size internally, and then resize the entire surface afterwards
  • Use a configurations table to drive the positioning and rules of the various components (important for supporting another type of cabinet, for pinball)
  • New images for a pinball cabinet, with different positioning of cabinet/snap/marquee and sizing
  • Allow cabinet to be horizontally "squeezed" up to a point, to make things fit better
  • Beyond that point, resize the cabinet smaller (so a mix of some squeezing and some shrinking) -- this means for vertical screens the cabinet is no longer full height, which presents some challenges...
  • Added "topper" image to place above the cabinet when it isn't full height -- definitely an imperfect workaround, needed because the cabinet images don't go all the way to the top (it looks good for typical cabinets but for odd-shaped cabinets this isn't going to look right, so this solution might need further adjustments)
  • Rework the "wheel" to be formula based too (finally a reason to use my high school trigonometry) -- BUT this introduces a problem, as it's nearly impossible to match the exact curve and position when using the shaded background image, so...
  • Solution: Learn all about GLSL shaders, and write a shader that draws the shaded background curve for the wheel (and another shader for the rectangular version)
  • Bonus: Now we can choose the color of that shaded region too, so I added an option for color
  • Reduce wheel height for vertical screens, so we see the entire height of the curve in that case
  • Rework bezel rendering, now processing the left/right sides separately and using horizontal compression to show the entire bezel (for vertical games). Note: I did also work out a simple change to support the original logic, cropping the outer edges of the bezel rather than compressing, but I like this result better
  • Fix to not show the scanlines effect over the bezel sections
  • Disable scanlines for vector-based games
  • Show the game information on two lines when the screen is vertical
  • Position box art at the top for vertical screens (as the cabinet is not full height in that case)
  • Rework the screen glow effect to work for any screen size (this one had me confused for a long time)
Here are some examples (this only includes one horizontal and one vertical example of each cabinet type, but I can provide other resolutions/configurations/etc.). I'm sure I've missed some things, but it should now be easier to make any needed changes in a resolution-independent way.  8)

12
Scripting / Re: Trying to understand position within a shader
« on: April 05, 2021, 10:08:52 PM »
I was able to track down my issues with this, and I'm beginning to understand it better. gl_FragCoord is indeed usable but I learned two important points, which I'll document here in case they are useful to others in the future:

  • The coordinate system is opposite to the normal AM screen coordinates. Within a shader (0,0) is bottom left instead of top left.
  • The coordinates are relative to the entire screen size. Normally this should not be an issue but in my case I am setting fe.layout.width and fe.layout.height to make the dimensions smaller because I'm testing different layout resolutions. This leaves some unused space on the screen edges, and those pixels still count.

For point 1, we can change the behavior by placing this line at the top of the shader code, switching to the AM style layout coordinates:

layout(origin_upper_left) in vec4 gl_FragCoord;

For point 2, I'm now passing a set of offset coordinates to the shader, and using them to shift the position and accommodate the extra screen edges. In my case this was like:

shader.set_param("fragmentOffset", -(ScreenWidth - flw) / 2, -(ScreenHeight - flh) / 2);

And then used in the shader like so:
vec2 position = gl_FragCoord.xy + fragmentOffset;
(then I use position instead of gl_FragCoord)

13
Scripting / Trying to understand position within a shader
« on: April 02, 2021, 10:39:45 AM »
I'm experimenting with writing my first shader, but I'm having a hard time using gl_FragCoord to determine the position within the image. Does anyone here have experience with this? I can set gl_FragColor and see results, but what I can't seem to do is pass values into the shader (say a position and a size), and then use those values relative to the current coordinate in gl_FragCoord. Basically I'm trying to color a specified set of pixels within the image, where those locations are provided by an AM layout. Is there a secret I'm missing? I can get the desired results in an online tool such as thebookofshaders.com, but using the same code (I think) in a shader called by AM does not give the same results. I suspect the difference lies in how the coordinates are used, but I don't know of any direct way to "debug" the shader and show those internal values at run time.

I can put together a test example if needed, but I was hoping someone here knows something about conversion between a "standard" GLSL fragment shader and an AM compatible shader. In case it matters, the object I'm assigning the shader to is a surface.

14
Themes / Re: At-The-Arcade Multi-Cab [Release] - Updated 14 February 2021
« on: February 14, 2021, 10:38:54 PM »
Thanks Yaron for your work and even taking requests! For me the delay would only need to be on initial startup, not when switching layouts, but I'm not sure if the layout code would even know the difference. Probably it should just be an AttractMode feature rather than a layout feature. But anyway it is all working well.

15
Themes / Re: At-The-Arcade Multi-Cab [Released]
« on: February 09, 2021, 08:37:31 AM »
The new music settings are really great! Feature request: I'd like if there were a setting for the music location, so that we could point to some other common directory. And maybe a startup delay setting for the music (as I already play some audio when starting up AttractMode, so the two are overlapped currently).

Pages: [1] 2 3