Jump to content

How to easily import a Tilemap that is not on the game server.


Nodragem
 Share

Recommended Posts

Hello,

I am making a prototype, and I would like my collaborators to be able to use their own tilemaps with the prototype I made.

So basically, their tilemaps are not on the server that hosts the game. Note that I am using Heroku as a server.

I thought of several ways to do it:

  1. uploading the file to the server from the game webpage, maybe using javascript, but I don't know if that is possible at all, as I am using Heroku,
  2. open a dialog with javascript in the game webpage that asks for a URL. This URL would link to the tilemap file, hosted somewhere on the internet. Then, I would use the following method to open the tilemap from a URL: http://phaser.io/examples/v2/loader/load-text-file. However,  1) I am not sure about how to make a  'Access-Control-Allow-Origin' header present on the server, 2) I am not sure I can use, let's say, Google Drive to provide an URL to the file.
  3. I just saw that I could use AWS S3 with Heroku: https://devcenter.heroku.com/articles/s3 but I am not sure how it will interact with Phaser.

So if you already have a similar issue and have a solution, please let me know!

Otherwise, I will post my solution if I find one :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...