Jump to content
  • Advertisement
Sign in to follow this  
orcfan32

Console Color - Possible?

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

Advertisement
You can do this by making use of Windows' console functions. Look at WriteConsoleOutput(). SetConsoleTextAttribute().

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/character_mode_applications.asp

:stylin:

EDIT: too fast Gor435 - nice link.

Share this post


Link to post
Share on other sites
Just to let you know, doing a game using console "graphics" is much more of a pain than using SDL even if you use a library that wraps it up nice and pretty like pdcurses.

Share this post


Link to post
Share on other sites
Yeah,
I tried graphics in consoles and it was hard for me. Then I switched to SDL and I am doing good their. I have been studing it for 3 days and I am almost ready to make pong.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Just to let you know, doing a game using console "graphics" is much more of a pain than using SDL even if you use a library that wraps it up nice and pretty like pdcurses.
Indeed. Still, it's quite fun. [wink]
One thing I don't cover is setting the colour for "normal" console work (such as printf()), which could be handled with SetConsoleTextAttribute() as stylin mentioned. My methods tend to rely on writing the character/colour information to a CHAR_INFO buffer then copying that to the console window, which is probably more appropriate to the work you're doing.
On this subject, I don't know if I should write up how to manage colours/graphics better in a console window (such as I used in here). Would people find it useful?

Share this post


Link to post
Share on other sites
Yeah, a lot of it is tedious, but I'm going to write some functions for it.

EDIT: Your site's down now..are you working on it or did the worm hit it?

Share this post


Link to post
Share on other sites
Quote:
Original post by orcfan32
EDIT: Your site's down now..are you working on it or did the worm hit it?
That would be my very cheap hosting, sorry. Normally comes back in a few minutes... [rolleyes]

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.

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!