* May 19, 2013, 08:35:55 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 9225 times)
Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« on: December 07, 2009, 10:19:49 PM »

Update 2:
The number resets on date changes now, demos (except autorecord) and videos use the same naming convention.
http://ingar.satgnu.net/tremulous/files/tremulous-gpp1-screenshot_timestamp3.patch

Update 1:

The format is now
yyyy-mm-dd-nnnn.jpg (or .tga)

nnnn is a number from 0000 to 9999, the client will continue numbering shots one the same day. If you happen to be playing at 0h 00m, it will not reset the numbering until you restart the client. If you make more than 10,000 screenshots on a single day you'll get an error message.

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

Original post:

The default screenshot naming scheme isn't very convenient: if you like to make a lot of pictures and keep them organized it's easy get confused.

Personally, I like my screenshots to contain a timestamp. Such files are always neatly organised
in explorer and are much easier to find when you need them.

I propose the following format:
tremulous-yyyymmdd-hhmmss-nnnn.jpg or .tga

The nnnn part is somewhat interesting: it's a number from 0-9999 that gets reset to 0 every time
you start the client. That way you can have multiple screenshots per second and you also
have some kind of session numbering.

I made a small patch for gpp1 that does just that, you can find it here:
http://ingar.satgnu.net/files/tremulous/tremulous-gpp1-screenshot_timestamp1.patch
The patch also removes the delay you experience when you make your first screenshot because
the client doesn't have to search for the first available screenshot number.

« Last Edit: January 06, 2010, 07:01:43 PM by Ingar, Reason: New patch » Logged

Norfenstein

*

Turrets: +81/-77
Posts: 628



« Reply #1 on: December 08, 2009, 12:19:42 AM »

Would be nice to have the map name in there too, but maybe it's not worth making the file name even longer.
Logged
David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #2 on: December 08, 2009, 12:24:42 AM »

Why the tremulous- at the start?  Surely its being in ~/.tremulous gives that away?

Also with thousands of them, maybe splitting into folders could help?  eg folder per day or whatever.
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.
Demolution


Turrets: +157/-64
Posts: 1198


« Reply #3 on: December 08, 2009, 02:13:34 AM »

Substitute the "tremulous" part for a map name?
Logged


Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
my brain > your brain.
and i am VERY stupid.
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #4 on: December 08, 2009, 04:44:26 AM »

Also I'd drop two of the yy just for simplicities' sake. I don't really see too much of a worry for Tremulous being played in the 22nd century. Shortens the file name too.
Logged

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

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

~Mooseberry.
Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #5 on: December 08, 2009, 06:27:08 PM »

Would be nice to have the map name in there too, but maybe it's not worth making the file name even longer.
Might mess up chronological ordering of the files, unless the mapname comes after the timestamp.
Also, I have no idea where to find the mapname (code wise). It might be more difficult than it sounds,
but worth exploring.

Why the tremulous- at the start?  Surely its being in ~/.tremulous gives that away?
The best reason of all: lazyness. That way I can just upload screenshots
to my website without having to rename them.

I admit the number thingy does bother me somewhat, maybe I should limit it to two digits.
Logged

David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #6 on: December 08, 2009, 06:55:37 PM »

I seem to recall there being a mapname cvar, although that may be server only.
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.
Bissig


Turrets: +103/-131
Posts: 1309


« Reply #7 on: December 08, 2009, 11:24:58 PM »

Maybe put the map name into an exif field?
Logged

kevlarman

*

Turrets: +291/-295
Posts: 2737



« Reply #8 on: December 08, 2009, 11:30:23 PM »

I seem to recall there being a mapname cvar, although that may be server only.
it is, but the client has easy access to the mapname anyway (how would it load it otherwise?), see the cl_autorecorddemo code.
Logged

Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----
Norfenstein

*

Turrets: +81/-77
Posts: 628



« Reply #9 on: December 08, 2009, 11:57:38 PM »

Would be nice to have the map name in there too, but maybe it's not worth making the file name even longer.
Might mess up chronological ordering of the files, unless the mapname comes after the timestamp.
Also, I have no idea where to find the mapname (code wise). It might be more difficult than it sounds,
but worth exploring.
After all the numbers was what I was thinking. And David's right, if you wanted tremulous- in front of all the file names you could easily mass rename them yourself. Agree with mooseberry too.
Logged
UniqPhoeniX
Spam Killer
*

Turrets: +66/-32
Posts: 1376


« Reply #10 on: December 09, 2009, 11:04:55 AM »

If Tremulous had a time cvar: bind f11 screenshotJPEG tremulous-\$time\-\$mapname\. At least in Tremfusion, the mapname part works already and I could get gametime with a script that starts counting time when I enter a game. The nnnn part can be made to work too. Why can't Tremulous have scripting?
Logged

Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #11 on: December 09, 2009, 06:08:08 PM »

I did think about a cvar but it's just overkill. I don't feel like writing a parser for it.
I'll take a look at how tremfusion does it and maybe steal a good idea or two.
Logged

Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #12 on: December 17, 2009, 02:16:41 PM »

The format in the new patch is:
yyyy-mm-dd-nnnn.jpg (or .tga)

nnnn is a number from 0000 to 9999, the client will continue numbering shots one the same day. If you happen to be playing at 0h 00m, it will not reset the numbering until you restart the client. If you make more than 10,000 screenshots on a single day you'll get an error message.

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

This way the funky number does something useful, I noticed it's quite confusing to find screenshots between a bunch of timestamps so I removed it and made the date a bit more readable.

I looked into adding the mapname but it seems slightly complicated, volunteers are always appreciated Grin

@moosberry:
I don't like 2-digit year numbers. It's like a different kind of soda: It sounds good
but I like my usual brand better.

Logged

gimhael


Turrets: +70/-16
Posts: 546


« Reply #13 on: December 17, 2009, 04:50:54 PM »

The renderer stores the map name is in tr.world->baseName (this is the file name of the .bsp without extension), but be careful: tr.world may be NULL when no map is loaded !
Logged
Demolution


Turrets: +157/-64
Posts: 1198


« Reply #14 on: December 17, 2009, 05:23:33 PM »

Is there something similar to this for demos?

If you make more than 10,000 screenshots on a single day you'll get an error message.

aww..
Logged


Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
my brain > your brain.
and i am VERY stupid.
kevlarman

*

Turrets: +291/-295
Posts: 2737



« Reply #15 on: December 17, 2009, 05:35:44 PM »

The format in the new patch is:
yyyy-mm-dd-nnnn.jpg (or .tga)

nnnn is a number from 0000 to 9999, the client will continue numbering shots one the same day. If you happen to be playing at 0h 00m, it will not reset the numbering until you restart the client. If you make more than 10,000 screenshots on a single day you'll get an error message.

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

This way the funky number does something useful, I noticed it's quite confusing to find screenshots between a bunch of timestamps so I removed it and made the date a bit more readable.

I looked into adding the mapname but it seems slightly complicated, volunteers are always appreciated Grin

@moosberry:
I don't like 2-digit year numbers. It's like a different kind of soda: It sounds good
but I like my usual brand better.


cl_main.c:2928
Code:
                       Q_strncpyz( mapName, COM_SkipPath( cl.mapname ), sizeof( cl.mapname ) );
                        COM_StripExtension(mapName, mapName, sizeof(mapName));
« Last Edit: December 17, 2009, 06:21:58 PM by khalsa, Reason: Testing linking » Logged

Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----
MitSugna
Guest
« Reply #16 on: December 17, 2009, 06:32:19 PM »

That would be awesome if all I did was taking screenshots
Logged
khalsa
Administrator

*

Turrets: +187/-132
Posts: 591


Dharam De rakhvalae


WWW
« Reply #17 on: December 17, 2009, 06:48:59 PM »

This patch should be for both demo's and sshots.

My vote is for yyyy-mm-dd-nnnn-mapname
Logged

}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ
KillerWhale
Spam Killer
*

Turrets: +63/-26
Posts: 469

I'm a whales


« Reply #18 on: December 17, 2009, 09:19:01 PM »

I'd prefer to see yyyy-mm-dd-mapname-nnnn for better sorting, in my opinion. Either that or, mapname-yyyy-mm-dd-nnnn.

Both of those ways will group the shots from a map together, where Khalsa's way would group all of the first shots from every map together, which doesn't sound too intuitive to me.

Having this on demos and on screenshots sounds very nice. I don't like "screenshot0001" and "demo0001". Tongue
Logged

mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #19 on: December 18, 2009, 02:40:02 AM »

I'd prefer to see yyyy-mm-dd-mapname-nnnn for better sorting, in my opinion. Either that or, mapname-yyyy-mm-dd-nnnn.

Both of those ways will group the shots from a map together, where Khalsa's way would group all of the first shots from every map together, which doesn't sound too intuitive to me.

Having this on demos and on screenshots sounds very nice. I don't like "screenshot0001" and "demo0001". Tongue


yyyy-mm-dd-nnnn-mapname seems the best way to me.

That would make the picture be 2009-12-17-0001-atcs.jpg. That doesn't make a ton of sense logically but I think it would be easiest to sort by. Knowing what map the picture was take on is nice, but I don't really see the need to ever sort by mapname (unless you're going back through old photos looking for pictures on a specific map.) It seems to me most of the time you will want it sorted by date.

And, you can name demos, but of course, this will make it a lot nicer if you don't bother to name them.
Logged

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

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

~Mooseberry.
kevlarman

*

Turrets: +291/-295
Posts: 2737



« Reply #20 on: December 18, 2009, 03:04:35 AM »

cl_autorecorddemo has already done this for ages...
Logged

Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----
KillerWhale
Spam Killer
*

Turrets: +63/-26
Posts: 469

I'm a whales


« Reply #21 on: December 18, 2009, 06:00:28 AM »

Well, I am confused as to the number. Is the number +1 for every shot taken on that day, or for on that map on that day?
Logged

Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #22 on: December 18, 2009, 06:01:52 PM »

@KillerWhale
patch number 2 does +1 on a new day, it doesn't have mapname yet.

I did add the mapname, in fact it was rather easy thanks to the tips in this thread.
BUT it screws chronological order. bigtime. Think playing the same maps, in a different order,
in several games on a single day.

mapname and number don't mix, so it's either

- full timestamp (down to the millisecond)
- short timestamp (date and/or time) + number
- full timestamp + mapname

There is a perfectly sound technical reason but I won't bore you with it.
Logged

UniqPhoeniX
Spam Killer
*

Turrets: +66/-32
Posts: 1376


« Reply #23 on: December 19, 2009, 01:50:38 AM »

yyyy-mm-dd-nnnn-mapname shouldn't mess with cronological order tho.
Logged

Paradox

*
*

Turrets: +253/-250
Posts: 2610


I eat babies!


WWW
« Reply #24 on: December 19, 2009, 10:49:30 PM »

I like the idea of dumping mapname in EXIF data. Bissig said it, i believe
Logged


∧OMG ENTROPY∧
mooseberry
Community Moderators
*
*

Turrets: +666/-325
Posts: 3934


Hello.


« Reply #25 on: December 20, 2009, 12:11:59 AM »

I like the idea of dumping mapname in EXIF data. Bissig said it, i believe

Only problem is for the average user they will not know what this is or how to view it.
Logged

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

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

~Mooseberry.
Ingar
Tremulous Developers
*

Turrets: +302/-7
Posts: 535


Doomsday device you say?


WWW
« Reply #26 on: December 20, 2009, 12:07:29 PM »

yyyy-mm-dd-nnnn-mapname shouldn't mess with cronological order tho.

The basic problem is I can't check if a filename yyyy-mm-dd-nnnn-* exists.
And after closer inspection, it will screw up in other situations as well.

I need to think this over.
Logged

David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #27 on: December 20, 2009, 01:04:44 PM »

Make it yyyy-mm-dd/nnnn-mapname, then all you have to do is count the number of nodes in the directory.
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.
A Spork
Spam Killer
*

Turrets: +37/-230
Posts: 1010

rawr


WWW
« Reply #28 on: December 20, 2009, 02:59:56 PM »

Shouldn't mapname be before nnnn?
Otherwise you will get
0000atcs
0000niveus
0000nexus6
0001atcs
0002atcs

It should goup by map IMHO.
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
David
Spam Killer
*
*
*

Turrets: +249/-273
Posts: 3543

David


« Reply #29 on: December 20, 2009, 05:04:14 PM »

The numbers keep going up even if the map changes.
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.
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!