TheRealDannyyy's Recent Forum Activity

  • > I'll try and get audio unloading in the next build...

    >

    It would be awesome to see it as an official feature. TheRealDannyyy thank you for your hard work as well.

    Thanks to BackendFreak, I'm just the "publisher" for this one.

    TheRealDannyyy Thank you for this, very helpful! Hopefully, will find it`s way into an official update too.

    Out of interest how does memory management / garbage collection of video work? - is it like image files with automatic garbage collection on layout change or more like audio? Could we further save ram use by unloading video from ram after viewing?

    I've honestly never used the video plugin and I'm using C2 for a couple of years now.

    I think memory management for videos is handled by the "destroy" action?

    Judging by THIS changelog I assume that destroying the video, unloads the memory used for the playback.

    The best way to make sure that it is, is by doing measurements on your end and see if memory usage goes down when destroying the object or changing the layout.

  • Well here it is StaticCloud, I hope it fits your needs.

  • * moved to a more relevant section. If you consider this plugin complete then let me know and I'll move it to the Completed section.

    Surething do as you like @zenox98, it's finished/complete. (Sorry for posting it in the wrong section.)

    We've just called it experimental for testing purposes but private tests were all positive with next to no bugs found.

    Ashley Sorry if I'm tagging you too much but here it is, feel free to share feedback.

  • MUST READ:

    Audio Unloading features have been added for Construct 2 releases starting from r242,

    it's highly recommended to use the official plugin instead of this one!

    Description:

    The AudioPlus object plays back audio just like the official plugin does but it also

    comes with a set of highly requested enhancements, more details can be found below.

    Plugin Download & Example:

    The AudioPlus Plugin: Download | The AudioPlus Example: Download

    Features:

    <Action> Unload all sounds

    Clears the buffer of all preloaded sounds.

    <Action> Unload sound

    Clears the buffer of a single audio file.

    <Action> Unload by name

    Clears the buffer of an audio file by name.

    <Action> Unload by tag

    Clears the buffer of audio files by tag.

    How It Works & Limitations:

    Releasing/Unloading audio files from memory isn't as easy as you would expect it to be.¹

    Javascript is using something called "Garbage Collector" to release not needed (not used anymore) data from memory.

    In order to release audio from memory, we're required to basically mark the audio files that

    we would like to release as "garbage" and wait for the Garbage Collector to do the work.

    What this means for C2 developers is that releasing audio from memory will never happen

    instantly and will always come with a delay, the delay varies and can take up to 10 seconds.

    Advice & Best Practices:

    "Unload All Sounds" will unload all sounds from memory by using a single action.

    You can also simply select specific soundfiles that you would like to unload from a dropdown list.

    It's also possible to unload specific sounds by using a tag or the actual filename.

    The AudioPlus plugin will automatically stop the playback of the audiofiles before unloading them.

    Please keep in mind, even with the implemented stopping mechanism which stops the active playback

    of audio files, it's recommended not to unload audio files which will still be used in the next layout.

    Basically only unload audio files which are not required anytime soon!

    Credits & References:

    ¹Detailed information about JS memory management (

    Mozilla-Memory Management)

    Plugin by

    (Toby R. Wtfgamesgroup)

    Stuff by TheRealDannyyy (

    Subscribe to Construct videos now

    )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, that confirms it's to do with audio memory management. I must point out turning the "preload sounds" option means you are explicitly telling C2 to load and decompress all sounds in to memory on startup, which if you use a lot of sounds, can be a very great deal. But the fact it doesn't release any and still ultimately crashes is a problem. I'll try and get audio unloading in the next build...

    We're about to release our version of the unloading audio feature, this could maybe make things easier on your end.

    However nothing stops you from doing everything by yourself, looking forward to it either way.

  • Updated the Roundup with the following changes:

    • <Added> How To: Workaround Steam Overlay Issues With Letterbox Scaling
    • <Added> How To: Modify/Remove Right-Click Context Menus
    • <Changed> How To: Only Have 1 Process While Running NW.js (NW.js v0.20.0+)

      The recent releases of NW.js also require you to manually disable the crash dumping process. I will add the crash dumping "deactivator" to the roundup as soon as it's out. [?]

    • <Removed> How To: Enable WebGL2 (Experimental Version)

      No longer required since future releases starting from Chromium V56 will have WebGL2 enabled by default. WebGL2 (Chromium V56) will most-likely be released in the stable branch by the end of January.

    Thanks for your suggestions everyone, see'ya!

  • If you go on like this you will end up getting a temporally ban for sure.

    Joke or not, spamming the forums like this is annoying and won't get you anywhere.

    Listen to the guy below, he's got the power around here!

  • It already reboots once a month - it installs Windows Updates every Patch Tuesday.

    Alright sounds good. Thanks for taking your time to answer all those questions of mine.

  • Knowing this explains a lot. I mistakenly thought that audio was loaded per layout like graphic files. TheRealDannyyy Where can we join you in testing this plugin? We may be in a position to help with this fix, if needed.

    It's on the way, we just add some smaller things like unloading audio by name and optimize the code here and there.

    I'll notify you using a tag here when we share the experimental plugin to public. (Probably going to create a topic on Sunday.)

    There are currently some issues with the delay between event execution and the garbage collector, a lot of technical things but we'll try to explain it in a more simple fashion inside the topic. We also hope that Ashley will check it out and maybe put the unloading features inside the official audio plugin, if he's alright with how we handle things.

    Big shoutout to for taking care of creating this amazing plugin!

    Do you have "preload sounds" enabled? Does it work better if you turn that off?

    This is a great solution to at least get the game running but it won't stop the game from reaching the memory limit and crash as a result.

    I believe memory issues with audio also were the reason why Klang only works on 64bit systems. (Not sure if he's found a workaround for it but I think it's still 64bit only.)

    Anyway, I think it's time to address this major flaw of the audio engine and try to find a more effective workaround.

  • TheRealDannyyy -- sorry for taking so long to reply, I don't check the Construct2 site that frequently. Providing a mechanism to support APK expansion files is outside the scope of the XDK and the types of apps we are supporting. It is not something that will be added to the product. For that sort of a feature I recommend you go directly to using Cordova CLI, where you have much more control over the construction of your APK files.

    There is at least one APK expansion file Cordova plugin available (perhaps more) that you might want to experiment with. It likely will not work with our build system, because there appears to be a lot of fixups to your project that will likely fail with our build system, thus Cordova CLI is your best bet.

    Alright, looks like the community has to find a way to deal with this.

    Thanks for taking your time to respond!

  • Ashley, that worked! And I want to applaud your customer service. I spent many hours in a support role, you are top notch!

    It's nice that you consider me as being Ashley (which basically implies that I'm smart) but I have to disappoint you by telling you that my actual name is TheRealDannyyy and I'm just your average C2 user browsing and helping people out on the forums.

  • That template won't record if nw.js States canvas recording not supported

    Make sure you use the latest version of NW.js.

TheRealDannyyy's avatar

TheRealDannyyy

Member since 30 Sep, 2014

Twitter
TheRealDannyyy has 18 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies

Blogs