Node-webkit + external XML

Discussion and feedback on Construct 2

Post » Mon Jan 14, 2013 6:24 am

Hi All,

The reason why i use XML that allows the users can modify the game.

I would like to know is possible to support external files like images, text and XML files with node-webkit.

Apparently i made a .capx, then test with browser, it works while you can edit XML file and press refresh (F5) on the browser, it changed some values no need to click "Preview" button again in C2.

http://dl.dropbox.com/u/76227787/ajaxml.capx

I tried to export node-webkit, it didn't work. I wouldn't report this as bug, i would like to know if is possible to add new feature like external files for node-webkit, thanks.
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Mon Jan 14, 2013 12:34 pm

@rogerwang @ashley any toughts?
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Mon Jan 14, 2013 4:04 pm

I think it's a bug - AJAX requesting project files doesn't work in node-webkit. However I found the cause and hopefully it's fixed in the next release.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Mon Jan 14, 2013 11:07 pm

[QUOTE=Ashley] I think it's a bug - AJAX requesting project files doesn't work in node-webkit. However I found the cause and hopefully it's fixed in the next release.[/QUOTE]

@Ashley thanks for your reply, i have a question, aren't you developing a node-webkit plugin which we can access hard disk directory to write and read files as node-webkit APIs; before to export will it have Manifest format dialog to change icon and window size?
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sat May 11, 2013 5:16 am

I'm going to bump this thread because i have a doubt.

It already fixed the bug, but...

Isn't possible to separate a XML file from .exe and load the xml file via ajax in this current directory when you export node-webkit?Joannesalfa2013-05-11 05:20:01
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sat May 11, 2013 3:27 pm

@Joannesalfa - not right now - just import the XML as a project file then you can AJAX request it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Sat May 11, 2013 3:50 pm

@Ashley I see about "not right now" it seems not possible to load external .xml file at the moment.

Maybe i can wait when you introduce file system for node-webkit in future versions.

Thanks.
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sun May 12, 2013 2:23 pm

@Joannesalfa - what's wrong with importing it as a project file then loading it? That should work fine.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Sun May 12, 2013 6:50 pm

Well I think he wants his game to be a native file with modable files for the enduser to play around with.

Although I don't have any ideas atm that would involve the users, I do think that a way to reference files outside of the node-webkit package would be useful(either in it's own directory, or local documents/appdata folder for the user)Thndr2013-05-12 18:50:41
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Mon May 13, 2013 12:30 am

[QUOTE=Ashley] @Joannesalfa - what's wrong with importing it as a project file then loading it? That should work fine.[/QUOTE]

@Ashley it did.

I'm saying about .xml file could pretend like .ini file that the game .exe loads external .xml file (.xml file should not be inside of .exe)
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 16 guests