Page 1 of 2
Sega Genesis Spriting
Posted: Thu Aug 11, 2011 9:57 pm
by Jony
Alright, this is a really noob question i know... but bear with me
I've done some spriting work in
Photoshop for RPG Maker and SDL games in the past and have also used Microsoft Paint to a lesser extent.
Now, i'm attempting to move to Mega Drive development and as such would like to know if anyone can help me get started with making sprites for the MD
I already know that they must be
16Color Bitmap Images (
and later be converted to BIN or ASM)
But i don't really know what colors i would and (
would not) be allowed to use when creating Mega Drive sprites
I've heard that the Mega Drive supports 512 colors (
plus shadow and highlight mode?)
Can you really only use 16 colors per sprite?
I'm not really used to having these kind of color limitations and that's why it's a bit confusing to me, so excuse the "newbieness"
^^^ - One of the sprites i made way back when
------------------------------------------------------------------------------------
Noob Nation - "We Need You"

Posted: Fri Aug 12, 2011 2:19 am
by Chilly Willy
Sprites should be 15 colors plus transparent. Each of the 15 colors maps to a palette entry that can be set to a 9 bit value - 3 bits per color (red, green, and blue). Ignoring shadow and hilite for now, that means you get to choose 15 colors from a total of 512 possible colors.
Posted: Fri Aug 12, 2011 7:42 am
by TmEE co.(TM)
You can use these values on the RGB channels : 0, 36, 72, 108, 144, 180, 216, 255
For shadow you got these values : 0, 18, 36, 54, 72, 90, 108, 126
Highlight values are : 126, 144, 162, 180, 198, 216, 234, 255
Posted: Fri Aug 12, 2011 8:35 pm
by Chilly Willy
It's not quite exact, but the easiest way to think of hilite and shadow is like this:
regular color (binary)
BBB0 GGG0 RRR0
hilite
1BBB 1GGG 1RRR (color is shifted right one bit and the top bit set for each color)
shadow
0BBB 0GGG 0RRR (color is shifted right one bit and the top bit cleared)
In fact, many emulators use that exact method to derive the colors for hilite and shadow from the regular palette.
Posted: Fri Aug 12, 2011 11:47 pm
by Jony
I've been working with
SGDK since yesterday(I know, i'm a noob =P) and so far, this is what i've managed to get output after several
bintos.exe crashes
Which kinda looks like an NES chinese homebrew, but i thought i'd post it just to give you guys a laugh =P
Posted: Sat Aug 13, 2011 3:32 am
by Chilly Willy
Not bad for just having started. A nice big sprite which is not a bad conversion of the original image.
Posted: Sun Aug 14, 2011 9:33 am
by Jony
This might sound like a stupid question but...
When making MD graphics, how can i know which colors are supported and which ones aren't?
I've already read about how the MD does not work based off a fixed color palette like the NES
But, without a fixed palette to go by how would i know when i'm using a color that the MD can't handle?
Posted: Sun Aug 14, 2011 10:02 am
by Jaklub
As it was mentioned:
TmEE co.(TM) wrote:You can use these values on the RGB channels : 0, 36, 72, 108, 144, 180, 216, 255
For shadow you got these values : 0, 18, 36, 54, 72, 90, 108, 126
Highlight values are : 126, 144, 162, 180, 198, 216, 234, 255
Posted: Sun Aug 14, 2011 6:02 pm
by Jony

(
Thinks to self) "For Shame
Jony Airhead, for Shame..."
So, i could select any color that uses any combination of those RGB values?
for example
R0 G108 B90 = Dark Green (Shadow)
Colors selected from Shadow values
R36 G180 B72 = Green (Normal)
Colors Selected from Normal Values
R126 G216 B144 = Light Green (Highlight)
Colors selected from Highlight Values
Posted: Sun Aug 14, 2011 6:26 pm
by TmEE co.(TM)
You would want to avoid using Shadow and Highlight values as use is limited. You can shadow/highlight an existing color. It does not give you new colors, it gives you more shades of existing colors.
Say you have a palette of 16 colors, and last color in it is 255, 144, 36 (orangeish tone) and the drawing is a ball of that color. now you shadow some pieces of the ball, and the shadow gives you 126, 72, 18 (darker orange / brown). When you highlight parts of the ball you get 255, 198, 126 (brighter yellowish tone).
I don't really know how to explain it, but you should stick with normal palette for now.
Posted: Sun Aug 14, 2011 7:04 pm
by Chilly Willy
While the PC uses a value from 0 to 255 for each color (R/G/B), the Genesis uses a value from 0 to 14 by 2's (0, 2, 4, 6, 8, 10, 12, 14). Also, the order is B, G, R on the Genesis. So take whatever PC color value you have, and divide by 16. If you do that, you'll get values from 0 to 15 by 1's, but the Genesis ignores the least significant bit, so that doesn't matter... 15 is the same as 14, 13 the same as 12, and so on.
Posted: Sun Aug 14, 2011 7:40 pm
by TmEE co.(TM)
That method results in darker image than needed. Highlight does NOT make white whiter, which means you scale the values to fill whole space. You have 15 steps total not 16 with S/HL.
Posted: Sun Aug 14, 2011 8:53 pm
by Chilly Willy
TmEE co.(TM) wrote:That method results in darker image than needed. Highlight does NOT make white whiter, which means you scale the values to fill whole space. You have 15 steps total not 16 with S/HL.
Well, I DID say it wasn't completely accurate, merely the easiest way to think about it while trying to learn about the MD graphics.

Re: Sega Genesis Spriting
Posted: Mon Aug 15, 2011 8:51 pm
by Charles MacDonald
Sprites aren't affected by shadow/highlight, so don't worry about it.
Did everyone else in this thread forget that?
Shadow/highlight only affects the brightness of the background underneath a sprite. When you draw a sprite you are still limited to using any 15 colors from a total of 512.
Posted: Mon Aug 15, 2011 9:50 pm
by Stef
As far i remember you can also apply the hilight / shadow effect to a sprite just by having overlapping shadow or hilight sprite... not sure though.