Landscape generation

  scripts
  sprites
See inside
Instructions

Use Sulfurous for a 15x speed increase -
- https://sulfurous.aau.at/~sulfurous/#164324717

Quick instructions
---------------------------
1) SPACE BAR toggles visibility of controls
2) RENDER is fast and should be pressed after changing angle, palette, backdrop, water depth or water colour
3) RELIGHT is quite slow and should be pressed after changing light blend setting (also performs a RENDER)
3) GENERATE is slow and should be pressed after altering roughness or to generate a completely new landscape (also performs RELIGHT and RENDER)

Detailed instructions
------------------------------
You can alter a landscape's appearance by using the buttons at the bottom of the screen and then pressing RENDER to redraw the scene. This is a fast process.

ANG - sets the angle from which the landscape is viewed. The default viewing angle is 120 degrees. The other side of the landscape faces away from the light and contains far more shadows.

PAL - there are five palettes to choose from. They give very different appearances to the landscape from snowy mountains through to a mars-like appearance.

PIC - ten backdrop pictures have been included which completely alter the feeling of the landscape.

DEP - controls the depth of water. Water is more visible the higher this number is set to.

COL - there are five colour palettes set for water.

You can change how the lighting affects the landscape. Once you've adjusted the blend setting, hit RELIGHT to recalculate the lighting and redraw the landscape.

BLENDED - the lighting can be blended which smooths the lighting and darkens it towards the bottom of the landscape or have it unblended which gives a harsher more vivid effect.

You can create entirely new landscapes by adjusting the type and roughness settings at the top of the screen and then pressing the REGENERATE button. This will cause an entire landscape to be recalculated and so is a lengthy process.

ROUGH - allows you to generate anything from smooth rolling hills (1) to incredibly jagged mountains (5).

TYPE
- 1) a standard rolling mountains/hills landscape
- 2) a basin type landscape
- 3) a more random style landscape

Notes and Credits

Featured on Front Page (June 8th, 2017)

A few to try -
- The underworld - QSYIYXVSEGWRRVRW
- Raining on the hills - XYROUDHUQGWWEVRW
- Martian landscape - ZAWTLXGRQGWREVRW
- Mountains at dusk - DUTALUFRQGWYTVRW
- Swampy marshland - CSRPNDOQQGWYEVRW

Version 1.2 (2nd July 2017)
- New landscape types added

Version 1.1 (1st July 2017)
- 30% faster terrain creation
- Light blending option added
- Water depth and colour added
- Terrain load and save feature added [e.g. XYTOAQEUQVTYRQ]

Version 1.0 (4th June 2017) [Featured on the front page]
- Landscape creation and rendering

Background information
-----------------------------------
I played around with a few techniques and settled on one where I create a smoothed random grid and iterate across it using fractional Brownian motion to control how craggy the resultant terrain is. I then add lighting from a selected angle and apply a non-linear palette to make the mountains fade slightly towards the bottom as well as displaying a pleasant lighting effect. The final data is essentially a height map and a colour map which I render using a front to back voxel technique for speed.

Have a break for some light relief
-------------------------------------------------
If you've read this far, you probably need a break! I may as well take this opportunity to promote a couple of my games!

New Rally X - https://scratch.mit.edu/projects/152837762/
Scramble - https://scratch.mit.edu/projects/156708703/

Shared: 4 Jun 2017 Modified: 18 Jul 2017
Favorite this project 1087
Love this project 1441
Total views 19999
View the remix tree  14
  
More projects by RokCoder