My entry for The 25-Line ActionScript Contest, candidate 008, a flight simulation over a terrain of perlinNoise.


Awfully long lines of code in an extremely compressed form isn’t the easiest thing to read, so here’s a couple of tricks for tightening code I came up with:
instead of
addEventListener(Event.ENTER_FRAME, update);
function update(e:Event):void {
var i:int=1, j:int =2, ii:int =0; ...you could write:
addEventListener(Event.ENTER_FRAME, function update(e:Event, i:int=1, j:int=2, ii:int=0):void {and how to set pixels of a BitmapData on a single line:
(bmd = new BitmapData(w,h,false)).setVector( new Rectangle(0, 0, bmd.width, bmd.height), Vector.<uint>([0xebe9da, 0xebe1db, 0xe9e9da,/* long list of uints for the pixel values */ 0x00]));… I think I’ll later post the whole code in a longer and more readable version as soon as I get some comments written on that.
Currently (January 22, 6:38 pm) my entry seems the be at 3rd place, with 10 votes (12,12,10, …) – so let’s see, anything might happen ! Who wouldn’t mind CS4 for a birthday present ?
Edit (January 23, 2009 at 8:48 am): Looks So Very Promising ! ok, I’m trying to keep cool, anything might still happen !
Edit (January 28, 2009 at 10:15 am): O-oh, my entry was leading all the weekend, now it looks like 030 has taken some votes ahead … But hey – you still have time to vote if haven’t already !
Edit (February 1st, 2009): Well, new month, new ideas – or actually old, writing 008 I did come up with couple of more ideas, so let’s see !





I voted for your work
I think it’s absolutely brilliant. And the best from the list.
By: Roma on January 22, 2009
at 7:11 pm
I actually voted for your entry as I find it both cool looking and using some stuff I did not know of.
And thirdly I can come in handy in a lot of other works 
I mean this vector thing. Will need to try and play with it
For example it reminds me of this http://vimeo.com/2094557
Anyways good luck wining
By: wonderwhy-er on January 22, 2009
at 7:19 pm
Brilliant!
I’ve always been obsessed with endless perlin noise terrains, I was gonna do one for the 25 lines contest but I could never beat this!
By: Mark Barcinski on January 22, 2009
at 7:29 pm
This is a great demo. I’ve also been working on my own terrain generator these past few weeks – seems to be the flavour of the month at the moment
By: Tom on January 22, 2009
at 8:07 pm
great job!
i did a very primitive terrain generator for the previous 25lines contest (http://www.flashfuck.it/2008/11/30/my-entry-to-bit-101s-25-lines-competition/) but, hey…this really rocks!
By: Piergiorgio Niero on January 22, 2009
at 8:15 pm
[...] http://pixelero.wordpress.com/2009/01/22/flight-25/ [...]
By: The 25-Line ActionScript Contest » About January Entry 8 on January 22, 2009
at 10:50 pm
I still can’t believe that took only 25 lines!
By: Kate on January 22, 2009
at 11:45 pm
I had the same idea for December contest.
But i didn’t want to use drawTriangles (i don’t know why, may be that was my mistake) and tried to use something like voxel but using DisplacementMap.
But i ended up with Bottle Glass Mountains.
By: Dan on January 23, 2009
at 1:34 am
You are the best!
I`m your fan from today
By: gasubasu on January 23, 2009
at 2:24 am
Congrats Petri.
This time I didn´t manage to take part but in my point of view, your file is by far the most impressive one.
So, CS4 is waiting…
Cheers
-frank
By: Frank Reitberger on January 23, 2009
at 9:43 am
That was so impressive man!
By: Mr.doob on January 23, 2009
at 11:46 am
You should put it up on wonderfl (with proper code formating
)
By: Mr.doob on January 23, 2009
at 11:47 am
Great Work
I voted for you
By: VapeS on January 23, 2009
at 12:11 pm
I voted for you, even though I have my own entries in the finals! Nice work. Your entry deserves to win.
By: Nathan on January 23, 2009
at 4:10 pm
Excellent stuff… despite the compressed nature of the code, this is a great example of making use of fp10’s Matrix3D, Utils3D etc…
By: Zevan on January 24, 2009
at 5:47 pm
It was a tough decision, but I could sit and watch your 25 lines do their stuff all day! You got my vote, good luck!
By: Binary on January 26, 2009
at 4:21 pm
what a pity, petri.
i really thought this time the most impressive entry, and not the one with the most ‘friends/supporters’ would win.
in my point of view, your entry was the most advanced one by far…
maybe they change their voting system in the future (hope so!)?
By: Frank Reitberger on February 1, 2009
at 1:40 pm
[...] Flight 25 « Pixelero [...]
By: 今日僕が気になったもの_Feb 3 ‘09 | ReInit_creative Log on February 3, 2009
at 11:41 pm
You mean pictures can be drawn using actionscript? You mean actionscript as in Flash?
By: Joy on February 7, 2009
at 6:52 pm
@Joy – Yep, generated terrain, here’s some links for further info:
http://iquilezles.org/www/articles/terrainmarching/terrainmarching.htm
http://www.subblue.com/blog/2009/3/7/tracing_a_terrain
… and February’s entries for 25 lines, n:o 9’s ‘magic card trick’ is nice, on the second run I figured it out – but my vote went to n:o 10:
http://www.25lines.com/?page_id=231
By: pixelero on March 17, 2009
at 7:20 am