Hacker News new | ask | show | jobs
by JohnTHaller 4337 days ago
We used node-webkit with a portable launcher (to contain registry entries and keep settings with the app on Windows) to make 2048 Portable over at PortableApps.com: http://portableapps.com/apps/games/2048-portable

It was a bit of an experiment to see how well it worked... and IF it worked. We compressed some of node-webkit with UPX to shrink it down without compressing all of it and sacrificing performance. It works pretty well though is a bit buggy. We already have a couple web games that are planning to use it to reach a wider audience (since we have a few millions users).

1 comments

Can you elaborate on compressing node-webkit with UPX? I've got a nw app which feels somewhat fat at ~70mb and shaving some of that down would be of interest to me.
Sure. Our release of 2048 Portable 2.1 has node-webkit 0.9.2 slimmed down from about 59MB to about 23MB. We'd originally tried packing it to maximum using brute since it's so large for the purpose but found that nrv2e worked best with everything. It's not surprising as we usually recommend that for most purposes. It's the best balance of size, speed, and decreased false positives in antivirus apps (LZMA seems to increase false positives).

You can use our PortableApps.com AppCompactor to compress all DLLs and EXEs in a directory and sub-directories with your choice of UPX levels easily without needing to use the command line on them all. As a bonus, it runs UPX with -t after each compression to test it and ensure it works properly. As always, you'll need to double check that it runs properly as some DLLs don't like being UPX compressed. But node-webkit seems to run quite happily. Grab AppCompactor here: http://portableapps.com/apps/utilities/portableapps.com_appc...

We also experimented a bit with compression level of the .nw file but I can't recall exactly what compression level in 7-Zip we wound up settling on at the moment.