[Scummvm-devel] Detection hints in the Add Game browser
Max Horn
max at quendi.de
Sat Jul 29 22:30:49 CEST 2006
Am 29.07.2006 um 21:27 schrieb Ori Avtalion:
> Hi,
>
> I noticed a slight usability problem in the "Add Game" dialog. I will
> outline it and offer a solution.
>
> Since the file list in the browser only displays directories, the
> actual
> clicking of the "Choose" button is done when nothing is on the screen.
> I think this disorients some users (for one example, see
> http://video.google.com/videoplay?docid=-1663029591101855863).
Agreed.
> One possible solution is show the files alongside the directories, but
> have them greyed-out. I understand this was done on the mac version
> and
> also caused a bit of confusion.
Aye.
>
> My solution is to have a message such as "This directory seems to
> contain a SCUMM game" displayed when a candidate directory is entered.
Heh, I was actually thinking about a similar thing recently, but
never pursued the idea (of course anybody could claim that now, but
just read it as saying "sounds like a good plan")
>
> How is this done?
> Each engine will implement an Engine_XXX_rootFilesList which will
> contain a list of filenames that identify the game engine (could be
> just
> one file).
>
> Whenever the game browser enters a directory, it will scan it against
> each engine's list. If an engine's list is found inside the dir, it
> will
> pop up the message. Note that the message does not mean "Choose" will
> actually detect anything. The actual, heavier Engine_XXX_detectGames
> function is not being executed (it may contain more logic: checking
> against md5's, checking file headers etc).
>
> If it seems like a good idea, I'm willing to implement it myself.
Why limit it by enforcing detection via a single fixed approach
(checking against a fixed list of files). How about doing it in a
more flexible and generic way: Add a new plugin method,
"quickDetectGames", implemented by all plugins, which returns a value
indicating whether any support games may be contained in that
directory (i.e. a bool).
Another approach would be to add a "bool quickScan" parameter to
Engine_XXX_detectGames, which could disable expensive checks (like
the MD5 checking, or looking at file contents at all), at least for
certain selected ports.
But before we go for any of those, I wonder if we couldn't just use
plain Engine_XXX_detectGames after all. The advantage would be that
we get guaranteed uniform behavior. And at least on desktop machines,
it should be fast enough. The only problem I see right now (mind you,
of course there maybe many more which I am simply not seeing ATM) is
the MD5 detection, which at least for SCUMM games currently still
scans 1 MB of file data. That could be reduced to 40-128k, though,
with minimal effort, as I outlined here previously.
Of course, some backends generally have very slow file access, even
when "only" reading the content of directories, not to mention
reading actual contents. For those a "quick detect" might still be
useful. Or turning of that feature completely. But to know that, one
would have to first know more about the affected ports. The only one
with that problem I am aware of from the top of my head is the DC
port, but IIRC it uses a custom GUI anyway (but correct me if I am
wrong).
Cheers,
Max
More information about the Scummvm-devel
mailing list