Help with reducing lag on a specific object

So in my game I created the object “Off-Spring”, It’s premise is to duplicate itself so that it creates a large field of sacrificial springs that deal damage, but after a few duplications the game goes under severe lag. I’m not sure what’s causing this, since they don’t really have much code running.
But if someone wants to do a deeper dive, it’s greatly appreciated.

2 Likes

Does anyone think all the collisions is what’s causing this?

2 Likes

Yeah, Proximity and Collision can cause some serious lag in large numbers.

2 Likes

Do you know of any alternative? or maybe a way to disable the collision until it actually hits.

2 Likes

Did you look at the performance panel to see exactly what it causing the lag? The first step is to find the problem before you start trying to change anything.

3 Likes

Due to my current lack of Indie, I’m unable to do that. But i’m sure it what’s causing the lag, because it’s the only constant trigger in the object.

2 Likes

Can you set something up so that I can quickly and easily see the lag? If so, I’ll take a look at the issue and maybe have a recommendation

3 Likes

It’ll work if you just place an “Off-Spring” on the title screen, it’s less laggy there but it has the same effects.

3 Likes

OK, so as you can see - proximity is the big problem. That object has a bundle with a bunch of Prox triggers in it.

If they all need to stay, consider replacing those old-style Prox triggers with the newer Prox component. With the new one you control when it checks, instead of just checking all the time.

4 Likes

Oh boy, I forgot that ever existed, thanks a ton.

4 Likes

What do you mean by this?

2 Likes

No. Maybe put the collision into the A input of an AND logic gate, and put the In of an In View trigger into the B of the AND gate?

1 Like

He means use the current one that is readily available instead of copying an outdated version from an old example like Lexmaier06 must have.

2 Likes