Page 1 of 1

VFS module

Posted: Wed Jun 10, 2009 11:18 pm
by zuzuf
I am rewriting the VFS system as an independent generic module (it manages Archive::File objects only accessed through abstract Archive objects).
In order to add support for a type of archive, just add the corresponding module inheriting from the Archive class.
Caching and file priority is handled by the VFS module (the new design should allow more freedom in file priority management, so mod dependencies will be possible).
File access is provided by classes derived from Archive. Those class do not need to have their header file included in some global file, they are loaded as plug-ins. Those modules automatically register the functionalities they provide to the main Archive class which handle all object allocation and archive detection.

Currently there is support for real filesytem through the RealFS class (which inherits from the Archive class too :mrgreen: ), and HPI support is work in progress through an Hpi class.
Zip support could be provided through a Zip class, 7z support though a SevenZip class, etc ... we can even imagine a LanFS class that would clone the server's files for LAN games :D

Currently the new VFS code is built and linked but not used, the old HPI/VFS code is still used by the engine (there is no conflict since VFS stuffs aren't included by any other module and aren't in the TA3D::UTILS::HPI namespace).

Re: VFS module

Posted: Thu Jun 11, 2009 6:35 am
by xpoy
Cool!
Zip support could be provided through a Zip class, 7z support though a SevenZip class, etc ... we can even imagine a LanFS class that would clone the server's files for LAN games

But I think LanFS just work when player want, the net maybe the new problem

Re: VFS module

Posted: Thu Jun 11, 2009 4:05 pm
by zuzuf
Of course large bandwidth and low latency is required for a LanFS module :), otherwise reading files will be awfully slow

Re: VFS module

Posted: Fri Jun 12, 2009 8:34 pm
by zuzuf
new VFS module is working :). At least I could play a campaign mission and a skirmish game :D

Re: VFS module

Posted: Sat Jun 13, 2009 6:20 am
by Balthazar
New build is reqired for testing :P

Re: VFS module

Posted: Sat Jun 13, 2009 6:56 am
by xpoy
Yes, new build at now. The campaign work well

Re: VFS module

Posted: Sat Jun 13, 2009 11:59 am
by zuzuf
well, unfortunately, the RealFS module doesn't work on windows yet :cry: , I am debugging it right now. When it's ready I'll make a new package.

Re: VFS module

Posted: Sat Jun 13, 2009 2:06 pm
by xpoy
Crash when exit campaign.
And the campaign meet wrong, :P

And really faster load!

Re: VFS module

Posted: Sat Jun 13, 2009 2:22 pm
by zuzuf
yep, it seems to load faster now (I load a game in 5 sec :D ). I'm going to look at this log :)

PS: obviously it didn't manage to create the mission script :( :

Code: Select all

[Sat Jun 13 21:55:46 2009] [infos] [settings] The settings has been saved.
[Sat Jun 13 21:56:14 2009] [debug] [paths] `F:\ta3d\resources\scripts//game` does not exist !
[Sat Jun 13 21:56:14 2009] [error] [paths] Impossible to create the folder `F:\ta3d\resources\scripts//game`
[Sat Jun 13 21:56:14 2009] [error] [script] Could not open file `F:\ta3d\resources\scripts/game/__campaign_script.lua` (c:/MinGW/home/Yoda/ta3d/trunk/src/ta3d/src/scripts/script.cpp, 1317

Re: VFS module

Posted: Sat Jun 13, 2009 3:45 pm
by zuzuf
There was a nasty bug there :P and several other bugs in the mission script generator.
Anyway this is a strange bug, there is noway to know for sure if it's gone until it's tested (works on Linux, but it seems a win32 specific bug).

Re: VFS module

Posted: Sat Jun 13, 2009 6:28 pm
by xpoy
I couldn't found seggstion.
Really perfect. Keep going!
support!