🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

So many tutorials on 8-bit gfx but I want 16-bit.

Started by
1 comment, last by Hans 24 years, 6 months ago
I don't know of any tutorial on 16 bit gfx in particular. The main thing with 16 bit gfx is that you encode the color of each pixel in 16 bits (obviously!). There are two common pixel formats -

RGB565
bit 15.....bit 0
RRRRRGGGGGGBBBBB

RGB555
bit15......bit 0
0RRRRRGGGGGBBBBB

Note that in the former format green gets one extra bit of precision and in the latter one bit is wasted. So when you lock a 16 bit surface, each 16 bit word in memory is arranged like this. You can use the DirectX blitting functions as normal. You don't need to worry at all about DirectX palettes. Color keying in 16 bits is also OK.

Advertisement
Any good tutorials to cover 16-bit gfx in directX? Anything in MSDN?
Is it possible to set transparent color if you have 16-bit sprites (using directX's own sprite drawing of course).
16 bit graphics are on the whole a lot easier than 8-bit. MSDN has a ton of info. All you really need to worry about is the difference between formats (as stated before, 555 vs. 565 and sometimes the ordering of the components).

- Splat

This topic is closed to new replies.

Advertisement