Pages: [1]
Author Topic: What about adding cg_drawtimer 2 as countdown?  (Read 332 times)
In the year 3000

Cakes 46
Posts: 4351

« on: July 31, 2018, 01:45:29 am »

On Discord, ccCam user asked if there is a way to show a countdown for the remaining time of a match. AFAIK, there is only a countup timer, cg_drawtimer 1.
However, a countdown may actually be useful. So, what about adding "cg_drawtimer 2" to work as a countdown?
I can guess that the change shouldn't be too much: get timelimit value (convert it to mm:ss if necessary), then subtract the time you would usually print, then print this new value.

Additional thoughts:
- In case no timelimit is set (timelimit <= 0... or, well, timelimit < 1), it should fall back to showing a countup.
- In a few cases, the match time may exceed the timelimit (e.g. in LMS mode, you have to wait for the end of the current round, before the match can actually end. And in Elimination mode, a team has to win of at least two rounds of difference before the match can end, IIRC). I don't think this should be a big problem: I suppose just having a minus symbol (or an "extra" or "ot" word or similar) in front of a upgoing time should work. However that should be tested, to be sure it would not show weird things.
- I just did a quick test, it looks like timelimit is always rounded down (I entered timelimit 1.7 and the match ended at 1 minute).
- Elimination roundtime is already a countdown, it is independent from cg_drawtimer and doesn't need to be modified. Might give some hint about the code, but elimination_roundtime is expressed in seconds instead of minutes like timelimit variable.

What do you think?
« Last Edit: August 01, 2018, 04:39:43 pm by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.

Cakes -2
Posts: 9

« Reply #1 on: October 31, 2018, 12:56:23 pm »

Personally, I would love to see this.  TBH, I can't even really see how useful a timer that DOESN'T count down the remaining time of the match is.  Sauerbraten, Alien Arena, Xonotic, I believe all show the remaining time.  Since you can set the match length, it should definitely be a countdown timer showing the remaining time by default, in my opinion, or at least certainly an option, especially since you can easily set the length of the matches, it would not matter if the match was five minutes or twenty minutes, all you'd have to do is look at it, and see how much is remaining in either case.
Pages: [1]
Jump to: