Im making an endless runner game, since the world has bounds that the player will cross later as running endlessly, I ditched that method and started moving the tiles to the player instead of making the player run endlessly.
This works now, but how I made it work is that the tiles (17-18 * 3, so maybe max around ~60) is using a very basic tick function, which uses VInterpConstantTo
to set the location and after it goes behind the player, it destroys the tile. It works perfectly, I dont see any performance impact at all.
And I know that adding some very basic logic to tick is okay, but not sure about this one. Is using Tick function on nearly 60 or a bit more actors is okay? I tried timeline and that didnt work as expected since I have to stop and resume the timeline and Im not sure if I couldnt set it up or its not possible with timeline. Also using TimerHandle
is nearly the same as Tick in this case as it needs to run again very fast.
It needs to stop when the player dies, and resume moving towards the player if the player has extra lives (and this works as expected with Tick).
All this is done in C++.