Hi, There is something I don't understand about the color palettes of the images. How is it possible that some images have a certain palette and other have a completly different palette and yet both images are shown on the same screen perfectly.
How can you achieve this?
Images palette question
Re: Images palette question
vga game supports 320x200 in 256 colors. Due to format restrictions and to save memory (remember the game was created by the end of the 80's), each image is able to use only a 16-color palette. The game has different active palettes at the same time:
- the built-in palette, used for background, texts, potion palette. Editable with cuspop
- the main environment palette (changes with the environment). Editable with PR.
- the second environment palette use only in the plain wall tile (also changes with the environment). Editable with PR.
- the guard palette (that's one of the reasons there can only be one guard per screen). Editable in a binary resource extractable with PR and specified in FormatSpecifications.
- The kid palette (used for our guy, his shadow, the skeleton, the lives and the mouse)
- The pv palette, used for the torches, princess and Jaffar (not sure about that it's been a long time).
so, as you can see each palette has 16 colors, we can add up to 16 different palettes at one time. A very big disadvantage is that colors may be repeated, for example orange in the torch and a guard may be repeated, but there is no solution for that. In fact that's the reason why mouse, skeleton and kid shares palettes: to save some palette space for the common white.
Edit: mickey correction
- the built-in palette, used for background, texts, potion palette. Editable with cuspop
- the main environment palette (changes with the environment). Editable with PR.
- the second environment palette use only in the plain wall tile (also changes with the environment). Editable with PR.
- the guard palette (that's one of the reasons there can only be one guard per screen). Editable in a binary resource extractable with PR and specified in FormatSpecifications.
- The kid palette (used for our guy, his shadow, the skeleton, the lives and the mouse)
- The pv palette, used for the torches, princess and Jaffar (not sure about that it's been a long time).
so, as you can see each palette has 16 colors, we can add up to 16 different palettes at one time. A very big disadvantage is that colors may be repeated, for example orange in the torch and a guard may be repeated, but there is no solution for that. In fact that's the reason why mouse, skeleton and kid shares palettes: to save some palette space for the common white.
Edit: mickey correction
Re: Images palette question
Hi poirot,
So, there are multiple palettes active at the same time, right? how can you do this? I've been trying to find an example of this but I couldn't find any. Can you show me an example?
Thanks!
So, there are multiple palettes active at the same time, right? how can you do this? I've been trying to find an example of this but I couldn't find any. Can you show me an example?
Thanks!
Re: Images palette question
Correction: VGA game supports 320x200 in 256 colors.poirot wrote:vga game supports 32'x240 in 256 colors.
Refueled my car! Now I can keep going!
Re: Images palette question
define "example". You need a C code to see how to handle VGA graphics or an example of this in POP1?Nico wrote:Hi poirot,
So, there are multiple palettes active at the same time, right? how can you do this? I've been trying to find an example of this but I couldn't find any. Can you show me an example?
Thanks!