D:GameVFS 0.1

Kiith-Sa 42 at theanswer.com
Tue Jul 17 06:35:51 PDT 2012


On Monday, 16 July 2012 at 17:27:32 UTC, Marco Leise wrote:
> Am Fri, 20 Jan 2012 00:36:11 +0100

> I didn't check your code, but does it handle case-insensitive 
> Windows OS as well as Unix like?

I didn't think consider this when working on it, so it's probably
always case-sensitive.

> Did you think of ways to probably even switch the language from 
> a menu?

Outside of scope of D:GameVFS. Of course, you could just
mount different directories with language files based on user 
input.


> From your example in the readme, it isn't immediately clear 
> what the names 'user', 'main' and 'root' are used for.

No particular purpose, they could be used for anything. In my 
game project,
I have "root" for read-only (what goes to somewhere in /usr on 
Linux),
and "user" for read-write e.g. config, logs, screenshots, etc.
(what goes in /home/username/.gamedirectory).

> I assume that StackDir inherits from FSDir which is a nice 
> design.

No. As you can see in the API docs, StackDir and FSDir both 
inherit from
VFSDir. StackDir wraps one or more VFSDirs to wrap them. So you 
could even
stack a zip dir (if/when a ZipDir is implemented) on top of an 
FSDir.
I actually stack StackDirs on top of each other in my project.

> I'd probably expect things to work out as in F.E.A.R. or Quake 
> where these things are implementation details. In other words, 
> the game *never* attempts a write access into it's data files.

Directories can be read-only. You also need write support for 
stuff like
saves, config, screenshots, etc.

>   auto fs = new FileSystem();
>   fs.mount("main"); // can be directory "main" or "main.zip"
>   fs.mount("user"); // overrides main now

You can use a StackDir, and mount a ZipDir (if/when implemented) 
_or_ an FSDir based on whether e.g. a zip exists or not, but 
you't have to detect that yourself. I don't plan on adding such 
API to D:GameVFS, but it would only
take a simple function on top of it.



Note that D:GameVFS is just 0.1 now. I just implemented what I 
needed at the moment so far, stuff like a ZipDir will be only 
added once I need it.
Of course, any contributions are welcome - it shouldn't be too 
difficult.

For the game project, see https://github.com/kiith-sa/ICE, but it 
doesn't
really use D:GameVFS that heavily - only to separate read-only 
and read-write.
I'm planning to use it for mods later.

I'm currently outside the D world (working on a non-D related 
GSoC project),
but I'm planning on revisiting D:GameVFS and D:YAML in September.
That will only be to update compatibility to DMD 2.060 (if it's 
released by then) and to fix bugs, though.

Tango (which should now have a D2 port) also has a VFS API, which 
has more features (e.g. zip support) - the reason I started 
D:GameVFS was that I couldn't do some things (related to 
stacking) I wanted with the Tango API.
Don't remember what exactly was the problem, though.


More information about the Digitalmars-d-announce mailing list