JohnnySheffield's Forum Posts

  • Yup i noticed that too, but haven't got time to check that, sometimes it won't quit, sometimes goes smoothly and quits instantly... not sure where's the problem

    i'll check it tomorrow or sometimes when i got time :D

  • Haven't tested but i believe it should work. There was no warnings in the wiki about cross-platform problems on the stuff i implemented, but here will probably be some problems, eg:

    bug # 154

    Menu icon has no effect on Ubuntu bug linux

    bug #142     

    Frameless app windows are not resizable on Linux bug linux

    and mac:

    bug #170

    etc.

  • Plugin "finished", you can download the plugin here

    and find more info on the plugin here

    Download demo with some of the functionality here

    This plugin is for the basic stuff, window size, title, clipboard, etc...

    Hopefully i'll get some time these days to dig in deeper and write some node.js module plugin for construct, i'm thingkin fs, to get access to local files, but maybe go for socket.io server side to get some multiplayer stuff rolling in the construct 2. It's nice to dream... :D

    Please test, post your ideas and anything that crosses your mind!

    Cheers! <img src="smileys/smiley41.gif" border="0" align="middle">

  • 12/12/2012

    edited the plugin; You can use it now in your html5 apps, it won't break the project, eg. if you are in a html5 app and try to call an node-webkit action, project won't break. (so it follows the "code once, export everywhere" mantra)

    Also, added the "IsOnNodeWebkit" condition so you can tell in what environment are you running on.

    Added the "open window" action so you can open additional windows. it accepts two parameters: URI and specs;

    URI can be either some url, eg "http://www.google.com", or it can be URI to another .html file in your app, so if you have an folder in your app package called "AnotherConstructProject", and in it another exported C2 project, you can open it in another window eg. "AnotherConstructProject/index.html". Just remember to add it to your package.json, so beneath the "main:'index.html'" line add another line "second: 'AnotherConstructProject/index.html'" , and you're set to go!

    specs are anything that goes in the "window" section of the package.json; eg. "screenX=0,screenY=0,width=100,height=100".

    re-download, add suggestions, and enjoy!

    7/12/2012

    Edited the plugin, you can use action "close window" and little red x, it won't break, but i had to put deprecated property on the "onClose" trigger because it caused problems. Also, bumped version to 1.1.

    Re-download plugin if you like!

    7/12/2012

    Edited the plugin, action "quit" now quits the app properly and instantly.

    BUT, when you try to close window either with a red X or action "close window" it doesn't work. It's just a problem with catching the "onClose" event and managing the closure properly, but i'll check into that tomorrow. For now, use the "quit" action to close the app.

    Re-download the plugin, uploaded a new version

    Exported a new demo with faster loading time

    Did some minor changes to .capx

    __________________

    Download the plugin here

    And the demo here

    And the .capx here

    Conversation about and more info on node-webkit here

    Plugin is still in development and heavy testing. Please test and be careful!

    I really don't want to copy and paste bunch of text so read about implemented stuff

    here (window related stuff)

    and

    here (App related stuff)

    and

    here (clipboard related stuff)

    and

    here(Shell related stuff)

    Final note: for succesfuly creating an .exe you'll have to play with package.json, it's nothing scary, just a bunch of variables you can set so that .exe knows how to run.

    Read about package.json for node-webkit here

    Cheers!

    EDIT: forgot to mention, plugin exports an example package.json file for you. After exporting your project, open package.json file in your favorite text editor and edit it as you need!

    For exporting to .exe check here

  • Fullscreen, no chrome [window borders] - i'll release a plugin in a few hours with this possibility sorted out

    Custom icon on windowed game [not the HTML5 logo] - edit the package.json to achieve this

    ----

    Leaner exe with separate data files

    Cruft removal from exe [unused icons and cursors]

    Mouse capture / hide / replace cursor

    ---- <img src="smileys/smiley35.gif" border="0"> me if i know :) ------

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

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

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

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure what's happening there, I haven't used cocoon.js so probably I won't be as much of help with this issue.

    I looked at cocoon.js documentation, and they don't mention support for socket.io, just websockets so I,m not sure can we edit this plugin to work with cocoon.js.

    Maybe try to use the websocket version here (scroll to the websocket version)

    But i cannot guarantee will it work with new version of construct or cocoonjs because out to s an old plugin.

  • Link gives me 404?

  • Cool, I'll just add node-webkit to the never ending list of new technologies I'd like to learn and utilize!

    But it really looks promising!

  • I can say because i'm already using it.

    kiyoshi

    Have you succesfully exported construct 2 project to .exe with node-webkit?

    Can you provide more info on the proccess?