[Scummvm-devel] Augmented target name

Max Horn max at quendi.de
Mon Apr 7 00:07:10 CEST 2008


Hi folks,

after seeing that an innocent question of mine from yesterday caused  
a heated debate today on IRC, I first was tempted to just try to  
ignore it and let it solve itself. But after thinking a bit about it,  
I believe we should come to some actual solution, even though no  
matter what we end up doing, some will dislike it.

OK, so what am I talking about? Well, let me explain:
This is about the "target names" generated by ScummVM when a user  
adds a game via the launcher to the config file. How are these names  
generated? In the simplest case, ScummVM will simply use the gameid  
-- so if the gameid is "quux", the target name will be the same. If  
there is a name clash, the launcher will add a dash plus number to  
the text "quux-1", "quux-2", etc. to make it unique. You may ask "why  
the dash?" -- the reason being that many gameids end with a digit,  
and you want to be able to distinguish "monkey-2" and "monkey2".

Now, for some games, there are many variants. And some of us  
(developers, collectors, fans with too much time at their  
hands... ;-) happen to own multiple of them, and want to use them. So  
you quickly end up with five targets for e.g.  Monkey Island.

The majority of our users does not care about this: They fire up  
ScummVM, add a game, and play. "Target, what's that? and what is this  
command line thing you keep babbling about anyway?" ;-). But for the  
die-hard fans, and for ScummVM devs, having monkey, monkey-2,  
monkey-3, monkey-4, ... is a bit inconvenient. "Hmm, that bug report  
is for Monkey Island VGA Special Christmas Edition in Italian -- was  
that monkey-4 or monkey-5".
These people tend to edit their target names to something more  
meaningful, like "monkey-vga-xmas-it" or "MonkeyVGAXmasIT" or  
"monkey_vga_xmas_it" (it seems these differences are actually the  
core of the fight, but more about that later ;-).

To help those "power users", we enhanced the "advanced detector" used  
by many of our engines some time ago to automatically generated  
"better" target name suggestions. So if you add a copy of Monkey  
Island, it will suggest as target name a string like "monkey-vga-xmas- 
it" (well, not really, of course, as there is no Christmas edition of  
MI -- as far as I know, at least ;-). Again, the casual user won't  
care (usually, at least -- I'll get back to that, too). For the power  
user, it just became easier to (re)add (maybe via the hidden "Mass  
Add..." feature of our launcher) his huge came collection.

So what is the point in generating relatively unique target names?  
("relatively" because you still get some variants which won't be  
covered by this, so we are not quite rid of the -1, -2, -3, ...  
suffixes)

Besides appealing to the "tidiness lovers" out there, it also has one  
subtle impact (I can think of -- if you can think of others, please  
let us know), namely, the savestate names: If I remove and re-add a  
game variant, it's nice that it ends up with the same target, so that  
I can keep using my savestates. This is not such a rare condition,  
actually -- if you update to a new ScummVM version, move your game  
data files, move to a new computer, etc., you may want to redo your  
config file and re-add all games. Or you want to get the new  
"improved" game description strings (they were quite crappy in 0.8.x  
and older ;-), you might do this. Or on the DC, after booting from a  
ScummVM, it does a full "mass add" from scratch whenever you insert a  
new game data CD (I believe -- correct me I am wrong).

"What is he getting at now anyway, why this long rant?" you may ask?  
Hush, I am almost there now ;-).

I said that we added this feature to the advanced detector. Well,  
actually, we added it as an optional feature, which can be controlled  
by a flag. Most engines (all except Kyra, actually), have this  
feature turned on. So for those, the variant/platform/language is  
used to augment the generated target name. Likewise, SCUMM does this.  
Kyra doesn't. The Sword engines do something a bit similar, but  
rather more limited: They generate targets named "sword1",  
"sword1demo", "sword1mac", "sword1macdemo" etc.

The issue now is this: We are inconsistent (shhesh). I have several  
variants of all kyra games, so now I have kyra1, kyra1-1, kyra1-2,  
kyra3-1, kyra3-1, kyra3-2, ...
Personally, I find this extremly irritating, and I would much prefer  
to have augment target names. I am getting old and just find it  
annoying to memorize that kyra1-3 is the "CD/DOS/English" version of  
Kyra 1, while kyra3-1 is the DOS/German of Kyra 3. :-)

"Argh, enough, old man -- tell us, what is THE PROBLEM or shut  
up!!!". Well, no real problem. The main reason we don't activate this  
feature everywhere is that we just can't agree whether "monkey-vga- 
xmas-it" or "MonkeyVGAXmasIT" or "monkey_vga_xmas_it" or ... is the  
one and only correct target name.

Yes, that's it. :-)

My stance on this is:

* This is a SILLY debate :-). I am sorry for having started it, but I  
think it's my responsibility now to handle it. Sorry.

* I agree that the "monkey-vga-xmas-it" is not god given, and IMO it  
has no strict advantage of the others -- it's just a pure matter of  
taste.

* In fact, I believe that *any* of the three is far superior to non- 
augmented target names. Augmenting helps power users, and doesn't  
hurt novices.

* Making this changeable via an option is a total NO. This is not a  
solution, it's chickening out

One reason given *against* changing kyra to use the "augmented  
targets" was that it would break savestates when re-adding games.  
True. But changing the 11 other engines now (to disable it, or to use  
a different style) would also break savestates. Compared to them,  
Kyra has not been around for long. And not being consistent breaks  
user experience. As such, my stance is that we should keep  
augmenting, and should change Kyra to do it. And possible more  
engines which don't do it right now and for which there are tons of  
game variants.
Ideally using the same style everywhere (let's keep BS1&BS2 as they  
are, though -- these target name have been in use for ages now,  
nothing to be gained by changing them).

If we really, really REALLY, desire so, we *could* change the style  
(foo-bar vs FooBar vs foo_bar vs. whatever else), *once*. If we  
absolutely desire so. But we better had excellent reasons for it.  
Neither "you have to press shift to make CamelCase" is a valid  
reason, nor is "we use CamelCase for our C++ class names" (and if you  
don't believe that, i can even explain to you why not, but I suggest  
to first ponder it deeply before seriously asking ;-).

One final compromise comes to my mind: We can change the frontend to  
be lax about interpreting target names, and make it ignore dashes and  
underscores -- if you type "foo_bar", it will match also "foo-bar and  
"foobar". That way, all you shift-hater and dash-eater and underscore- 
wreckers can type whatever target names you like. Of course, you also  
end up with collisions if a user has both "monkey_2", "monkey-2" and  
"monkey2". Hmmmm... "Mommy, what does 'contrived' mean?"


Anyway, since we didn't ask democratically the last time, I will do  
it now (well, we aren't a democracy anyway, but it won't hurt to ask  
for opinions -- we aren't coloring a bikeshed here afte rall, are  
we??? (*)):

Are there any *strong* and well-founded opinions on this?
Shall we augment target names or not?
If yes, do you have any strong preference for which style to use?
And please, state *reasons*, telling me that "yellow is much nicer  
than blue" doesn't help ;-),


Cheers,
Max


(*) http://www.bikeshed.com/

Cheers,
Max




More information about the Scummvm-devel mailing list