Download

2D infinite map with randomly placed grass and rendering view limit

Hello, i am trying to make a 2d pixel art mobile game with an infinite map and since i don’t want the background to be static i wanted to add some randomly generated grass and walk paths, but the main issue is that an infinite map is really heavy on the phone performance wise so i need the components to generate in a certain radius of the player and then disappear when i am far from them, are there any projects or plugins that can help me? or if someone has a similar code so i can use it as reference?

Thank you

While this tutorial is for an endless runner, that spawns in the tiles, that create the lane for the runner, it might show you how to destroy them too.

Just instead of the delay, you might check for actors, that are further away then your wanted radius/distance.

Oh, here is a tut, that might be even closer to what you want:

thank you i will check it out right now