Node Webkit - Open another hosted C2 game?

0 favourites
  • 5 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • I noticed that Node Webkit won't open another C2 game as a separate window (in node webkit, not the browser).

    • Only happens for hosted C2 games.

    Does anyone know why?

  • I've narrowed it down to this: Uncaught ReferenceError: require is not defined

    		if (this.isNodeWebkit)
    			window["ondragover"] = function(e) { e.preventDefault(); return false; };
    			window["ondrop"] = function(e) { e.preventDefault(); return false; };
  • There are multiple ways you can create a window in node-webkit, because of security concerns (enabling newly open window access to require enables them access to multiple dangerous settings.) You are probably using the from browser object?

    Probably the newly open window has the 'node-enabled' set to false, to disable access to the node (more accurate, none of the parameters passed, so probably node is disabled by default, thus required not defined).

    You can pass all of the parameters of the manifest format to the new windows:

    var win ='', {
      position: 'center',
      width: 901,
      height: 127
    but mind that we're not doing the, but rather
    I have managed to get multiple c2 projects together in a nw app, but i packed it manually, had custom manifest file, used custom plugin for opening new windows, and it was long time ago. 
    I would recommend to dive in [url=]window[/url] and [url=]security[/url] and [url=]manifest[/url] parts of the wiki for starters.
    edit: sorry, i've written first, then opened your capx second -> i do not get any errors!
  • You're able to play the game when the window opens? (the capx)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I updated to the latest beta and it works again (hate doing that).

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