Node-webkit & Construct 2

Discussion and feedback on Construct 2

Post » Wed Dec 05, 2012 2:40 pm

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. JohnnySheffield2012-12-07 23:59:16
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Dec 05, 2012 5:49 pm

thanks you I make a try
B
61
S
9
G
7
Posts: 176
Reputation: 8,824

Post » Wed Dec 05, 2012 10:08 pm

I downloaded and did some testing.
Start-up time is quite excessive.

The executable launches right away, but then leave 25 seconds staring at a black window before game loads.

I used ResourceHacker http://www.angusj.com/resourcehacker/ to browse through the SpaceBlaster.exe file.

It is full of cruft that, as far as I can tell, are not used in this application. Numerous icons for volume control, printing, pause and play controls, and more...

109 superfluous graphic resources that are bundled with the exe file. Do you have any idea why that may bee the case?

See for yourself:
Download ResourceHacker (link given)
Open SpaceBlaster.exe with ResourceHacker
Browse through "BINDATA"

Odd.
B
7
S
3
G
3
Posts: 11
Reputation: 2,569

Post » Wed Dec 05, 2012 10:43 pm

@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!
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Dec 05, 2012 11:05 pm

You could distribuite DirectX dependencies (.DLLs) to use WebGL in windows
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Dec 05, 2012 11:12 pm

If Awesomium won't update or dies, we may take Node-WebKit, it would be useful if is for multiplayer games.

@JohnnySheffield Is possible to make external data to load resource files?

I believe EXE shouldn't be more than 35 mbJoannesalfa2012-12-05 23:20:17
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Dec 05, 2012 11:18 pm

@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.
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Dec 05, 2012 11:21 pm

[QUOTE=JohnnySheffield] @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.[/QUOTE]


@JohnnySheffield maybe it could reduce startup time, i'm not sure if it's true.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Dec 05, 2012 11:23 pm

@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!
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Dec 05, 2012 11:32 pm

I compared between Awesomium and node-webkit,

i must say node-webkit's performance is superior than Awesomium!
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Next

Return to Construct 2 General

Who is online

Users browsing this forum: erandi1984 and 9 guests