running layout without a localhost server possible?

0 favourites
  • 6 posts
From the Asset Store
In this template the music plays without looping in your game
  • Is it possible to do? Construct2 is dependent on creating the localhost server, even when it's target platform is nw.js!

    Unfortunately that is the one thing that WINE cannot do - so it's not possible to run layout in linux and mac. Otherwise the editor seems to be very stable and can even export the games. It just takes much more time to export the game and test it and we cannot debug it either.

    So this is a question to Ashley :

    Can we get the editor to run the layout without creating a localhost server? This would be a nice workaround for everyone who wants to use it under Linux before construct3 comes out natively. A tickbox in preferences to disable localhost would be awesome!

    I guess that because it is a html5 game and html5 wont allow some things to work if the files are not on an actual server, the only way to do this is to run it with nw.js. So running a game layout with nw.js should allow to do this.

    Btw here is the bug report I posted at wine's bug tracker:

    https://bugs.winehq.org/show_bug.cgi?id=38245

    The developers dont seem to be all that interested in fixing it. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    So if we can somehow get it to run layout and debug layout without the localhost server, it will make the editor much more useable under wine. Another thing that would be nice is the ability to tell nw.js which platforms to build for. Right now it builds for all platforms,, which takes a long time and creates a much bigger output. While testing the game, or 99% of the time, I would prefer to build it for only the platform I am working on. A nice tickbox to select which to build would be a nice addition to the editor!

  • Doesn't NW.js work? I didn't think it ran a server and could just load files from disk.

    Outside of that, you can't really run projects from disk, because browsers have very strict security rules for files from disk which generally prevent it from starting up the game. Besides, I don't really want to get sucked in to hacking in features just to work around incomplete features in WINE, better that they fix it their end.

  • Ashley

    they say that httpapi has a long road before it works in wine so it wont happen any time soon. C3 will probably be ready before wine devs sort that out as it is also low on their priorities.

    Nw.js c2 compiled (export project) games run beautifully natively under linux. But they take time to compile and it is not possible to debug them.

    When I set my construct2 project's preview browser to NW.JS, and then play the layout, construct2 still creates a server and of course WINE fails because it needs httpapi to work. So NW.js preview (play/debug project) does not work in wine, because it depends on creating a server. There is currently no possible way to preview layout or debug game in construct2 without creating a localhost server.

    Is there a reason nw.js preview depends on localhost? Would it be possible to skip creating the localhost and just previewing the layout with nw.js? after the game is compiled and exported with nw.js, it does not need to create a localhost. So why is construct2 editor so dependent on it for nw.js preview?

    Certainly having the option to skip creating localhost will be useful, not only for linux and mac users running it wine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As I said, I don't really want to get sucked in to making hacky changes because WINE doesn't support something. C3 should bring full official support for Linux. NW.js relies on localhost because it's a simple and elegant way to get NW preview to work: it's just treated like another browser.

  • Ashley > I see. If it's too complicated and hacky then you're right.

    Thank you for developing C3 I hope it's alpha/beta comes out soon. There are certainly a lot of non-windows users who can't wait to get their hands on it

  • Ashley rpg maker mv also uses nw.js and it runs without any effort on linux via wine, because they dont require a local host.

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