NES Palette(s)

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
Dwedit
Posts: 4312
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Fri Sep 16, 2011 12:21 pm

Carnivac wrote:Ok does this work (uses the global palette of my first screenshot)?

Image

Have I got this whole palette thing right or did I misunderstand it?

(I took out the clouds but I can add them back in later using palette 3)
Wow, this is some terrific stuff! Thought I was looking at a 16-bit game for a few seconds there.

Except you seem to be disregarding the 8-sprite limit (only eight 8-pixel wide sprites can be on the same scanline at a time, the rest are discarded). Games shuffle the order of sprites every frame so they flicker instead of disappear.

Might want to see what these graphics look like after running them through an NTSC filter, because stuff can look completely different.
Last edited by Dwedit on Fri Sep 16, 2011 12:29 pm, edited 1 time in total.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

Carnivac
Posts: 17
Joined: Thu Sep 15, 2011 4:20 am

Post by Carnivac » Fri Sep 16, 2011 12:29 pm

So each sprite is actually made up of 8x8 pixel tiles? Oh ok. Well this is just a test shot anyways. I'll take that into consideration when doing the levels.

By the way are animated tiles allowed? Say if I wanted to have a hidden room with a solid color background could I then have a tile version of the coin in that room repeated a lot for crazy money collecting or would that have to be static (as in the coin doesn't spin)?

User avatar
Dwedit
Posts: 4312
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Fri Sep 16, 2011 12:41 pm

Sprites are either 8x8 or 8x16. You use 8x8 if you need to make different pieces of a big sprite different colors more easily, and you use 8x16 if you are hitting the 64 total sprite limit and want to draw more. (8x16 sprites also require slightly less processing time because there are half as many on a screen) But you can only use one type of sprite for the entire screen, you can't mix the two. Your screen is either dedicated to 8x8 or 8x16 sprites.

You can animate tiles either by changing graphics for the tiles in video memory, or by writing new tiles to the name table. Or you can temporarily "promote" a background tile to a sprite, you erase it from the background, animate it for a short time, then turn it back into a background tile, Mario 1 did this for the question blocks when you hit them.

Tiny Toon Adventures, Super Mario Bros 2, and Super Mario Bros 3 are good examples of animated tiles done by switching CHR-ROM pages. Some games animate tiles by changing contents of CHR-RAM, but that is more limited.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
tokumaru
Posts: 11711
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Fri Sep 16, 2011 12:43 pm

Wow, this look incredible. It really does take a while to realize it's an 8-bit game.
Carnivac wrote:So each sprite is actually made up of 8x8 pixel tiles?
Sprites can be either 8x8 or 8x16 pixels, and you can display up to 64 of them at any given time. What Dwedit meant is that the NES can only show 8 sprites in a row/scanline, if you try to put more than that the ones with lower priority won't appear. Commercial NES games handled this by cycling the priority of the sprites every frame, causing different sprites to disappear each frame, creating the effect popularly known as "flickering".
Well this is just a test shot anyways. I'll take that into consideration when doing the levels.
Just avoid having too many sprites horizontally aligned. For example, in one row you have two diamonds, an enemy, two coins, a barrel and a chest, which would need a total of 14 sprites horizontally. That's almost twice the limit, so you should avoid situations like these.
By the way are animated tiles allowed?
You mean background tiles? Yes, they are allowed. In real NES games, the hardware inside the cart has an influence on how animated backgrounds work, but you don't have to care about this.
Say if I wanted to have a hidden room with a solid color background could I then have a tile version of the coin in that room repeated a lot for crazy money collecting or would that have to be static (as in the coin doesn't spin)?
They can spin, but they would have to use one of the background palettes. The closest one you have to the coins is palette 0, which I think is similar enough.

User avatar
tokumaru
Posts: 11711
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Fri Sep 16, 2011 1:09 pm

If this was an actual NES game (which unfortunately isn't the case... :cry:), we would have to talk about the HUD. It doesn't appear to be using the background palettes, and because of the 8 sprites per scanline limit you obviously can't draw it using only sprites.

Also, it's too close to the edge of the screen, which is bad because TVs usually crop part of the image. Important information should always be a few pixels (at least 12 or so) away from the edges of the screen, or else the chances that the player won't be able to see them are very high.

You may chose to take this into consideration or not, since this is not an actual NES program.

User avatar
Bregalad
Posts: 7884
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Fri Sep 16, 2011 1:27 pm

You know, the quality of the graphics really looks incredible.
Life is complex: it has both real and imaginary components.

Carnivac
Posts: 17
Joined: Thu Sep 15, 2011 4:20 am

Post by Carnivac » Fri Sep 16, 2011 1:55 pm

Ok,
some slight changes.
Image

Had to lose the font being in the players colors as those are sprites and I guess the font has to be background tiles and I've moved it down as suggested. I chose to use the background font of the rocks as I'm also using that for wood on other level tilesets (particularly the castle tiles I started before this forest set) so the font shouldn't change colors on other levels. I may have to rethink the hearts as they don't really fit any of the background palettes on this level and have ended up a bit green to stand out which isn't so bad in itself but that particular background palette is likely to change on other levels so might need to just replace it with something simple. I removed the seperator line as not sure if that is easily doable or not.

I've made a candle on wall tile which (while resulting in green candlesticks but that's not a big deal) eases off on the sprites per line. The candle flames can fit in one 8x8 sprite.

I've also added a version of the chest as a background tile. Figure this one can be used commonly and the blue/white sprite version is much less common and filled with greater treasure.

tepples
Posts: 21985
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Fri Sep 16, 2011 2:14 pm

SMB1 World 1-1 palette layout:

BG: Hills / Ground / Sky / ? blocks (animated)
OBJ: Mario / GreenWhiteSkin / RedWhiteSkin / Goomba

But in World 1-2 it switches to

OBJ: Mario / BlueLightDark / RedWhiteSkin / BlueGoomba

The BlueLightDark appears to be a muted version of GreenWhiteSkin.
psycopathicteen wrote:Doesn't the Starman and the Fire Flower just rotate through all 4 palettes?
On second thought, you're right. The leaves use GreenWhiteSkin, and the inflorescence switches among all palettes. Coins and flames use the RedWhiteSkin palette, and broken bricks use the Goomba palette. Starman switches between the Goomba and RedWhiteSkin palette.


Now back to our regularly scheduled topic:
Carnivac wrote:Ok,
some slight changes.
Very impressive. Another test would be to pixel the background for a whole level.

As for the HUD: You can learn the theory behind what the TV cuts off in our wiki article about overscan.

User avatar
tokumaru
Posts: 11711
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Fri Sep 16, 2011 2:41 pm

Carnivac wrote:Ok,
some slight changes.
All decisions you made were good. The dragons in the HUD will probably be cut off, but I guess they are not essential.

It's a very good thing that you are thinking about the other levels, because since some items are present in every level, their palettes can't change.

User avatar
Dwedit
Posts: 4312
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Fri Sep 16, 2011 2:45 pm

Image
How my (old) TV cuts off stuff. Approximation.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
koitsu
Posts: 4217
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Fri Sep 16, 2011 3:12 pm

Just gonna throw this out there: am I the only one who's wondering what the point of this thread is given that the game in question (assuming there even is a game -- an artist-drawn shot doesn't really indicate there's a game) **will not** be on the NES?

For example, if I was doing a 320x200 DOS game, I really wouldn't care to "mimic the NES" given that you're entitled to a 256-colour palette where you can use any of those colours for any pixel anywhere in 320x200 space.

Same applies to things like overscan and other whatnots (assuming it's a PC title).

I guess you could say I'm trying to figure out what the purpose is, given that the system its intended for is not the NES. If it's "I want it to look authentic" then make it look authentic per limits and specification of the system its intended for.

Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru » Fri Sep 16, 2011 3:23 pm

There is nothing wrong with making authentic retro-looking graphics or games for modern platforms. Not everyone are able or interested in taking challenges of making of actual NES game, some people just want to recreate the feel.

tepples
Posts: 21985
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Fri Sep 16, 2011 6:07 pm

koitsu wrote:For example, if I was doing a 320x200 DOS game, I really wouldn't care to "mimic the NES" given that you're entitled to a 256-colour palette where you can use any of those colours for any pixel anywhere in 320x200 space.
To expand on what Shiru said: Mega Man 9 and 10 mostly adhere to NES restrictions.
Same applies to things like overscan and other whatnots (assuming it's a PC title).
Overscan still applies to home theater PCs and modded game consoles.

User avatar
tokumaru
Posts: 11711
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Fri Sep 16, 2011 7:01 pm

I don't see anything wrong about mimicking the feel of another machine... Do I prefer the real deal? Sure, but not everyone can spend years trying to learn how to code for their favorite systems just because they want to make a few games in the spirit of those systems...

The limitations of each system is what makes them unique, and that creates a certain "style" for the software of each console. With time, that style becomes more than just a consequence of those limitations and becomes an actual entity that people learn to like (or hate!).

Nowadays, computers can be used to render photorealistic images, but some people still use them for traditional hand-drawn animation. Those people are mimicking something that used to be done on paper in order to create something in a style they like, instead of making "better use" of the machine and generating the most complex thing it has to offer.

User avatar
koitsu
Posts: 4217
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Fri Sep 16, 2011 8:30 pm

Except the author isn't mimicking the feel of another machine. The attribute table limitations are obviously not being considered, amongst other things.

I have no problem with someone wanting to make a "NES-like" game for another platform -- totally awesome, no qualms -- but there's a point where the degree one mimics something becomes unnecessary/superfluous. I mean really, overscan? Curved corners due to trapezoidal and CRT (electron gun)-specific aspects? Come on guys, seriously.

Post Reply