mamedev / mame

MAME
https://www.mamedev.org/
Other
7.76k stars 1.95k forks source link

Cross-platform layout editor/writer #443

Open james-wallace-ghub opened 8 years ago

james-wallace-ghub commented 8 years ago

I admit this is something I've played with from time to time, but never got anywhere with. At the moment, we're served relatively well for internal and external layouts for simple titles because of the basic XML layout engine we currently have. My concern is that as the goals of MAME evolve, the ability to layout the necessary art elements via simple calculation will not be sufficient to incorporate everything. Taking the example of the slot machines and similar devices we now include - many of these require hundreds of independent lighting objects, as well as positioning of mechanical devices that we simulate, but not in a manner that makes the layout particularly intuitive.

My proposal is that, in order to assist with making these kinds of layouts, we liaise with those in modding communities like Hyperspin etc, and attempt to develop a cross-platform, open layout creator and editor to enable those whose skills are more art focussed than programming focussed to actually be able to build MAME compatible layouts, and add the potential to include any other objects we ultimately add to the renderer.

Taking the example of the old FME community (as this is the closest in scope to my suggestion), the tools for development are often no more than basic drag and drop tile positioning, with palettes of object types for the more complex materials. In our case, we do represent a bit more flexibility, but still relatively sensible.

johnparker007 commented 8 years ago

I have made progress on the FME side by converting mfme layouts - please see http://mfme2mame.org for more info :)

james-wallace-ghub commented 8 years ago

Interesting, I'm surprised that such a format could be converted, but it helps part of the problem. I wonder if the same setup can be used ultimately to provide some sort of editor we can use directly, although I gather that MFME is basically restricted to Windows.

johnparker007 commented 8 years ago

Hey James :)

Yeah, converting it is a real headache! But I could see it was doable, and got sucked in ;) ...In theory you could use MFME to make layouts for non-fruit machines, in conjunction with the converter - though it's certainly not an ideal solution.

Definitely needs someone to write a cross-platform editor from scratch - maybe a university student could do it for their final year project - would look good on a CV.

The guys who make the fruit machine layouts are going to use to it make the new layouts (for new hardware platforms, like Scorpion 5) in MFME and then convert to MAME to test/play/release. And I'll ask them to do us a "Classic" one for each new machine too (without any bitmapped graphics), so that MAME gets internal layouts for all the new fruit machines.

I'm currently finishing up making the Classic mode... then I am going to start adding quite a few internal layouts to MAME... also, I will then create the "DX" (bitmapped graphics) layouts from the vast collection of MFME layouts, and host them on my mfme2mame website.

I'm hoping I can tempt you skilled emulator coders in with all these layouts for some fruit machine bugfixing, as I'm not really a low-level hardware emulation coder type, it's out of my comfort zone! ;)

james-wallace-ghub commented 8 years ago

Well, if I can help on that front I will - anything to keep this going. There are things like the CFG files you need for dipswitches etc that I wonder might be something that can be served another way, particularly if the defaults are wrong.

johnparker007 commented 8 years ago

Yes I did start looking into that cfg file area and made some progress:

http://mfme2mame.org/index.php?action=downloads;cat=4

So there are a few (converter-generated) MAME cfg files - they read the keyboard shortcuts assigned to buttons in MFME and map them to MAME.

But I guess they ideally need to go in the MAME drivers? As in there I believe you can set default dip settings... some machines don't even boot (or have wrong stakes etc) if the dips are wrong!

Perhaps a system like the .lay files, where there is a MAME 'internal' version, but it is overridden if there is an 'external' cfg file present...

I'm open to ideas, I could certainly generate .h source files from the converter the same way I'm generating the default.lay and .cfg files... perhaps these could have the default dips in...? All seems doable anyway, just how to go about doing it, MAME source is a bit of a beast, can't believe how long it took to compile the first time! :)

On Fri, Mar 4, 2016 at 3:05 PM, James Wallace notifications@github.com wrote:

Well, if I can help on that front I will - anything to keep this going. There are things like the CFG files you need for dipswitches etc that I wonder might be something that can be served another way, particularly if the defaults are wrong.

— Reply to this email directly or view it on GitHub https://github.com/mamedev/mame/issues/443#issuecomment-192314299.

james-wallace-ghub commented 8 years ago

Don't know enough about whether local cfgs is a maintainable case, but nice to see you're getting up and running. Not sure if this is the best place for discussing that specific point, given the main crux of this is more platform and system agnostic, but you know where to find me for any thing not on topic, and of course, there's the rest of the support setup.

johnparker007 commented 8 years ago

Yes - ideally I'd like to ditch the local cfgs - was just experimenting at first :) I didn't realise I'd get a MAME/FME pro on board! As you are interested then yes, I'd much rather get as much into the MAME drivers as possible.

My best case scenario is the machines fully playable with correct DIPs and 'nice' keyboard shortcuts, and internal layout.

If the end user wants the nice graphics, they just install the artwork folder/zip and they're all set :)

On Fri, Mar 4, 2016 at 3:41 PM, James Wallace notifications@github.com wrote:

Don't know enough about whether local cfgs is a maintainable case, but nice to see you're getting up and running. Not sure if this is the best place for discussing that specific point, given the main crux of this is more platform and system agnostic, but you know where to find me for any thing not on topic, and of course, there's the rest of the support setup.

— Reply to this email directly or view it on GitHub https://github.com/mamedev/mame/issues/443#issuecomment-192327216.

james-wallace-ghub commented 8 years ago

Pro is a bit strong, think intermediate ;)

I don't have much time to do things like this any more, but if I can pitch in, I will.

stilett0 commented 8 years ago

Out of curiosity, does the AGEMAME layout editor written in Java still function at all, or has it all moved on since 2008?

james-wallace-ghub commented 8 years ago

It's probably not going to support everything, it's a bit outmoded in many ways, but it's probably salvagabl for someone who wanted to. It never really did drag and drop IIRC.

stilett0 commented 8 years ago

okay. I found it over here and could probably get it to work with a 32-bit java runtime installed I expect: http://www.pembo.co.uk/2008/08/08/agemame-layout-editor-ale-v084a/ Think that's the final version.