Bug Issue: Very low FPS due to unsolicited activation of Continuous Collisions in ALL actor types.


Pages: 1

LIBERADO

  • Expert Stencyler
  • *
October 02, 2016, 06:45:13 am
Due to this bug, I can't use in my games any actor with Continuous Collisions enabled.

If you create one instance of any actor type which has the Continuous Collisions option enabled, this will enable said option in any other actor type that you create later at runtime, which results in a low FPS to the point that the game becomes unplayable because all actors behave as if they have the Continuous Collisions option enabled. Obviously, this has a terrible impact on performance. This is an important bug because drastically reduces the FPS. Maybe, this unknown bug is the cause of most the complaints from users about the Stencyl performance.

In the following example you can see the very negative effect of this bug. Here you can see two different actor types, the blue actor type has the Continuous Collisions option disabled, and the red actor type has it enabled:
   
           
   
They are resting on black tiles.
See what happens if you create 30 blue actors, then create 1 red actor:
   

   
But see now what happens if you create 1 red actor, then create 30 blue actors:
   

   
As you can see, same number of each actor type, but in the second example the FPS drops to 4 because the first red actor created enables the Continuous Collisions option in the 30 blue actors created later, even when they are instances of a different actor type.

So, this unsolicited activation of the Continuous Collisions option in all actor types significantly affects the performance and can really make the game unplayable.

Please, fix this serious bug.
« Last Edit: October 02, 2016, 01:51:13 pm by LIBERADO »


Issue updated by LIBERADO - October 02, 2016, 06:45:32 am
  • Issue renamed from "Very low FPS due to unsolicited activation of Continuous Collisions in ALL actor" to "Very low FPS due to unsolicited activation of Continuous Collisions in ALL actor types."


SadiQ

  • Level 5 Stencyler
October 02, 2016, 09:06:48 pm
I just made a test game for this and it didn't happen for me. Maybe upload your test game in case I did something silly?


LIBERADO

  • Expert Stencyler
  • *
October 03, 2016, 04:46:51 am
It happens for me in every game when I create one instance of any actor type with CCD enabled, then create instances of a different actor type with CCD disabled. All of them behave as if they have CCD enabled, and the FPS decreases drastically.

I have attached a simple test game showing this damn bug.
« Last Edit: October 03, 2016, 04:52:57 am by LIBERADO »


New attachment added by LIBERADO - October 03, 2016, 04:47:11 am


SadiQ

  • Level 5 Stencyler
October 04, 2016, 01:22:33 am
I looked at the test game you have and yes, FPS's drop in my case as well. I did want to see if the actors have had their Continuous Collision turned on after creation, and it seems that only one of them has that option enabled (assuming I checked things the right way):




I messed with the tile collisions and the framerate went up to about 20-ish frames, but that's still not good.


LIBERADO

  • Expert Stencyler
  • *
October 04, 2016, 01:32:52 am
Yes, you see.

If you create 30 blue actors, then create 1 red actor: 60 FPS
If you create 1 red actor, then create 30 blue actors: 4 FPS

Same actors in both cases, but you get 60 or 4 FPS depending on the creation order.
For this reason, I can't use any actor with CCD enabled until this bug is fixed.

Obviously, there is an important bug here.
« Last Edit: October 04, 2016, 01:48:39 am by LIBERADO »


rob1221

  • Master Stencyler
  • *
December 26, 2016, 06:11:22 pm
I looked into this problem today and found out that when any actor is created with continuous collisions, B2World.m_continuousPhysics is set to true (probably so it works with tiles).  So why does the actor creation order matter?  It's because when your blue boxes fall onto tiles, the response is different depending on if B2World.m_continuousPhysics is true or not.  If you set B2World.m_continuousPhysics to false and then back to true shortly after, the FPS goes back up (because the drop already happened and now they're settled on the tiles).  Disabling rotation on the blue boxes also brings the FPS up because there are less tiny movements triggering continuous collision detection.

There could still be a bug involved because I would expect the blue boxes to settle on the tiles after falling but it seems they get stuck with tiny vibrations that kill the FPS.


Issue updated by rob1221 - April 30, 2017, 05:29:46 am
  • Status changed from New to Confirmed


Pages: 1

Details

  • Reported
    October 02, 2016, 06:45:13 am
  • Updated
    April 30, 2017, 05:29:46 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Confirmed
  • Priority
    Normal
  • Version
    3.4.0 beta4
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine

Tags


Attachments

* BUG Continuous Collision.stencyl (299.41 kB - downloaded 53 times.)