Discussion about game on mobile

0 favourites
From the Asset Store
Get the assets for your isometric games. Four sets of buildings with interiors and objects.
  • After doing some more testing with the CocoonJs Launcher I think I've found what was causing most of my slow speeds. It had to do with using a random time. I like using random events but they were killing performance on mobile. I was using both a "wait random(30,60)" and a "every random(30,60)". I only had a few events set up to use random times. Removing the random expressions completely, or setting the events to only fire at certain times solves most of my slow speeds. I still have some more optimizations to do. But now I've been seeing the frames per second running up in the 60's with CocoonJS. A pretty big increase in performance to say the least.

    If anyone has any interest in exporting to iOS I strongly recommend the CocoonJS Launcher. It is a fantastic tool for testing! The app itself is really well designed and makes it so easy to test right on the device. Don't think about it, just install it.

    Ashley

    The CocoonJS launcher gives me an unrelated error message in the log file. It doesn't seem to effect performance or functionality in game that I've noticed. I didn't know if this message would be anything you'd want to know about or not. Here's the error message.

    JSUtilities Exception: TypeError: 'undefined' is not a function (evaluating 'caf(this.raf_id)') Line: 1219 File: ? Tag: onsuspended

    I did a small test after looking around in the exported c2runtime.js and found that by removing the following two lines the error no longer reports to the log. Just thought you'd like to have the info of where the error is located.

    if (this.raf_id !== 0)

    caf(this.raf_id);

  • Huh, interesting about the random hitting the performance. Thanks for the info.

  • Thunder

    Thanks for sharing such crucial information. I use "random time" in my minigame too,tonight I shall try it out!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thunder

    Well, my random(0.5,1)second has no cost on my performance. I just deleted them and the performance has not changed.

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