MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Some videos of my frontend in progress
#252940 - 04/26/11 11:35 AM


I've been posting for a while now making vague allusions to the frontend that I am working on. Well I've made a few videos showing my progress for anyone who is interested. Keep in mind that it's very rough and very early, but it will give some idea of some of the effects that I am going for.

The videos I made were mostly to communicate with the person who made the 3d arcade models that I am using within the frontend but if you can sit through the boring chatter about that you can get a feel for what I'm doing.

The most recent video is in two parts because my computer crashed partway through the first (@!^%#&*&@ graphics driver ...):

Part I:

http://www.youtube.com/watch?v=wiGRKaAvfIA

Part II:

http://www.youtube.com/watch?v=boz-pnx8Tt8



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: Bryan Ischo]
#252972 - 04/26/11 08:38 PM


NOTE: Developer-speak highlighted in blue, to make it easier for non-devs to ignore.

So in case it's not obvious, one of the main points of my frontend is to embed MAME in it directly (well, not directly, it's still run in a separate process to prevent MAME crashes from crashing the frontend, but there is a shared memory based IPC mechanism that makes it look for all intents and purposes like MAME is running in the frontend), which lets me do things like render MAME anywhere on the screen that I want to; I've collected a bunch of 3d arcade models from Google 3d warehouse and am using them to house the game screen.

It also means that the in-game pop-up UI will not look like or be MAME's standard list-based UI. I intend to write a UI for these functions that is better matched to the front end.

I think these may be unique features of my frontend; I don't know if any other frontends ever have embedded MAME directly in this way.

Oh and one more thing - the technique I am using will allow me to embed other emulators as well, at least those that are open source and thus can be modified to work with my frontend; so I had hoped to, for example, integrate Daphne in as well and make it seamless so that those games that are best handled by Daphne will just run it and those that are best in MAME will run MAME, and this will all be completely seamless to the user who won't need to know what emulator is being run. Maybe I will incorporate MESS too someday ...



Tourniquet
Semi-Lurker
Reged: 09/20/03
Posts: 155
Send PM


Re: Some videos of my frontend in progress new [Re: Bryan Ischo]
#252979 - 04/26/11 10:50 PM


> I've been posting for a while now making vague allusions to the frontend that I am
> working on. Well I've made a few videos showing my progress for anyone who is
> interested. Keep in mind that it's very rough and very early, but it will give some
> idea of some of the effects that I am going for.

Since no-one else has responded. I think its cool that you've persisted with this. I had the idea of doing something similar (sending the composited video frames over IPC) about a decade ago but never got around to it (much like most of the other crazy ideas I had: hooking Continental Circus up to me stereoscopic glasses, abstracting the force-feedback, implementing the native networking over shmem or possibly sockets).

Btw, Glmame / Xmame (Sven Goethel) had a similar visualisation a long time ago (a rendered cab with the game running on it), although that was all in the same process.



StevieWunderful
Reged: 11/19/04
Posts: 115
Loc: NY
Send PM


Re: Some videos of my frontend in progress new [Re: Bryan Ischo]
#252980 - 04/26/11 11:35 PM


I think this is a step in a good direction, and cool to see some efforts being put forth with it.

If its possible, additional un-used processor cores could be used for running a few virtual cabs at the same time... even if they are sort of buffered and streamed.

I thinks it would be nice to have a row of cabinets put on a circular path. That way, you can see the sides of a cabinet as you are scrolling thru them.

It would also be nice to be able to adjust the level of depth that you stop in at. For example, you might not want to zoom completely into the game. Rather, you would stop just about over 2ft away, so you could still see some of the cabinet model/artwork while playing.

It also looked like there were too few frames when the games zoomed in and out.

The biggest problem of course, are the models themselves. It appears for example, that there is no 3d bezel surrounding the normally curved monitor. The monitor should be a little deeper set into the game, and not right up against the plexiglass face. Typically, about 2 to 3 inches.

If there was a curved invisible surface, it would be nice to wrap the games display around it.

At very least, a squared bezel could be created as a temporary way to set the monitor image a little deeper into the game.



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: Some videos of my frontend in progress new [Re: Bryan Ischo]
#252982 - 04/27/11 12:03 AM


Very nice. Why aren't you using the 3D Arcade models BTW? Licensing issues?
http://www.mameworld.info/3darcade/

- Stiletto



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: Stiletto]
#252984 - 04/27/11 12:21 AM


> Very nice. Why aren't you using the 3D Arcade models BTW? Licensing issues?
> http://www.mameworld.info/3darcade/
>
> - Stiletto

Thanks - there are two reasons:

1. Licensing issues like you mentioned; it's not that I intend to use my frontend for anything commercial, but since it's open source (or will be as soon as I release it!) I really don't like using stuff that has license restrictions like that.

2. They're all in formats that I don't know much about. I see: .w3d, .max, and .uam. I don't really know what these are; if they are openly documented then I would have no problem using them, but I'll have to write a model importer.

(1) is a bit annoying to me; (2) is just an issue that I haven't had time to even investigate yet.

But thanks for the suggestion, I should definitely consider rounding out my model set with those should I be able to overcome (1) and (2).



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: StevieWunderful]
#252986 - 04/27/11 12:32 AM


> I think this is a step in a good direction, and cool to see some efforts being put
> forth with it.
>
> If its possible, additional un-used processor cores could be used for running a few
> virtual cabs at the same time... even if they are sort of buffered and streamed.
>
> I thinks it would be nice to have a row of cabinets put on a circular path. That
> way, you can see the sides of a cabinet as you are scrolling thru them.
>
> It would also be nice to be able to adjust the level of depth that you stop in at.
> For example, you might not want to zoom completely into the game. Rather, you would
> stop just about over 2ft away, so you could still see some of the cabinet
> model/artwork while playing.
>
> It also looked like there were too few frames when the games zoomed in and out.
>
> The biggest problem of course, are the models themselves. It appears for example,
> that there is no 3d bezel surrounding the normally curved monitor. The monitor should
> be a little deeper set into the game, and not right up against the plexiglass face.
> Typically, about 2 to 3 inches.
>
> If there was a curved invisible surface, it would be nice to wrap the games display
> around it.
>
> At very least, a squared bezel could be created as a temporary way to set the
> monitor image a little deeper into the game.

Thank you for your suggestions!

In terms of using extra cores - I just added a feature (that I had intended to use all along but hadn't implemented yet) where the game that the highlight is on starts up after 1/3 of a second of hovering on that game. This makes games start up pretty much instantaneously as you scroll through the list - the lag time between stopping on a game and having it running is very small.

The purpose of this is because one of my goals is for game starting and running to be as fast as possible, so I use the extra CPU of the system (i.e. extra cores and extra cycles available even on single core systems) to start games fast. The previous game hasn't even stopped running yet, it's just 'moved out of the way' in the background and shuts down while the hovered game starts up. The result is that you can pretty much start playing any game within a fraction of a second of highlighting it. By the time you press the button to zoom in it's usually already going.

That's one way that I'm soaking up extra cycles. I had also thought about maybe running more than one game at once, although my goal is less to offer a '3d arcade' style interface, and more just to showcase games one at a time and allow fast selection and play of them.

Modern graphics cards don't even begin to break a sweat with the amount of polygons and textures I'm throwing at them so multiple cabinets at once is definitely a possibility. Multiple games going all at once could be done too with the infrastructure I have created but like I said, it's kind of not really aligned with my focus which is to choose and play individual games rapidly.

I also thought about adjusting the zoom depth, with a stop like you said that stopped close to the game but not all the way there, either to view the cabinet (with game playing) closer up, or to allow the artwork to be viewed while playing the game. Although my personal preference is not to see artwork while I am playing, for some reason I just find it distracting.

In terms of more correct simulation of the screen, with an inset and rounded surface, that could be done but it would be something of a headache, mostly because it would involve work on the model side, and I am just trying to leverage free models, not make my own, because I don't really have the time or skill to do that; and also because projecting a texture onto a curved surface is not the easiest thing to do unless it's been authored that way when the model was created, which would, for various reasons, not work well with my system (I can dynamically position flat screens in space, but wrapping them around curved surfaces is quite a bit harder).



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: Tourniquet]
#252987 - 04/27/11 12:39 AM


> > I've been posting for a while now making vague allusions to the frontend that I am
> > working on. Well I've made a few videos showing my progress for anyone who is
> > interested. Keep in mind that it's very rough and very early, but it will give some
> > idea of some of the effects that I am going for.
>
> Since no-one else has responded. I think its cool that you've persisted with this. I
> had the idea of doing something similar (sending the composited video frames over
> IPC) about a decade ago but never got around to it (much like most of the other crazy
> ideas I had: hooking Continental Circus up to me stereoscopic glasses, abstracting
> the force-feedback, implementing the native networking over shmem or possibly
> sockets).
>
> Btw, Glmame / Xmame (Sven Goethel) had a similar visualisation a long time ago (a
> rendered cab with the game running on it), although that was all in the same process.

Yeah I originally had MAME linked into the same process also but that caused some problems:

- MAME has *alot* of very complex code in it and unfortunately, it crashes sometimes. Especially when you are abusing it like I am (starting and stopping games constantly). I also am not convinced that some drivers don't leak memory in some situations, and the shutdown path is not always that robust. The upshot is that when I was running MAME in the same process (separate thread), it was not uncommon for the frontend to crash.

- It is not possible to run multiple copies of MAME at once in the same process because of the globals that MAME uses; running MAME in separate processes solves this nicely.

So what I did was to move MAME out into a separate process, using a shared memory IPC mechanism; I use "no lock" IPC (compare and swap instructions and memory barriers) with rapid polling (every 1/2 millisecond - uses like 0.3% of a CPU) to ensure that the MAME process cannot screw up the frontend (i.e. grabbing a lock and then dying/hanging) under any circumstances. It works so well that I can sit there and fork off copies of MAME all day long and no matter what happens to them, the frontend is undisturbed.

The video and sound frames are pushed through the shared memory segment like you'd expect. I have instrumentation that can measure the latency this introduces and it's generally not perceptible - about 1/4 millisecond on average, just what you'd expect with a 1/2 millisecond polling interval.



StevieWunderful
Reged: 11/19/04
Posts: 115
Loc: NY
Send PM


Re: Some videos of my frontend in progress new [Re: Bryan Ischo]
#252990 - 04/27/11 01:00 AM


Thank you for your suggestions!

- My pleasure Ive plenty of ideas, but no programming talent.

As for starting faster, you might want to consider using Save States when available. That would skip the startup rom checks, and go right into the games demo / attract mode.

For me, theres something magical about seeing many classics next to each other.. especially if they are all lit up and playing.. much like how we remembered experiencing them.

A custom game order would be nice, so one could for example, order certain games in the circle as you wanted them to be experienced / viewed near each other.

I dont care much for the walk-through arcade environments, because nobody really wants to spend time trying to run a virtual guy around a maze of games. Its much better to have a lineup of some sort, thats easy and quick to select.

(however, other games could be virtually ran in the background for example, or merely displayed as a pre-made static picture.)

As for the models, I think plenty of them will become available in a better format as the ability to use them with a good frontend presents itself.



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: StevieWunderful]
#252991 - 04/27/11 01:24 AM


> Thank you for your suggestions!
>
> - My pleasure Ive plenty of ideas, but no programming talent.
>
> As for starting faster, you might want to consider using Save States when available.
> That would skip the startup rom checks, and go right into the games demo / attract
> mode.

Ha ha, you and I think alike. That is also a strategy I had intended to employ, with a menu option from within the game popup menus to 'save current state as start state'. So when you started a game for the first time, you could reset the hardware, wait until the exact moment when the attract screen started (i.e. right after initialization), then bring the pop up menu up (which pauses the game), and select the 'save current state a start state', and boom - forever thereafter, when you started a game it would start from that spot, skipping all of the initialization.

> For me, theres something magical about seeing many classics next to each other..
> especially if they are all lit up and playing.. much like how we remembered
> experiencing them.
>
> A custom game order would be nice, so one could for example, order certain games in
> the circle as you wanted them to be experienced / viewed near each other.

One thing I didn't show is that if you highlight the top list item on the left and press a button, the list 'flips over' and there is another list on the back (you can repeat this for more lists). One of the lists is 'favorites' and one is 'most recently played'. If you could order the favorites list then I think you could get what you're asking for (assuming that multiple models on the screen was implemented).

> I dont care much for the walk-through arcade environments, because nobody really
> wants to spend time trying to run a virtual guy around a maze of games. Its much
> better to have a lineup of some sort, thats easy and quick to select.
>
> (however, other games could be virtually ran in the background for example, or
> merely displayed as a pre-made static picture.)
>
> As for the models, I think plenty of them will become available in a better format
> as the ability to use them with a good frontend presents itself.

Well I can only hope so!

Thanks again for your suggestions. I have been working on this for a while; as the only developer on it, and only being able to work when my kids are asleep at night, it unfortunately goes pretty slowly. And things like writing math routines to calculate where to put the screen rectangle in 3d space to be right in the correct spot on an arbitrary cabinet take me soo long when my math skills are quite weak!!!



Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM


Re: Some videos of my frontend in progress new [Re: StevieWunderful]
#252993 - 04/27/11 01:27 AM



> It also looked like there were too few frames when the games zoomed in and out.

Oh I forgot to mention - that's mostly because of two things:

1. The zoom in/out is quite fast, it happens in 1/5 of a second, so at 60 fps you only get about 12 frames best case during the zoom, and

2. The video capture software I was using captures only 30 frames per second, which I think is YouTube's limit anyway. So the 12 frames is reduced to 6 while watching the video of the zoom in/out.

If you set the zoom in/out to something long like 5 seconds then it's buttery smooth but ... too slow!


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 31 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1848