How to run MULTIPLE INSTANCES of a game exported with NODE WEBKIT

1

Stats

1,986 visits, 2,538 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 15 Aug, 2014. Last updated 19 Feb, 2019

If you export a game using NODE WEBKIT, you will find that you can only run one instance of the game on a single computer at any given time.

This may be fine for what you need, but...

If you're creating a multi-player game and want to run all the HOST INSTANCES on your own server, you'll probably want to use NODE WEBKIT since it takes up less resources, but you'll hit this ONE INSTANCE limitation.

This is because NODE WEBKIT exports have a default setting that deliberately limit the execution to a single instance. Construct2 uses this default export.

Fortunately, you can get around this default by adding a single line of code to a simple JSON text file that's hidden away in the Construct2 exporter folder.

All you need to do is go to the following folder (or equivalent on your computer):

C:\Program Files\Construct 2\exporters\html5\node-webkit

And find the text file:

PACKAGE.JSON (for Linux and IOS) or PACKAGE-WIN.JSON (for windows)

Then you add a single line of text to that file: "single-instance": false,"

We added it near the top, under the VERSION line. It probably works anywhere.

If you do this, your exported NODE WEBKIT file will run unlimited instances.

NOTE - if you upgrade Construct2, your file will get overwritten and you need to add the line of text to it again. If you don't upgrade, it will work for as long as you keep the file unchanged, impacting all your NODE WEBKIT exports.

FINAL NOTE - it would be great if Construct2 supported this directly by giving us a setting that causes this line to be added automatically.

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!