VFS module

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

VFS module

Post by zuzuf » Wed Jun 10, 2009 11:18 pm

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).
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: VFS module

Post by xpoy » Thu Jun 11, 2009 6:35 am

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

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: VFS module

Post by zuzuf » Thu Jun 11, 2009 4:05 pm

Of course large bandwidth and low latency is required for a LanFS module :), otherwise reading files will be awfully slow
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: VFS module

Post by zuzuf » Fri Jun 12, 2009 8:34 pm

new VFS module is working :). At least I could play a campaign mission and a skirmish game :D
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: VFS module

Post by Balthazar » Sat Jun 13, 2009 6:20 am

New build is reqired for testing :P

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: VFS module

Post by xpoy » Sat Jun 13, 2009 6:56 am

Yes, new build at now. The campaign work well

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: VFS module

Post by zuzuf » Sat Jun 13, 2009 11:59 am

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.
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: VFS module

Post by xpoy » Sat Jun 13, 2009 2:06 pm

Crash when exit campaign.
And the campaign meet wrong, :P

And really faster load!
Attachments
stdout.rar
(15.64 KiB) Downloaded 750 times

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: VFS module

Post by zuzuf » Sat Jun 13, 2009 2:22 pm

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
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: VFS module

Post by zuzuf » Sat Jun 13, 2009 3:45 pm

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).
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: VFS module

Post by xpoy » Sat Jun 13, 2009 6:28 pm

I couldn't found seggstion.
Really perfect. Keep going!
support!

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests