How do I increase FPS / Increase Performance

  • > its pretty obviuos that your project or your pc is not running webgl, but canvas2d... that why you get bad pefromance.

    >

    Are you sure about that? As far as I know physics have nothing to do with WebGL. This all runs in JavaScript. Not on the GPU. His graphics hardly matter for such a simple demo.

    That's what I thought.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Hi, I also tried CocoonJS... it is not worthy! Compilation takes a lot of time and it can be even slower.. =(

    >

    > Seems like I have to quit using embedded physics and aim some work-around....

    >

    Physics is always an issue with JavaScript. But I am getting smooth 60fps on my old desktop.

    Schoening, could you please tell me your old desktop's specs and what web browser are you using?

    Thanks!

  • henriquesv

    I'm surprised you get any issues.. My guess is that you have to many events. Consider using a Family Object for the events and then nest from there.

    Instead of:

    On Blue Touched
    On Red Touched
    On Green Touched
    [/code:2bg00v77]
    
    Do:
    
    [code:2bg00v77]
    On Square Touched -> If [square color] -> Do this.
    [/code:2bg00v77]
    
    That should reduce the amount of events. 
    [i](I have not yet looked through the Construct2 source code. But I would assume that this reduces some internal looping quite a bit)[/i]
    • You might reduce collision points in blocks, for example the red, yellow, green, blue block from 11 points to 4.
    • As discussed

      henriquesv can maximize event scheduling.

  • Thanks Guys! I will give it a try tomorrow! I will let you know.

    Schoening, this is your old desktop? I was working with this old desktop:

    Intel Pentium Dual E2140 - 3,00GB / Win7 64bit

    =)

  • henriquesv Haha. Old in age. It works fine. But it is a few years old now.

  • henriquesv

    I see in your test capx you have quite a few txt boxes which act like counters and are constantly updating.

    Try only updating these on a less frequent time. (Every 1 second) or if they are only for debug purposes try not updating and checking performance. I know when I was making my mobile App before the debug feature was out I used to have a few text boxes as counters and that used to hinder the performance with CJS on andorid alot.

  • OP, I found your capx to have a lot of small problems. There are a lot of good suggestions in the thread here that you should do.

    C2 doesn't support more than 8/9 collision points. Squares only need 4.

    Family up your events(ie no blue on touch, blue on red.. that's bad, bad bad bad bad. )

    Your Evertick eats too much.

    I've come to testing design for my personal computer. Create a test app. run the test app on your minimal target device. once you get the performance you want by adding features. note down the CPU usage on your computer for the exact same app.

    As an example using my PC and iPodTouch4g.

    My PC will have a CPU usage of 3% to maintain 55+fps. Any more than that will exponentially drop performance.

    So your EveryTick often hits my computer with 5.8% here and there. While often fluctuating between 2.8 to 4%. So when it hits 5.8% it starts to cascade the performance.

  • Hi,

    Did you find a solution for improving your CPU?

    Thanks

    M

  • Here, take a look at this:

    https://www.dropbox.com/s/kx0gdbuml25ii ... .capx?dl=0

    Kind of strapped for time...basically, I'm setting this so sounds are called by the names of the two objects colliding. It trys both name combos (n1+n2, n2+n1), so as long as you have one sound for each collision (if that's really what you want to do) it'll work.

    Also dialed back your physics accuracy and reduced collision points on your tokens. If you want a circular collision area, select that option under physics (properties - behaviors - physics - collision mask - circle)

    You still have a lot of needless overhead and redundancy. Read about families. Apply that to your token moving groups...you only need one set of that logic, having a set for each token is redundant.

  • henriquesv

    Hi,

    As for android Admob,

    fix Admob SDK FPS issue: go to my AdMob account and disable text banners, leaving enabled only image banners. (provided by Cipriux)

    Thanks

  • Thanks guys! I am a little late on this project! I will let you know!

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