AS3: animated landscape
More fun
Click here to have a look. A little bit CPU intensive. Move the mouse to move across the land. The upper left corner shows the perlinNoise map of the land. Refresh for a new map.
betaruce.com
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
« Oct | Jan » | |||||
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
More fun
Click here to have a look. A little bit CPU intensive. Move the mouse to move across the land. The upper left corner shows the perlinNoise map of the land. Refresh for a new map.
Still not completed, but looks quite good to me.
Click here to have a look. It may need a bit of time to load.
The upper left corner is the perlinNoise for creating the landscape. The right gradient is the coloring scheme.
Things that will be added: interaction, better rendering, animation, etc…
I was typing some AS3 one day and was a bit lazy. I did the following:
The EnterFrame work, but not the Mouse event. This is because the mouse event does not respond to the timeline ("this" refers to the timeline).
Therefore, to make the mouse respond to the movement, I add the event to some object e.g. stage in my case.
This is also true for Keyboard events.
Stage is only the class name i.e. flash.display.Stage, whereas stage is the thing referring to the real stage.
This can create lots of confusion, esp in the Flash 9 Alpha Stage is highlighted in blue but not stage.
I find that many people want to make a fire effect with the new filters in Flash 8.
I have written a tutorial about my way of creating this effect. My way is quite simple and the effect is realistic enough, altho it maybe a bit CPU intensive. Anyway I hope this can be a useful one .
Basically you can use the same principal and write it in AS 3. If people think it is good and the response is good, I will write one in AS 3 later.