Skip to content
carlosemvPublic

About

Procedural terrain generators

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

protegen

Toy procedural terrain generators.

TerraGen1

The 2D (or, arguably, 1D) terrain generator generates a one-dimensional array of height values, and from that creates a ppm (Portable Pixmap) image, like the ones below.

It's written in C and uses a simple random midpoint displacement algorithm (MDA), similar to the well-known diamond-square algorithm for generating heightmaps.

Further development

Implementation of the following features is not currently planned, but could be considered:

  • Command line interface for algorithm parameters, and for image size, colors, and path/filename.
  • Output images in other formats (such as png or jpg).
  • Offer other generation algorithms.
  • Construct image from multiple layers of height maps (giving a "mountain range" impression).

TerraGen2

TerraGen2 is a random heightmap generator. It functions similarly to TerraGen1, and so far has only a dimond-square algorithm available for generation. Below are some examples of images generated.

Further Development

Most improvements considered for TerraGen1 are also applicable for TerraGen2. Implementation of other generating algorithms is especially desirable, perhaps based on Perlin or Simplex noise. Some form of 3D rendering or 2D shading could also be considered.

About

Procedural terrain generators

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages