I’m still working on the flocking code I blogged about earlier.
I wanted to get more flock objects on screen. But my nearest neighbour detection code was VERY SLOW. In the old version each flock object would do a closest neighbor check by for looping through EVERY OTHER ENTITY on screen. The number of calculations would increase exponentially as the number of flock entities increased. This set a limit of about 200 entities before things started to slow down.
So I decided to add a broad level distance detection level. My first attempt got me up to about 700, before things started to slow down. Which was not bad but I was sure I could do better. At this point my friend William stepped in and essentially re-wrote my code 3 times over (William is a math major, and a super smart guy). One of his broad hit level schemes let me get up to 2000 entites on screen at once (on my home computer). The version I posted here shows 1200.
See the mega swarm in action after the break.
Read the rest of this entry »
January 18th, 2009 by Peter Organa
Hey guys, I made a prettier version of the Swarm app I posted yesterday.
Check it out after the break.
Read the rest of this entry »
January 8th, 2009 by Peter Organa
Recently I watched a video on Ted.com. In the video Steven Strogatz talks about sync, in one segment he speaks about flocking behavior and lists the three simple rules that govern flocking. Later I found that this type of artificial flocking behaviour can be referred to as ‘Boids‘.
So yeah… I decided to code it up in Flash ActionScript 3.0.
The image on the left doesn’t really do the app justice.
Click more to see the app in action.
Read the rest of this entry »
January 7th, 2009 by Peter Organa
Recently saw this link on BoingBoing.
Some fellas used Adobe’s Alchemy
(this is the first I’ve heard of it) to compile Dooms C++ code directly to Actionscript.
The frame rate isn’t all that great, but I’m still incredibly impressed with Adobe for coming up with all this crazy stuff and the Newgrounds crew for getting it to work.
Click to see Doom in a Browser (FP 10 required)
November 29th, 2008 by Peter Organa
Posted in
Programming | Comments Off on Doom in Actionscript CRAZY!
Recently I had some time to goof off at work and I wanted something quick and dirty to play with. So I tried to generate a flame using Perlin noise.
Now I know a ton of people have already done this kind of stuff. But I wanted to give it a shot myself. I don’t think my attempt is half bad either.
Really this is just a Perlin noise field in a bitmap being scrolled and blurred on 3 layers. Sorta simple… kind of 😀
The source code is super messy and not very edit friendly, but you’re welcome to it if you want it:
Click to download Source
You can see the swf in action after the break.
Read the rest of this entry »
November 24th, 2008 by Peter Organa
Well, I said I was working on Box2d and indeed I am.
Over the past week I’ve been working on this for my birthday invite (turning 29! Terror!).
I’m using computeSpectrum to read in the music (by Aphex Twin). The melody controls the frequency and size of the circles. The beat brings in the red squares. It looks better running so please don’t judge it by the image.
You can see the Application in action after the break.
Read the rest of this entry »
November 24th, 2008 by Peter Organa
Hey, just putting the word out in case anyone else is having similar problems.
I was playing with AIR AS3/Flash recently and ran into some serious headaches while listening for the closing event.
Eventually I discovered that Mac and PC have to listen for two different events… sigh. Or so I believe, I don’t have a Mac to test on.
PC Listener:
stage.nativeWindow.addEventListener(Event.CLOSING, onClosing);
Mac Listener:
NativeApplication.nativeApplication.addEventListener(Event.CLOSING, onClosing);
I’m new to AIR so if I’ve seriously misunderstood something fundamental please email me at:
organa@gmail.com
August 25th, 2008 by Peter Organa
Posted in
Programming | Comments Off on AIR Mac & PC listeners
Hey! I haven’t posted for a while! I was working on a huge project for McCain foods.
Now that it’s done I can share it!
The project is called ‘Rose Recommends’. It allows the user to plan out their meals for the week. More importantly the application will show the nutritional information for each food item and the plate as a whole. Now you can finally find out precisely how bad eating a plate full of Cottage Cheese is for you.
I spent a pretty exciting/stressful month working on this app, I hope you like it.
If you have any questions/comments feel free to post them down below.
I’ll try to get some experimental stuff up again soom. I just need to enjoy the summer a bit first. It’s almost gone!
Click to see the app!
July 24th, 2008 by Peter Organa
Alright, here it is flipBoard Ver. 1.0!
This is an animated picture transition engine written in AS3 which uses as3flickrlib to connect to Flickr to pull images in real time.
I realized that the panels in the previous version were far too small and far too fast. Giving the impression that the panels were just kind of shimmering rather than actually flipping. This version has much larger and slower panels.
I’ve also added title and author support!
Another new feature is skipping images: If you click on the image you can force it to go to the next image without waiting for the timer. I’ve added a new transition style (circular) for these forced swaps.
After the break I’ll show off the working swf, I’ll give a link to the source code and I’ll describe how to use the application.
I’ve also included a bare bones example of my as3flickrlib implementation.
Read the rest of this entry »
June 2nd, 2008 by Peter Organa
I’m still working on this one, but I think I’ve made enough progress that I can show it off in its current state.
This AS3 app is pulling images from Flickr using as3flickrlib and displaying them in an animated pixel board.
Read the rest of this entry »
May 31st, 2008 by Peter Organa
Posted in
AS3,
Programming | Comments Off on Pixel Board using as3flickrlib (SWF in progress)