Sunday, October 28, 2007

Polar Color Test

More complicated Entity Test

Still entirely nondeterministic, but now I've added some more color controls. Some of these particles are positive poled and will naturally attract, some will repel. Hold down the mouse to invert the magnetic pole of the mouse (and increase the power of the magnet).

Tuesday, October 23, 2007

Companion Sphere

Abject return value chain abuse here:

em.addAffector(new MouseAttractor(5)).assign( em.addEntity(newe(0,0xEE0000)) );
em.addAffector(new MouseAttractor(-5)).assign( [em.addEntity(newe(90)), em.addEntity(newe(180)), em.addEntity(newe(270))] );

Creates this version, with 3 of them hating the Mouse and 1 loving it

(newe() in this case just makes an entity with a circle drawn and a start angle with a velocity of 10 and a color)

Uno Mas

Added a 4th Affector that will attract to the mouse cursor if you get close enough

Entity First Tests

First Entity Test

I'm rebuilding my particle system around a couple base objects: Entity, EntityManager, EntityEmitter(optional).

Entities are Sprites with the ability to be updated via a delta 'time' slice. They support nondeterministic animation through this system natively, but they also can each have their own timeline objects to have properties of themselves deterministic.

EntityManager objects manage groups of entities and serve as a single point of contact to update or evaluate an entire group. They also manage removal, and Affector chains.

The whole entity thing is basically a way to get things like Affectors without having emitters - so I can write an Artificial Intelligence Affector for an enemy that needs updating/main loop service.

This example has 4 entities and 3 affectors (WobbleAffector, VelocityClampAffector, RadialSoftBoundsAffector).

Flash? in my YouTube?

http://www.lostinactionscript.com/blog/index.php/2007/10/13/flash-you-tube-api/
Saved here for future usage.

Entity is coming

rewriting particle framework, brb
(RSS feed)