Ejecta memory management testing

0 favourites
From the Asset Store
Manage time and money, plan the best strategy to make all the customers happy in your restaurant, a hotel, cafe, or any
  • Hi all,

    The new Ejecta exporter for iOS currently suffers the same problem as CocoonJS: it will try to load everything on startup, which makes large games take ages to start and possibly crashed if it ran out of memory. Thankfully Ejecta is open source so it can be hacked to the way we want it to work!

    I've come up with a first implementation of memory management for Ejecta. I don't have a lot of experience with iOS development or Objective-C, but I got it working for Space Blaster. However it's important to get real-world testing to make sure it works for everyone's games, many of which are much bigger and more complicated!

    To try it out, download the Ejecta source from my fork here and compile with these files instead:

    (Link removed 20th June 2014. Our code was subsequently merged in to Ejecta so there is no separate repository any more. The main code is available as always from https://github.com/phoboslab/Ejecta)

    In WebGL mode it should have full memory management support, and should be able to release textures from the old layout when moving to a new one. However canvas2d mode in Ejecta still doesn't support least-recently-used eviction like real browsers do, so it won't release textures. As you move through the game it will still accumulate everything in memory and may end up crashing still. Support for this could be added, but I'm not sure why you'd want to disable WebGL mode anyway.

    If it's broken, it might crash, in which case the text of the error log should be useful. Hopefully though your games will start up a lot faster, and use less memory. I'm especially interested in feedback if your game previously crashed on startup, or suffered annoyingly long loading times - let me know how it works!

  • Ashely Seriously THANKS SOOOOOO MUCH for that

  • Gonna test it as soon as I get my hands on my macbook.

  • Excellent news! I will give this a go later today....

  • Awesome, really looking forward to testing this.

  • damnd, that's fast Ashley. You rock.

    While I overall understand your hesitancy for supporting non Browser wrappers. It seems with Apples current stance on non WebKit browsers we are stuck. Thankfully Ejecta is open source and offers alternatives paths to closed source. So thank you so much.

  • If this works, you're a hero. Great work!

  • Ashley,

    Thank you so much for putting this together. You continue to amaze.

  • get other problem always result with the potrait mode when build on simulator....

  • The game that previously needed some 15 seconds to load now loads instantly, memory usage of the loaded game dropped from 280mb to 90mb.

    Moving from the loader layout to another layout crashes the game: EXC_BAD_ACCESS (code=1 address=0xe145a1cd)

  • Really good effort, keep at it! Soon we'll have both iOS and Android exporters that don't suck for larger games. Exciting times!

  • KFC - promising results, but does it point to a source code file and line number in the error log? Or can you send me your .capx file? I can't do much without either.

  • This is awesome, I don't have a macbook to test this on right away but a breakthrough all the same!

  • Isn't viable to port this feature to Ejecta X for Android?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Time to get my developer account now. Oh, and my EIN first...

    Great work Ashley!

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