Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Gamma Alternative

Author
Message
headcrab 53
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 10th Oct 2005 18:30
Setting the Gamma too high makes all of the colours look weird, but I need to make the game brighter. My monitor is too dark, and alot of games on this site are unplayable because of it. That's why I want to put a gamma slider in my game, but setting it higher than 255 makes everything look weird, as if it was trying to make things look brighter than white. Does anybody have a good method to use instead of gamma?

If you can read this, you are over qualified.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 10th Oct 2005 18:32
well you could either get a new monitor or change your monitors gamma, if you must make things brighter then you could paste a big white sprite over the screen and change its alpha transparency. or you could lighten the textures or lighten the ambient light or many things.


headcrab 53
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 10th Oct 2005 18:54 Edited at: 10th Oct 2005 19:01
The monitor is allready as bright as it will go. Lightening the textures would take a while and would make it too bright on other monitors. The ambient light has a big effect on how dark shadows and shaded areas are, and probably wouldn't be the best way, but a sprite over the screen seems like it could work. I'll try that.

EDIT:

Thanks. Out of everything i've tried, the sprite works the best.

If you can read this, you are over qualified.
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 10th Oct 2005 19:07
255 for gamma? I haven't used the gamma commands yet, but if they take values like any other gamma adjustment, it should be a float and you should be using values mainly between 1.0 and 3.0...usually just between about 1.5 and 2.5 really. Have you tried those kind of values? If it works, gamma is going to be a better method than sprites.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 10th Oct 2005 21:41
255 is standard 512 is totally white 0 is black, or atleast it should be if it worked right :p post it in the bugboards if its not already there cause this bug should be fixed as its usefull quite often


headcrab 53
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 10th Oct 2005 23:41 Edited at: 16th Oct 2005 18:32
Sprites accually work pretty well. Here's how I have it set up:

Put this at the beginning of the program. Brightness is the brightness, 0=black, 255=normal and 511=white, just like the gamma settings.



Put this again whenever the brightness is changed



"white.bmp" is a 1x1 bitmap that's white.
"black.bmp" is a 1x1 bitmap that is very dark, rgb(5,5,5) so it looks black but isn't transparent.

If you can read this, you are over qualified.
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 11th Oct 2005 01:44
Totally white and totally black? It should never be at either of those, hence the reason it's the gamma. Sounds more like it's brightness.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 11th Oct 2005 01:57
read his code, then slap yourself repeatedly(and repeat)


headcrab 53
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 11th Oct 2005 04:51 Edited at: 11th Oct 2005 04:52
You might want it to be completly white or completly black for fading effects. And I did use the word brightness repeatedly in the code and explenation.

Brightness
if brightness>255 then
set sprite alpha 1,brightness-256
whenever the brightness is changed

The whole point really was that the gamma command doesn't work properly and this is a way to control the brightness of the screen without it.

If you can read this, you are over qualified.
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 11th Oct 2005 05:45
Quote: " 255 is standard 512 is totally white 0 is black, or atleast it should be if it worked right"


This is what I was reffering to, not the codebox. I had said 255 for gamma was strange, this was what was posted about that it seemed.

Login to post a reply

Server time is: 2025-06-01 09:33:59
Your offset time is: 2025-06-01 09:33:59