How do I "bake" many physics objects into one new object to save resources?

0 favourites
  • 3 posts
From the Asset Store
Create your game with this complete pack of images and animations!
  • Hi! I was playing around with physics and need a ton of physics objects for my idea.

    But after 3-5K sprites it starts to slow down, and I need about 20+ times more of them.

    Is there a way to "bake" the settled / sleeping / immovable objects into one big object? I added some actions to make them immovable after a while and not moving much (sleep does not even activate for immovable objects not interacting with other objects) to improve performance. It helped a lot but it's not enough.

    Then I tried to put them on a drawind canvas with pyhsics enabled but the problem is, it has only one big rectangular hitbox then and does not use a hitbox suitable for the pasted objects.

    Is there any other way to do this? Can I make a "solid" object out of many small objects so physics only interacts with this one?

  • Devices do have limits, regardless of optimization tricks. 100k objects is going to be pushing it, even without physics.

    I'm not very familiar with physics, but one idea that came to mind would be to use a helper tilemap object that is immovable. When your objects come to a rest, turn off their physics and swap tiles to ones with collisions where they are overlapping the object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! This could work, I will try a tilemap. :)

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