While making my previous demo I faced an unexpected issue of priority display with text.
Here, text and hud are both set on BG_A, but the box of the text smashes the tiles instead of transparency:
In this other case, text and tiles are set on BG_B, and the box of text do not show transparency:
Many attempts, modifying priority effects of tiles and text cause the primary objective was to scroll the hud and text with it.
At last I write text on BG_A, but only when no tile is shared with on this plan.
What did I miss?
text and transparency
Moderator: Stef
-
- Interested
- Posts: 24
- Joined: Sun Feb 27, 2022 3:27 am
Re: text and transparency
Can you paste your code?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: text and transparency
Not saying this is the problem, but remember the priority chain: S > A > B > G. For B to show up over A, it must have its priority bit set. If A has its priority bit set, B will never show over it. Another thing to remember is that transparent pixels MUST be 0. I've seen tilesets designed to use another value as transparent. Those will not be transparent on the MD. Finally, remember that the VDP sets which palette bank value 0 is the background. The MD doesn't have 64 colors (ignoring shadow/hilite), it has 60 + 1 background that can be chosen on the fly from four different values.
Re: text and transparency
@amateurSC:
I only use the VDP_drawTextEx();
I use the last color from 4 existing palettes in the demo. (bricks, sprites...).
I have not worked on this problem yet but I have noticed lately that my graphic tool (mtpaint), saves images with a -1 as defaut transparency state.
I considered this could be a valuable clue.
And you, Chilly, give me the feeling I might be right.
I will start a brand new demo very soon and I will take care with the images' savings.
Colors and palettes use were pretty complicated processes to me but this stuff becomes brighter those days.
I'm fine with the idea of 60+1 colors.
When I create/set a 16 colors palette, I always consider the 0 as the transparency.
I feel quite comfortable as well with the priority chain. I'll be glad to show this very soon... Next release on september!
Thanks guys.
I only use the VDP_drawTextEx();
I use the last color from 4 existing palettes in the demo. (bricks, sprites...).
I have not worked on this problem yet but I have noticed lately that my graphic tool (mtpaint), saves images with a -1 as defaut transparency state.
I considered this could be a valuable clue.
And you, Chilly, give me the feeling I might be right.
I will start a brand new demo very soon and I will take care with the images' savings.
Colors and palettes use were pretty complicated processes to me but this stuff becomes brighter those days.
I'm fine with the idea of 60+1 colors.
When I create/set a 16 colors palette, I always consider the 0 as the transparency.
I feel quite comfortable as well with the priority chain. I'll be glad to show this very soon... Next release on september!
Thanks guys.