collisions offscreen

0 favourites
  • 7 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hi there,

    anyone got an idea how do i disable platform behavior for offscreen or distant sprites? Trying to manage that but so far without luck. thx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put all events concerning your offscreen sprites in a group and activate the group when the x of the sprite is less than viewportright+50 and more than viewportleft-50. trigger this once while true and also do the deactivating for the opposite.

  • Littlestain, is it the same as when i set the enemy family platform behavior to default: OFF and then turn it ON once the sprite is onscreen? And turn it OFF when its outside layout..

    Basicaly the default is OFF for the whole family

  • It is usually not the same when you do something completely different.

    Turning of the behaviour doesn't stop the events you have set up to check for collisions.

    Outside of layout probably won't work, because your family members are most likely on the layout.

    Using grouped events or adding the conditions to check if your familymembers are within a certain distance from the viewport edges, would probably be your best choice.

  • Littlestain from my tests, the only thing that makes huge fps drop is the platform behaviour. Other collision events that i have set on the family members {checking for edgemarkers, collision with main hero etc.} are making maximum 1-2fps so far on iphone5. The platform behavior is making huge fps drop even when 5 enemies on screen.

    Its very nicely visible when i have an area with no enemies or 1 enemy - it runs about 57 fps since i disabled platform behavior when family members out of screen. But from the moment when there's like 4 enemies, it goes to its knees...

  • Have you tried disabling ALL events in which your family members are present?

    All animations, rotations, movements, collisions, etcetera?

    fps drops usually have more to do with rendering the graphics than anything else.

    Did you optimize your graphics? Are there many calculations required for the graphics to be rendered?

  • i have made a test where i had all the family collision events enabled and only disabled the platform behavior. That made the bigest impact on fps. When i only have moving sprites with animations {without platform behavior} the game runs perfect around 60 fps. So the speed has to do with collision detection.

    I also optimised ground tiles- using big blocks of tiled background as ground collisions which helped a bit.

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