make node-webkit .exe load images from a folder?

0 favourites
  • 7 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • Hi everyone,

    My client is hoping for a PC .exe game that loads images from a folder in the same folder as the game .exe file, so that they can swap out images in the folder and have them appear in the game. This possible?

    I searched and found stuff about loading external images, but when I export via node-webkit the images it loads are hidden or built into the .exe or something.

    Anyone know how to make this happen?

    thanks,

    Mike

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bump...

    no-one?

  • I have not worked with webkit before so i have no clue :-)

    But Ashley responded to a post last month about external .xml file. I would think that would count as the same.

    He stated that it was not possible yet.

    See the thread here.

  • node-webkit plugin is capable to read files from external.

    I tried to load image to sprite from path, it doesn't work... but the text works. I don't know why. I'm looking a solution.

    <img src="http://i.imgur.com/f1z7F4u.png" border="0" />

  • thanks for the heads up cvp, Actually I figured out what I needed.

    step 1) in the projects window, right click the files folder and choose import, then import the images you want to load from a folder.

    step 2) Add events at the start of your game to load from URL into your sprites, but instead of URL's, just add the images names such as "imageOne.png"

    step 3) Export the game as node-web-kit

    step 4) Go into the win32 folder that node-webkit created and find the file called package.nw and rename it to add .zip to the end of it. (becuase its really a .zip file)

    step 5) open the zip file you just created by rename it to .zip and replace the images you had "imported" with new images.

    step 6) rename the file again to get rid of .zip.

    The next time the game is run it will display the new images.

    cheers,

    Mike

  • Also Load image from URL -> NodeWebkit.AppFolder&"images/image.png" works but only on exportet exe. On next version of Construct you can preview as node-webkit so maybe it works then.

    Edit: To be clear just create folder whit images to the application folder (win32).

  • Very cool! Thanks for making my life easier Katala (And Scirra, as always). Can't express how much I love using C2.

    Mike

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