Sprite half in front of PLAN_A and the other half behind.
Moderator: Stef
-
- Very interested
- Posts: 118
- Joined: Mon Feb 19, 2018 7:31 pm
Sprite half in front of PLAN_A and the other half behind.
Hi!
PLAN_A have priority = TRUE and Sprite have priority = TRUE, I've checked if my code change it in somewhere, but it doesn't happens.
There is a explanation for it?
Thank you!
My issue
ROM DOWNLOAD
https://www.mediafire.com/file/1irl8z11 ... m.rar/file
Is it works like the animation bellow, correct?
PLAN_A have priority = TRUE and Sprite have priority = TRUE, I've checked if my code change it in somewhere, but it doesn't happens.
There is a explanation for it?
Thank you!
My issue
ROM DOWNLOAD
https://www.mediafire.com/file/1irl8z11 ... m.rar/file
Is it works like the animation bellow, correct?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sprite half in front of PLAN_A and the other half behind.
You also need to have correct priority sprite wise (which are disconnected from high / low priority stuff). If you are using SGDK you can use the SPR_setDepth(..) method to change inter-sprite priority.
-
- Very interested
- Posts: 118
- Joined: Mon Feb 19, 2018 7:31 pm
Re: Sprite half in front of PLAN_A and the other half behind.
Solved.
Issue caused by Pirate depth (Prio = FALSE and depth = MIN_DEPTH +40 aprox.) , after changed to MAX_DEPTH it works.
How sprite depth can afect PLAN_A tile depth?
I don't understand.
Thank you!
Issue caused by Pirate depth (Prio = FALSE and depth = MIN_DEPTH +40 aprox.) , after changed to MAX_DEPTH it works.
How sprite depth can afect PLAN_A tile depth?
I don't understand.
Thank you!
Re: Sprite half in front of PLAN_A and the other half behind.
You have another sprite covering your high-prio-bit sprite. That low-prio-bit sprite is higher in sprite priority, which means it covers your high-prio-bit sprite, but lower in the plane bit priority, which means it's below the high-prio plane.
Tricks like this are commonly used back to the NES era for various effects.
Tricks like this are commonly used back to the NES era for various effects.
-
- Very interested
- Posts: 118
- Joined: Mon Feb 19, 2018 7:31 pm
Re: Sprite half in front of PLAN_A and the other half behind.
It's so strange .
Looking how SNES version of Goof Troop works, I saw the inverse, something like a "reveal area", I don't know if it is easily possible on Sega Genesis.
Thank you!
Looking how SNES version of Goof Troop works, I saw the inverse, something like a "reveal area", I don't know if it is easily possible on Sega Genesis.
Thank you!
Re: Sprite half in front of PLAN_A and the other half behind.
The whole effect can be done even better using only one plane:
- Launching bombs characters are low priority
- Using only plan B with low priority, except for
- The tiles which are in front of the bomb launchers
- Set black as the background color, and the same color number as index 0 on that palette
Apart for only using only one plane, can you see why is better?
About the running bombs on weed, you need a new sprite to draw the shadow on bottom of the bomb, so that will hide the lower bomb part.
To my point of view, is gross that bomb launchers have shadows and bombs haven’t.
- Launching bombs characters are low priority
- Using only plan B with low priority, except for
- The tiles which are in front of the bomb launchers
- Set black as the background color, and the same color number as index 0 on that palette
Apart for only using only one plane, can you see why is better?
About the running bombs on weed, you need a new sprite to draw the shadow on bottom of the bomb, so that will hide the lower bomb part.
To my point of view, is gross that bomb launchers have shadows and bombs haven’t.
HELP. Spanish TVs are brain washing people to be hostile to me.
-
- Very interested
- Posts: 118
- Joined: Mon Feb 19, 2018 7:31 pm
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Sprite half in front of PLAN_A and the other half behind.
Most significant bit of the tile entry in the map is the priority bit.
-
- Very interested
- Posts: 118
- Joined: Mon Feb 19, 2018 7:31 pm
Re: Sprite half in front of PLAN_A and the other half behind.
Nice!
Now it's using only PLAN_B.
First I put full screen with low priority, then it load's 7 little tile maps (4x4) to put in front with high priority.
Now it's using only PLAN_B.
First I put full screen with low priority, then it load's 7 little tile maps (4x4) to put in front with high priority.
Code: Select all
VDP_loadTileSet(boss_hide_02.tileset, *paramInd, DMA);
paramMapA = unpackMap(boss_hide_02.map, NULL);
VDP_setMapEx(PLAN_B, paramMapA, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, *paramInd), 7, 12, MapXPosInTile, MapYPosInTile, 4, 4);
*paramInd += boss_hide_02.tileset->numTile;
MEM_free(paramMapA);