[Feature Request] It's Time To Polish NW.js Exporting

Discussion and feedback on Construct 2

Post » Sun Aug 21, 2016 1:01 pm

Sethmaster wrote:Just curious, how long does it take OP to export his game into nwjs?
It take me less than several minutes to export mine as reference and I have zero issues with the process.

On my PC and laptop the spritesheeting process takes about the same time: 15-20 minutes.
However after optimizing it and temporally removing all my Full-HD art it got reduced to: 5-10 minutes.

The Packaging mostly takes up to 30 minutes on my PC, and a lot less on my laptop.
Don't get me wrong, exporting time is still acceptable. It just gets annoying when I have to test
out events with Steam4C2 (I assume it would be the same with Greenworks), which don't work in preview.

Tokinsom wrote:In these threads Ashley talks about in-editor spritesheeting being a goal for C3, and it requiring architectural changes that won't happen in C2. This was all regarding preview times but it affects export as well. ...

Thanks, I either missed it or forgot about it. :?
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730

Post » Sun Aug 21, 2016 2:18 pm

Alright guys this is ridculous...
I thought for the sakes of testing Steam4C2 within the Linux & OSK builds, I should downgrade to NWjs v0.14.0.
Now to the ridiculous part, my packaging time got reduced to ~2 minutes. :shock:

So either the NWjs team did something terribly wrong in 0.16.0 or it is C2's fault.
I don't want to pass the blame to someone specific but one of them did something wrong for sure.
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730

Post » Sun Aug 21, 2016 2:46 pm

The NW.js exporters could indeed be a lot better. Adding the steam dlls and the txt to every one of the builds is annoying and time consuming when testing. I know Scirra can't just distribute the dlls but I'd love if I could point my steamworks folder to Construct 2, so it could get the dlls from there and use the in the exported games. Also the appid txt file.
B
123
S
43
G
41
Posts: 846
Reputation: 28,204

Post » Mon Aug 22, 2016 5:46 am

andreyin wrote:The NW.js exporters could indeed be a lot better. Adding the steam dlls and the txt to every one of the builds is annoying and time consuming when testing. I know Scirra can't just distribute the dlls but I'd love if I could point my steamworks folder to Construct 2, so it could get the dlls from there and use the in the exported games. Also the appid txt file.

It would be nice if we could set up a folder in the export window for files like this and during packaging, C2 would copy it's content to the exported folder automatically.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Mon Aug 22, 2016 7:45 am

glerikud wrote:
andreyin wrote:The NW.js exporters could indeed be a lot better. Adding the steam dlls and the txt to every one of the builds is annoying and time consuming when testing. I know Scirra can't just distribute the dlls but I'd love if I could point my steamworks folder to Construct 2, so it could get the dlls from there and use the in the exported games. Also the appid txt file.

It would be nice if we could set up a folder in the export window for files like this and during packaging, C2 would copy it's content to the exported folder automatically.


I thought you could it already by just dumping whatever you want in NWjsForC2 win32 folder or any folder inside.
Anytime you export the NWJS version, anything inside will be included in the final release.

Including the folder and files setup you made beforehand.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Mon Aug 22, 2016 10:23 am

Sethmaster wrote:
glerikud wrote:
andreyin wrote:The NW.js exporters could indeed be a lot better. Adding the steam dlls and the txt to every one of the builds is annoying and time consuming when testing. I know Scirra can't just distribute the dlls but I'd love if I could point my steamworks folder to Construct 2, so it could get the dlls from there and use the in the exported games. Also the appid txt file.

It would be nice if we could set up a folder in the export window for files like this and during packaging, C2 would copy it's content to the exported folder automatically.


I thought you could it already by just dumping whatever you want in NWjsForC2 win32 folder or any folder inside.
Anytime you export the NWJS version, anything inside will be included in the final release.

Including the folder and files setup you made beforehand.

It's true that you can go to NWjsForC2 folder and add anything there but the steam dlls must be inside the package.nw zip file, and it's C2 itself that zips the game files into it so there's no way of doing that.. so each time you have to test your game on Steam, you have to manually add the dlls to each OS' package.nw file :(

Also keep in mind that, if you also make DRM-free versions of your game (which is my case), even if you could add the steam dll to the NWjsForC2 folder, you'd have to go back and remove it manually anyway.
B
123
S
43
G
41
Posts: 846
Reputation: 28,204

Post » Mon Aug 22, 2016 10:32 am

...or just add them in your project as external files.... (at least it works with my plugin)
Image
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Aug 22, 2016 10:45 am

TheRealDannyyy wrote:The Packaging mostly takes up to 30 minutes on my PC, and a lot less on my laptop.

Jeez, that sounds like your system is running out of memory and swapping solidly for 25 minutes or something. IIRC the packaging step consists solely of creating package.nw, which is basically adding all your project files to a zip. So it shouldn't take significantly longer than doing the same from Windows. I'd imagine it's limited by your hard disk write speed. It also doesn't compress any NW.js files so the NW.js version should have no impact on this at all.

You could try disabling antivirus/Windows Defender in case that is slowing it down (AV may scan everything written to disk in real-time).

30 minutes is extreme and sounds like some kind of fault condition (or poor hardware? :-\) but assuming export can finish in <5 minutes, that seems reasonable to me - I never thought anyone would export regularly, you do all your testing from C2's preview mode then you export once for publishing, right?
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Mon Aug 22, 2016 3:25 pm

Ashley wrote:Jeez, that sounds like your system is running out of memory and swapping solidly for 25 minutes or something. IIRC the packaging step consists solely of creating package.nw, which is basically adding all your project files to a zip. So it shouldn't take significantly longer than doing the same from Windows. I'd imagine it's limited by your hard disk write speed. It also doesn't compress any NW.js files so the NW.js version should have no impact on this at all.

You could try disabling antivirus/Windows Defender in case that is slowing it down (AV may scan everything written to disk in real-time).

30 minutes is extreme and sounds like some kind of fault condition (or poor hardware? :-\) but assuming export can finish in <5 minutes, that seems reasonable to me - I never thought anyone would export regularly, you do all your testing from C2's preview mode then you export once for publishing, right?

My hardware is surely counting as "old", compared to today's standards (DxDiag) but it is more powerful than the hardware inside my laptop. I have to admit though, having Chrome (Video Stream) + Steam + C2 Export running at the same time, might have an impact on the exporting time.

The only thing that I still don't understand is, why NWjs 0.14.0 is doing the job so much faster than the updated version, it just makes no sense to me.
I'm using Avira Anitvirus which is almost never complaining about anything I do and I also let C2 function over the firewall, if that helps in any way.

I'm not exporting that frequently, just sometimes to test out multiplayer features with my friends, that's why an exporting time of 30 minutes is still acceptable but nonetheless could be improved with separated exporting I think.

I will keep going with NWjs14 and give NWjs17 a shot, when it comes out to see if it brings any change.
For now, I really hope that you could maybe surprise us with some NWjs enhancements in one of the future C2 updates.
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730

Post » Mon Sep 12, 2016 3:32 pm

MadSpy wrote:...or just add them in your project as external files.... (at least it works with my plugin)
Image


Doh, that sounds like an easy fix. I take it it doesn't it cause any problems to have dlls for all OS'es in all exports?

Ashley wrote: I never thought anyone would export regularly, you do all your testing from C2's preview mode then you export once for publishing, right?


I do test the game in NW.js' preview mode, but I also like to test it after it's exported on different computers and often times I decide to change something or find a bug. So I have to go back to C2, export it again and add all the dlls again.
B
123
S
43
G
41
Posts: 846
Reputation: 28,204

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: SaRaB and 6 guests