I select a framework for developing a game on JS. But the same problem arises during development: the browser does not allow the code to open and generally work with local FS files. Say, an example with the framework Phaser.js or Quintus:

Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file: /// C: /racemath/data/sprites.json'.

How, then, should this work on a mobile device without the Internet, or if I want to debug locally and don’t want to raise any server that provides java script files?

And the second question: are there any frameworks that allow connecting resources from files, or does it all rest on the very problem of denying access to the OS file system from a browser? Then I don’t understand how to make a game portable to mobile devices, which in theory does not need any access to the Internet, it is self-sufficient with all its internal resources and executable code after all.

  • one
    Everything is developed on localhost, then packaged with some PhoneGap. - RubaXa
  • one
    Hm And what's stopping you from just doing this: <script src = "RelativePathInProjectStructure.js"> </ SCRIPT> And the script already assigns sprites (sprites.json) - ReinRaus September

0