Flash 8 : Perlin Noise Landscaping
Well, I finally got around to fleshing out something in Flash 8 and I must say I absolutely love the perlinNoise function!
This is an adaptation of the fractal landscape generation (which was also recently re-written and optimized for a flash 7 version using random midpoint displacement) that uses perlinNoise to generate the height-map for the terrain. In addition, there are minor color variations to make it look a tad less plastic, blurring for land further in the distance, and clouds.
Also, a couple things of note: I've seen quite a few examples of things in the Flash 8 player, but not many people sharing the code to accomplish them. So I have made the source to this example available to download so others can learn from it. Also, I am not sure about all the parameters for the perlinNoise function, and was guessing at some of them based on conventions and behaviors. If you have any additional information (or guesses), please let me know in the comments!
I hope you enjoy viewing the landscape! Oh, and you can click on the file to regenerate a new landscape...
Others Have Said
Just want to say thank you for sharing as it is true that there are few available sources about Flash 8 features... so thanks :)
why do my posts not appear?
hrm. not sure what is wrong with the comments right now - i will check into that when i get a chance!
Hey, I rewrote the app, i reused basically the two perlin noise functions and the compute color function. Look here: http://rorexrobots.com/flash/ (The landscape link at the bottom)
can i post?
Hey Mike! Tried to drop a comment here a month or so ago, no luck! All is better now. Awesome work! I need to get off my duff and play with 8. Whats new? James
wonderful I will try using this for a game Im workin on peace.
one million thanks :D
I'm playing with this in php for a game.. Thanks for the info its helping alot.. If I ever get this game finished i'll let you know..
Sound cool Crafts - I'd love to see progress as you work on it. I had always thought it would give some cool possibilities for games. Especially since the perlin noise functions are much better documented now. Maybe I should revist this in AS3!
Myself and my mate have been playing wargames2 which has been fun but we both wanted to blend in some visual elements so started making a "sort of" game.. (map at the pressent :D I'll drop you a linky when we have some worth showing..
Thanks for share us the great Archive!

My name is Mike Johnson, though many know me as exorcyze. I have been in love with programming
for over 25 years and use Adobe Flash for most of my personal experiments. I enjoy sharing
knowledge and study almost anything. Most of my professional work is in Actionscript, C#.Net and PHP.
