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
Jun 24, 2015

Jun 23, 2015

Jun 21, 2015

Jun 17, 2015

Jun 14, 2015

Jun 8, 2015

Jun 7, 2015

May 31, 2015

May 28, 2015

May 18, 2015

May 7, 2015


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