Node-webkit & Construct 2

  • Inspired with this I succesfuly created an .exe file using Space Blaster demo and node-webkit:

    Link to download .exe, (25.6mb zipped)

    here's the package.json i used to export to node-webkit,

    download node-webkit for windows here,

    aaaand wiki about node-webkit here.

    Procedure:

    Tutorial on how to export

    Check out here for more detailed info how to package and distibute your app for Windows, Mac or Linux

    So, i haven't tested how the other HTML5 api behaves, i just tried to call "Request Fullscreen" from Construct, and it didn't work, but maybe i set up the package.json wrong.

    Here's some additional info on webgl support on windows with node-webkit

    This is cool and everything and it gives an superior alternative to the Awseomium, but i think the real magic lies in the possibility to implement node.js wizardry in construct2 and get a nice .exe file with a bunch of power.

  • thanks you I make a try

  • I downloaded and did some testing.

    Start-up time is quite excessive.

    The executable launches right away, but then leave 25 seconds staring at a black window before game loads.

    I used ResourceHacker angusj.com/resourcehacker to browse through the SpaceBlaster.exe file.

    It is full of cruft that, as far as I can tell, are not used in this application. Numerous icons for volume control, printing, pause and play controls, and more...

    109 superfluous graphic resources that are bundled with the exe file. Do you have any idea why that may bee the case?

    See for yourself:

    Download ResourceHacker (link given)

    Open SpaceBlaster.exe with ResourceHacker

    Browse through "BINDATA"

    Odd.

  • FuguFirecracker

    Actually no idea. I presume they are icons shipped with chromium for video player, sound player controls, alert windows and such?

    Loading time is something I'll get into as soon i finish with the plugin to control the window (enter fullscreen, leave fullscreen, minimize, etc) because it's essential to have that part functional to make something useful.

    I'm halfway done with it, plugin will be up in a few hours then i'll try to see if i can do something with the loading time...

    Cheers, and thanks for testing!

  • You could distribuite DirectX dependencies (.DLLs) to use WebGL in windows

  • If Awesomium won't update or dies, we may take Node-WebKit, it would be useful if is for multiplayer games.

    JohnnySheffield Is possible to make external data to load resource files?

    I believe EXE shouldn't be more than 35 mb

  • Joannesalfa

    from wiki: "On Windows with some hardware and driver, WebGL won't work until you copy D3DCompiler_43.dll and d3dx9_43.dll to node-webkit's directory, or install DirectX redistributable. For license reasons we cannot ship those DLLs."

    So it actaully works out of the box, but not on all hardware. I haven't look at the licenses to see if we can distribute them freely, but of node-webkit can't ship them so i don't think it's an option.

  • Joannesalfa

    from wiki: "On Windows with some hardware and driver, WebGL won't work until you copy D3DCompiler_43.dll and d3dx9_43.dll to node-webkit's directory, or install DirectX redistributable. For license reasons we cannot ship those DLLs."

    So it actaully works out of the box, but not on all hardware. I haven't look at the licenses to see if we can distribute them freely, but of node-webkit can't ship them so i don't think it's an option.

    JohnnySheffield maybe it could reduce startup time, i'm not sure if it's true.

  • Try Construct 3

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

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

    "is possible to make external data using node-webkit to load resource files?"

    I don't understand, could you explain? But if chromium or node.js can do what you want, in theory node-webkit should make it happen!

    As for the size, i think we cant get it under 48 mb beacuse the nw.exe, .dll's and .pak file are that size. If you add your own .nw file it can only go up! It's an issue, i know.

    But we can't expect for it to be small, it's an .exe with node and chromium included so it must be big. Also size is not an issue beacuse it's an .exe, not a mobile game!

  • I compared between Awesomium and node-webkit,

    i must say node-webkit's performance is superior than Awesomium!

  • Does this use directx? lols, that was so annoying with Construct Classic, had to install directx on every computer for it to work.

  • Does this use directx? lols, that was so annoying with Construct Classic, had to install directx on every computer for it to work.

    alspal Most AAA games use DirectX, otherwise this download file doesn't include DirectX and i run this game very fine, it looks like it's using OpenGL

  • alspal

    I don't think so, but for some graphic cards two dll's form direct x are needed. I believe if you can run chrome & webgl in it on your computer, this should work too!

  • Joannesalfa

    "is possible to make external data using node-webkit to load resource files?"

    I don't understand, could you explain? But if chromium or node.js can do what you want, in theory node-webkit should make it happen!

    As for the size, i think we cant get it under 48 mb beacuse the nw.exe, .dll's and .pak file are that size. If you add your own .nw file it can only go up! It's an issue, i know.

    But we can't expect for it to be small, it's an .exe with node and chromium included so it must be big. Also size is not an issue beacuse it's an .exe, not a mobile game!

    JohnnySheffield

    Well, what if the complex game is more than 100 mb? it could take a lot of time to startup.

    It would be nice if the dependencies would separate from the EXE like chromium binary and some DLLs, the startup could load external resource files like Awesomium does.

  • Joannesalfa

    Ok, i see what you mean but that's currently out of my league...

    We must consider that node-webkit is 0.3.5 version and little over a year old. I hope it will get better in time!

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