playMaker

Author Topic: [solved] Best practice for runner game  (Read 1403 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
[solved] Best practice for runner game
« on: May 08, 2020, 09:10:04 PM »
Hello !

Working on a Level based Runner game. It will take approx. 40 seconds to complete each level. Currently, game need around 1300+ tiles and extra 30 Objects as obstacles.

I use Pooling for obstacles.

Can I leave remaining tiles as it or should I de-activate them when played passed them ?

to make tiles disable when player passes them, I have to compare both Player's & tile's Z values and disable it when it passes. is it okey to add this FSm to all 1300+ tiles?

will game slowdown when 1300 objects comparing float every frame ?

Thanks
« Last Edit: May 09, 2020, 09:59:25 AM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Best practice for runner game
« Reply #1 on: May 09, 2020, 05:14:39 AM »
hi.
Is player going 1 direction?

if so, you could have a trigger off screen behind player and handle that to despawn