Jump to content
Guppy

Implement virtual filesystem?

Recommended Posts

Once the c++ version comes out would it be possible to use something like PhysicsFS in your game?

 

Or rather is there currently a file system abstraction I can replace so I can make Leadwerks built in model/texture/sound loading use the virtual file system?

Share this post


Link to post

Leadwerks 2 we had the possibility for using abstract commands. e.g.

Model myModel = Abstract("Mymodel.mdl");

It would return the first find in the assets based on the given search parameter.

 

I don't know if Josh has plans to bring this back in to the current version.

Share this post


Link to post

Leadwerks 2 we had the possibility for using abstract commands. e.g.

Model myModel = Abstract("Mymodel.mdl");

It would return the first find in the assets based on the given search parameter.

 

I don't know if Josh has plans to bring this back in to the current version.

 

 

It's a bit more low level that that - I want to intercept the open/close/read file commands inside loadXXXX('.....');

 

as I'd rather not have to rewrite all the loading & importing functions :)

Share this post


Link to post

Our file system actually can read zip archives and treats them as a file system. This is how games are deployed. It's an unofficial feature, but you just call Package::Load( zipname ) and it automatically creates a virtual file system the file read commands work with,

Share this post


Link to post

While that is nifty I was aiming for encrypted containers, dont suppose I can teach package new tricks?

Share this post


Link to post

Passwords are supported:

Package* Package::Load(const std::string& path, const std::string& password, const bool regist=true)

 

The last parameter registers it as a virtual file system the file commands automatically load files from.

Share this post


Link to post

Basically, the zip file name creates an extra folder. So if you have a file in a zip called "Materials.zip" you would load Materials/filename.mat.

Share this post


Link to post

It's presently not exposed. It would also be kind of pointless to encrypt a zip file and store the password in script.

Share this post


Link to post

I still don't know where you are going to store the password. Even if it's in the exe you can still pull it.

Share this post


Link to post

There are ways. Since I am planning to build this into the publishing step, I haven't bothered making this an officlal feature yet..it's just going to be replaced with something that's automatic.

Share this post


Link to post

One thought is using an EXE compressor and I think that might jumble the password. The other is pulling it from a server or website. But everything can be circumvented/figured out. It's always a balance of risk versus reward.

Share this post


Link to post

well IF you are only protecting the data you don't need to store the password.

 

only thing you need to do is jumble the bit code and if wrong password is presentated you get jumbeled data.

 

if you present right password you get data back in the correct order.

 

but giving wrong passwords you could get anything from beautifull picture to beautifull song to just jumbeled data most of the times, ... would kinda be easyer to make stuff your self than doing it with force password breaker.

Share this post


Link to post

You could always compile the lua code to byte code. Also you can have the password in a dll/lib and use luajit to load it. There are ways to obfuscate code in lua. It will stop the casual hacker. A determined hacker will get regardless. Plus it gives people a simple way to distribute dlc/download packs outside of steam, Ie:desura and distribute a key for the zip.

Share this post


Link to post

Just wandering as a major missing feature in LE3 is project publishing with encryption, as actually in LE3 Steam edition the project code and all ressources are entirely visible when published.

As LE3 already contains the commands , could not it be possible to include the Zip and encryption in the publish button action ?

Share this post


Link to post
Just wandering as a major missing feature in LE3 is project publishing with encryption

 

I am planning to build this into the publishing step

I would highly appreciate it if this feature will be implemented in one of the next releases.

 

BTW: It would be nice if we had a list of planned features were the community can vote for each planned feature. Something like that which epic offers their UE4 community on https://trello.com/b/gHooNW9I/ue4-roadmap . With this tool devolopers could share priority management with the community. It would be a win-win solution for everyone.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...