How can i make an endless runner more optimized?

(sorry for bad english) so far i did everything i can think to make my game perform best but i didn’t get exactly the result i wanted.

What I’ve done for optimization so far

  • I delete all obstacles that go off the screen

  • In the videos I’ve watched, the ground moves and when it goes off the screen, it goes back and forth and this process is repeated, but instead I put the ground animation moving to the background and I put a force pushing the character back. Do you think this will give better performance?

Other than that, I can’t think of anything, how can I optimize my game better?

Use Trigger Once where you could. Delete Timers if you don’t need them.

1 Like

Thanks for the suggestion, I’ll implement it right away

How to debug poor game performance

and

This draft Optimisation document

1 Like

If you are using lots of objects, try to make groups for the ones that will behave alike, and if possible, use plain events instead “for each”.

thank you i will check them out

I mean, if the events of two objects are similar, should I make one of those events and use them for both?

Yeah. Make a group of objects with the same (same and not similar) events and trigger that action on the group itself instead of individual objects.

1 Like

wow thank you i will try it soon :slight_smile:

In my platform game I started to have a problems with optimization too. I found here on the forum some people commenting about the collision events and to optimize it would be good to limit the distance. It’s saved my simple game. I don’t know if it’s gonna be helpful to you.

But take care with the distance. If you put the distance in pixels less than sprite size probably you’ll have problems with collision, because it will happens only when the distance is below in X pixels even you already colision with the object.

1 Like

thank you i will try it

1 Like