Sprites with more than 3 colors
Moderator: Moderators
-
UncleSporky
- Posts: 388
- Joined: Sat Nov 17, 2007 8:44 pm
Sprites with more than 3 colors
I had read at one point that the Megaman games used some tricks to squeeze out better graphics than should've been possible, in particular to achieve sprites with more colors. No matter how much I search the internet I can't find any info on this. It's possible I read it wrong and they were referring to some other graphic tricks in Megaman. Has anyone here heard of this, and if so then how did they do it?
Looking at MM sprites now, I do see more than 3 colors; most bosses have a black outline, two colors, white highlights and a skintone face. But it's possible that they're just broken up cleverly such that no 8x8 chunk contains more than it should.
Even if I'm mistaken about MM, how would you attain more colors? The most obvious way is to overlap two sprites in the same spot, but doing this for more than a few moving objects at a time would be really wasteful of the 8-sprites-per-line limit. The other way I can think of is using sprites and background together, but this would greatly limit movement, correct?
Any other ways to do this that are more efficient? Are there any games that are good examples of this?
Looking at MM sprites now, I do see more than 3 colors; most bosses have a black outline, two colors, white highlights and a skintone face. But it's possible that they're just broken up cleverly such that no 8x8 chunk contains more than it should.
Even if I'm mistaken about MM, how would you attain more colors? The most obvious way is to overlap two sprites in the same spot, but doing this for more than a few moving objects at a time would be really wasteful of the 8-sprites-per-line limit. The other way I can think of is using sprites and background together, but this would greatly limit movement, correct?
Any other ways to do this that are more efficient? Are there any games that are good examples of this?
Just get to a point in the game where you can see one of those sprites, using an emulator that will allow you to see the contents of the pattern tables, such as FCEUXD or Nintendulator. Try to locate the patterns and you'll see the small pieces that compose the sprite, and since each individual 8x8 sprite (or 8x16, another mode the NES has) can use a different palette, depending on the way they are arranged the character they represent will seem to have more colors.
Take a look at the Sonic sprite in my avatar... it's for the NES, and has 6 colors, because I use 2 different palettes to make it up, overlapping the skin parts over the blue parts (one palette has 2 blues and white, and the other is a gradient of the skin tone, with the darkest one closer to red).
This trick must be used carefully though, because of the limit of 8 sprites per scanline. With all the overlapping for just one character, there might not be much left for the other sprites on screen.
Take a look at the Sonic sprite in my avatar... it's for the NES, and has 6 colors, because I use 2 different palettes to make it up, overlapping the skin parts over the blue parts (one palette has 2 blues and white, and the other is a gradient of the skin tone, with the darkest one closer to red).
This trick must be used carefully though, because of the limit of 8 sprites per scanline. With all the overlapping for just one character, there might not be much left for the other sprites on screen.
-
UncleSporky
- Posts: 388
- Joined: Sat Nov 17, 2007 8:44 pm
Heh, I saw that before, and I wondered if that was a homebrew thing or something from the Master System games!
If this was something I actually planned on doing in a game, I'd definitely just do it for the main character only, and possibly for bosses.
What about the other method, sprites on background? I take it this would only really be useful for static background objects, unless there was nothing else in the background and you had the freedom to scroll the screen around (strikes me as good for shmup bosses). Do you know of any games/demos where either of these techniques were used to great effect?
If this was something I actually planned on doing in a game, I'd definitely just do it for the main character only, and possibly for bosses.
What about the other method, sprites on background? I take it this would only really be useful for static background objects, unless there was nothing else in the background and you had the freedom to scroll the screen around (strikes me as good for shmup bosses). Do you know of any games/demos where either of these techniques were used to great effect?
This is used by a few minibosses in later Mega Man games (the cat in Mega Man 3's topman stages comes in mind). It's the other way arrond, the ennemy is basically drawn on BG, but a few part of it are sprites to add colors. Some enemies in Dragon Warrior 3 and 4, and Earthbound, also does this.What about the other method, sprites on background?
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
Oh yeah, I remember that. I think that's actually a really good idea if you want to make enemies large. I was thinking of something similar for the boss of my sidescroller, where the boss would just be huge, and be a part of the background. It's a good alternative sometimes, but it's very very limited in terms of movement.
-
UncleSporky
- Posts: 388
- Joined: Sat Nov 17, 2007 8:44 pm
Someone correct me if I'm wrong, but couldn't you use sprite 0 hit to draw a static ground and then scroll the top part around to move the boss?Celius wrote:Oh yeah, I remember that. I think that's actually a really good idea if you want to make enemies large. I was thinking of something similar for the boss of my sidescroller, where the boss would just be huge, and be a part of the background. It's a good alternative sometimes, but it's very very limited in terms of movement.
Yes you could. But there would still be a lot of limitations... The background (behind the big enemy) would still need to be just a solid color, and you'd need to define a "safe" ammount of scrolling in order to not end up showing te floor out of place (before the bottom of the screen), something that could happen because of mirroring. 1-screen mirroring would allow for much more movement though, as the floor would be in one name table and the enemy on another, so they'd never meet by accident.UncleSporky wrote:Someone correct me if I'm wrong, but couldn't you use sprite 0 hit to draw a static ground and then scroll the top part around to move the boss?
EDIT: I remember one of these huge enemies from Mega Man (don't remember which game, but I thing the enemy was a huge yellowish robot with large hands and a massive jaw) moved back and forth over a floor, but this floor was mainly composed of horizontal lines, and it was scrolled along with the enemy, but you dodn't really notice because there were no vertical detais. I also remember Darkwing Duck using the same trick during the intro sequence, for the road, but it used sprites to fake some vertical details on it, giving the impression of an actual split where there was none.
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
Doing the sprite 0 hit wouldn't be hard if the upper part wasn't moving, and the lower part was. However, I don't really see why you'd want this. But, I do know a way you could do the sprite 0 hit and have a floor. I use a formula in my scrolling engine that takes pixel coordinates, and calculates the address of the BG tile at those coordinates. So if 8,8 goes through the routine, it comes out with $2021. Say our boss is just a big tall guy walking around, moving left and right. Keep track of the Y coordinate that would be right below his feet. Put that Y coordinate and the whatever the X scroll is set to through the routine, and it will calculate the PPU address for below his feet, but at the left side of the screen. Store a white tile at this location, and do your sprite 0 hit. After your hit, switch to a different name table that has the floor in it.
Two enemies in Plantman's Stage of Mega Man 6 seems to correspond to this descritption. The tank in Contra's stage 5 also does this.EDIT: I remember one of these huge enemies from Mega Man (don't remember which game, but I thing the enemy was a huge yellowish robot with large hands and a massive jaw) moved back and forth over a floor, but this floor was mainly composed of horizontal lines, and it was scrolled along with the enemy, but you dodn't really notice because there were no vertical detais. I also remember Darkwing Duck using the same trick during the intro sequence, for the road, but it used sprites to fake some vertical details on it, giving the impression of an actual split where there was none.
Celuis : What you describe is pretty interesting. I had in mind to do one or two BG bosses in my current game (maybe more) and was thinking about many tricks in doing this. I won't tell much more, because I haven't planned much yet (the first boss I'm making right now is a sprite) and because I also want it to be a surprise.