# Procedural 3D Environment Generation

I am concerning a 3D Scroller game which is like Subway Surf or Temple Run. The thing I am confused about is their way of generating 3D environment. For example for 2D games like Flappy Bird, there is a camera and player which have fixed positions respect to the X axis. And the environment is being generated, moved into camera's viewport, and finally gets destroyed after getting out of viewport. I mean, player and camera does not move in general, the environment does.

Is this approach efficient by means of performance for 3D scrollers? Do they use a box which covers the camera's viewport, and when objects get out of the box, destroy them? Or do they create the environment via code as the player goes further, then make the camera follow the player and they are moving both? Is this a valid approach and what are the advantages or disadvantages of these implementations?

• You wouldn't run into floating point problems until you were traveling distances that put the Earth-Moon distance to shame. gamedev.stackexchange.com/questions/75537/… 0.015 is enough precision for fast-paced player movement (60 fps). Ok, a bit of a hyperbole, you'd still be good to out to over 500 km (each unit in Unity being a meter). – Draco18s no longer trusts SE Jun 5 '17 at 20:34