Advertisement

8-bit and 16-bit

Started by May 09, 2001 11:10 AM
2 comments, last by lastms 23 years, 9 months ago
I have made some 8-bit games, and now I want to use 16-bit graphics. What should I think about? Thanx
Think happy thoughts!!
Advertisement
LoL yes, happy thoughts are good

I''m assuming that you are talking about 8 bit graphics when you say 8 bit game.

Technically 8 bit and 16 bit are very different (compared to like 16 to 24 or to 32 bit). 8 bit uses palette to organise colours - and you only have 256 index, each carrying RGB (red-green-blue) values for your chosen colour. But 16 bit doesn''t use those indexes (palette), and instead write the RGB value directly in video buffer to desplay that colour. Picture file formats like BMP is also affected by this change, pretty much in the same way as video buffer.

So the first few things to "think" about (if you are just planning at this stage) is the new graphics engine, which ditches the palette method you have used in 8 bit. And replace it with functions that deal directly with RGB value (16 bit). This also applies to Picture file format, whatever you were using for 8 bit - you need to save that as 16 bit picture file in your paint program. Then the function to load the picture must be modified alike with this new format.

In windows directx, 16 bit RGB has 5 bits to each entry. And one bit left over which is unused (or intensity? I think. You can forget about that if you are just porting your 8 bit code). So 5 bit describing Red, another 5 describing Green and last 5 carrying Blue value, and 1 left over. That makes it 16 bits (5+5+5+1).

If I remember this correctly, in windows directx I think RGB format was in reverse order, so it''s BGR, I think. Blue first, then Green in the middle, and then Red. You better check that first... My memory is blurry... (uhh... my head... *faints*)
Well you have to check the colour format of the card when you change the display mode to 16 bit I think. Most cards use 565 colour (5 bits red, 6 bits green, 5 bits blue - the eye is most sensitive to green so the extra bit goes in there), but some (older) cards won''t work with that. They use the 555 format described above, also sometimes called 15-bit colour for obvious reasons.

Harry.
Harry.

This topic is closed to new replies.

Advertisement