Post by xavisan on Dec 10, 2022 20:01:46 GMT
Escribo este texto por si puede seros de ayuda y por si es posible ampliar información al respecto, ya que pienso que SPRITEINK en MPAGD 7.10 no
termina de funcionar y tiene algún que otro BUG importante.
Paso pues a explicar el tema, y así aportamos un poco de conocimiento que siempre es bueno para todos

El problema de usar varios coloures en MPAGD es cuando se usan juego con muchos enemigos y mucha plataforma o gráfico, ya es estos no terminan de ir bien y cuando el Player esta cerca siempre flashea un poco el colour.
Para que la parte de colour funcione, hay que tener todos los enemigos incluido el player con el colour asignado, el problema principal es que el generador de Sprites de MPAGD aunque le marques el colour no sirve de nada, al igual
que si le poner el colour de fondo, en todos los casos utilizará siempre un colour fijo, normalmente especificado en el GAMEINIT, si no, el colour por defecto será blanco brillante, ósea un código 71.
Los coloures en MPAGD los de la paleta brillante son los siguientes:
64 - Negro
65 - Azul
66 - Rojo
67 - Violeta
68 - Verde
69 - Azul claro
70 - Amarillo
71 - Blanco brillante
y se utilizan siempre con SPRITEINK x siendo x el cólor a utilizar del 0 al 7 o del 64 al 71
Para que esto funcione entre comillas, digo entre comillas porqué no termina de ir bien, es necesario aplicarlo en las zonas de movimiento de nuestra rutina, pero al contrario, es decir, primero el colour de LIMPIEZA, ose el mismo que cuando pasa un sprite si el TILE es amarillo el de limpieza tendrá que ser amarillo, el problema de esto es cuando se utilizan sprites adicionales como de movimiento, si el sprite cae encima puede llegar a tener un flasheado que es el problema principal existente, es por ello que lo descarto casi siempre ya que en MPAGD 7.10 no termina de ir bien.
Posteriormente al final usaremos el colour que queremos asignarle realmente al Sprite.
Veamos un ejemplo, con un tramo standard de generación de código de MPAGD:
IF CANGOUP
SPRITEINK 6 ; tinta amarilla fondo TILE
SPRITEUP
SPRITEINK 3 ; tinta rosa Sprite
ELSE
SPRITEINK 6 ; tinta amarilla fondo TILE
LET DIRECTION = DOWN
LET FRAME = 0
SPRITEINK 3 ; tinta rosa Sprite
ENDIF
Si observamos el cambio de colour se pone colour de Background y una vez realizada la rutina de movimiento, usamos el del colour del Sprite, cuando en la parte inferior tenemos un colour y es un TILE que se puede traspasar, y en la parte superior es otro colour y es otro TILE que se puede traspasar, y además tenemos un Sprite fijo o enemigo debajo o en medio, entonces es cuando es cuando el proceso falla y no termina de ir muy bien, funcionará siempre que los TILE coincidan, y que el objeto intermedio o Sprite siempre estén los coloures aplicados en la misma forma, teniendo en cuenta además que el Player también será necesario asignarle colour ya que si no el colourClash sucede y todo y con ello no termina de dar un resultado adecuado.
Debo indicar que falla, no es muy fiable, ya que a veces hay ciertos Sprites que aun poniendo bien los coloures siguen realizando el colourClash.
Dependerá del tipo de juego y de al final como están implementados los TILES para generar la pantalla del juego, la cantidad de enemigos y las funcionalidades del juego, pero funcionar no termina de funcionar como debería.
---
The problem of using several colours in MPAGD is when you use a game with many enemies and a lot of platform or graphics, since these don't end up going well and when the Player is close the colour always flashes a bit.
For the colour part to work, you have to have all the enemies, including the player, with the assigned colour. The main problem is that the MPAGD sprite generator, even if you mark the colour, is useless, just like
that if you put the background colour, in all cases it will always use a fixed colour, normally specified in GAMEINIT, if not, the default colour will be bright white, that is, a code 71.
The colours in MPAGD those of the bright palette are as follows:
64 - Black
65 - Bue
66 - Red
67 - Violet
68 - Green
69 - Cyan
70 - Yelow
71 - White
and they are always used with SPRITEINK x where x is the colour to be used from 0 to 7 or from 64 to 71
For this to work in quotes, I say in quotes because it doesn't end up going well, it is necessary to apply it in the movement zones of our routine, but on the contrary, that is, first the CLEANING colour, that is, the same as when a sprite passes If the TILE is yellow, the cleaning one will have to be yellow. The problem with this is when additional sprites are used as movement sprites. If the sprite falls on it, it can flash, which is the main problem. I rule out almost always since in MPAGD 7.10 it doesn't end up going well.
Later at the end we will use the colour that we really want to assign to the Sprite.
Let's see an example, with a standard section of MPAGD code generation:
IF CANGOUP
SPRITEINK 6 ; tinta amarilla fondo TILE
SPRITEUP
SPRITEINK 3 ; tinta rosa Sprite
ELSE
SPRITEINK 6 ; tinta amarilla fondo TILE
LET DIRECTION = DOWN
LET FRAME = 0
SPRITEINK 3 ; tinta rosa Sprite
ENDIF
If we observe the colour change, the Background colour is set and once the movement routine is done, we use the colour of the Sprite, when in the lower part we have a colour and it is a TILE that can be transferred, and in the upper part it is another colour and it's another TILE that can be passed through, and we also have a fixed or enemy Sprite below or in the middle, that's when the process fails and doesn't end up going very well, it will work as long as the TILEs match, and that the intermediate object or Sprite the colours are always applied in the same way, also taking into account that the Player will also need to assign a colour to it, otherwise the colourClash happens and everything and with it it does not end up giving an adequate result.
I must indicate that it fails, it is not very reliable, since sometimes there are certain Sprites that even putting the colours well continue to perform the colourClash.
It will depend on the type of game and in the end how the TILES are implemented to generate the game screen, the number of enemies and the game's functionalities, but it doesn't work as it should.
-----