It is currently Fri Nov 17, 2017 11:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Dec 14, 2015 3:11 am 
Offline

Joined: Mon Dec 14, 2015 2:58 am
Posts: 20
Hello. I'm new to nesdev and bit confused when it comes to color limitations of sprites. So... backgrounds use 16x16 tiles that may use 3 unique palette colors + black. What about the limit for character sprites? Most use just 3 colors, can I use black as the 4th color? Here's a sprite of on-guard sword knight from Kirby's Adventure, which uses 6 colors (3 for the knight and 3 for the sword). Are they just 2 separate sprites?
Image


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 3:17 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7265
Location: Chexbres, VD, Switzerland
It is multiple separate sprites overlayed on eachother. This is nothing special/uncommon on the NES, since you already have to use multiple sprites to form a metasprite, overlaying them is just the next step.

Also backgrounds uses 8x8 tiles, not 16x16. The colour palette granularity is 16x16, and it is common for games to simulate 16x16 tiles by assembling groups of 4 tiles, "metatiles".


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 4:07 am 
Offline

Joined: Mon Dec 14, 2015 2:58 am
Posts: 20
Does it mean that if my character is 8x16, upper 8x8 tile can have completely different colors than lowe 8x8 tile?


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 4:10 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7265
Location: Chexbres, VD, Switzerland
In the case of 8x8 hardware sprites, yes. If 8x16 hardware sprites are used, no.

However Contra have 32x16 player with 8x16 hardware sprites and different colours for the lower part (pants) and the upper part (body).


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 4:30 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10112
Location: Rio de Janeiro - Brazil
Friendly_Noob wrote:
can I use black as the 4th color?

No. The reason NES sprites are only 3 colors is that one of the colors has to be sacrificed in favor of transparency. The only way to have sprites with more than 3 colors is to overlay sprites (like in the Kirby example) or to use different palettes in non-overlapping sprites (like in Contra).


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 7:30 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3950
One more way to get another sprite color: Plain old black background everywhere. Not all that infrequent.

Another thread proposed modifying the background tiles around the player character to draw black pixels there, using an RPG hero as an example. This would help against the sprite limit and add forced black pixels to the character. If white was forced into every background palette, you could get White that way too.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 8:06 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10112
Location: Rio de Janeiro - Brazil
Dwedit wrote:
One more way to get another sprite color: Plain old black background everywhere. Not all that infrequent.

This worked pretty well in the fighting sequences of the Famicom Dragon Ball Z games.

Quote:
Another thread proposed modifying the background tiles around the player character to draw black pixels there, using an RPG hero as an example.

This is quite an extreme solution, and very impractical in most games that don't use tiny sprites whose movements are limited by a grid.


Top
 Profile  
 
PostPosted: Mon Dec 14, 2015 11:11 am 
Offline

Joined: Mon Nov 10, 2008 3:09 pm
Posts: 431
tokumaru wrote:
Dwedit wrote:
One more way to get another sprite color: Plain old black background everywhere. Not all that infrequent.

This worked pretty well in the fighting sequences of the Famicom Dragon Ball Z games.


Fun fact: Only one of the two characters in those fighting sequences is made of sprites. The other one is drawn onto the BG. That's why they never flicker even when the bigger characters do a kick.


Top
 Profile  
 
PostPosted: Tue Dec 15, 2015 8:58 am 
Offline

Joined: Mon Dec 14, 2015 2:58 am
Posts: 20
Thanks for answers everyone!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group