What may cause C2 games to crash on Android?

0 favourites
  • 10 posts
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • It crashes occasionally (certainly not on every launch) It just quits. No errors. No Message. Nothing. It just dissapears. I experience this on signed APK file exported using CocoonJS's latest version and C2 latest stable. The game is downloaded from Play Store's beta testing mode.

    My phone has quad core processor, 1 GB RAM and HD Display.

    What can cause this?

    Also, my friends told me my game takes up too much of their RAM and drains their battery. Is there a way to prevent this?

  • Sounds like there are many objects that could be destroyed.

    You should try the Debug-Mode on WIndows to find out which Event or Object causes these issues.

  • Sounds like there are many objects that could be destroyed.

    You should try the Debug-Mode on WIndows to find out which Event or Object causes these issues.

    But it doens't crash on windows. How will I know which object causes it?

    Also, will it help if for example I destroy all menu objects when going to the Gameplay layout and when the player goes back to the main menu, use System action to recreate the destroyed menu objects?

  • bump

  • You need to optimize, reduce processor and memory use if you want your game to work well on mobile devices.. running in debug mode helps you see what uses the most memory and processor time..

    best of luck,

    -Mike

  • Using the Debug-mode you can see what takes the most amount of processing time and memory etcetera..

    You could (read should) use that to find out what the bottleneck is..

    You should be glad it doesn't crash on windows, for that will give you enough time to figure it out..

    First thing I would look at is if there aren't objects being created all the time and if the collisionchecks aren't too high.

    It could also just be a part of your programming (events) that is taking up a lot of your cpu time.

    This is exactly what the debugger is for, debugging..

  • Using the Debug-mode you can see what takes the most amount of processing time and memory etcetera..

    You could (read should) use that to find out what the bottleneck is..

    You should be glad it doesn't crash on windows, for that will give you enough time to figure it out..

    First thing I would look at is if there aren't objects being created all the time and if the collisionchecks aren't too high.

    It could also just be a part of your programming (events) that is taking up a lot of your cpu time.

    This is exactly what the debugger is for, debugging..

    The problem is using C2's debugger is that when using the debuger to run the game, the game experiences EXTREME lag. The kind of lag which is worse than on a mobile. On mobile the game has about 50-60 FPS, on normal windows its 60 FPS and in dubug mode its 7 FPS!!

    Is this normal with all C2 projects or is it just because of my CAPX?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's probably running out of memory, or a CocoonJS bug. It is almost impossible to comment further without seeing your project.

  • There are (probably) some issues with your capx..

    Even with 7 FPS you should be able to have a look at the debuggers info to see where that is coming from..

  • There are (probably) some issues with your capx..

    Even with 7 FPS you should be able to have a look at the debuggers info to see where that is coming from..

    Ashley It'll probably be a problem with my project as there are several good performance games wrapped using CocoonJS.

    LittleStain

    It says Collision detection: 227 (avg)

    Object count: 35 (avg)

    Is this the problem?

    I read somewhere on the forums that doing something every tick is bad for performance on mobile.

    I am doing these things every tick:

    Every Tick:

    1. Simulate Platform pressing right

    2. Scroll to player

    3. Add time spent to variable TotalDistance

    4. Add time spent to variable CurrentDistance

    5. Set text "Score" to variable "TotalDistance"

    All these "every tick" actions are vital to the game's basic gameplay and I can't seem to find a way to avoid using Every Tick.

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