Jump to content
  • Advertisement
Sign in to follow this  
CandleJack

Why always 16 bit bitmaps?

This topic is 3625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Using DirectDraw, every example I see seems to use 16 bit bitmaps. I know 32 bit is kind of an overkill, since I would never even use that extra byte for the alpha, but I was just wondering if there was a reason everyone uses 16 bpp? I run my game in windowed mode for debugging purposes, so it has to share video resources with the desktop, which is set to 32 bit color. I know I can switch it to 16 bit color and solve the problem but my curiosity (and laziness) has gotten the better of me. Also, I usually save my graphics in paint as 24 bit bitmaps, but saving them as 16 causes some color loss, since I select custom colors for shading. Am I going to get stuck with a limited pallet?

Share this post


Link to post
Share on other sites
Advertisement
Possibly because DirectDraw is from the dark ages when a 24 or 32 bit bitmap was actually quite a lot of memory.

Share this post


Link to post
Share on other sites
Haha OMG... dark ages. Seriously though he's right, you're probably wasting your life learning a version of DirectX that old. I recommend you go online and start to learn DirectX 9 or 10 based on your preferences.

Share this post


Link to post
Share on other sites
I see. Alright. I was just using it because the book I bought uses it. I bought it because the other books were teaching 3D graphics, which I didn't really want to learn yet so it seemed like a good choice.

Share this post


Link to post
Share on other sites
Don't worry mate stuff like this happens to everyone... every now and then. Anyways I might as well help you out. DirectDraw was scrapped when they made DirectX 9 and now both 2D and 3D functions are with Direct3D, hmm, it is kinda mis-leading ain't it :). Should have called it DirectGraphics or something.

Fissure.

Share this post


Link to post
Share on other sites
All the cool kids are learning with XNA these days. ;)

There is a new DirectX API coming that aims to make 2D simpler, as doing 2D with D3D9 requires more math than you'd probably like. I have no idea on the ETA, if it will be Vista/Windows7 only, etc.

Using D3D9 with ID3DXSprite can simplify things a bit, and is likely to be far more optimal than what you'd write in D3D9 yourself.

I can't speak for what XNA's 2D support is like, having never got around to checking it out, but there's some pretty impressive stuff out there using XNA, so it may be worth a look, unless you're opposed to learning C#. Personally I'd recommend this route just to learn C#, as more and more jobs are asking for it.

edit: Oh, and having learned some DirectDraw back in the dark ages, I wholeheartedly recommended you avoid it at all costs!

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
I can't speak for what XNA's 2D support is like, having never got around to checking it out, but there's some pretty impressive stuff out there using XNA, so it may be worth a look, unless you're opposed to learning C#. Personally I'd recommend this route just to learn C#, as more and more jobs are asking for it.


XNA has the SpriteBatch class, which works almost exactly like ID3DXSprite. However unlike native D3D9, there's a ton of 2D tutorials and samples on the Creator's Club website. Definitely a good place to start, I'd say.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
All the cool kids are learning with XNA these days. ;)

There is a new DirectX API coming that aims to make 2D simpler, as doing 2D with D3D9 requires more math than you'd probably like. I have no idea on the ETA, if it will be Vista/Windows7 only, etc.

Using D3D9 with ID3DXSprite can simplify things a bit, and is likely to be far more optimal than what you'd write in D3D9 yourself.

I can't speak for what XNA's 2D support is like, having never got around to checking it out, but there's some pretty impressive stuff out there using XNA, so it may be worth a look, unless you're opposed to learning C#. Personally I'd recommend this route just to learn C#, as more and more jobs are asking for it.

edit: Oh, and having learned some DirectDraw back in the dark ages, I wholeheartedly recommended you avoid it at all costs!


Thanks. I already know C# actually, and math is no problem for me, so I'll definitely check both of those routes out!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!