Hi,

On 10/03/2019 23:13, Gabriel CV wrote:
>
> - Either you have a "Dynamic Asset Bundler" system implemented on the
> server. Basically, there is server code that is able to build
> dependency graphs of all assets. Bundling is no more a
> manual/empirical thing, but follows a precise and formal algorithm.
> So, when the game asks the server that it want some asset, the server
> is automatically replying with the full list of dependent assets
> needed. The game then send a list of assets it already have locally,
> and finally, using both those lists (what is needed, and what is
> already there), the server is building a specific bundle for that
> specific request. Bundles are created dynamically and
> client-dependent, and no more static and developer/packager dependent.
> This is a very different philosophy.
>
> - Either you have a "Individual Asset Cache" system implemented
> locally. In this case, the game don't cares at all about bundling.
> When the game want an asset, he look for it in a local cache that is
> quite limited in size (either in memory fs, or in Indexed db, I don't
> know). If if it is not in the cache, the game fetch it from the server
> and put it into the cache. If the cache is full, the oldest stuff is
> being removed. And so on, for each individual assets and dependencies
> that might be needed. The major issue with this is that such server
> queries are asynchronous on the web, and existing games are used to
> have synchronous IO operations since the dawn of video games. So there
> is some major design changes needed to achieve this.
>
> So in both cases... there is non trivial work needed to allow multi-GB
> AAA games on the web. That's not impossible though I think, it just
> require some serious design.... and maybe axing a bit the texture sizes ;)


I thought I'd mention that large assets could be reused as-is using the
XHR-backed FS, with a standard web server requirement (Range: header):
https://emscripten.org/docs/porting/files/Synchronous-Virtual-XHR-Backed-File-System-Usage.html#synchronous-virtual-xhr-backed-file-system-usage

In this case what the game additional needs is more tolerance for slow /
unreliable FS access (e.g. don't assume loading a OGG or PNG will be fast).

Also one needs do that in a web Worker, which should be easier with the
pthread work in progress.

Cheers!
Sylvain

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to