Autor Tema: Bezel en Mame, conversión .lay to .art  (Leído 6280 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado empardopo

  • Admin
  • *
  • Mensajes: 21739
  • Gracias 761
  • Espero mejorar al KungFu Master!
    • Mi canal de Youtube
  • Ciudad: Norte de África
  • Pais: Escoña
  • Iniciales nick: EPP
Bezel en Mame, conversión .lay to .art
« en: Julio 02, 2013, 01:18:40 pm »
Advertisement
Bueno el caso es que estoy interesado en Bezels para mame pero para la versión 106.
Un ejemplo de Bezel en mame



Resulta que a partir de esta versión cambiaron el formato de .art a .lay

Por poneros un ejemplo, tengo el bezel para el KungFu Master en formato .art y el contenido de dicho fichero es el siguiente:

Código: [Seleccionar]
bezel:
file             = kungfum.png
alphafile     = kungfummask.png
layer             = bezel
priority     = 0
visible             = 1
                            //right,bottom,left,top
position     = -0.1744,-0.3681,1.1783,1.3846
brightness     = 1.001

El mismo bezel pero en formato .lay contiene lo siguiente:

Código: [Seleccionar]
<!-- kungfum.lay -->

<mamelayout version="2">
<element name="bezel">
<image file="kungfum_bezel.png" />
</element>
<view name="Bezel Artwork">
<screen index="0">
<bounds left="574" top="804" right="2922" bottom="2565" />
</screen>
<bezel element="bezel">
<bounds left="0" top="0" right="3500" bottom="3396" />
</bezel>
</view>
</mamelayout>

Como véis no tiene nada que ver uno con el otro sobre todo por los números que aparecen que supongo que será la posición en la pantalla en la que aparecerá el Bezel.

¿Alguien sabe como se podría hacer la conversión de un fichero .lay a uno .art? ¿Qué relación tendrían esos números?

A quién le interese he encontrado este link en el que nos crea un bezel pero .lay

Saludos
« Última modificación: Julio 02, 2013, 02:01:40 pm por empardopo »



Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #1 en: Julio 02, 2013, 02:43:45 pm »
a mi me interesa crear bezel para cada juego del mame, o ponérselo si ya esta hecho o lo consigo

A ver, que me entere y miro como se hace, en teoría en añadir un archivo de imagen y otro que le diga cual es o para que juego es, no?

Luego miro por que me interesaría bastante, sobre todo para los que tenemos monitor 16:9 que podemos ponerlos sin reducir casi el tamaño del vídeo(juego)


Voy a ver si me entero, a mi me gustaría encontrar el magician marquee para sacar puntuación y demás en la marquesina con una pantallita de 7" , pero no veo el programa libre en ningún lado y el foro donde esta no me manda el correo de alta, así que no puedo bajarlo.

Bueno, pues eso, miro esto y si alguien tiene el Marquee que lo pase PLEASE  :babas:

Saludetings :orden:

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #2 en: Julio 02, 2013, 02:57:20 pm »
esos números son la relación de tamaño y posición del bezel, el borde que dejas, etc... en teoría seria fácil editarlo a pelo en un editor de texto, pero no se si alteras el archivo y ya no vale, a la tarde hago pruebas ;)

Desconectado empardopo

  • Admin
  • *
  • Mensajes: 21739
  • Gracias 761
  • Espero mejorar al KungFu Master!
    • Mi canal de Youtube
  • Ciudad: Norte de África
  • Pais: Escoña
  • Iniciales nick: EPP
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #3 en: Julio 02, 2013, 03:17:26 pm »
esos números son la relación de tamaño y posición del bezel, el borde que dejas, etc... en teoría seria fácil editarlo a pelo en un editor de texto, pero no se si alteras el archivo y ya no vale, a la tarde hago pruebas ;)

Compi, la relación de tamaño a qué te refieres exactamante?

Veras, te explico a mí me interesan los .art porque son los que se usan con las versiones antiguas de mame (hasta la 106 incluida que es la que suelo usar para los records con mame y tal).

Si necesitas algún .art te lo paso...

Saludos

Nota: Por cierto, no me suena ese programa que comentas.

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #4 en: Julio 02, 2013, 03:26:22 pm »
Cuando me empape bien te digo todo lo de los numeros, para no decir mentiras jejejje :snow:, este es el programita de lo de la marquesina, info, etc... http://www.gameex.info/forums/topic/6911-release-marquee-magician-21/

ya me puse el correo de gmail y me mando la activacion, con ono no iba.

Mirare a ver si puedo subir algo molon :love:

« Última modificación: Julio 02, 2013, 03:32:18 pm por Josito »

Desconectado empardopo

  • Admin
  • *
  • Mensajes: 21739
  • Gracias 761
  • Espero mejorar al KungFu Master!
    • Mi canal de Youtube
  • Ciudad: Norte de África
  • Pais: Escoña
  • Iniciales nick: EPP
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #5 en: Julio 02, 2013, 03:33:43 pm »
Pues espero a ver si sacas respuestas ,jeje! Yo llevo un par de horas buscando info en españolo o guiri y no he encontrado nada de nada...

Sobre el programa ni idea, no lo conocía pero tampoco me deja descargarlo, jeje!

Muchas gracias Josito

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #6 en: Julio 02, 2013, 03:49:07 pm »
Pues espero a ver si sacas respuestas ,jeje! Yo llevo un par de horas buscando info en españolo o guiri y no he encontrado nada de nada...

Sobre el programa ni idea, no lo conocía pero tampoco me deja descargarlo, jeje!

Muchas gracias Josito

http://ul.to/wvk4828v

Desconectado empardopo

  • Admin
  • *
  • Mensajes: 21739
  • Gracias 761
  • Espero mejorar al KungFu Master!
    • Mi canal de Youtube
  • Ciudad: Norte de África
  • Pais: Escoña
  • Iniciales nick: EPP
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #7 en: Julio 02, 2013, 04:29:38 pm »
Thanks! Pero espero la info!!!  ;)8 ;)8 ;)8 Si es que das con la tecla, jeje!  :ver:

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #8 en: Julio 02, 2013, 05:33:59 pm »
Thanks! Pero espero la info!!!  ;)8 ;)8 ;)8 Si es que das con la tecla, jeje!  :ver:


como narices colocas los bezel?

carpetas y demas, thanksssss  ;)

Desconectado Antolin

  • VIP
  • *
  • Mensajes: 386
  • Gracias 48
  • Ciudad: Oviedo, Asturias
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #9 en: Julio 02, 2013, 06:45:37 pm »
Empardopo, si no me falla la memoria, creo que tendo los art en algun disco. Si lo encuentro te lo paso por mediafire o similar.
1SaluDT

Desconectado Antolin

  • VIP
  • *
  • Mensajes: 386
  • Gracias 48
  • Ciudad: Oviedo, Asturias
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #10 en: Julio 02, 2013, 07:02:01 pm »
Aqui puedes descargar los artworks antiguos. Son los que usa mame hasta la 106 (incluida).
http://mameworld.info/mrdo/old_artwork.php
Estos son a menor resolución que los nuevos.
1SaluDT

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #11 en: Julio 02, 2013, 07:23:18 pm »
Aqui puedes descargar los artworks antiguos. Son los que usa mame hasta la 106 (incluida).
http://mameworld.info/mrdo/old_artwork.php
Estos son a menor resolución que los nuevos.
1SaluDT

gracias Antolin,  :bien: como los colocas? en artwoks/bezels/ ?

saludos socio :orden:

Desconectado Antolin

  • VIP
  • *
  • Mensajes: 386
  • Gracias 48
  • Ciudad: Oviedo, Asturias
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #12 en: Julio 02, 2013, 07:28:17 pm »
Los nuevos tienes que meterlos (no hace falta descomprimir los Zip), en la carpeta artwork. Con los viejos imagino que también.
1SaluDT

Josito Chanante

  • Visitante
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #13 en: Julio 02, 2013, 07:34:41 pm »
Los nuevos tienes que meterlos (no hace falta descomprimir los Zip), en la carpeta artwork. Con los viejos imagino que también.
1SaluDT

graciassss  :bien:

Desconectado empardopo

  • Admin
  • *
  • Mensajes: 21739
  • Gracias 761
  • Espero mejorar al KungFu Master!
    • Mi canal de Youtube
  • Ciudad: Norte de África
  • Pais: Escoña
  • Iniciales nick: EPP
Re:Bezel en Mame, conversión .lay to .art
« Respuesta #14 en: Julio 02, 2013, 11:28:36 pm »
OK muchas gracias Antolin. Disculpad pero es que he estado toda la tarde off!

Bueno, el tema era saber también de donde venían esos números extraños para mí ,jeje en el fichero art. Una vez se comprendan de donde vienen, se podría intentar hacer alguno de cosecha propia que es lo que quería hacer ...

Tapule, me ha pasado la siguiente info:
Citar
**********************************************************************

THE ART FILE

The .art file is very simply formatted. It consists of any
number of entries that look like this:

[artname]:
file = [filename]
alphafile = [alphafilename]
layer = [backdrop|overlay|bezel|marquee|panel|side|flyer]
position =
,[top],
,[bottom]
priority = [priority]
visible = [visible]
alpha = [alpha]
brightness = [brightness]

Comments in the .art file follow standard C++ comment format,
starting with a double-slash //. C-style comments are not
recognized.

Fields are:

[artname] - name that is used to reference this piece of
artwork in the game driver. Game drivers can show/hide
pieces of artwork. It is permissible to use the same
name for multiple pieces; in that case, a show/hide
command from the game will affect all pieces with that
name. This field is required.

file - name of the PNG file containing the main artwork.
This file should live in the same directory as the .art
file itself. Most PNG formats are supported. If the
PNG file does not have an alpha channel or transparent
colors, it will be loaded fully opaque. This field is
required.

alphafile - name of a PNG file containing the alpha channel.
Like the main file, this file should live in the same
directory as the .art file. The alphafile must have the
exact same dimensions as the main art file in order to
be valid. When loaded, the brightness of each pixel in
the alphafile controls the alpha channel for the
corresponding pixel in the main art.

layer - classifies this piece of artwork into one of several
predefined categories. Command line options can control
which categories of artwork are actually displayed. The
layer is also used to group the artwork for rendering
(see discussion of rendering below.) This field is
required.

position - specifies the position of this piece of artwork
relative to the game bitmap. See the section on
positioning, below, for the precise details. This field
is required.

priority - specifies the front-to-back ordering of this
piece of art. The various artwork pieces are assembled
from the bottom up, lowest priority to highest priority.
If you want a piece of artwork to appear behind another
piece of artwork, use a lower priority. The default
priority is 0.

visible - sets the initial visible state. By default, all
artwork is visible. The driver code can change this state
at runtime.

alpha - specifies a global, additional alpha value for the
entire piece of artwork. This alpha value is multiplied
by the per-pixel alpha value for the loaded artwork.
The default value is 1.0, which has no net effect on the
loaded alpha. An alpha of 0.0 will make the entire piece
of artwork fully transparent.

brightness - specifies a global brightness adjustment factor
for the entire piece of artwork. The red, green, and blue
components of every pixel are multiplied by this value
when the image is loaded. The default value is 1.0, which
has no net effect on the loaded artwork. A brightness
value of 0.0 will produce an entirely black image.

Once the .art file is loaded, the artwork is categories into
three groups: backdrops, overlays, and everything else. Each
of these groups is handled in its own way.

**********************************************************************

BLENDING

Conceptually, here is how it all fits together:

1. A combined backdrop bitmap is assembled. This consists of
taking an opaque black bitmap, and alpha blending all the
backdrop graphics, in order from lowest priority to highest,
into it.

2. A combined overlay bitmap is assembled. This consists of
taking a translucent white overlay and performing a CMY blend
of all the overlay graphics, in order from lowest priority to
highest, into it.

3. A combined bezel bitmap is assembled. This consists of
taking a fully transparent bitmap, and alpha blending all the
bezel, marquee, panel, side, and flyer graphics, in order from
lowest to highest, into it.

4. Depending on the user configurable artwork scale setting,
the game bitmap is potentially expanded 2x.

5. The combined overlay bitmap is applied to the game bitmap,
by using the brightness of the game pixel to control the
brightness of the corresponding overlay bitmap pixel, as
follows:

RGB[mix1] = (RGB[overlay] * A[overlay]) +
(RGB[overlay] - RGB[overlay] * A[overlay]) * Y[game];

where

RGB[mix1] -> RGB components of final mixed bitmap
A[overlay] -> alpha value of combined overlay
RGB[overlay] -> RGB components of combined overlay
Y[game] -> brightness of game pixel

6. The result of the overlay + game blending is then added to
the backdrop, as follows:

RGB[mix2] = RGB[mix1] + RGB[backdrop]

where

RGB[mix2] -> RGB components of final mixed bitmap
RGB[mix1] -> RGB components of game + overlay mixing
RGB[backdrop] -> RGB components of combined backdrop graphics

7. The combined bezel bitmap is alpha blended against the
result of the previous operation, as follows:

RGB[final] = (RGB[mix2] * (1 - A[bezel])) + (RGB[bezel] * A[bezel])

where

RGB[final] -> RGB components of final bitmap
A[bezel] -> alpha value of combined bezel
RGB[bezel] -> RGB components of combined bezel
RGB[mix2] -> RGB components of game + overlay + backdrop mixing

**********************************************************************

POSITIONING

The positioning of the artwork is a little tricky.
Conceptually, the game bitmap occupies the space from (0,0)
to (1,1). If you have a piece of artwork that exactly covers
the game area, then it too should stretch from (0,0) to (1,1).
However, most of the time, this is not the case.

For example, if you have, say, the Spy Hunter bezel at the
bottom of the screen, then you will want to specify the top
of the artwork at 1.0 and the bottom at something larger, maybe
1.25. The nice thing about the new artwork system is that it
will automatically stretch the bitmaps out to accomodate areas
beyond the game bitmap, and will still keep the proper aspect
ratio.

Another common example is a backdrop that extends beyond all
four corners of the game bitmap. Here is how you would handle
that, in detail:

Let's say you have some artwork like this:

<============ 883 pixels ===============>

(1)-------------------------------------(2) ^
| ^ | |
| 26 pixels | |
| v | |
| (5)-----------------------(6) | |
| | | | |
| | | | |
| | | | |
|<---->| | | |
| 97 | Game screen | | 768
|pixels| 700 x 500 | | pixels
| | |<---->| |
| | | 86 | |
| | |pixels| |
| | | | |
| | | | |
| (7)-----------------------(8) | |
| ^ | |
| 42 pixels | |
| v | |
(3)-------------------------------------(4) v

If you're looking at the raw coordinates as might seem
logical, you would imagine that they come out like this:

(1) is at (0,0)
(2) is at (883,0)
(3) is at (0,768)
(4) is at (883,768)

(5) is at (97,26)
(6) is at (797,26)
(7) is at (97,526)
(8) is at (797,526)

The first thing you need to do is adjust the coordinates
so that the upper left corner of the game screen (point 5)
is at (0,0). To do that, you need to subtract 97 from
each X coordinate and 26 from each Y coordinate:

(1) is at (0-97,0-26) -> (-97,-26)
(2) is at (883-97,0-26) -> (786,-26)
(3) is at (0-97,768-26) -> (-97,742)
(4) is at (883-97,768-26) -> (883,742)

(5) is at (97-97,26-26) -> (0,0)
(6) is at (797-97,26-26) -> (700,0)
(7) is at (97-97,526-26) -> (0,500)
(8) is at (797-97,526-26) -> (700,500)

The final thing you need to do is make it so the bottom
right corner of the image (point 8) is at (1.0,1.0). To do
that, you need to divide each coordinate by the width
or height of the image

(1) is at (-97/700,-26/500) -> (-0.13857,-0.052)
(2) is at (786/700,-26/500) -> (1.122857,-0.052)
(3) is at (-97/700,742/500) -> (-0.13857, 1.484)
(4) is at (883/700,742/500) -> (1.122857, 1.484)

(5) is at (0/700,0/500) -> (0.0,0.0)
(6) is at (700/700,0/500) -> (1.0,0.0)
(7) is at (0/700,500/500) -> (0.0,1.0)
(8) is at (700/700,500/500) -> (1.0,1.0)

Alternately, you can also provide pixel coordinates, but it will
still be relative to the game's native resolution. So, if
the game normally runs at 256x224, you'll need to compute
the division factor so that the bottom right corner of the
game (point 8) ends up at (256,224) instead of (1.0,1.0).

Basically, if you have the original coordinates shown
right below the image, you can compute the values needed by
doing this for X coordinates:

(X coordinate on artwork) - (X coordinate of game's upper-left)
---------------------------------------------------------------
(width of game in artwork pixels)

And this for Y coordinates:

(Y coordinate on artwork) - (Y coordinate of game's upper-left)
---------------------------------------------------------------
(height of game in artwork pixels)

*********************************************************************
Está en guiri pero creo que más o menos se entiende y al menos me servirá para hacer pruebas.

Muchas gracias a todos y a ver si doy con la tecla...

Nota: Por cierto, he puesto una fotillo del KungFu Master pero por ejemplo este es uno de los juegos que pese a haberme descargado el artwork no consigo que me aparezca como en la foto que he puesto que la he cogido de internete!!!

 


* Salón Recreativo #55 (27-04-2024 / 26-05-2024)  Autor: beaches Foro: Salón Recreativo FaseBonus 14/05/2024 (22:08)
* MPAGD (Multi Platform Arcade Game Designer)  Autor: Zael Foro: Creación de juegos 14/05/2024 (10:53)
* ¿A qué estáis jugando ahora mismo?  Autor: joselopez Foro: Offtopic 13/05/2024 (23:30)
* [N3DS] Red Viper - Emulando Virtual Boy como Dios manda  Autor: sirdrak Foro: Noticias de emuladores 13/05/2024 (00:53)
* El megapost del ZX Spectrum  Autor: Zael Foro: Offtopic 12/05/2024 (20:30)
* La inteligencia artificial ha llegado a la música  Autor: Zael Foro: Offtopic 12/05/2024 (20:24)
* Info sobre MARP  Autor: empardopo Foro: Records y wolfmame 12/05/2024 (20:09)
* Stop the express  Autor: empardopo Foro: ZX Spectrum 12/05/2024 (20:05)
* Retro 320 - Wizard of wor  Autor: empardopo Foro: Competiciones y concursos 12/05/2024 (20:03)
* Retro Portable Maker ArcadeSpain (RPMA)  Autor: empardopo Foro: Otros programas 12/05/2024 (17:37)
* Recopilatorio Retos: Desde el 1 hasta .....  Autor: montypepa Foro: Competiciones y concursos 05/05/2024 (21:30)
* iojukebox Theme, un JukeBox para Attract-Mode  Autor: gucaza Foro: Themes AM 04/05/2024 (02:47)
* Nuevo miniPc para mi vieja recre y juegos Windows compatibles formato 4:3  Autor: jmpuk Foro: Offtopic 02/05/2024 (23:31)
* Homenaje a Locomalito  Autor: beaches Foro: Otros programas 02/05/2024 (23:03)
* [Recomendación] Cine para los findes en casa (bueno, bonito y barato)  Autor: arquillos Foro: Offtopic 02/05/2024 (09:39)
* [Recomendacion] Series para ver  Autor: jmpuk Foro: Offtopic 01/05/2024 (21:54)
* Etpa8: El Reino Subterráneo  Autor: jmpuk Foro: ZX Spectrum 01/05/2024 (21:49)
* Amiga Games + 1.9.2  Autor: empardopo Foro: Emuladores 01/05/2024 (20:58)
* West Bank para ZX Spectrum  Autor: empardopo Foro: ZX Spectrum 01/05/2024 (20:07)
* Patrocinador para el foro ArcadeSpain  Autor: empardopo Foro: Noticias 29/04/2024 (19:37)
* Aprende a hacerte un PORTABLE de tu juego arcade favorito  Autor: empardopo Foro: Records y wolfmame 29/04/2024 (19:27)
* Screenshot de empardopo  Autor: empardopo Foro: Otros programas 24/04/2024 (19:42)
* Concurso Bytemaniacos 2025  Autor: empardopo Foro: Creación de juegos 23/04/2024 (21:46)
* Van dos y se cae el del medio - Hilo de cachondeo general  Autor: empardopo Foro: Offtopic 21/04/2024 (18:47)

Countdown
Buscaunchollo.click