Memory issues --2-Deck Shuffling Game

Get help using Construct 2

Post » Fri Feb 22, 2013 8:04 pm

Hey Construct(ers),

I'm in my first week with the program, and am loving Construct 2 so far! I've created my first game, however, and I'm having some issues with bulky memory. It's been running fine in browser tests on my computer and iPhone, but Android's a little wonky, and CocoonJS and AppMobi app tests have all crashed out of the gate (While the size on disk for the AppMobi apptest was 11.88 MB for 126 image files, the total size in Memory was 334.09 MB and Size in App Game Interfaces was 811.77 MB...yikes!)

Basically, I've got a card game with two side-by-side decks (players need one card from each deck per turn). The first deck is 12 cards (technically 1 card with 12 animation frames) that are re-shuffled each turn. The second is 90 cards (1 card, 90 animiation frames) that are re-shuffled only when the 90 cards have all been used. My model for the shuffling is based on the thread, "Randomized an array for a deck of cards",

Here's a link to my initial shuffles: I've tried to keep all my file sizes as lean as possible, but even putting export at the lowest JPEG conversion possible still has the game crash in AppMobi AppTests, so I think it's the logic/rules/shuffling that are really slowing me down (I even tried halving the number of cards in the 90 card still crashed immediately).

Basically, my question is: is there any hope to bring this kind of a game down to a reasonable/working size for app store mobile use? Or should I just stick with the browser web-app version (which generally works)? If there is a way to make my shuffling more memory efficient, please let me know!

Posts: 1
Reputation: 527

Post » Fri Feb 22, 2013 8:29 pm

Sounds to me like a garbage collection issue, likely caused by flawed logic in events (such as creating new variables/objects every tick). I'm sure someone will paste a relevant link, but for now it's hard to tell what is going on without taking a glance at the actual logic.
Posts: 1,910
Reputation: 13,155

Return to How do I....?

Who is online

Users browsing this forum: Dodgger, Mikhail80, Yahoo [Bot] and 6 guests