gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > highlight just one sprite ?

#63666 - calimero06 - Thu Dec 15, 2005 12:50 pm

Hello,

this is my fisrt post here, but I browse the forums for several weeks and have began the coding of a shoot'em up (old school like r-type).

Today I have a working version and my next objective is to increase the content (especially the graphics side).

One thing I want to do is when an ennemy is hit to have an effect on it like sprite becoming white. I tried the BLDCNT register but all my sprites are altered.

Is there a possibility to alter only one sprite with thie feature or do I have to find another solution (suggestions welcome)

sorry for my bad english, I'm french.

#63669 - Cearn - Thu Dec 15, 2005 1:34 pm

BLDCNT works on all sprites that are set to use blending. Apart from the blend toggle (attr0, bit 10), you can't separate it for individual sprites.

If you're using 4bit sprites, you could use palette toggling. Have one palette bank for the normal colors and one for when it's flashing. Or just edit the palette itself when you need to ... then again that'd upset the other sprites as well.

#63691 - calimero06 - Thu Dec 15, 2005 4:19 pm

thanks for your response Cearn, I haven't seen the bit 10 in atr0, I think it may fullfill my need. For now I'm in 256 color mode , the palette stuff is interesting but I'm a little bit lazy to convert my graphics at the moment.

#63962 - thegamefreak0134 - Sun Dec 18, 2005 2:46 am

The way I do it is to have both versions of the animation in the memory, and have the animating sprites change their atr2 pointer. Although this might be easier, it really depends on the situation as it requires you to double the memory required to hold each sprite. The palette switch mentioned seems to be more memory conserving for your situation, but this might make it slightly easier just to debug code.
_________________
What if the hokey-pokey really is what it's all about?

[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]