Skip to main content
gamedev.net
🔒 Locked

Help please

Started by caffeineaddict Jul 31, 2001 at 11:02 PM 7 replies 400+ views
Original Post
caffeineaddict
caffeineaddict
I''ve got a problem, I wrote my game, and ran it in 16 bit color mode, no problem here, but I wanted to see if it would run in other modes, so i changed my settings on my desktop to 256 colors and tried to run my game, well it executed but nothing but a grey screen was there, does anyone have any idea why it did this? If you know of some way to remedy this please post it here.
Nairb
Nairb
Hey,
Are you using some API or function calls to change the computer''s color depth to the one needed in the game? Otherwise, if the game uses things like true-color graphics and you''re in 256 color mode, you''re going to have some problems.
Midnight Coder
Midnight Coder
You should make your game change the color mode when it is started. It shouldn''t just use the one the user has set, or otherwise you will have major trouble.
caffeineaddict
caffeineaddict
how can i make it change it when it starts?

also when it starts i am assuming you're in 16 bit, i didn't know how to change it, or i would have.

Edited by - caffeineaddict on August 1, 2001 1:12:09 AM
Shag
Shag
try looking at any of the Nehe tutorials ... they all have code for changing resolution / colour depth!

Regards
caffeineaddict
caffeineaddict
I looked at the demos on there but i just saw where it was changing the color bit, i never saw where you could change it to 256 color mode if you wanted, please help.
caffeineaddict
caffeineaddict
Thanks AP, that will save me many hours and headaches trying to find code for this.
Florian Nentwich
Florian Nentwich
I''ve taken this piece of code from NeHe''s first tutorial:

// Create Our OpenGL Window
if (!CreateGLWindow("...",640,480,16,fullscreen))
{
return 0;
// Quit If Window Was Not Created
}

If you place 8 instead of 16 you should be using the 8-bit (256 color) mode. You will see that this doesn''t work as it should (at least here it doesn''t).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.