craftablescience / ChiraEngine

A customizable MIT-licensed game engine.
https://craftablescience.info/ChiraEngine/
MIT License
33 stars 6 forks source link

Virtual Filesystem #56

Open craftablescience opened 1 year ago

craftablescience commented 1 year ago

Component to Improve

Core Engine

Describe Your Suggestion

The current resource system is fine, and works well imho, but it's also unwieldy to work with the filesystem directly. I was a bit shortsighted when making the resource system, in trying to abstract it to work with any kind of file sources like zip and vpk I didn't realize that raw filesystem operations would be so crucial. The resource provider system needs to be refactored into a virtual filesystem. It should know what filesystem providers are read-only, what filesystem providers can provide raw file paths (which are sometimes necessary!), and perhaps one day provide additional operations like watching for file or directory changes.

There needs to be a distinction between running games from raw files versus exporting games on certain platforms, but we don't need to worry about that yet.