The Forest

Simulation of orienteering in pure JavaScript/HTML5

by grelf

Advertisement

This is an update (2014 - ongoing) of a pair of programs first published in the mid-1980s: The Forest and Explorer. The originals were of course very limited in their capabilities so the new version is very much more than just an update. The Forest started as a training aid for the sport of orienteering, so a map is generated which conforms to IOF standards and is essentially infinite in extent. Each scene on the ground (or, for non-orienteering explorers, from a helicopter, down in mines, etc) is built as a composite of thousands of copies of a few photos of my own. The amazing thing is that such scenes are displayed in less than a second but the code is just JavaScript, using the standard HTML5 2D graphics API. No frameworks or libraries are used, just my own code.

Being just HTML5/JavaScript the programs runs on any device that has a browser. The user does not have to install anything. The code is about 200 kilobytes (yes) and the photos come to less than 2 megabytes, so the whole thing downloads and runs in seconds.

This is not a commercial venture. I am simply doing it for my own creative enjoyment, as a demonstration of the capabilities of JavaScript in an HTML5 web page, to encourage others to create things in that environment and as an example for others to build upon. I am continually adding new features. The code is easily available and I have written extensive documentation both for users and programmers. Start here: https://www.grelf.net/ojsvg.html Among the many links from there you will find my free programming course too (JavaScript in HTML5).

Explorers (non-orienteers) can have quite a challenging and (hopefully) interesting quest, as the following describes.

[This is possibly a SPOILER.]

The first strange thing that explorers are likely to notice is that some rootstocks (upturned tree roots) have fragments of a small map attached to them. Putting the fragments together reveals an island to search for on the main map and travel to. If all the fragments have been seen something will happen on arrival at that location. There will be a clue as to where the treasure chest lies very near there.

There are several other diversions that may be encountered along the way and which may or may not be worth looking into.

Also scattered throughout The Forest are some posters written in a simple cipher which the explorer may want to elucidate. When decrypted these posters give clues about various things in The Forest, including how to get into certain places. It is not essential to read these but it could save some time and effort. The cipher appears on something else too, so it is useful to understand it.

The treasure chest has a note (in plain text this time) indicating how to find a particular building. It also provides a key code for entering the building. Do make a note of the key code. Buildings all have key codes which must be typed in for entry. There is a measuring device that can be found in many places underground. It will help to determine the key codes, once the explorer understands how it works.

Once inside a building there are posters on the walls which may help to explain certain things.

Buildings all contain a controller for a mechanism which is essential for the next stage of the treasure hunt but the mechanism will only work in that particular building indicated by the note from the treasure chest. (It is believed that there is only one building with that key code but since everything is randomly generated that may not be true.) The mechanism will reveal the target of the next stage of the adventure and make it possible to get there.

The next stage involves a dream sequence reminiscent of a certain film. The sequence ends at another machine.... (to be continued).

Further hints: there is a shortcut key that enormously assists the journey from the starting area to treasure island. The x and y positions given in the status line also may be useful. See the User Guide for more details: https://www.grelf.net/terrain.html

Last updated July 16, 2019
Status
Released
Platforms
Engine
Advertisement