Endless Forest (2018 Port)


#1

Many years ago, I’ve discovered a really nice three.js showcase. Although the app is still accessible (see here), it uses a very old three.js revision from 2011.

Yesterday night, I’ve decided to make a quick “remake” with the current version of three.js (R91). The code uses now BufferGeometry and the models are based on glTF. However, I’ve not applied all models to the new version. Instead I’ve added a new ambient sound of a running woman and a new camera movement which makes the atmosphere a little bit more intense.

I really like this code since it’s a great skeleton for a 3D endless runner. It’s also notable that the showcase uses no lighting at all. The visual appearance is a combination of unlit materials and fog.

As you can see, I’ve put everything into a fiddle so it’s more easy for interested devs to play with the code :wink:. Hope you like it!

Demo: https://jsfiddle.net/ctsqkpgh/show

Thanks to @oosmoxiecode for the original code!


#2

Some possible improvements:

  • Use instanced rendering for the trees, rocks and plants.
  • Sync the ambient sound and the camera movement.
  • Provide a start button after the loading screen so the ambient sound works on mobile, too.
  • The path through the forest is straight right now. A curvy path maybe with ups and downs would be a nice addition.

#3

Sounds mean so much ). Ancient epic Saga became Hollywood horror.
Very atmospheric!!!


#4

It was now necessary to add a start button because the last update of Chrome (66.0.3359.117) changed the autoplay policy. Even on desktop, the application requires a user interaction before playback of sound is possible.