Video games employ smoke and mirrors all the time to make, say, environments feel bigger than they are, or to hide loads and transitions. Naughty Dog's Uncharted 2 is no different, with particular attention paid to the train "level", which spans multiple chapters, starting with the aptly-named "Locomotion".
While you might have guessed the train goes around in a big loop so it never runs out of track, Naughty Dog pulled a couple of other tricks out of its hat to make the whole thing feel seamless, as Freako explains in this video:
How does the train move into a different environment? Well, the simple answer is "camera tricks" ... Eventually, you reach [a] train car [with] really high sides and they use these high sides to mask the area change.
At this point, Freako zooms the camera out as the transition occurs, where the swapping of assets is very obvious.
Every time you move the camera in Horizon Zero Dawn, the game is doing all sorts of under-the-hood calculations, loading and unloading chunks of world to ensure that it all runs properly.
I had to laugh when the real length of the train is shown. It's massive when you see it all at once (well, most of it).
What's amazing is that you just don't notice any of this stuff when you're actually playing, a testament to Naughty Dog's ability to pull the wool over our eyes... but in a good way.
How The Train Level In Uncharted 2 Works [YouTube]