Sega Genesis Spriting

Talk about anything else you want

Moderator: BigEvilCorporation

Jony
Interested
Posts: 12
Joined: Tue Jul 26, 2011 3:16 pm
Location: Portugal

Sega Genesis Spriting

Post by Jony » Thu Aug 11, 2011 9:57 pm

Alright, this is a really noob question i know... but bear with me :P

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" :P

Image

^^^ - One of the sprites i made way back when



------------------------------------------------------------------------------------
Noob Nation - "We Need You"

Image
"I'm looking for some alien toilet to park my bricks, who's first?"

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Aug 12, 2011 2:19 am

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.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Aug 12, 2011 7:42 am

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
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Aug 12, 2011 8:35 pm

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.

Jony
Interested
Posts: 12
Joined: Tue Jul 26, 2011 3:16 pm
Location: Portugal

Post by Jony » Fri Aug 12, 2011 11:47 pm

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

Image

Which kinda looks like an NES chinese homebrew, but i thought i'd post it just to give you guys a laugh =P
Last edited by Jony on Sat Aug 13, 2011 4:54 am, edited 1 time in total.
"I'm looking for some alien toilet to park my bricks, who's first?"

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Aug 13, 2011 3:32 am

Not bad for just having started. A nice big sprite which is not a bad conversion of the original image.

Jony
Interested
Posts: 12
Joined: Tue Jul 26, 2011 3:16 pm
Location: Portugal

Post by Jony » Sun Aug 14, 2011 9:33 am

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?
"I'm looking for some alien toilet to park my bricks, who's first?"

Jaklub
Interested
Posts: 41
Joined: Mon Aug 24, 2009 1:36 pm

Post by Jaklub » Sun Aug 14, 2011 10:02 am

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

Jony
Interested
Posts: 12
Joined: Tue Jul 26, 2011 3:16 pm
Location: Portugal

Post by Jony » Sun Aug 14, 2011 6:02 pm

:oops: (Thinks to self) "For Shame Jony Airhead, for Shame..." :lol:

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
"I'm looking for some alien toilet to park my bricks, who's first?"

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Aug 14, 2011 6:26 pm

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.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Aug 14, 2011 7:04 pm

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.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Aug 14, 2011 7:40 pm

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.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Aug 14, 2011 8:53 pm

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. :D

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Re: Sega Genesis Spriting

Post by Charles MacDonald » Mon Aug 15, 2011 8:51 pm

Sprites aren't affected by shadow/highlight, so don't worry about it.
Did everyone else in this thread forget that? :D

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Aug 15, 2011 9:50 pm

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.

Post Reply