Open colonelfazackerley opened 8 years ago
I much prefer 1, except that I am considering making ls.txt manually-written, so that level files can be just named after the level.
Do you think your innovation of naming levels 02_Level_name.rel is good enough? I'd prefer to avoid loads of renames when we're re-ordering levels, but maybe I should put up with it.
I am not a big fan of having to set something twice. eg '01_Bob.rel' has to contain ':name=Bob' too.
We could abolish ':name=' altogether and just use the filename.
I like names in filenames. Swapping order is easier:
git mv 01_Bob.rel 04_Bob.rel
git mv 04_Susan.rel 01_Susan.rel
compared to
git mv Level_01.rel tmp.rel
git mv Level_04.rel Level_01.rel
git mv tmp.rel Level_04.rel
If we do just use filenames, we could have '-' in the name changing to a space. Perhaps use a double '--' if we want a hyphen in a filename.
handcrafting ls.txt sounds unnecessarily onerous.
handcrafting ls.txt sounds unnecessarily onerous.
Yes. I thought it would be good for assembling level sets from a general pool of levels, but I think it just makes life more difficult.
I like names in filenames
Definitely.
I am not a big fan of having to set something twice. eg '01_Bob.rel' has to contain ':name=Bob' too.
What if we wrote a test that checks the 2 are consistent?
We could abolish ':name=' altogether and just use the filename.
I feel like that is going to cause us pain. Filenames have different constraints on different platforms, and we may want exciting names containing emojis or something the young people use.
So, in conclusion, if ls.txt is going to stay, we can automatically add the name into it during make.
$ cd rabbit-escape/rabbit-escape-engine/src/rabbitescape/levels/easy
$ egrep '^:name=' *.rel | sed 's/^\([^:]*\)::name=\(.*\)/\1 \2/'
level_01.rel Digging practice
level_02.rel Bashing practice
level_03.rel Build your way out
level_04.rel Block before you drop
level_05.rel Get down
level_06.rel Come together
level_07.rel Get in the burrow
level_08.rel Dig quick
level_09.rel Climbing practice
level_10.rel Cliff face
level_11.rel You wait here
level_12.rel Across the void
level_13.rel Give us a leg up
level_14.rel Three strikes
level_15.rel Keep it simple
level_16.rel The Lone Bridger
level_17.rel Go on without us
level_18.rel Face the right way
level_19.rel Saw tooth
level_20.rel To the top
I'm pretty sure you can do it with just sed (not egrep).
If we do this (and my anti-Ant manglings) we'd need to add a (developer) dependency on sed, but I think we are considering developer dependencies a free-for-all if they are apt-get installable on Ubuntu/Debian.
So, we expand ls.txt to contain filename and level name. I agree this is OK as long as we test they are the same (or similar if there are funny chars in the level name).
We are quite far down the path of having to use linux for dev, so I think it's not much of a step to require sed, egrep, etc.
getting sed/egrep for win through mingw isnt too troublesome compared to make.
Good to know.
I just noticed you propose above to enforce file names to be similar to level names. That sounds sensible - I propose allowing (but not enforcing for dev levels?) a leading number, and requiring the rest of the file name to be the canonical name as defined by ByNameConfigBasedLevelsCompleted.canonicalName
.
Sounds good.
That method name is rather long.
Sorry, class name.
Actually the method name is rather long and the class name is unforgiveable.
As soon as we've got #258 sorted let's give it a simpler name.
I was looking at implementing this item from TODO.md. Options, with my favourite first;