How heavy is platform behaviour FPS wise?

  • hello,

    I started new project for mobiles, its simple sidescroller shooter.

    and I'm getting very slow fps with enemies, I know its my fault because I managed to run other games with solid 60FPS with C2.

    before I go to deep into debuging events, I wanted to ask for general advice, if I'm taking wrong approach.

    Here is what I have

    1. I have enemies with Platformer Controller attached, they have 2 animations with in total probably 36 sprites size of 64x128.

    Should I avoid using platformer behavior for enemies?

    2. they consist of several parts, and have container, is that OK?

    3. They are placed statically on map, should I spawn them on demand? (e.i when player is near) I don't know how construct loads them.

    Cheers

    -Hellwalker

  • 4. I'm using both solid and platform on enemies, could that cause problems?

  • See performance tips. Usually poor performance is caused by rendering, and not events or behaviors.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hm I got interesting Results.

    I guess my problem is closer to area of collision checks.

    (without zombies fps is solid 60)

    <img src="http://i.imgur.com/Njh1p5d.jpg" border="0" />

  • Ok, yep having many Platformer Behavior Objects seems to drastically lower Framerate. bellow 30 fps

    I have 7 Objects and basically this is only code attached to them.

    <img src="http://i.imgur.com/eCbEUqH.png" border="0" />

    Zombies have Platformer and Solid on Them.

    Tested Platforms, Ipad 3 and Amazon Kindle Fire, Exported via cocoonJS

  • platform is a complicated behavior probably calculating stuff the zombies don't need...

    Personally I would custom build the enemy movement using x,y and dt or bullet behavior modified...

  • its very handy, as it can detect walls, ground. Has Animation Triggers and so on.

    But yeah, I moved on to manually creating movement with set x and dt.

    Its interesting though on PC I get perfect framerate and on several devices I have available, FPS reduction was same on each of them, when Ipad 3 is supposed to be much more powerful then android phone I had available.

  • For these types of issues, I like to just right-click and disable whole chunks of code. Then I know exactly what is causing the performance issues.

  • hmmm, you put platformed & solid on your zombies?

    I can't say this for sure. I really can't. But i remember fiddling around with Solid and another controlling behaviour. I ended up with the object colliding with itself.

    Also be careful with how your working with collision checking. Collision checking can use a ton of power if not used carefully. You might want another criteria on that.

    Every 0.2 seconds

    -> Is zombie colliding

    -> Is zombie on screen

    you could be right that maybe it is the platformer being power hungry, but it might be just how it's being used.

  • I tried empty scene with no events at all and platformer behavior on 64x128 sprite with collision set to bounding box. if i remember correctly FPS was 30~40 for 7 characters on screen.

    When i disabled solid in any of tests I got max 3~4 fps boost.

    there was something wrong with my events, as it was taking away around 20 FPS, but platformer was taking extra 30.

    I was on a deadline and decided to go with simpler solution, but I'm curious to nail down the problem. it could be lot of things, c2, cocoon compiling, cocoon launcher, and most likely me :D

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