Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Glass_Knife

How many colors should I use(8 bit, 16 bit)?

This topic is 5863 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

Hello fellow programers... This is my first post, so I''ll let everyone know where I stand. I am currently attending college, studing programming, and working on game programming on my own when I have time. I learned all the stuff I do know (win32 API, DirectX, C++) on my own from books and internet tutorials! I have learned many things, but there are a few very simple things I do not know. So I''m posting in the begginers Forum. Here''s my first question... Should I use 8 bit, 16 bit, 24 bit, or 32 bit when making a game. I would think 16 or 32, but most of the Directx tutorials I read, (including ones on this site) have everything in 8 bit. Also, the "Trick of the windows game programming gurus" book I have also has many examples in 8 bit. I''ve have lots of computer games, and I don''t think any of the new games comming out are using 8 bit graphics, but I could be wrong. If using 8 bit graphics in equivilent to writing DOS programs, please let me know, because I don''t want to learn old, unused technology. If, on the other hand, 8 bit is alive and well, please let me know why, because I have no idea of the benifits of 8 bit graphics. I think, therfore I am. I think?

Share this post


Link to post
Share on other sites
Advertisement
8 bit is used in the tutorials because of its simplicity. If you want to learn to program like the pros though, you''d best learn to use 16 and/or 32 bit coloring. Iven in Andre Lamothe''s book he states that although he teaches you with 8 bit coloring, he suggests that you take the steps to use 16 or higher bits after you get the foundations of 8 bit down.

The multiverse is sloppy... I just make it neat

Share this post


Link to post
Share on other sites
It''s really easy to work in modes higher than 8bit. The only major changes in code is the actual loading of bitmaps and how you plot pixels. Other than that, you still call the same functions to blit bitmaps onto the screen and flip surfaces. You just don''t have to work with a palette anymore.

If you look at this thread it explains how you can load in 24bit bitmaps onto 16bit DirectDraw surfaces. Once you know how to convert to different bit depths it shouldn''t be too hard to make your game support 16bit, 24bit, or 32bit graphics. Good luck

***********************
          

Share this post


Link to post
Share on other sites
Hey, Big Sassy, I have a question about bitmap loading. When I load bitmap that is not the size of my screen width and height (full screen) and I blt it to screen, it get garbled. But when its the size of my screen, it is clear. You got any ideas why?

______________________________________________
You know your game is in trouble when your AI says, in a calm, soothing voice, "I''m afraid I can''t let you do that, Dave"

Share this post


Link to post
Share on other sites
A) Are you using my function?
B) Do you have code to take care of padding?
C) How many different widths did you test?

***********************
          

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!