Guide: Fix Jank in r190+ Node-Webkit Export

Discussion and feedback on Construct 2

Post » Thu Nov 27, 2014 12:10 am

Foreword:

This guide only applies to Windows 32-bit exports (win32). I imagine a similar procedure would work for the other exporters, but I don't have a mac platform available, and I don't have time to go thru this on linux.

64 bit exports are going to jank; there is no 'older' version for them since 64 bit support is a recent development.

To summarize: we are going to replace the new, 'jerky' version of node-webkit (0.11.1) with the older, more stable version (0.10.5) that shipped with the last stable, r184. If you wish to reverse this change later on, just reinstall 'nodewebkit-for-c2.exe'.

A. I've updated to r190+...and all my node-webkit exports jank!

You need an earlier version of node-webkit. Get it here:
http://dl.node-webkit.org/v0.10.5/node- ... n-ia32.zip

    1. Extract 'node-webkit-v0.10.5-win-ia32.zip'. Inside are 8 files and a sub-solder "locales". Copy everything EXCEPT "locales", 'credits.html', and 'nwsnapshot.exe'. You should be copying 6 files.

    2. Go to 'C:\Program Files\NodeWebkitForC2\win32'. Should be 7 files there. Select all files EXCEPT 'dxwebsetup.exe'. Delete them, and paste in the 6 files copied from "node-webkit-v0.10.5-win-ia32".

    3. You're done! Bring up C2 and export a project as node-webkit. Then, go to the win32 subfolder for your exported project, and launch the '.exe' file with your project's name. It should run smooth as silk.

    NOTE: To re-iterate: 64 bit exports are going to jank; there is no 'older' version for them since 64 bit support is a recent development.

B. I want to upgrade to r190+ from r184...but I don't want my node-webkit exports to jank...


    1. We're going to skip re-downloading the older node-webkit files, since you already have them. Go to 'C:\Program Files\Construct 2\exporters\html5\node-webkit', select everything in the folder, and press copy.

    2. Now, create a folder called "Node-Webkit for C2 - r184" somewhere else, and paste the copied files into it.

    3. Take a deep breath. Then, install 'construct2-r190-setup.exe' and 'nodewebkit-for-c2.exe'.

    4. Back to "Node-Webkit for C2 - r184". Go to the subfolder 'win32'. Now, select everything here EXCEPT subfolder "locales" and copy it. You should be copying 7 files.

    5.
    Go to 'C:\Program Files\NodeWebkitForC2\win32'. There should be 7 files in it. Select them all, delete them, and paste in the files copied from the r184 folder.

    6. You're done! Bring up C2 and export a project as node-webkit. Then, go to the win32 subfolder for your exported project, and launch the '.exe' file with your project's name. It should run smooth as silk.

    NOTE: To re-iterate: 64 bit exports are going to jank; there is no 'older' version for them since 64 bit support is a recent development.

Hopes this helps some people out. :)
Last edited by TiAm on Tue Jan 06, 2015 11:19 am, edited 3 times in total.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Thu Nov 27, 2014 12:49 am

Well, related to node webkit if anyone is interested about how building works, this old tutorial of before the support was built in (the good ol' awesomium times), if it still works (it should), that may be another alternative, you just export your html, you wrap it up with the older version of node webkit you should be able to find on the internet, that may be less troublesome than making C2 believe you are using the latest one (and also could be applicable outside C2), unless C2 only activates the node webkit api depending on the chosen exporter maybe.

https://www.scirra.com/tutorials/417/ou ... ode-webkit
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Thu Nov 27, 2014 12:54 am

@Aphrodite

Actually, swapping out the new node for the old one is pretty straight forward; just delete the new files and copy the old ones in. I just tried to cover every little step, in case newer users needed to do this. And, of course, as with any 'hack', YMMV :mrgreen:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Thu Nov 27, 2014 1:16 am

It is just that little hacks like this are working, but the fact people have trouble with the duality of C2 and node webkit is not a very good sign, thus I wanted to share somethings that sort of shows how that works behind the scenes, not that "in topic" now that I think about it (even though it shows that you just bundle files and parameters within node webkit to define what happens, which assure there is no reason for it to fail).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Thu Nov 27, 2014 2:14 am

It's a good point Aphrodite. I've been meaning to look into manual packaging of node-webkit app's, but ATM it's a way's down on my priority list. I want a finished project with a solid base of gameplay and performance before I dive into micro-tweaking. I certainly don't want to have to go thru all that fuss when I just want to preview a project. But for my final release? Yeah, manual export would certainly be worth a look.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Thu Nov 27, 2014 2:15 am

Works in OSX 32 too?
B
15
S
3
G
4
Posts: 32
Reputation: 3,655

Post » Thu Nov 27, 2014 2:17 am

Good work, @TiAm. I kind of hope that this is made easier in future.... :)
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Thu Nov 27, 2014 2:45 am

@Ulpo media

I don't know, don't have a Mac. I assume the same approach would work. If you try it, let us know.

@Colludium

Me and you both... :roll:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Thu Nov 27, 2014 3:10 am

I know that we rely upon 3rd party wrappers or browser for - everything html5.... But I am pretty sure that if we contracted out our export to desktop option and it broke over night then the message would not be to wait until things improve (indeterminate time frame, could be 2-6 months) - a rapid reversion to what worked before would be implemented whilst the problem was addressed. I could not imagine this happening with Unity, for example. This should be no different IMO; I don't understand how a high standard of product can be confused with using a wrapper's latest update.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Thu Nov 27, 2014 3:15 am

It's new! It must be better!

...Right? :roll:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Next

Return to Construct 2 General

Who is online

Users browsing this forum: lukewasthefish and 3 guests