Gamma issue.
#1
My monitor is really dark, it's so dark the "lightscale 1" command isn't enough so I must adjust the gamma to "fix" this issue. As a few people stated in the past, AssaultCube has a sort of problem with the gamma since the 1.1 and nobody seems to know where this is from. Each few minutes, the screen as a sort of flash that resets the gamma to the initial value (100), but it only resets the visual aspect, not the gamma value.

It's kinda hard to explain to let's take an example:
-set the gamma to 200
-the game is way more enlightened
-check the gamma value with /gamma and it says 200
-a strange flash bug randomly appears
-the game is now dark (like the gamma 100 value)
-check the gamma value and it says 200
-write /gamma 200
-nothing happens it's still dark
-check the gamma value and it says 200

The only way to get rid of this bug is to set another gamma value, like 199 or 300 or whatever you want. Once the gamma value is different from the bugged one, you can set back the gamma 200 and it will work.

In the 1.1, I used to run a one-line script that mostly fixed this issue.

gammafix = [gamma 180, sleep 1000 [gamma 179]; sleep 1010 [gammafix]]
I have a constant 200 fps, no matter the official map I'm on so the 10ms delay had never been a problem.

I personally binded it on the "n" key and launched it each times the bug appeared in each maps, but I shared the script on this forum and people were launching it from the "addonloadalways", I never had bad feedbacks about the script, only positive ones, it was working for me and for everyone who experienced this bug.

Now that it's the 1.2, the bug is still here and the script does not work anymore, sometimes it does nothing and sometimes it writes "could not set gamma", I don't think the gamma and sleep commands changed between the 1.1 and 1.2 (that would be vicious). I manually tried to change the gamma when the bug occurs and the manual fix works (I set the gamma from the bugged 200 to 199, then I switch it back to 200).

I don't know why such a short script doesn't work, it looks like it's in conflict with other scripts that were implemented in the game for the 1.2 as a "resetbinds" is helpless, or maybe I'm wrong, but I'm pretty sure lines like "dyngamma = [0]" in my saved.cfg were not written by myself or by any script I wrote in-game and in the autoexec.cfg.
Thanks given by:
#2
I guess it's hopeless...
Thanks given by:
#3
I am wondering if ever tried recalc in conjunction with this?

I am noob, but I wanted to answer. But I am afraid to ask stupid questions, honestly.
Thanks given by:
#4
Does it happen also after renaming saved.cfg?

Edit: so dyngamma = 0 doesn't work?
Thanks given by:
#5
I tried to rename the saved.cfg yesterday after I saw Elite's topic related to this file. I didn't renamed it, I just moved it somewhere else, but it's the same thing since it created a new saved.cfg to replace the older one.
Now that you ask, the fresh saved.cfg (after launching the game and a savequit) has "dyngamma = [0]" and "ofc_gamma_list = [100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100]" written at the end, my autoexec.cfg is the following one:

alias gammafix [gamma 180, sleep 1000 [gamma 179]; sleep 1010 [gammafix]]

At first, I thought the ofc_gamma_list was forcing the dyngamma which is set to 0, so to test it, I have set the ofc_gamma_list first value to 300 instead of 100, so that, if the bug occurs and if it's from this, the gamma will be stuck to 300. I launched the game and voted a tdm ac_aqueous with 32 bots for 200 minutes and went to eat because I can't provoque the bug, it's random. When I came back, the screen was dark, the gamma was obviously set to 100 even if the game said it was 180 after a /gamma to check.

I'll test it again tomorow because I don't have the time to do it now and testings takes me a lot of time cause the bug occurs randomly, I'll start by testing to enable the dyngamma and to keep the 300 value on ac_aqueous, maybe it will fix the issue...
Thanks given by:
#6
You have error in the script, comma instead of semicolon.
Test:
alias gammafix [gamma 180; sleep 1000 [gamma 179; echo test]; sleep 1010 [gammafix]]
and
alias gammafix [gamma 180, sleep 1000 [gamma 179; echo test]; sleep 1010 [gammafix]]
In the second case doesn't appear "test", so "gamma 179" probably isn't executed.
Thanks given by:
#7
Well done for the coma instead of the semicolon, I fixed it on my script, tried to run it and it still doesn't work without any error message or without something in the console. I wiped my autoexec.cfg 2 days ago and re-writed the script so here comes the error of the missing semicolon, too bad it's still not the problem. So, I tried your script that does the same actions with an echo, the echo works, then I have a double "could not set gamma" lines that appears in the same time, then it prints "test" in an inf-loop.

And about the error in the first script, I think it's the 180 that would not be executed since it tried to set the gamma to the value "180,".

EDIT: I tested with dyngamma 1 and I've set ofc_gamma_list first value to 300, launched ac_aqueous with bots (who were hax-jumping everywhere btw, wtf was that), it was bright, then the bug occured and it became dark, I checked the gamma value, theoretically 300. I still couldn't set the gamma to the real 300 without setting another gamma value (like 299) before.
Thanks given by:
#8
1. What OS do you use?
2. Does gamma reset happen also in fullscreen mode?
3. What does happen in Sauerbraten, if you change gamma?
4. Maybe some other software/environment/screensaver/etc. resets gamma?
Thanks given by:
#9
Win7-64 premium and this bug was not here when I played Sauerbraten in the past. Fullscreen/windows mode does not change anything. I have no such softwares and I'm in dual screen but it appears with a single screen too.

I never tried to change the gama in Sauer and I don't have the game anymore. The bug occured for 3.5 years, no matter the drivers I was using and the Nvidia settings.
Thanks given by:
#10
I agree. I set my gamma one way, it's too bright. I set it another, it's too dark. It changes per map. One solution could be a specified gamma range for mapmakers.
Thanks given by:
#11
(08 Jan 15, 03:22AM)MorganKell Wrote: I agree. I set my gamma one way, it's too bright. I set it another, it's too dark. It changes per map. One solution could be a specified gamma range for mapmakers.

Good maps are made to be best played at gamma 100.
Thanks given by: