* May 20, 2013, 12:01:42 PM
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Come Chat with us live! Learn how HERE!
 
   Home   Help Search Login Register  
Pages: 1 [2]  All   Go Down
  Print  
Author Topic: Screenshot naming + gpp1 patch  (Read 9230 times)
A Spork
Spam Killer
*

Turrets: +37/-230
Posts: 1010

rawr


WWW
« Reply #30 on: December 20, 2009, 09:22:28 PM »

Whatever, still makes more sense to me to have
mapnam before nnnn...
Logged

Don't shoot friend Basilisk! Friend Basilisk only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
Basilisk    Basilisk    Basilisk
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #31 on: December 21, 2009, 06:21:23 AM »

Whatever, still makes more sense to me to have
mapnam before nnnn...

Whatever, but read the thread you are posting in for it to make more sense.
Logged

Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.
A Spork
Spam Killer
*

Turrets: +37/-230
Posts: 1010

rawr


WWW
« Reply #32 on: December 21, 2009, 06:48:14 PM »

What?
how does it not make sense?
Logged

Don't shoot friend Basilisk! Friend Basilisk only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
Basilisk    Basilisk    Basilisk
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #33 on: December 21, 2009, 08:42:33 PM »

What?
how does it not make sense?

Hm... Again you should read what people say.

I said read the whole thread carefully to better understand why things are what.

So what are you asking me "how does it not make sense?" for.

(I'll save you time, that was a rhetorical question.)
Logged

Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.
A Spork
Spam Killer
*

Turrets: +37/-230
Posts: 1010

rawr


WWW
« Reply #34 on: December 21, 2009, 10:58:00 PM »

Your wording sucks.
And I did read the thread, and I didn't see any reason why mapname has to be last.
Logged

Don't shoot friend Basilisk! Friend Basilisk only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
Basilisk    Basilisk    Basilisk
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #35 on: December 21, 2009, 11:32:32 PM »

Your wording sucks.
And I did read the thread, and I didn't see any reason why mapname has to be last.
Sad
Logged

Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.
UniqPhoeniX
Spam Killer
*

Turrets: +66/-32
Posts: 1376


« Reply #36 on: December 21, 2009, 11:44:56 PM »

<date>-0000-atcs
<date>-0001-tremor
<date>-0002-atcs
is better than
<date>-atcs-0000
<date>-atcs-0002
<date>-tremor-0001
Logged

David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #37 on: December 22, 2009, 12:09:50 AM »

Give them all random junk names, and make a lots of text files all indexed different ways.  Or could make tons and tons of symlinks to make everyone happy.  Or a cvar to let you choose it.  Or do whatever you want safe in the knowledge no one will care enough to submit a rival patch.
Logged

Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.
UniqPhoeniX
Spam Killer
*

Turrets: +66/-32
Posts: 1376


« Reply #38 on: December 22, 2009, 01:23:10 AM »

Or wait until Tremfusion adds a cvar containing date and time (maybe game time too Tongue).
Logged

Paradox

*
*

Turrets: +253/-250
Posts: 2610


I eat babies!


WWW
« Reply #39 on: December 22, 2009, 02:30:34 AM »

Why not just mapname/yyyy-mm-dd.jpg?
Logged


∧OMG ENTROPY∧
David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #40 on: December 22, 2009, 08:24:19 AM »

Because then I have to go through a stack of folders to find all of todays shots.
Logged

Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.
Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #41 on: January 06, 2010, 06:57:57 PM »

mapname can't be done because I have to be able to check if a file with a certain number already exists.
I can't use wildcards.

In any case, I cleaned up the patch some more, format stays the same (yyyymmdd-nnnn) but the number resets to 0
on date changes. Demos and videos now use the same naming convention. (I did not change the autorecord demo names).

http://ingar.satgnu.net/tremulous/files/tremulous-gpp1-screenshot_timestamp3.patch
Logged

Thorn


Turrets: +409/-60
Posts: 1237


WWW
« Reply #42 on: January 06, 2010, 09:31:30 PM »

How many Ingar's does it take to change a screenshot?
Logged

Flex
David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #43 on: January 06, 2010, 10:47:06 PM »

Six.  One to write the patch and 5 to fight off the ravaging hordes.
Logged

Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.
gimhael


Turrets: +70/-16
Posts: 546


« Reply #44 on: January 07, 2010, 07:20:23 AM »

mapname can't be done because I have to be able to check if a file with a certain number already exists.
I can't use wildcards.

Wouldn't it make things alot simpler if you just add an archived cvar that holds the date and number of the last screenshot/avi ? Then you don't need to check for existing files at the start, you just continue where you last stopped.
Logged
Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #45 on: January 07, 2010, 08:11:57 PM »

mapname can't be done because I have to be able to check if a file with a certain number already exists.
I can't use wildcards.

Wouldn't it make things alot simpler if you just add an archived cvar that holds the date and number of the last screenshot/avi ? Then you don't need to check for existing files at the start, you just continue where you last stopped.


The last used number is stored in a static int but it still has to scan the first time. It seems a bit overkill
to make it more complicated  Wink

How many Ingar's does it take to change a screenshot?
Six.  One to write the patch and 5 to fight off the ravaging hordes.

I have an infinite number of scary monkeys.

« Last Edit: January 07, 2010, 08:20:07 PM by Ingar » Logged

Lakitu7
Tremulous Developers
*

Turrets: +120/-73
Posts: 1002


Watch for spinys


« Reply #46 on: February 08, 2010, 04:47:17 PM »

So is this now done, tested, and ready to go in, with people generally happy about the results?
Logged
Liskey


Turrets: +7/-4
Posts: 111

Eats, shoots & leaves.


« Reply #47 on: February 08, 2010, 09:55:37 PM »

Silence means consent - so it must be all good :-)

But since I'm snowed in and bored, I'll ask why would wildcards even be mentioned as an issue.  Don't you need to read all the filenames anyway in order to find the latest?  Just parse out the date and sequence number and ignore the rest -- it makes no difference how filenames are formatted or what else they contain.

Code:
nextn = 0
today = current_date()
while (fname = readdir(dir)) {
  if (parse_date(fname) == today) {
     if (n=parse_nnnn(fname) >= nextn) nextn = n
  }
}
nextn += 1
 
Logged

Winnie the Pooh


Turrets: +45/-85
Posts: 442


« Reply #48 on: February 08, 2010, 10:01:00 PM »

Ingar has become a developer?
Logged

Quote
I also realize that this is the internet, but even more so this is the forum for a video game on an internet, then even beyond that this is TREMULOUS forums the Satan version of all video game forums for a video game that is ON the internet.
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #49 on: February 09, 2010, 01:57:51 AM »

What are you talking about?
Logged

Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.
Winnie the Pooh


Turrets: +45/-85
Posts: 442


« Reply #50 on: February 09, 2010, 02:27:07 AM »

What are you talking about?
I'm talking about Ingar's work going straight into the official Final.
So is this now done, tested, and ready to go in, with people generally happy about the results?
Logged

Quote
I also realize that this is the internet, but even more so this is the forum for a video game on an internet, then even beyond that this is TREMULOUS forums the Satan version of all video game forums for a video game that is ON the internet.
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #51 on: February 09, 2010, 03:06:28 AM »

What are you talking about?
I'm talking about Ingar's work going straight into the official Final.
So is this now done, tested, and ready to go in, with people generally happy about the results?

I don't think/didn't know he is official dev, (although I could be wrong for sure) but this is open source, so anyone can create something useful, and "anything" could "potentially" end up being included in 1.2.
Logged

Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.
gimhael


Turrets: +70/-16
Posts: 546


« Reply #52 on: February 09, 2010, 06:56:35 AM »

Silence means consent - so it must be all good :-)

But since I'm snowed in and bored, I'll ask why would wildcards even be mentioned as an issue.  Don't you need to read all the filenames anyway in order to find the latest?  Just parse out the date and sequence number and ignore the rest -- it makes no difference how filenames are formatted or what else they contain.

Code:
nextn = 0
today = current_date()
while (fname = readdir(dir)) {
  if (parse_date(fname) == today) {
     if (n=parse_nnnn(fname) >= nextn) nextn = n
  }
}
nextn += 1
 

Ingar keeps the current file number in a variable, but the variable is lost when you quit and restart tremulous, so it has to scan the existing files to find the highest existing number. After the first screenshot it's just a matter of incrementing a counter.

An other possibility to fix this is to keep the counter value over restarts by storing it in the autogen.cfg.
Logged
Liskey


Turrets: +7/-4
Posts: 111

Eats, shoots & leaves.


« Reply #53 on: February 10, 2010, 09:57:40 PM »

Yes of course, he explained all that.
mapname can't be done because I have to be able to check if a file with a certain number already exists. I can't use wildcards.
That was the question - mapname can certainly be included in filenames, there is no reason to use wildcards, and you can check if a file already exists using readdir.
Logged

Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #54 on: February 28, 2010, 10:37:07 AM »

What are you talking about?
I'm talking about Ingar's work going straight into the official Final.
So is this now done, tested, and ready to go in, with people generally happy about the results?

I don't think/didn't know he is official dev, (although I could be wrong for sure) but this is open source, so anyone can create something useful, and "anything" could "potentially" end up being included in 1.2.

Sorry for the somewhate late response, but I still wanted to clear this up:

I am not an official developer, but I knew how to write code before I could make maps.
When there's something about a program that bothers me, I sometimes take the time to
correct it, make a patch and offer it to the developers. I already did this for a lot
of programs, not just tremulous.

In general, developers tend to pay more attention to patches than to random suggestions.
Logged

Pages: 1 [2]  All   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
TremPlus theme by Ingar, based on AF316 theme by Fedhog
Valid XHTML 1.0! Valid CSS!