VirtualFileSystem: Difference between revisions

From Spring
Jump to navigationJump to search
Jk (talk | contribs)
mNo edit summary
Jk (talk | contribs)
Line 23: Line 23:
=Engine Usage=
=Engine Usage=
The engine access a few files directly, most of them are lua files which access other files themselves.
The engine access a few files directly, most of them are lua files which access other files themselves.
Here the list of files that must exists in the VFS (some of them don't have to be in the game/map archive cause there are fallback solution in springcontent.sdz & maphelper.sdz):
Here the list of files that must exist in the VFS (some of them don't have to be in the game/map archive cause there are fallback solution in springcontent.sdz & maphelper.sdz):


* ./
* ./

Revision as of 18:52, 16 April 2011

Development < VirtualFileSystem

VFS

The Virtual File System is the unified layer to access the different archives used at runtime. So you can access map, game & config files via the same interface.

Archive Hierarchy

When loading a new archive (sdz, sd7, sdd) it overrides existing file references in the VFS, so the order archives are loaded is very important. So here it is:

  • game
    • springcontent.sdz
    • game dependencies
    • game archive itself
  • map
    • maphelper.sdz
    • map dependencies
    • map archive itself
  • raw fs (only for unsynced data)

Extra Informations

Spring's VFS is lowercase only. Also it is extremely recommended to use linux style path separators, e.g. "foo/bar.txt" and not "foo\bar.txt".


Engine Usage

The engine access a few files directly, most of them are lua files which access other files themselves. Here the list of files that must exist in the VFS (some of them don't have to be in the game/map archive cause there are fallback solution in springcontent.sdz & maphelper.sdz):