PypeBros wrote:
since the SNES produces an analog signal, dithering will work much better.
Dithering doesn't tend to look that great on SNES. The analog signal isn't bad enough to smooth out the dots, but at least on NTSC it can cause them to shimmer when the screen scrolls. Also, a lot of emulator users go for "HQ" filters or just leave the pixels blocky.
I've run your colour-reduced image through blargg's NTSC filter with medium settings and no other processing, to show you roughly how it would look:
Attachment:
120-colors-blarggNTSC.bmp [ 678.05 KiB | Viewed 11320 times ]
Kinda looks like the pencils have the chicken pox...
Quote:
I had 190 unique colors on the background planes
Your source image has garbage lines on the top and right side. Removing those lines results in just 105 colours total, including the sprites. (Also, I should note that the colours are incorrectly converted from 15-bit - they've been multiplied by 8 instead of properly expanded to the full range of 0-255. This gets you a slightly duller picture, with a "white" having RGB values of 248, which is slightly gray.)
You're probably going to have to manually palettize the BG graphics anyway; the 256-colour modes use too much VRAM. Do you really need more than eight 15-colour BG palettes at the same time, taking sharing into account? Could you just keep track of where in the level you need which palettes and switch them out on the fly during VBlank?
...
Let's see... The foreground wooden blocks are 10 colours, so you could fit 5 more in there. That covers the ink layer, with probably two colours left over if you're using BG3 for it. The pencil eraser with its metal clamp also uses 10, and the letters use 5, which completes another palette. The book appears to use exactly 15 colours. The far background seems to use just 7 colours all told; perhaps something useful could be done with the other 8. The pencil shafts appear to mostly use 6 colours each, with 8 more for the point; this may be excessive considering there are at least five shaft colours in this screenshot. Perhaps the pencils could be redrawn slightly to keep the shaft colours off the point tiles, and either reduce the number of shaft colours or make sure no more than three point colours appear on shaft tiles. This would allow two pencil shafts to be packed into one palette (doubling the number of tiles required for the pencil shafts, but that number isn't large), and for the point to use the spare 8 colours in the far background palette. This brings us up to seven BG palettes containing no more than 86 unique colours, or 84 if you don't count the ink.
So the screenshot you've posted would work on the SNES with minor modifications to the pencils (which might make them look
more like the originals by compensating for the aspect ratio shift), with an ink layer in reserve and a whole spare BG palette available, all without needing fancy tricks. You could even add another pencil colour and still have that spare palette. I doubt the above is the smartest way to distribute the colours, but at least they all fit.
You could do it without any modifications at all by using sprites for the pencil points, but that would eat half a sprite palette, and you might want to save those...
...
It might actually be smart to use HDMA to overwrite one of the BG palettes in between the playfield and the HUD, so you can use all 8 BG palettes for the playfield.
If all else fails, you could even start changing colours partway down the playfield, as long as you've got vertically-separated elements such that the upper one won't glitch when you start overwriting its palette for the lower one. In this case, note that the shafts of the blue and yellow pencils are separated by 92 scanlines; once the blue pencil shaft has been drawn, it would be perfectly safe to overwrite its palette with the yellow one's palette during HBlank (and reset it again after the yellow one has been drawn but before the blue one starts being drawn next frame) so as to get away with only allocating four pencil shaft palettes instead of five. But that's an emergency measure and hopefully won't be necessary...
That said, the use of HDMA on this image would allow it to be reproduced on SNES without any modifications, and without having to use sprites for any element that wasn't removed in the dithered version. (It would, however, need to use all 8 BG palettes to avoid attribute clash between the pencil shafts and points; this is what redrawing the pencils fixes.)
Quote:
Some stuff will have to be converted to sprites, however, such as the 1-UP bonus
That's basically a picture of the main character, right? Sounds eminently reasonable, as then they can share a palette.
Quote:
or the ink waves (previously existing as either tiles or sprites depending on the situation).
If you're using Mode 1, you have a third BG plane available that uses 2bpp graphics (3 colours plus transparent). I imagine this would be well suited to the ink layer. You'd have to colour-reduce it slightly, but it shouldn't be a big deal; I had to look pretty closely to find that out.
Sprites are a bad idea for this, if I'm correct about what you mean by "ink waves". The SNES can only render 34 8-pixel sprite slivers per scanline. The ink waves span the whole screen from left to right, and since you're scrolling them horizontally you need at least 33 tiles per row. This leaves just one additional 8x8 sprite tile that can appear on those scanlines before you start seeing dropout. And since the SNES renders the OBJ line buffer from back to front, dropout looks really bad because the stuff that's supposed to be on top starts to disappear...
You don't need to reserve BG3 for the HUD. The SNES allows you to freely change BG scroll values and even map/data locations in between scanlines. Any playfield BG layer could be repurposed in this fashion, so you can use all three for the gameplay screen.
Are there parts of the game where you need more than two scrolling tiled layers besides the ink?