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
Nov 27, 2014


Nov 13, 2014

Nov 11, 2014


Nov 10, 2014

Nov 9, 2014

Nov 6, 2014


Nov 4, 2014

Nov 3, 2014

Oct 28, 2014

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