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
Sep 9, 2014

Sep 8, 2014

Sep 7, 2014


Sep 5, 2014

Aug 26, 2014

Aug 22, 2014

Aug 21, 2014


Aug 18, 2014

Aug 2, 2014


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