Extreme RAM usage by C2 in large project nwjs export.

0 favourites
  • 5 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • Hello All,

    Anybody here also noticed very high RAM usage in their nwjs exports?

    The export weighs in at circa 900Mb. The moment the assets unpack and the game loads, it at once takes up 1,5 GB RAM and that's on the splash/loader screen, which has only 2 events (on start of layout exec javascript to kill/disable rightmouse and f12 context/dev menus). Then when the title screen load it takes 2GB of RAM The estimated RAM for largest scene/layout in the project is 400MB.

    Is this normal? Would appreciate input and feedback regarding this matter

    Cheers!

    UPDATE! Resolved

    Switched to nwjs27.2 and Ram usage went down by circa 40%

    This is really bugging me. My problems with the project started when I started messing around with different nwjs versions. The game was working flawlessly up until January-I was showing it at expos and tradeshows, with the export running non stop for multiple hours every day. Sometimes it would throttle/get slowdowns/start to stutter but that would be usually after at least 4-5 hours of extensively playing the build.

    Then I added the Steam4C2 plugin. Up unitl then the project was exported with nwjs 15. To get the newest version of the plugin I had to update nwjs(to nw 27). And that's when "the fun" started. I seriously doubt I added a performance killing event(I did however add many new animations to existing enemies and the hero-however, the estimated memory use stayed the same). After that, exports would get the stutter/slowdown after 20 minutes of gameplay. Reverted to nwjs 15 and it would be better but for around 1 hour(instead of the previous minimum of 4-5 hours). What's even more bizzare-I suddenly started having the black flickering issue (mentioned in the nwjs roundup) which was non present before and had to use the --disable directcomposition arg. Went down to 13-2, performance was even better, but as noted in the topic at hand, RAM usage went up. This is a bit puzzling

  • RAM is dependent on the size of the window, aka if you're native resolution is 3000 x 2000, it's going to use more RAM if the screen is maximized than if your resolution was 1920 x 1080 maximized.

  • https://www.scirra.com/manual/183/memory-usage

    Your images are decompressed in memory. A 900 MB size exported project (made of compressed and spritesheets arranged images) will indeed decompress for more RAM on start of the application/on layout start.

  • Thanks for the info guys!

    Kyatric: Thanks for the link. I checked it a while ago. I don't think this is the case, since I am not using the image compression on project export (image compression set to none). If I got something wrong here, I'd appreciate being corrected Also, I have set downscaling to "low" and "preload sounds" to "no" in project settings(had to do this early on, since the prevs in C2 would often go haywire, as well as set "dont show unique icons")

    ome6a1717: I think this might be the more probable cause. Window size of the game is 640x400 but set to fullscreen(fullscreen scaling high quality). Currently checked with 3000x2000 for the 1.5GB splash->2GB title screen RAM values. This is with the newest build which has undergone some optimisation. A few weeks ago, during test on a desktop in 1080p the older build took around 1.7GB RAM. Will have to check current build with different resolutions and get back with an update.

    EDIT UPDATE: just checked with a different resolution on my current spec (surface book2, i7, 16 GB RAM,win10), tried running export in 1920x1080 and 1920x1200 instead of 3000x2000. Same results: Splash takes 1.5GB RAM and between 2GB on title screen load. Yet, as mentioned on my old desktop, an older less optimised build with the same amount of assets with win7, 8GB RAM, the game takes 1.6GB RAM on title screen load

    As much as I love working with C2, the lack of changing the screen resolution ingame/project is a serious bummer, especially for larger, more taxing projects. Slightly off main topic, but if anybody would have a workaround for this issue, I'd appreciate a link or suggestions etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • UPDATE: RESOLVED. The whole lowdown is in the updated Original Post. Adding it also below:

    Switched to nwjs27.2 and Ram usage went down by circa 40%

    This is really bugging me. My problems with the project started when I started messing around with different nwjs versions. The game was working flawlessly up until January-I was showing it at expos and tradeshows, with the export running non stop for multiple hours every day. Sometimes it would throttle/get slowdowns/start to stutter but that would be usually after at least 4-5 hours of extensively playing the build.

    Then I added the Steam4C2 plugin. Up unitl then the project was exported with nwjs 15. To get the newest version of the plugin I had to update nwjs(to nw 27). And that's when "the fun" started. I seriously doubt I added a performance killing event(I did however add many new animations to existing enemies and the hero-however, the estimated memory use stayed the same). After that, exports would get the stutter/slowdown after 20 minutes of gameplay. Reverted to nwjs 15 and it would be better but for around 1 hour(instead of the previous minimum of 4-5 hours). What's even more bizzare-I suddenly started having the black flickering issue (mentioned in the nwjs roundup) which was non present before and had to use the --disable directcomposition arg. Went down to 13-2, performance was even better, but as noted in the topic at hand, RAM usage went up. This is a bit puzzling

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)