banner ad

Tuesday, May 30, 2006

Obstacle avoidance v1 »

This is the first script of a series on obstacle avoidance with unknown trajectories.  This steering behavior anticipates the clip's future path and avoids the the cone shaped obstacles by adding a lateral steering force to the velocity. ...

Track your flash performance »

Find out if your audience is viewing your Flash content. Track who your audience is. See if your Flash content's popularity is on the rise or taking a tumble. Learn where your traffic is coming from.  I have been using Mochibot for stats tracking...

Friday, May 26, 2006

Particles w Collision v2 »

Collision detection was added to my last border detection v2 post to ceate the following script.  Theoretically this relates back to my circle hit detection series.  I needed to make some adjustements to the collision reaction method in order...

Tuesday, May 23, 2006

border detection v2 »

I was not too proud of my last border detection post.  Not that it did not work correctly, I simply found it too long to implement and use. I rewrote the code using the assign direction boolean value trick.   We simply verrifiy if the...

Monday, May 22, 2006

Assign direction v1 »

I was trying to find the best way to get randomly placed movieclip to choose a traveling direction (left or right) and move that way.  I was looking for an elegant solution and not the clinky chunky one I see everywhere. I finaly realised that...

Monday, May 15, 2006

Particles w Collision v1 »

Today I combined the particle animation v1 code with the circle hit detection v2 method to compile and create a steering behaviors for autonomous characters.  This gives each particle the ability to navigate around their world in a life-like...

Friday, May 12, 2006

circle hit detection v4 »

It has been a week  that I am tying to figure out a fail safe circular hit detection mehod.  My problem is simple, every time 2 circles collide at high speed the detection triggers too late.  So I turned to Euclidean Geometry, ...

Thursday, May 11, 2006

rectangle collision v2 »

Border detection combined with a good rectangle collision function can create nice effects.  The only thing I added since my last post is the border detection method.

rectangle collision v1 »

Based on Newtons law of motion, my last posts collision function can also be used in the case of the rectangle rectangle hitTest.

Wednesday, May 10, 2006

circle hit detection v5 »

My last post was dedicated to the study of  hit detections in circular shapes and finding a replacement to the faulty flash hitTest method. The following explores what happens when two circles collide.   Collisions involve forces...

Monday, May 08, 2006

circle hit detection v3 »

In my last 2 posts; circle hit detection v1 & v2, I described 2 techniques to detect if circles collide. Both were great at low speeds but reached a breaking point when speeds were increased. Collision simulations in flash is discrete in the...

circle hit detection v2 »

Handling the collisions of two balls colliding in flash is based on the pythagorean theorem. In any right triangle, the area of the square whose side is the hypotenuse (the side of a right triangle opposite the right angle) is equal to the sum of the...

Thursday, May 04, 2006

circle hit detection v1 »

The next few posts are dedicated to the topic of handling the collisions of two balls. To correctly calculate the collision, we first calculate the area a clip traveled since the last enterframe, we calculate this from the x|y coordinates the old clip...

border detection »

How can I be so dumb as to have forgotten to post the basics of border detection.  Attach a bunch of clips to the stage, give them a speed (vx,vy) and change their x|y values on enterframe. Border detection  verrifies which direction...

Wednesday, May 03, 2006

rectangle to rectangle hitTest »

To detect that a collision occurred between two rectangles using the hitTest movieClip property can be limiting. You may need to accept lower accuracy or you could use some fancier programming. The following example computes the left and right...

3D particles animation »

Based on the particle animation v1 script, I decided to add a 3D engine with pullthrough.  Now particles deviate from their rotation angle and find new paths to follow while residing in a three dimensional space. I have to admit that the resultung...