Less collisions worse performance?!?

0 favourites
  • 7 posts
From the Asset Store
The game will give you a dog that appeared and you must say if he appeared more, less or equal.
  • So im making my platformer and first level is almost complete.

    Enemies use platform behavior and i see that i have over 3000 collision checks per tick. Game plays smooth 60fps on pc but choppy on mobile.

    I set enemy platform behavior disabled, gravity to zero, collisions disabled and then with event ->when enemy is on screen->enable platform and collisions.

    Great! Collision checks per tick dropped to 30!

    The weird thing is that performance took a huge hit! 15fps (with 3% CPU usage) on pc and didnt even check it on mobile.

    Why did that happened?

  • event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

  • event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    event ->when enemy is on screen->enable platform and collisions

    Enemy->is on screen->Enemy->Set Collisions enabled

    .......................................Enemy->Set Platform enabled

  • Every tick

  • Every tick

    And thats worse than checking 3000 collisions every tick?

  • Well I don't see where you set the collisions to stop when it's not on screen so it's going to be even worse at some point.

    Anyway, I have no idea how many objects you have on screen at any point in time so yeah that could slow it down a lot.

    Then you may have some other events that cause some issues because you have set collisions and platform behavior off.

    The ideal method would be to turn collisions on when you get to a certain zone once, and turn it off when you leave that zone to go to another.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I don't see where you set the collisions to stop when it's not on screen so it's going to be even worse at some point.

    Anyway, I have no idea how many objects you have on screen at any point in time so yeah that could slow it down a lot.

    Then you may have some other events that cause some issues because you have set collisions and platform behavior off.

    The ideal method would be to turn collisions on when you get to a certain zone once, and turn it off when you leave that zone to go to another.

    Well, i feel stupid but this never hapened to me before. Ive restarted my pc and everything works fine now. Collision checks from 3000/tick are now 30/tick and performance is 60 fps on pc. Also smooth gameplay on my Galaxy S4 but about 15-18fps on a dualcore $50 tablet (as expected)

    PS Thank you very much for your replys. Ill keep in mind the zones method though..

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