0 Favourites

Node-webkit + external XML

  • 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.

  • 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.

  • 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.

    @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?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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?

  • Joannesalfa - not right now - just import the XML as a project file then you can AJAX request it.

  • 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.

  • Joannesalfa - what's wrong with importing it as a project file then loading it? That should work fine.

  • 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)

  • Joannesalfa - what's wrong with importing it as a project file then loading it? That should work fine.

    @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)

  • Hi! I want to add the files seperately in different folders and it seems to work fine when I export the project as node-webkit and use relative paths like "data/ads/1/1.txt". the contents were loaded and displayed in a textobject but is it possible to use this in preview mode somehow? (put the folder/files in the project folder for example?)

    PS: It seems this does not work with Sprites (Load image from URL). Is it possible to use local files/paths? I tried a relative path like in the example above "data/ads/1/1.jpg".

  • Hi! I want to add the files seperately in different folders and it seems to work fine when I export the project as node-webkit and use relative paths like "data/ads/1/1.txt". the contents were loaded and displayed in a textobject but is it possible to use this in preview mode somehow? (put the folder/files in the project folder for example?)

    PS: It seems this does not work with Sprites (Load image from URL). Is it possible to use local files/paths? I tried a relative path like in the example above "data/ads/1/1.jpg".Bl4ckSh33p2014-02-11 13:10:22

    Same problem, It seems in Preview mode relative path don't work !!

    (which then make preview mode in Node-Webkit totally useless )

    Fix that please...

    I want really buy this software, but with the NO-ABILITY to easily load files (external files meaning, since my game idea is to make it moddable !), I'm then refrained to buy it..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
98 7,599
norum82's avatar
norum82
Unread hot topic
92 11,977
SgtConti's avatar
SgtConti
Unread hot topic
85 7,285
shimo's avatar
shimo