Moderators: phlip, Larson, Moderators General, Prelates
1
2
...
9
A10
A11
...
A99
B100
...
B999
C1000
...
Z999999999999999999999999999
ZA1000000000000000000000000000
...
ElWanderer wrote:Another way is to insert a timestamp in YYYYMMDDhhmm(ss if needed) order.
20120101_1501_Game1
20120102_1256_Game2
20120103_0600_Game3
20120103_0601_Game4
...
20120124_1819_Game10
...
20120315_1945_Game156
I've included a few underscores for readability.
A lot of games sort by the savefile's timestamp and order so that the most recent savegame is uppermost.
That will break in the year 10000. The guy who started this topic wants a naming convention that would last forever, since he rejects fixed-length zero-padding.ElWanderer wrote:Another way is to insert a timestamp in YYYYMMDDhhmm(ss if needed) order.
Goplat wrote:Assuming letters sort after numbers, you could name your games like this:
- Code: Select all
1
2
...
9
A10
A11
...
A99
B100
...
B999
C1000
...
Z999999999999999999999999999
ZA1000000000000000000000000000
...
The prefix is asymptotically only 1/26 the length of the name. If you can't use letters, you could use a number base less than 10 and use the remaining digits for prefixes.
phlip wrote:Does it need to be human-readable / nice to look at? Because there are some simple ways to do it if that's not a requirement, if you're just generating a string that can be used (with the normal lexical comparison) to sort the original files... But they end up containing a bunch of cruft, and it won't really work if these need to be human-viewable in any way. For human-viewable, just go with 0-padding... if infinite extensibility is a concern, just have an automatic routine to go back and rename all the old files if a new one needs an extra digit.
<# digits> <number> <description>1 1 foo
1 2 bar
1 3 baz
...
1 9 borg
2 10 foo
2 11 bar
...1 . guz
3 . ish
2 98 . feh
2 11 91233485234 . buh
3 214 1098349013847598374029837459328759032875903\...
2857239048573249857324958732791783264987126347691\...
8679087172364876120398710976368423631628344513324\...
2583344336120874613465425653132455423341523545213\...
554612352347563245452327 . fish1
2
3
4
5
51
52
533
...
74
75
751
752
..
874
875
8751
...
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
WarDaft wrote:All you need is a character that is sorted before numbers, like "." is, and you can do this:
- Code: Select all
1 . guz
3 . ish
2 98 . feh
2 11 91233485234 . buh
3 214 1098349013847598374029837459328759032875903\...
2857239048573249857324958732791783264987126347691\...
8679087172364876120398710976368423631628344513324\...
2583344336120874613465425653132455423341523545213\...
554612352347563245452327 . fish
WarDaft wrote:
You can also pretend that you are approaching 1, and add another digit every time you close half the distance. IE:Not quite as efficient on digits, but more intuitive and readable I think. Also, you don't actually have to follow any particular scheme for adding digits, you can do it almost at random as long as you don't wait about as long as possible, you'll still end up with roughly exponential growth for the size of your save names.
- Code: Select all
1
2
3
4
5
51
52
533
...
74
75
751
752
..
874
875
8751
...
1
2
3
...
9
90
91
92
93
...
99
990
991
992
...
90
91
92
93
...
98
99
9900
9901
9902
...
9999
99990000
99990001
99990002
...
99999999
9999999900000000
Who, me? wrote:Hm, If i understand you correctly, it's along the lines of: [...] Which would work, but it's in p-space, as each new digit could only fit ten new names.
Goplat wrote:Assuming letters sort after numbers, you could name your games like this: 1-9, A10-A99, B100-B999, ...
The prefix is asymptotically only 1/26 the length of the name. If you can't use letters, you could use a number base less than 10 and use the remaining digits for prefixes.
0
1.0
1.1
...
1.8
1.9
2.00
2.01
...
2.99
3.100
3.101
...
4.9999
50.00000
...
74.99999999999999999999999999999
750.000000000000000000000000000000
...
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
skeptical scientist wrote:It looks like Yakk's post above is doing roughly this, but generalizing to n levels rather than one or two levels, and sticking a unary code for the number of levels out front. (I didn't bother reading his code, which looked ugly and had confusing notation, and just looked at his examples.)
Yakk wrote:Really, you don't need a _ character at all. I just added it for readability. If you want to do it only with digits, nevermind base 9 -- simply state that any value starting with a 9 must be encoded as a 1 digit longer value starting with a 0, then use 9 as the prefix character.
9931011"0"9911"0"10^100
then encodes a googleplex in a sort-friendly manner. ("x"y denotes y repeats of the character x).
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
n x=0.1 x=0.5 x=0.9
0 0 0 0
1 10 1 1
2 11 2 2
3 12 3 3
4 13 4 4
5 14 50 5
6 15 51 6
7 16 52 7
8 17 53 8
9 18 54 90
10 190 55 91
11 191 56 92
[...]
100 2719 820 999999999991
1000 34570 93970 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999991
10000 412129 974845 Yeah no.
100000 4719160 99221095
1000000 52572439 996605470All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
WarDaft wrote:Er, either 1 comes before 0, or it comes after zero. So it would actually be more like:
1
10
100
11
1
2
...
9
Z10
Z11
...
Z99
ZZ0100
...
ZZ9999
ZZZ00010000
...
ZZZ99999999
...
11
12
...
19
9110
9111
...
9199
9910100
...
9919999
999100010000
...
999199999999
...
11
12
...
19
1a
...
1Z
Z110
Z111
...
Z1ZZ
ZZ10100
...
ZZ1ZZZZ
ZZZ100010000
...
ZZZ1ZZZZZZZZ
...
Users browsing this forum: No registered users and 0 guests