Cross-Platform File-Manager #574

Open
opened 2025-12-14 20:48:08 +00:00 by SakulFlee · 0 comments
SakulFlee commented 2025-12-14 20:48:08 +00:00 (Migrated from github.com)

We can currently only run the Engine on Desktop platforms like Linux, macOS and Windows.
Other platforms like mobile (Android & iOS) and web are unsupported due to this limitation.

This Cross-Platform File-Manager should expose an API to be used universally by every part of this project, fully replacing the need to interface with native file APIs.
The API needs to be able to read and write on each platform.

  • For desktop platforms, we can simply proxy to the native file APIs.
  • For mobile platforms, we'll have to figure out a way of accessing the resources as needed, especially for writing files (e.g. save games).
  • For web platforms, we'll have to download and cache files from the server. For writing files, it has to happen in the local browser file storage and/or cache.
  • In case we are running on an unsupported platform, we should probably fall back to the "desktop platform" way of doing things. Anything else requires a custom / special implementation to work anyway.

We should distinguish files between assets (read-only) and custom user defined files (read-only or read-write).
Custom user defined files can be something like a config included with the app, but can also refer to something like a local save game file.

We should generalize how to access files without needing the full path.
For example, on desktop platforms, we can probably load assets from the current working directory (or the directory where our current executable is inside). E.g.: ./assets/cube.glb.
However, on mobile platforms, we need to load these assets from the app file. E.g.: //OurApp.(apk|ipa)/Assets/cube.glb.
Lastly, on websites, we'd need to make a GET request. E.g.: https://<domain.tld>/assets/cube.glb.
All of those file paths above should be loadable via a simple request like cube.glb.
Depending on the platform, the correct path should be figured out.

This'll be required for:

We can currently only run the Engine on Desktop platforms like Linux, macOS and Windows. Other platforms like mobile (Android & iOS) and web are unsupported due to this limitation. This Cross-Platform File-Manager should expose an API to be used universally by every part of this project, fully replacing the need to interface with native file APIs. The API needs to be able to read **and write** on each platform. - For desktop platforms, we can simply proxy to the native file APIs. - For mobile platforms, we'll have to figure out a way of accessing the resources as needed, especially for writing files (e.g. save games). - For web platforms, we'll have to download and cache files from the server. For writing files, it has to happen in the local browser file storage and/or cache. - In case we are running on an unsupported platform, we should probably fall back to the "desktop platform" way of doing things. Anything else requires a custom / special implementation to work anyway. We should distinguish files between assets (read-only) and custom user defined files (read-only or read-write). Custom user defined files can be something like a config included with the app, but can also refer to something like a local save game file. We should generalize how to access files without needing the full path. For example, on desktop platforms, we can probably load assets from the current working directory (or the directory where our current executable is inside). E.g.: `./assets/cube.glb`. However, on mobile platforms, we need to load these assets from the app file. E.g.: `//OurApp.(apk|ipa)/Assets/cube.glb`. Lastly, on websites, we'd need to make a GET request. E.g.: `https://<domain.tld>/assets/cube.glb`. All of those file paths above should be loadable via a simple request like `cube.glb`. Depending on the platform, the correct path should be figured out. This'll be required for: - #573 - #590 - #591
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SakulFlee/Orbital#574
No description provided.