How do I Reduce NWJS file export size

Get help using Construct 2

Post » Wed Jul 13, 2016 3:58 pm

So I have a small program here that uses a total of 7.2 MB "Only has 3 small images" & the Approximate download size according to C2 is 850 kb with 88 Events, yet when I export my project using the latest version of C2 + NWJS the non-compressed file size is 101 MB.. Even compressed into a .rar file 32 MB is far too much for what my little program is.

Is this a bug ? or is exporting with NWJS completely useless with C2 ?
B
81
S
37
G
22
Posts: 89
Reputation: 17,296

Post » Wed Jul 13, 2016 4:20 pm

You might look at Windows 10 Universal apps.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Wed Jul 13, 2016 5:08 pm

NW.js bundles the Chromium browser engine, which is how it works, but it adds quite a lot to the download size.

If you have a small project which you're not selling, you can just export it with HTML5 and run it in the browser where it has zero overhead. If it's a big substantial game for the likes of Steam, even 100mb is a tiny size by the standards of PC gaming. GTA V is 65GB!
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Wed Jul 13, 2016 7:28 pm

Ashley wrote:NW.js bundles the Chromium browser engine, which is how it works, but it adds quite a lot to the download size.

If you have a small project which you're not selling, you can just export it with HTML5 and run it in the browser where it has zero overhead. If it's a big substantial game for the likes of Steam, even 100mb is a tiny size by the standards of PC gaming. GTA V is 65GB!



It's a simple stat calculator with 88 events and 3 small images o.o
It's not a game by any means I just can't really see how 3 Images with 88 events = 101MB :/
B
81
S
37
G
22
Posts: 89
Reputation: 17,296

Post » Wed Jul 13, 2016 10:13 pm

So why not put it in a browser where there's zero overhead? NW.js is designed for large desktop games.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Wed Jul 13, 2016 10:17 pm

JaredX wrote:It's a simple stat calculator with 88 events and 3 small images o.o
It's not a game by any means I just can't really see how 3 Images with 88 events = 101MB :/


Your program - 1 MB, NW.js wrapper executable (Chromium browser engine) - 100MB. (Not exact, just for example)

Basically, most people already have a browser installed so you don't need to bundle the browser engine. Just export as HTML 5 and it will run in whatever people already have installed.

The main purpose of NW.js is to create an executable file for windows on a controlled platform. So for you, you don't really need NW.js and thus your original statement is correct in a way. Doesn't mean it is worthless for others who find it useful though.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Thu Jul 14, 2016 8:37 am

Ashley wrote:So why not put it in a browser where there's zero overhead? NW.js is designed for large desktop games.


Well I understand that C2 is design for large desktop games but I guess it just goes over my head when I see nearly nothing in the project than on export seeing 101MBs lol..

Also I wanted to export as a small desktop application, mainly because text objects seem to look better when I am not forced to use any of that fullscreen scaling crud..

@Oosyrag Well I meant it was worthless in the context of creating small desktop applications, but you guys are telling me that there is basically no way to do that with C2, which is fine.
B
81
S
37
G
22
Posts: 89
Reputation: 17,296

Post » Thu Jul 14, 2016 9:21 am

NWjs still needs ALL of the NWjs requirements to run your exported project. It doesn't matter if your project files are 1Mb or 1Gb... NWjs will always make an additional 100Mb roughly to your export, because it has to include all of the NWjs runtime files to make your project work.

It's been explained 3 different times already in this thread - NWjs is 100Mb minimum, as it doesn't export to naitive Win32/64 EXE format. It's using a wrapper.

As Ashley said, why not just make it into a HTML5 export? It will then just open in any browser when you click the index file - and it will be tiny!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Thu Jul 14, 2016 9:53 am

JaredX wrote:mainly because text objects seem to look better when I am not forced to use any of that fullscreen scaling crud..

It's more or less identical to Chrome, because it's using the same browser engine. If you resize the window it does the same stretching that the browser does. If you don't like it, you can always use fullscreen mode "off" and it won't scale in the browser either.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests