Page 17 of 19

Re: [UPDATED: 05.09.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Fri Dec 08, 2017 4:32 pm
by bclikesyou
TheRealDannyyy wrote:
bclikesyou wrote:Image

Just updated to the nw.js 27.0 and I'm getting this error on preview. I'm guessing it's because of the Steam4C2 plugin I'm using? I removed it from the project but it still happens.

EDIT: I started a new project which previewed fine with nw.js. So I'm guessing it must be some third party plugin in my project.

Can reproduce, the plugin seems to be at fault. Works fine when exporting the game.
Reported here: nw-js-plugin-broken-in-preview-v0-27-0_t198544


Dude you're a legend. I totally forgot to add the nw.js plugin in my empty project test. Good call on that. Reproducing it over here as well.

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Mon Dec 11, 2017 7:09 pm
by TheRealDannyyy
Updated the Roundup with the following changes [11.12.2017]:
  • <Added> How To: Workaround Steam Overlay Not Appearing (Constant Refresh)
  • <Added> How To: Workaround Steam Overlay Not Appearing (In-Process)
  • <Added> How To: Open Multiple NW.js Preview Windows
  • <Unresolved> NW.js Window Size Bug (Link)
  • <Unresolved> NW.js Mouse Pointer Problem When Right-Clicking (Link)

Cheers!

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Thu Jan 25, 2018 8:42 pm
by JhomasJhomas
Linux NWjs Webfonts Problem & Solution:

Problem:
When using webfonts with NWjs on Linux, the fonts don't apply & everything is times new roman (or your computers default font)

Why:
This is because for some reason on Linux when extracting the font files they will be downcased (ie Fun-Font.woff -> fun-font.woff).

Solution:
To fix this, simply rename your fonts (and the names in the associated css file) to be all lowercase in the first place!

Webfont tutorial:
https://www.scirra.com/tutorials/237/ho ... fonts#h2a6

Notes:
I dont really know if this is a Linux or NWjs thing, but the workaround is easy enough...

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Fri Jan 26, 2018 5:28 am
by TheRealDannyyy
JhomasJhomas wrote:Linux NWjs Webfonts Problem & Solution:

Problem:
When using webfonts with NWjs on Linux, the fonts don't apply & everything is times new roman (or your computers default font)

Why:
This is because for some reason on Linux when extracting the font files they will be downcased (ie Fun-Font.woff -> fun-font.woff).

Solution:
To fix this, simply rename your fonts (and the names in the associated css file) to be all lowercase in the first place!

Webfont tutorial:
https://www.scirra.com/tutorials/237/ho ... fonts#h2a6

Notes:
I dont really know if this is a Linux or NWjs thing, but the workaround is easy enough...

Doesn't Construct 2 lowercase all filenames from external files on export by default?
I remember it doing that but if not I will add this as a workaround soon.

Thanks for the heads up!

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Tue Jan 30, 2018 10:57 am
by maxlive2010
Good Job @TheRealDannyyy;
Global.gc (); only unload the audio from memory?

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Tue Jan 30, 2018 11:29 am
by TheRealDannyyy
maxlive2010 wrote:Good Job @TheRealDannyyy;
Global.gc (); only unload the audio from memory?


Thanks and Global.gc (); is actually the same as pressing the bin icon in the browser console.
Basically everything that's in the queue (mostly audio) will be unloaded instantly.

It's a very powerful feature which unfortunately doesn't get enough attention from NW.js users.

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Fri Feb 02, 2018 1:34 am
by jayderyu
With NW.js is there a way to check for parameters. For example "nw.exe console-on" where a param can enable a console.

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Fri Feb 02, 2018 11:08 am
by TheRealDannyyy
jayderyu wrote:With NW.js is there a way to check for parameters. For example "nw.exe console-on" where a param can enable a console.

I asked Armaldio for help regarding this and he managed to figure out the code and gave me THIS example.
It's fairly simple to use and makes it possible to check for a specific command line argument to enable something like a "devconsole" in your games.

(Great feature for Steam by the way, which makes it possible to define "launch options" in the properties menu. Feels just like enabling the ingame console for Half Life in the old days. 8-) )

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Sun Feb 04, 2018 3:44 am
by jayderyu
@TheRealDannyyy
Thanks, that helps a lot.

Re: [UPDATED: 11.12.2017] The Big NW.js Roundup - Tips & Tri

PostPosted: Wed Feb 14, 2018 1:18 am
by TheRealDannyyy
Image
  • <Added> How To: Fetch & Make Use Of Command-line Arguments
  • <Other> Cleaned up the topic and simplified stuff (no walls-of-text anymore)

Cheers!