cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

HTML5 File API #129

Open wmichaelv opened 10 years ago

wmichaelv commented 10 years ago

Chrome has implemented a layer of security to block 'unprotected' access on local assets. mediaGalleries is now required to request access from chrome browser. https://developer.chrome.com/apps/mediaGalleries

Please implement, thank you.

viki53 commented 10 years ago

Many browsers have implemented security measures when accessing local files.

mediaGalleries can be nice when developing with Chrome, but it won't stop having the same security issue on other browsers…

But if @cykod and the others are okay with it, we'll see how to make it work.

cykod commented 10 years ago

Unless I'm reading this wrong, I don't see how this is helpful - it requires user action to allow access to files - and specifically setting access to the directory with assets as a media directory.

For players of the game it makes no sense, for developers XAMPP or any of the simple http servers make much more sense.

@wmichaelv please re-open if I'm missing something and you can explain how this would be beneficial

wmichaelv commented 10 years ago

Developing and maintaining a multiplayer game will be cheaper and easier when the big data are stored locally first before running the application. Accessing local files are very beneficial for both client and server.

For the server, assets can be stored locally first before launching the application. The process of storing the assets can be done via 3rd party (media files host). This would reduce the amount of bandwidth required to maintain stable connect with the users significantly.

For the client, the reduced amount of required bandwidth will give them a more stable and comfortable connection (less dc--disconnection with server is one of the huge issue for online game clients). And having the assets stored locally would give the client an easier access for local modding.

I haven't delved much into the quintus core, but if other browsers are in concern, the HTML5 File API might help?

viki53 commented 10 years ago

With a good cache config sent to the client, assets will be stored locally too. Implementing an other API won't add anything new…

Once the client has downloaded what he needs, he won't be needing to download it again unless there's some change or/and he cleared his cache.

ghost commented 10 years ago

try this @wmichaelv : http://www.html5rocks.com/en/tutorials/appcache/beginner/

wmichaelv commented 10 years ago

I'd like to stay away from cache when dealing with big data if possible. As different browsers have different policies on big cache.

ghost commented 10 years ago

mediaGalleries is not available in client side of chrome, maybe it's just available to chrome extensions not_mediagalleries

wmichaelv commented 10 years ago

Yeah, me thinks HTML5 File API would be the solution instead.

Edit: Title is modified.

ghost commented 10 years ago

And thus, the journey for support of the File API... has begun... No one knows when will be implemented, maybe over time... But that's another story... :smile_cat: