TetroniMike's Recent Forum Activity

  • +1 same problem, it was working about 2 hours ago for me.

  • We need a plugin to interface with Xbox Live API's on PC, in a game using the NWJS exporter. It must support the following using the latest GDK from Xbox:

    1) Xbox Live Sign-in

    2) Achievements

    3) Cloud Saving

    Price negotiable, if you've got the skills and have access to the latest Xbox GDK get a hold of me!

  • Does anyone happen to know of a previous version of NWJS where this bug was not present? scirra.com/nwjs

  • While it is true that we're doing some unorthodox things with this project that aren't necessarily supported, the fact remains that this problem occurs with internally stored sound files too. You can test this in my provided capx, exported to nwjs, by clicking the internal sounds button. The sounds played there are all stored in the capx itself. I'm not sure, but I would guess if this was fixed for internal sound files, it'd also be fixed for externally loaded files as well :)

  • Correct, I tested in both Firefox and Chrome, and this only happens in NWJS.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • TLDR; in NWJS, when playing the same set of sounds over and over again over a period of time, used memory will increase (potentially infinitely) until it affects performance.

    The following pertains to EXE's exported with NWJS from Construct 2. C2 and NWJS are updated to the latest versions.

    When playing audio, it appears that some sounds get "stuck" in memory and stack up over time. After a long time in a complex game with lots of audio, this results in slowing down the framerate.

    I've tested with sound files that are (A) stored in the exe, and (B) stored externally. For external audio, you can use Audio - Unload All to bring memory and framerate back to normal, but using Audio - Unload by name for each sound file does not help.

    I've created a test capx with internal sound files and buttons which manually preload and unload external sound files. There are two buttons which toggle randomly playing these sounds extremely rapidly. One only plays internal sounds, the other only plays external sounds.

    In the following tests I took note of the Memory in MB via Windows Task Manager. There are inconsistencies sometimes when running these tests, but my findings in general are listed below:

    1) CONTROL - Run the EXE and do nothing for 5 minutes.

    Results: Memory starts at 75mb, after 5 minutes memory ends up at 73mb.

    2) Run the EXE, Preload external sounds, Play external sounds rapidly for 5 minutes.

    Results: Memory starts at 72mb, after 5 minutes memory ends up at 92mb.

    Addl notes: Unloading sounds manually (by name) does not decrease memory usage. Unloading ALL sounds DOES decrease memory usage.

    3) Run the EXE, Play internal sounds rapidly for 5 minutes.

    Results: Memory starts at 72mb, after 5 minutes memory ends up at 94mb.

    Addl notes: Unload Sounds (by name) and Unload All Sounds both have no effect on memory.

    Letting the test run longer than 5 minutes shows the memory increase further, I did not see a maximum in my testing.

    This seems minor when looking at this small test EXE, but with a big project with hundreds of sounds effects and music, this becomes a problem where memory can increase in the hundreds of megabytes over 10 minutes of play and negatively affect framerate. In my actual game, memory increased from 200mb to 2200mb over the course of 20 minutes of play, and framerate dropped to 30fps. Using Unload All Sounds fixes the problem temporarily, but I cannot use that during normal play for game audio quality reasons, and Unload Sounds (by name) has no beneficial effect to memory or framerate.

    Capx and audio files:

    drive.google.com/file/d/1iGf_hWjeu6EfqG3XIihX7dJycuROU71_/view

    Put the audio files in a folder titled "data" in the same folder as the exported EXE. Let me know if you have any questions, and thank you for your time.

    Edit: I did some additional testing. It appears that if you Preload external sounds, toggle them on for a few minutes until memory increases noticeably, then toggle the sounds OFF and wait a few seconds, then neither of the Unload commands do anything for the memory. So it appears that the Unload commands only affect currently playing sound files?

    Note: If you'd like to more quickly see results in your test, add "Repeat x times" to the code as shown in this linked image:

    drive.google.com/file/d/1wCN1RGmTJJ-wyAY9le1WU49ipEByRr5p/view

  • Not holding my breath for an answer, I know this is a really niche thing to need, but *bump*

  • There doesn't seem to be any "voices" available in an exported NWjs Linux application, therefore Text to Speech does not work. Any ideas?

    Note: I tested the exported application in Ubuntu 16.04.3.

  • Saw this in my F12 console while testing my game in NW.js... I have very little idea what this means, other than something in the Audio plugin will no longer be supported very soon. Is this something we need to worry about?

    [Deprecation] GainNode.gain.value setter smoothing is deprecated and will be removed in M64, around January 2018. Please use setTargetAtTime() instead if smoothing is needed. See https://www.chromestatus.com/features/5287995770929152 for more details.
    C2AudioInstance.play @ Audio_plugin.js:1689[/code:34mv4s0j]
  • Copied the Video plugin and modified it to be able to return width/height, I'll share it with the forums at some point

  • TLDR; I need to get the pixel width and height of video files.

    My game will have multiple video files of different sizes. I'd like to resize the Video object to match the pixel dimensions of the video that is playing, but it doesn't seem to have a way to get the loaded video file's width and height. Any way I can get this information?

    Thanks

  • NN81: If I did that I'd have to copy the code for each of the three families, instead of one single loop

    dop2000: That's not a bad idea! I think I might be able to use it as a starting point. Thank you!

TetroniMike's avatar

TetroniMike

Member since 18 Sep, 2016

None one is following TetroniMike yet!

Connect with TetroniMike

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies