0

Is there a cross-platform way to do these actions? Or only open files, the user download the files. I want to make a mmo side-scrolling game, and it needs to save maps, sprites and musics.

2 Answers 2

2

It's not possible to access the local filesystem at the client's side. If your data is text (image -> text through base64 data uri's), the DOM Storage may be interesting for you. The files must be base64-encoded at the server's side, though.

References:

Sign up to request clarification or add additional context in comments.

Comments

1

JavaScript has no I\O capabilities by itself.

If you want to reduce the traffic use the model in Travian:

  1. the user can save all of the resource files needed to his PC, device etc;
  2. the user submits to the server the path, where the resource files are saved;
  3. the game generates custom css with localpath (the path to the files on his machine).

This will reduce the traffic enormously.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.