[Plugin] JSONTMX importer

Post your completed addons to share with the community

Post » Fri Apr 04, 2014 6:47 am

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.


@helena

Your input string is XML format, not json.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Apr 04, 2014 2:04 pm

Ooh really, so it is different. I thought you said to use same way. Ok I am so sorry! :)
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

Post » Fri Apr 04, 2014 2:23 pm

@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.
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

Post » Fri Apr 04, 2014 2:32 pm

.... 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".
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

Post » Sat Apr 05, 2014 10:57 am

@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
Code: Select all
'document.write('<script src="zlib_and_gzip.min.js"></script>')'

should not show again.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Apr 18, 2014 6:01 pm

@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?
B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Sat Apr 19, 2014 5:11 pm

@mudmask

I am trying to re-write documents of my plugin in this website.
There are still a lot of un- document plugins.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Apr 20, 2014 5:19 am

@rexrainbow that's a huge undertaking - you've contributed quite a bit! Thanks so much Rex.
B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Tue Apr 29, 2014 6:55 am

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)
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sat May 03, 2014 3:40 pm

Here is the next version of JSON tmx importer. Now they are merged into one main plugin plus parsers.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests