Problems with Highlight Shadow Mode
Posted: Wed Jan 11, 2017 4:10 am
Hi all,
Now that I have scrolling working in my little engine I am experimenting with Mega Drive graphics before I make plans for a game.
I am planning on a top/down game, so using highlight/shadow mode is a possibility!
However, from copious reading of the docs (one at https://emudocs.org/Genesis/Graphics/genvdp.txt, another at http://md.squee.co/VDP#Shadow.2FHighlight), and forum posts, the behaviour I have found in emulators and on real console is different from what I expected.
In my example, I have 2 layers of tilemaps, both seem to be working well for priority - with priority, they are normal intensity, without, they are shadowed.
Off to the side of the screen I have two sprites, one is a 2x2 tile high priority sprite which just contains fills of the first few colours palette 0.
On top of that sprite I have another sprite, which I will call the "modifier sprite", which uses the same tileset, but in palette 4, to attempt to get highlight and shadow effects onto the sprites and tiles below that sprite (using colours 15 and 16).
However it is with this modifier sprite that I have found problems.
On the Gens emulator, using any colour index in palette 4 from 1 to 14 is fine. Please see below screenshot of using palette index 14 (a blue tone), in the middle of the 2x2 tile sprite below it. Using colour index 15 to highlight pixels underneath successfully highlights the sprite pixels underneath the modifier sprite. Using colour index 16 to shadow the pixels underneath doesn't display the modifier sprite at all, as can be seen below: Please see post below for Kega screenshots.
Now that I have scrolling working in my little engine I am experimenting with Mega Drive graphics before I make plans for a game.
I am planning on a top/down game, so using highlight/shadow mode is a possibility!
However, from copious reading of the docs (one at https://emudocs.org/Genesis/Graphics/genvdp.txt, another at http://md.squee.co/VDP#Shadow.2FHighlight), and forum posts, the behaviour I have found in emulators and on real console is different from what I expected.
In my example, I have 2 layers of tilemaps, both seem to be working well for priority - with priority, they are normal intensity, without, they are shadowed.
Off to the side of the screen I have two sprites, one is a 2x2 tile high priority sprite which just contains fills of the first few colours palette 0.
On top of that sprite I have another sprite, which I will call the "modifier sprite", which uses the same tileset, but in palette 4, to attempt to get highlight and shadow effects onto the sprites and tiles below that sprite (using colours 15 and 16).
However it is with this modifier sprite that I have found problems.
On the Gens emulator, using any colour index in palette 4 from 1 to 14 is fine. Please see below screenshot of using palette index 14 (a blue tone), in the middle of the 2x2 tile sprite below it. Using colour index 15 to highlight pixels underneath successfully highlights the sprite pixels underneath the modifier sprite. Using colour index 16 to shadow the pixels underneath doesn't display the modifier sprite at all, as can be seen below: Please see post below for Kega screenshots.