dragome / gdx-dragome

Dragome backend for LibGDX.
22 stars 1 forks source link

Files implementation #11

Open czyzby opened 8 years ago

czyzby commented 8 years ago
czyzby commented 8 years ago

GWT uses a source generator to create a file with all assets listed in it. Since Dragome does not have similar functionality (or does it?), I think we should rely on native JS XMLHttpRequest functionalities or simulate assets file generation with a Gradle task. If we don't generate assets file, we might have problems with directory listing operations, exists and simulating sync API with async operations.

czyzby commented 8 years ago

@fpetrola The way I see it, there are two ways we can handle files:

fpetrola commented 8 years ago

I think second approach should be enough good for a first implementation. A third approach could be to make use of statistical analysis, we can pre-load all assets in a first execution attempt and store assets usage statistics in order to determine which ones are required to be loaded together, creating more specific pre-loading blocks as each successive execution gives more info about assets usage.