HOME | DD

roboprez avatar

roboprez — Random Land Gen - Fractal


Random Land Gen - Fractal
Published: 2009-07-16 09:39:19 +0000 UTC; Views: 4145; Favourites: 19; Downloads: 31
Redirect to original
Description Instructions...
Click to double grid, space to reset. If flash brings up a slow script warning, click no to keep on going or click yes to keep what you've done

This is land generation using the fractal method. I learnt the method from ChevyRay's blog post

[link]
Now in case you are confused ill explain what it does. First it creates an 8x8 grid and fills it randomly with blue/green tiles. Now when you click it's going to double the grid (16x16) and double what was already there (GBBG becomes GGBBBBGG). Now for each tile it checks the nine tiles around it. Now depending on what's around it it has different chances of being G/B. Then you keep on clicking until you get to 512x512

I originally did this in AS2 but it was very slow (Flash would bring a slow script message on 206x206). Because of this a decided to read up on AS3 and convert it. this took 6 frustrating hours! Tell me when on your computer it brings the first slow script message (15 second time-out I recall).

Okay well I'm going to update this more with some funky features later!
Related content

Comments (18)