0 votes
by (2k points)
Like, does it make the game go slower? Faster? Do you get some freedoms?

2 Answers

–1 vote
by (680 points)
I suppose if you were to host the game locally, it would be inaccessible from other devices. However, if it were stored online, it would take a moment to load into the cache, possibly causing lag in the first few moments of the game.


Overall, if you plan to ever play the game on a different device, you should keep it online. If not, it doesn't matter that much.
by (2k points)
But I could upload the music along with the html.
+3 votes
by (159k points)

It depends on whether your game will be:

1. Playable on-line (html & media files are hosted on the same web-server)

2. Playable on-line (html & media files are hosted on different web-servers)

3. Downloadable & Playable on the end-user's local machine.

In use-cases 1 & 2 it makes sense to also host the media on-line, and in use-case 3 it makes sense to store the media in a loca location that is relative to the HTML file.

Also if setup correctly it is possible to use the same Relative URL to access the media in use-cases 1 & 3.
eg. assuming the media is stored in a media folder on either the web-server or the local machine then...

<img src="media/player-portrait.png">

... could be used to access the above image in both situations.