Author Topic: My custom layout for use on a 640x480 31Khz arcade monitor  (Read 7335 times)

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
My custom layout for use on a 640x480 31Khz arcade monitor
« on: December 08, 2015, 05:31:44 AM »
Hey gang,

I've been working on a pretty simple custom layout for use on my arcade cabinet (Sega Blast City with MS2930 monitor) and have got to the point where I'd like to show it off :)

It's loosely based on the layout that Cools created (nice work man!).  This is only a couple of days work so far, but I'm pretty happy with it so far.

I've designed it specifically for use in 640x480 on a horizontal arcade monitor, and the layout nicely handles previews for both horizontal and vertical games.

Vertical game:


Horizontal game:


In the background it scrolls an image I have included with the layout (brazenly stolen from Rocketlauncher, sorry guys!).  It also shows flyers overlayed over the top of the background.  Both layers scroll independently which looks pretty cool I think.  As not all games have a flyer, I have set up the flyers in my MAME config to also include snaps.  The layout will automatically scale the snaps so they are 1.5x larger than the screen so they can scroll around (albeit a bit chunky looking).

Here's a YouTube video of it running on my cabinet, please excuse the shaky cam!

I have not made any effort to test this layout at higher video resolutions, so for all I know it might not look so nice if you're not at 640x480! Word of warning!

Oh also, in the archive I've included a module I wrote that the layout relies on called "pan-and-scan".  This module is pretty straightforward, somewhat based on the FillArt module that Liquid posted on the forums recently.  This is what I use to display and animate the background and flyers.  If anyone want's to use it in their own layouts, be my guest! :)

Hope someone finds this useful for use in their own setup.  I will likely make additional changes and post them to the forums as I progress.

Finally, thanks to Raygun and all of the contributors for this awesome frontend! I've had a lot of fun noodling around with it :)

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 829
    • View Profile
    • new projects
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #1 on: December 08, 2015, 07:11:03 AM »
Great work!

That pan-and-scan module is something I was looking for. Thanks!
I was planing to make a theme with background image moving similar to Ken Burns effect - that is slow zoom-in and pan.

If I can see correctly from your video - it only pans (without zooming)? Right?
I'll install it tomorrow to check.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #2 on: December 08, 2015, 01:46:07 PM »
Great work!

That pan-and-scan module is something I was looking for. Thanks!
I was planing to make a theme with background image moving similar to Ken Burns effect - that is slow zoom-in and pan.

If I can see correctly from your video - it only pans (without zooming)? Right?
I'll install it tomorrow to check.

Thanks!

Yeah, right now the module just bounces around the dimensions of the image.  I planned to add scaling to it but haven't got around to it yet :)

Feel free to download it and modify the code to suit your own needs if you want to use it as a base for your own thing!

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 829
    • View Profile
    • new projects
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #3 on: December 08, 2015, 02:10:07 PM »
I'm not that great with code to add zoom to your module :(

I've tried it and it looks cool (with hi-res also).
Animation is little to fast for my taste and "animate_speed" variable doesn't have any effect on speed.


chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #4 on: December 08, 2015, 02:50:27 PM »
I'm not that great with code to add zoom to your module :(

No worries, I plan to tweak and make additions to the layout over time.  I'll look into adding support for zooming the background in the coming days.

I've tried it and it looks cool (with hi-res also).
Animation is little to fast for my taste and "animate_speed" variable doesn't have any effect on speed.

Glad to hear it works well at higher resolutions.  Regarding the animation speed, it is configurable via the "animate_speed" property.  If you want it to be slower you will need to work with smaller values.

Try changing
Code: [Select]
bg.animate_speed = 0.4; to
Code: [Select]
bg.animate_speed = 0.04; and you should notice a difference.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 829
    • View Profile
    • new projects
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #5 on: December 08, 2015, 02:58:12 PM »
I've changed
bg.animate_speed = 0.4;

to
0.1
0.05

but there is no change in speed

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #6 on: December 08, 2015, 03:14:21 PM »
I'm definitely seeing the animation speed change as I alter the values and then restart the layout in Attract Mode, so it's strange that you are not seeing the same thing.

Note that the flyer layer animates separately from the bg one, so you will need to change that one too.

If you still don't see any change, perhaps try checking the console window to see if Attract Mode is reporting any errors.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 829
    • View Profile
    • new projects
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #7 on: December 08, 2015, 03:37:33 PM »
Got it. Thanks.

It was the flyer behind that slanted snap/video - not the background.

with
flyer.animate_speed
change
there is a difference in animation speed.

btw - the whole background is "covered" with flyer. When can I see "animated background"? If there is no flyer?

----

If you are not familiar with Ken Burn's effect you can see it
here: https://youtu.be/czHEDq4eyjo?t=21
or here: https://www.youtube.com/watch?v=oqnJMYeZF0w

maybe little to fast and too much zooming (for my taste)

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #8 on: December 08, 2015, 03:53:11 PM »
Behind the flyer layer is a large image of arcade manufacturer logos (if you look in the layouts/blastcity directory, it's the default.png image).. I have kept it kinda subtle, perhaps too subtle if you don't see it!  Try fiddling with the .alpha property of the flyer layer, dropping it down to 100 or so and it should be more apparent.

kent79

  • Hero Member
  • *****
  • Posts: 553
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #9 on: December 09, 2015, 03:36:38 PM »
Great Job. Thanks

jasonwoodland

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #10 on: February 17, 2016, 04:01:00 AM »
Hi, nice theme! I really want to use this on the machine I'm building but it doesn't seem to work. When I comment out the lines: "local ... = PanAndScan(...);" It starts working, or course, without a background.

For the meantime I'll try out static backgrounds.

Attract logs: "Failed to create texture, its internal size is too high (3457x1512, maximum is 2048x2048)"

Hope someone can figure out what is causing this
It's an Intel Core 2 Duo, Windows XP SP3, 2GB RAM, if this helps.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #11 on: March 11, 2016, 07:52:13 PM »
Hi Jason,

Apologies for the late reply, I'd been working on some other projects recently and wasn't checking these forums.

It sounds like your graphics card is running out of video RAM because of the very large background image I used in my theme.  The machines I use here have multiple gigabytes of VRAM so I never had a problem with it.

I've attached an archive with a couple of background variants that you could try out.

default-2048x896.png - resized the original image.  This one will bounce up and down more frequently.

default-2048x1512.png - cropped the original image.  This one will bounce from side to side more frequently.

Just extract this archive in the blastcity layout directory, then delete the original "default.png" and rename one of the above files to "default.png".

Hope this helps!

jasonwoodland

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #12 on: March 11, 2016, 08:01:56 PM »
Thanks for the suggestion! I'll try it out when I have some spare time

I bought a cheap P4 machine solely for it's graphics card with S-Video output.
I later discovered I have a newer spare graphics card with S-Video out so I might try putting that in but I don't really like fiddling around near the CRT.

I also realised attract-mode is really unstable on my machine, it always crashes on exit, and sometimes even a BSOD when I quit a game and return to attractmode.

Maybe I'm better off creating a whole thread explaining my plight if your suggestion doesn't solve these other issues


verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 829
    • View Profile
    • new projects
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #13 on: March 12, 2016, 07:45:43 AM »
@chrisvg

Are you planning to add zoom option to that pan-and-scan module?

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: My custom layout for use on a 640x480 31Khz arcade monitor
« Reply #14 on: March 12, 2016, 08:37:18 PM »
Are you planning to add zoom option to that pan-and-scan module?

I am actually in the process of working on a new version of the pan-and-scan module to fix some bugs and add support for zooming :)