pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Random Terrain Generator

Random Terrain Generator - 1.0

benjamin lee (benjamin)

Tags:

Description

This creates a random heightfield with the fault algorithm. It takes a somewhat lengthy time to finish increasing a lot with the resolution and number of blocks of the finished file. It saves it as a jpeg file. The fault algorithm is where the computer makes a random ax+by=c line and everything on one side is raised a certain amount. Everything on the other side is lowered. After around 500 passes it starts to look like terrain. In my implementation I changed it so that things were raised or lowered based on the arctangent of their distance from the line which makes it look smoother.

Links

Home Page: http://www.pygame.org/
Source: http://dl.dropbox.com/u/851399/source/fault%20algorithm.py

Screenshot


click to view original size

Releases

Random Terrain Generator - 1.0 - Mar 12, 2012

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

No user comments have been submitted.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 21, 2014


Apr 19, 2014

Apr 16, 2014

Apr 13, 2014

Apr 9, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)