Web Assets #2083
Replies: 1 comment 1 reply
-
Semi-related: the WASM AssetIo implementation makes web requests to load assets (to the web server hosting the wasm app, not arbitrary domains). AssetServer is implemented as a "virtual filesystem" so that it can behave the same way (ex: use the same paths) in many different contexts (hosted on a web server, reading from android's storage api, reading from a desktop filesystem, etc). Changing the paths to a "fully qualified domain name" breaks the virtual filesystem api because it mandates a specific backend (a web request). From my perspective the two paths forward are basically what you suggested:
I think for simplicity it probably makes sense to start with (2). This enables you to build it as a 3rd party Plugin first that provides immediate value. Later we can consider direct integration with AssetServer if that seems like the right call. But making significant additions to the AssetServer api will likely meet some pushback right now as we're currently experimenting with migrating to Distill, which as far as I know doesn't support the use case you're describing. |
Beta Was this translation helpful? Give feedback.
-
Is anyone working on loading assets from the web?
It is useful for online games that update often. The user can launch the game and the new assets are downloaded while they play. They can even be moved to a newer version of the game without noticing.
It can also be useful for online game editors where multiple people can edit and add new assets in real time.
Finally, I will need it too for my toy web browser
buzzy
.I'm considering two approaches:
AssetServer
to useUrl
instead ofPath
(asset_server.load("foo.png")
will be turned into "file://foo.png" internally).AssetServer
code and rename itWebAssetServer
.It would nice if that could be merged into the main branch at some point. Any comments about which approach to take?
Beta Was this translation helpful? Give feedback.
All reactions