[Plugin] JSONTMX importer

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • tumira

    I will try to fix it. It's a little difficult since the web exported works fine, but cocoonJS exported failed.

  • Hello rexrainbow

    I have problem with JSONTMXimporter. I used TMXimporter to success and then I wanted to try in CocoonJS and it won't support XML so I went with JSONTMXimporter.

    In Firefox on my Windows I got this problem:

    Javascript error!

    SyntaxError: JSON.parse: unexpected character

    http://localhost:50000/Rex_JSONTMXImporter_plugin.js, line 895 (col undefined)

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer

    And then in CocoonJS:

    Javascript exception (line 19702 Tag: 'timer'): SyntaxError: JSON Parse error: Unrecognized token '<'

    What to do? Thank you.

  • helena

    How do you get the json string? Could you provide a simple capx for this bug ?

  • rexrainbow

    I sent pm to you.

  • Update

    I found that tile map editor could export json string ( At menu, "File" -> "Export As" -> "Json files" ) , so that I try to support that.

    This is my teat capx.

    But I am not sure I had covered all cases. Please help me to test it. (I forgot how to create object layer, so I might be miss that.)

    The older method to get json string is using tmx2json tool I made before. I recommend user use the official exporting one.


    Your input string is XML format, not json.

  • Ooh really, so it is different. I thought you said to use same way. Ok I am so sorry!

  • rexrainbow

    I tried first then got puzzled over that your test app was buggy too but then I realized I forgot to update the plugin itself. When that was done your capx worked and then eventually when I updated my capx, it works too. THANK YOU.

    Sorry again for my mistake.

  • .... But not in Cocoon JS. :/

    Javascript Exception (line 20117 File: 'c2runtime.js' Tag: 'script') TypeError: 'undefined' is not a function (evaluating 'document.write('<script src="zlib_and_gzip.min.js"></script>')')

    I typed this from my ipad, there may be typos.

    I looked in this thread and I saw people having same/similar problem, but I am not sure. In TILED my map is set to "uncompressed".

  • helena

    Try these steps:

    1. Download this plugin again.

    2. Get json by "File" -> "Export As" -> "Json files"

    3. Use AJAX to get json string from json file created by step2

    4. Load this json string into this plugin.

    The error message

    'document.write('<script src="zlib_and_gzip.min.js"></script>')'[/code:z5go15yr]
    should not show again.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • rexrainbow, I think this plugin along with your other plugins are fantastic - they really push the limits of what Scirra can accomplish. Is there any way you could consider posting a more comprehensive and documented example of this plugin in particular, or does one exist?

  • mudmask

    I am trying to re-write documents of my plugin in this website.

    There are still a lot of un- document plugins.

  • rexrainbow that's a huge undertaking - you've contributed quite a bit! Thanks so much Rex.

  • I thought CoconJS would support XML one day, but I'm wrong. CocoonJS and Ejecta do not support XML parsing today.

    It seems that JSONImporter plugin might be more general than TMXImporter plugin,

    I am consider that to re-make another kind of tmx importer plugin, to split the interface and parsers. i.e.

    tmx reader plugin + ( tmxXMLparser / tmxJSONparser plugin)

  • Here is the next version of JSON tmx importer. Now they are merged into one main plugin plus parsers.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)