[Plugin] JSONTMX importer

Post your completed addons to share with the community

Post » Mon Aug 26, 2013 11:21 am

Hi

I'm having trouble with both jsontmx importer & tmx importer.

Both freeze when I'm either adding to the example/demos or putting into my own projects.

I have new laptop (win 8) etc and latest construct 2 ...

When I add another action to demo ... any action .... it locks programme.

Is there something I'm missing or is it a bug..../

TA
B
4
Posts: 2
Reputation: 504

Post » Mon Sep 09, 2013 8:34 am

Hi,

it seems like the "gzip" support breaks the support for cocoonJS... When I launch the game cocoonJS gives me the following JS error:

JavaScript Exception (Line 16857 File: 'c2runtime.js' Tag: 'script'): TypeError: 'undefined' is not a function (evaluating 'document.write(<script src="

If I go to this line I'll get this lines:

document.write('<script src="zlib_and_gzip.min.js"></script>');
cr.plugins_.Rex_JSONTMXImporter = function(runtime)
{
     this.runtime = runtime;
};


The file "zlib_and_gzip.min.js" exists in the game ZIP, but it seems to have a problem...

Is it possible to get a older version of the plugin that doesn't support the gzip features?

Best,

Benny
B
6
S
1
Posts: 19
Reputation: 888

Post » Tue Oct 08, 2013 6:47 am

@rexrainbow

Hi. This plugin or example capx not working with current cocoonJS ver 1.4.3.

Could you fix this ?

Thanks
B
52
S
18
G
13
Posts: 385
Reputation: 10,943

Post » Thu Oct 10, 2013 8:43 am

Update: disable supporting of zlib and gzip decompression.

@dryas
@tumira

Try this one.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Oct 10, 2013 10:26 am

@rexrainbow

I got this error in CocoonJS 1.4.3 Galaxy S3.
Using your example capx after updated the plugins using Rex Repo tools



B
52
S
18
G
13
Posts: 385
Reputation: 10,943

Post » Wed Feb 19, 2014 7:32 am

@tumira

I will try to fix it. It's a little difficult since the web exported works fine, but cocoonJS exported failed.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Wed Apr 02, 2014 11:53 am

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

Post » Thu Apr 03, 2014 10:33 am

@helena

How do you get the json string? Could you provide a simple capx for this bug ?
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Apr 03, 2014 2:10 pm

@rexrainbow

I sent pm to you.
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

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
178
Posts: 4,122
Reputation: 104,051

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests