<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>simppa.fi/blog &#187; flash</title>
	<atom:link href="http://www.simppa.fi/blog/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simppa.fi/blog</link>
	<description>minä kaikkeudessa.</description>
	<lastBuildDate>Wed, 11 Jan 2012 11:10:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introducing open source evoSpicyParticleEngine</title>
		<link>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/</link>
		<comments>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 16:25:05 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1314</guid>
		<description><![CDATA[In this post I&#8217;m going to explain some of my findings when playing around with Adobe&#8217;s Stage3D and particles. I have pushed the current version of particle engine called evoSpicyParticleEngine into GitHub, will show some examples how to play with it and explain tricks used in it. &#8230; but first I want to joyously announcing [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.simppa.fi/blog/wp-content/uploads/2011/11/evospicyparticleengine1.jpg' alt='' title='evospicyparticleengine' width='920' height='377' class='alignnone size-full wp-image-1787' /></p>
<p>In this post I&#8217;m going to explain some of my findings when playing around with Adobe&#8217;s Stage3D and particles. I have pushed the current version of particle engine called evoSpicyParticleEngine into GitHub, will show some examples how to play with it and explain tricks used in it.<br />
<span id="more-1314"></span><br />
&#8230; but first I want to joyously announcing that I do not owe you shit. Nor does anyone else that open source stuff or release what ever. So if you don&#8217;t like the syntax or what ever don&#8217;t pressure me with feature requests. Get involved by forking my codes.</p>
<p>We are the most spoiled generation ever. The notorious West. At that nanosecond everything isn&#8217;t absolutely perfect we start to whine like children. One can just wonder how complaining when train schedule fails for 10 minutes sounds from majority perspective. (including those four billion people that live under $2.50 a day)<br />
How utterly ridiculous it is to whine when some extremely sophisticated technology fails to work at that precious moment one felt like using it? (e.g. Internet)<br />
Or how about whining when some refugee that came four months ago from country middle of oil war fails to pronounce the pizza delivery right?</p>
<p>Here&#8217;s a <a href="http://www.youtube.com/watch?v=8r1CZTLk-Gk" target="_blank">great sort youtube clip</a> from Conan O&#8217;Briens show related to this. </p>
<p>We face this nonsense when perspective is fucked up. Lets say we ditch the whining and preserve efforts.</p>
<p>Here&#8217;s my next effort for our playgrounds wellbeing (no more preaching):</p>
<p><strong>evoSpicyParticleEngine</strong></p>
<p>The idea behind this engine was to be able to render massive amount of moving particles. So this meant some restrictions. For example it only renders full buffers, it renders triangles instead of quads and all particles share some properties.</p>
<p>All this stuff can be find from GitHub. You&#8217;ll get links at the bottom of this gigantic post. Lets take a look from outside. This is how you render basic particles with sphere explosion movement:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// Create engine instance. (Reference to stage, stageIndex = which stage.stage3Ds to use, enableErrorChecking, set f-key as fullscren trigger)</span><br />
spicy = <span class="kw1">new</span> EvoSpicyParticleEngine<span class="br0">&#40;</span><span class="kw7">stage</span><span class="sy0">,</span> 0<span class="sy0">,</span> <span class="kw1">false</span><span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// If context3d failed</span><br />
spicy<span class="sy0">.</span>on3DFailed<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>on3DFailed<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// Get info about users GPU.</span><br />
spicy<span class="sy0">.</span>onGPUInfo<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>onGPUInfo<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// Wait until the engine is ready.</span><br />
spicy<span class="sy0">.</span>onEngineReady<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>onEngineReady<span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>&#8230;</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">private</span> <span class="kw3">function</span> onEngineReady<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Z-Sort particles or not.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setDepthTest<span class="br0">&#40;</span><span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Texture for particles.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setTextureParticle<span class="br0">&#40;</span><span class="kw1">new</span> TextureParticleAlphaKill<span class="br0">&#40;</span>128<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// BlendMode of particles.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setBlendMode<span class="br0">&#40;</span><a href="http://www.google.com/search?q=blendmode%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:blendmode.html"><span class="kw5">BlendMode</span></a><span class="sy0">.</span><span class="kw8">NORMAL</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// How far away particles are rendered</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>zFar = <span class="nu0">30000</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Field Of View</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>fov = <span class="nu0">90</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// count : int (maximum particle count = 1398080), valueClass : IValue (settings for particles. start points, end points, speeds, colors) </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>addParticles<span class="br0">&#40;</span> &nbsp; &nbsp; <span class="nu0">139808</span><span class="sy0">,</span> <span class="co1">// Particle count</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ValueExplosionSphere<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ColorGradient<span class="br0">&#40;</span><span class="br0">&#91;</span>0x3bc1ff<span class="sy0">,</span> 0x84481b<span class="sy0">,</span> 0xFFc1ff<span class="sy0">,</span> 0x3bc1ff<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> &nbsp;<span class="co1">// Start position multipliers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">2500</span><span class="sy0">,</span> <span class="nu0">2500</span><span class="sy0">,</span> <span class="nu0">2500</span><span class="sy0">,</span> <span class="co1">// End position multipliers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">16</span><span class="sy0">,</span> <span class="co1">// Size of single particle</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">true</span><span class="sy0">,</span> <span class="co1">// Randomize sizes or not</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="co1">// Add random value for individual speed</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// particle renderer. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> renderer<span class="sy0">:</span>RendererLinear<span class="sy0">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setRenderer<span class="br0">&#40;</span>renderer = <span class="kw1">new</span> RendererLinear<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ProgramLinear<span class="br0">&#40;</span>EaseProgram<span class="sy0">.</span><span class="kw8">LINEAR</span><span class="sy0">,</span> <span class="kw1">false</span><span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="co1">// Shaders</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">0.00008</span><span class="sy0">,</span> <span class="co1">// Speed of particles</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">128</span><span class="sy0">,</span> <span class="co1">// How many particles to rebirth in every frame</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x1e1b17<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// Background color</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Move the start point</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; renderer<span class="sy0">.</span>startPoints<span class="br0">&#91;</span>0<span class="br0">&#93;</span><span class="sy0">.</span><span class="kw7">y</span> = <span class="sy0">-</span><span class="nu0">500</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// add extra start point(s) (renderer.startPoints[1])</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; renderer<span class="sy0">.</span>addStartPoint<span class="br0">&#40;</span><span class="kw1">new</span> StartPoint3D<span class="br0">&#40;</span>0<span class="sy0">,</span> 500<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Start rendering</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">addEventListener</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="sy0">.</span><span class="kw8">ENTER_FRAME</span><span class="sy0">,</span> run<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>&#8230;</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">private</span> <span class="kw3">function</span> run<span class="br0">&#40;</span>event<span class="sy0">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">time</span><span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a> = <span class="kw7">getTimer</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">angle</span><span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="kw7">time</span> <span class="sy0">*</span> <span class="sy0">.</span>0001<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> rad<span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="nu0">1000</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span><span class="kw7">x</span> = rad <span class="sy0">*</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span class="kw5">Math</span></a><span class="sy0">.</span><span class="kw7">sin</span><span class="br0">&#40;</span><span class="kw7">angle</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span>z = rad <span class="sy0">*</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span class="kw5">Math</span></a><span class="sy0">.</span><span class="kw7">cos</span><span class="br0">&#40;</span><span class="kw7">angle</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span><span class="kw7">y</span> = <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span>lookAtPoint<span class="br0">&#40;</span>0<span class="sy0">,</span>0<span class="sy0">,</span>0<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span>rotationZ = <span class="kw7">time</span> <span class="sy0">*</span> <span class="sy0">.</span>01<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span><span class="kw7">render</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>Code above in action<br />
<a href="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticlebasic/"><img src="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticlebasic/screenshot.jpg" alt="SpicyParticleBasic" />SpicyParticleBasic</a>.</p>
<p>Another example that&#8217;s also in GitHub<br />
<a href="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticleblurperlin/"><img src="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticleblurperlin/screenshot.jpg" alt="SpicyParticleBlurPerlin" />SpicyParticleBlurPerlin</a>.</p>
<p>That looks easy enough?</p>
<p>Lets take a look on some of the tricks.</p>
<p><strong>Single particle</strong><br />
Like I mentioned earlier in this engine particles are triangles. The &#8216;normal&#8217; way would have them in quad that contains two triangles. That takes 4 vertices which is more then 3 and triangle can draw a particle as well.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/11/particletriangle.jpg" alt="" title="particletriangle" width="640" height="200" class="alignnone size-full wp-image-1374" /> </p>
<p>Common sense, huh? ;)</p>
<p><strong>Face particle to camera</strong><br />
This is a trick that I got idea and code examples from <a href="http://jpauclair.net/2011/07/18/massive-3d-particle-system-in-flash-molehill/">blog post</a> by Jean-Philippe Auclair who works at <a href="http://frimastudio.com/">Frima Studio</a>. It&#8217;s a great post about particles. Make sure to read it up if you haven&#8217;t already.<br />
Trick goes like this:</p>
<p>1. Precalculate a single triangle and store it to GPU. Store those register numbers (10,11,12) into individual particle position component (x, y, z, w <- right there).</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw2">var</span> <span class="kw7">data</span><span class="sy0">:</span>Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="sy0">-</span>1<span class="sy0">,</span> <span class="sy0">-</span>1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 10<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw7">data</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>0<span class="sy0">,</span> 1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 11<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw7">data</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>1<span class="sy0">,</span> <span class="sy0">-</span>1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 12<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>2. In render method create a matrix that&#8217;s invert from camera matrix and pass it on to GPU</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// CAMERA</span><br />
transformCamera<span class="sy0">.</span><span class="kw7">identity</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span><span class="kw7">position</span> = camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">if</span><span class="br0">&#40;</span>camera<span class="sy0">.</span>_doLookAt<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; transformCamera<span class="sy0">.</span>pointAt<span class="br0">&#40;</span>camera<span class="sy0">.</span>_renderLookAt<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Z_AXIS<span class="sy0">,</span> _up<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; camera<span class="sy0">.</span>_doLookAt = <span class="kw1">false</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationX<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Y_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationY<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Y_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationZ<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Z_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span>copyToMatrix3D<span class="br0">&#40;</span>transformParticle<span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;<span class="co1">// Copy camera matrix</span><br />
transformCamera<span class="sy0">.</span><span class="kw7">invert</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Invert camera</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// MODEL</span><br />
transformModel<span class="sy0">.</span><span class="kw7">identity</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span><span class="kw7">position</span> = <span class="kw1">this</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span>append<span class="br0">&#40;</span>transformCamera<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span>append<span class="br0">&#40;</span>transformProjection<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
context3d<span class="sy0">.</span>setProgramConstantsFromMatrix<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 0<span class="sy0">,</span> transformModel<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromMatrix<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 13<span class="sy0">,</span> transformParticle<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>3. In vertex shader get position of stored triangle, rotate that with camera invert. Scale it to desired size and transform to world space.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt2, vc[va0.w] <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// get vertice position from stored triangle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;m33 vt0.xyz, vt2.xyz, vc13 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span>&nbsp; &nbsp; <span class="co1">// rotate vertice with camera invert matrix</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt0.w, vt2.w <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// set proper w value from stored triangle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt0.xyz, vt0.xyz, va3.z <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; <span class="co1">// va3.z = Size of individual particle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt0.xyz, vt0.xyz, vt1.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// set new position for vertice </span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;m44 op, vt0, vc0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// transform and output vertex x,y,z</span></div>
</div>
<p>Tadaa! now it&#8217;s always facing the camera and this trick didn&#8217;t cost a penny.</p>
<p><strong>Moving particles in vertex shader</strong><br />
In AGAL vertex shader we cannot add values to vertices. Like move them a bit in x-axel in every frame. The data isn&#8217;t stored anywhere. All values must be at memory and push to GPU and then it&#8217;s just drawn. Continue movement could be done by storing movement values into a texture but we do not have access to texture in vertex shader. This a challenge and there&#8217;s a trick to get around this: We store start and end point of every vertices. Give a start time value to every particle and send constantly increasing time value to vertex shader. Then simply tween the particle position between those points according to time and start time value.</p>
<p>This way we can &#8216;rebirth&#8217; single particle by setting it&#8217;s start time value to current time value.<br />
This is how it looks like in AGAL:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt1, va0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// vertex</span><br />
<span class="co1">// va3 = individual component for every particle</span><br />
<span class="co1">// va3.x = starttime</span><br />
<span class="co1">// va3.y = speed multiplier</span><br />
<span class="co1">// va3.z = size of particle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;sub vt3.x, vc4.x, va3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// time &#8211; start time</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt3.x, vt3.x, va3.y <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// multiply time with move.y (to get individual speed)</span><br />
<span class="co1">// LINEAR MOVEMENT</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;sub vt6.xyz, va4.xyz, vt1.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// b &#8211; a</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt7.xyz, vt6.xyz, vt3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; <span class="co1">// movement</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt1.xyz, vt1.xyz, vt7.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// add move</span></div>
</div>
<p>And that&#8217;s how we can move <a href="http://www.simppa.fi/blog/1_point_4_million_particles/" target="_blank">1.4 million particles in flash</a>.</p>
<p><strong>Manipulate the movement</strong><br />
AGAL is not limiting language. (except that &#8216;no access to texture&#8217;-thing) It has a stack of mathematical functions. With those a lot is possible. Here&#8217;s how particle movement is eased in exponential fashion:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// EXPO OUT</span><br />
<span class="co1">// &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; c * (-Math.pow(2, -10 * t/d) + 1) + b;</span><br />
<span class="co1">// where &nbsp; &nbsp; &nbsp; &nbsp;t = time; b = 0; c = 1; d = 1;</span><br />
<span class="co1">// so it&#8217;s &nbsp; &nbsp; &nbsp;1 * (-Math.pow(2, -10 * time/1) + 1) + 0;</span><br />
<span class="co1">// and &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; -Math.pow(2, -10 * time) + 1;</span><br />
<span class="co1">//________________________________________________________________</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt6.x, vc5.z, vt3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// -10 * vt3.x</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;pow vt7.x, vc5.w, vt6.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// Math.pow(2, vt6)</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;neg vt7.x, vt7.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// -Math.pow(2, vt6)</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt3.x, vt7.x, vc5.y <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// -Math.pow(2, vt6) + 1</span></div>
</div>
<p><strong>Get your forks polished</strong><br />
 &#8211; <a href="https://github.com/simppafi/evoSpicyParticleEngine">evoSpicyParticleEngine at GitHub</a>. Also check those examples.</p>
<p>Hopefully you learn something from it. You can use it anyway you like. Contributing for its development by forking at GitHub is desirable. I&#8217;m slowly developing it more as time goes by. Post process filters, background and overlays are on table. Ohh and lights of course. All those are actually in my classes commented out waiting for polishing.</p>
<p>Peace and love, Simo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°80 1.4 Million particles</title>
		<link>http://www.simppa.fi/blog/1_point_4_million_particles/</link>
		<comments>http://www.simppa.fi/blog/1_point_4_million_particles/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 14:54:37 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1266</guid>
		<description><![CDATA[That&#8217;s 200 000 particle version. That might run on your browser. So like I&#8217;ve written on this blog my particle engine can move large amount of particles from A to B and I can do custom tweening algorithms for that transition. Great&#8230; what then. I realized that using perlin noise for setting the B positions [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/heartofglass.jpg' alt='HeartOfGlass' title='HeartOfGlass' width='700' height='377' class='alignnone size-full wp-image-1754' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34695881?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>That&#8217;s 200 000 particle version. That might run on your browser. </p>
<p>So like I&#8217;ve written on this blog my particle engine can move large amount of particles from A to B and I can do custom tweening algorithms for that transition. Great&#8230; what then. I realized that using perlin noise for setting the B positions of the particles could turn this thing look quite interesting.<br />
<span id="more-1266"></span><br />
On my OsX toy the difference between flash on browser and standalone is insane. 200 000-300 000 particles is pretty much the maximum until it won&#8217;t run smooth anymore. I wonder if this is memory related thing? or what? Who knows? Someone from Adobe might&#8230; Well anyways. Here&#8217;s the same thing exploding 1.4 million particles in 1920&#215;1200 resolution with smooth 60fps.</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/bU3z0L2zlhA?fs=1&#038;wmode=transparent&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>There are exactly <strong>1 398 080</strong> animated particles. This is the maximum amount since 64 full buffers is the limitation. It surely is enough. All the contrast will disappear because the screen is full of stuff. Still looks pretty darn rad. Especially thinking it&#8217;s Flash and dead and all..</p>
<p>Hopefully some update in the future will unleash this power for flash player in browser too.</p>
<p>&#8212; (UPDATE SOME HOURS LATER) &#8212;<br />
Here&#8217;s a 1.4 million particle demo for you to test. It&#8217;s heavy shit. Be patient. I mean it :D<br />
Also added a standalone version that you can play with your flash standalone player. That will run well in decent machine. (after unoptimized initialization)<br />
 &#8211; <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/1_4_million/">Browser version</a>.<br />
 &#8211; <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/1_4_million/standalone_1_4_million.zip">Standalone version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/1_point_4_million_particles/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°79 SpermOfSibelius</title>
		<link>http://www.simppa.fi/blog/spermofsibelius/</link>
		<comments>http://www.simppa.fi/blog/spermofsibelius/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 21:50:36 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1260</guid>
		<description><![CDATA[Prime Sperm of Sibelius. Music http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra and of course. Abandoned Sperm of Sibelius. Music http://soundcloud.com/yourhips/sibelius These are a bit heavier then last ones. Too bad if you have slow computer and you hate classic music. :/]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/primespermofsibelius.jpg' alt='PrimeSpermOfSibelius' title='PrimeSpermOfSibelius' width='700' height='377' class='alignnone size-full wp-image-1757' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34678911?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Prime Sperm of Sibelius. Music <a href="http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra">http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra</a></p>
<p>and of course.</p>
<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/abandonedspermofsibelius.jpg' alt='AbandonedSpermOfSibelius' title='abandonedspermofsibelius' width='700' height='377' class='alignnone size-full wp-image-1761' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34674104?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Abandoned Sperm of Sibelius. Music <a href="http://soundcloud.com/yourhips/sibelius">http://soundcloud.com/yourhips/sibelius</a></p>
<p>These are a bit heavier then last ones. Too bad if you have slow computer and you hate classic music. :/ </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/spermofsibelius/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°78 PyroTechnicsEaseExpo</title>
		<link>http://www.simppa.fi/blog/pyrotechnicseaseexpo/</link>
		<comments>http://www.simppa.fi/blog/pyrotechnicseaseexpo/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 09:47:09 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1250</guid>
		<description><![CDATA[Here&#8217;s how I can &#8216;individually&#8217; move massive amount of particles. 1. Give them start and end point. 2. Tween between those points in vertex shader. 3. Send only time value to vertex shader in every frame. No there&#8217;s no catch. The movement doesn&#8217;t have to be linear. AGAL can do this thing called mathematics and [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/PyroTechnicsExpoOut.jpg' alt='PyroTechnicsExpoOut' title='PyroTechnicsExpoOut' width='700' height='377' class='alignnone size-full wp-image-1766' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34668708?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Here&#8217;s how I can &#8216;individually&#8217; move massive amount of particles.<br />
1. Give them start and end point.<br />
2. Tween between those points in vertex shader.<br />
3. Send only time value to vertex shader in every frame. </p>
<p>No there&#8217;s no catch. The movement doesn&#8217;t have to be linear. AGAL can do this thing called mathematics and is quite awesomely fast in it. Familiar easing functions can be rewritten into AGAL. Upper flash is an example use case of <a href="http://robertpenner.com/">Robbie</a>&#8216;s legendary ExpoOut function.</p>
<p>And here&#8217;s example of ExpoIn function.</p>
<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/PyroTechnicsExpoIn.jpg' alt='PyroTechnicsExpoIn' title='PyroTechnicsExpoIn' width='700' height='377' class='alignnone size-full wp-image-1768' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34666615?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/pyrotechnicseaseexpo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°77 OceanBubbles</title>
		<link>http://www.simppa.fi/blog/oceanbubbles/</link>
		<comments>http://www.simppa.fi/blog/oceanbubbles/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 17:54:59 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1240</guid>
		<description><![CDATA[I&#8217;m working on a new particle engine (evoSpicyParticleEngine). That I&#8217;ll open source when it&#8217;s ready enough. Here&#8217;s some taste of it. There are 200 000 individually moving z-sorted particles. :D I found the browser player a bit slow. Or well.. I know it sounds ridiculous to whine &#8220;it can only run some hundred thousand particles&#8230; [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/oceanbubbles.jpg' alt='OceanBubbles' title='oceanbubbles' width='700' height='377' class='alignnone size-full wp-image-1770' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34663046?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>I&#8217;m working on a new particle engine (evoSpicyParticleEngine). That I&#8217;ll open source when it&#8217;s ready enough. Here&#8217;s some taste of it. There are 200 000 individually moving  z-sorted particles. :D</p>
<p>I found the browser player a bit slow. Or well.. I know it sounds ridiculous to whine &#8220;it can only run some hundred thousand particles&#8230; nyyh nyyh&#8221; when we only had few thousand couple months ago. BUT the local standalone player runs way way way faster! On my OSX it can run almost million in full hd resolution. Maybe browsers limit the power or what?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/oceanbubbles/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°76 FourSparklers</title>
		<link>http://www.simppa.fi/blog/foursparklers/</link>
		<comments>http://www.simppa.fi/blog/foursparklers/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 20:43:29 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1223</guid>
		<description><![CDATA[I just checked and yeah&#8230; I had almost a year break from releasing experiments. The very core content of my blog. What ever. Here&#8217;s another particle experiment. There are 87 380 balls doing their thing. I think this will lead to open source Stage3D particle engine lib and hopefully I end up adding these monsters [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/foursparklers.jpg' alt='FourSparklers' title='foursparklers' width='700' height='377' class='alignnone size-full wp-image-1773' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34661606?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>I just checked and yeah&#8230; I had almost a year break from releasing experiments. The very core content of my blog.  What ever. Here&#8217;s another particle experiment. There are 87 380 balls doing their thing. I think this will lead to open source Stage3D particle engine lib and hopefully I end up adding these monsters to Away3D someday soon too.</p>
<p>This isn&#8217;t a perfect system yet and not fully optimized. Anyway.</p>
<p>What this thing does is:<br />
1. Set start and ending points for particle vertices. (2304 in every frame)<br />
2. GPU will tween between those points.<br />
3. Plus all sort of funky stuff with colors and there&#8217;s light at the top of every particle stream. GPU will calculate distances to those and add more value to colors. As you can see.</p>
<p>Anyway that was the plan. In this case it started to behave funny when I adjusted my AGAL codes and the rule explained doesn&#8217;t fully apply anymore. So what I released here is a mistake, but I think it feels and looks great!</p>
<p><a href="http://soundcloud.com/rupert-falsch/emily-in-love-lullaby-rupert-falsch-remix">Here&#8217;s a link to that cool song.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/foursparklers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Sparkle a Moment</title>
		<link>http://www.simppa.fi/blog/sparkle-a-moment/</link>
		<comments>http://www.simppa.fi/blog/sparkle-a-moment/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 10:59:03 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[evoTinyEngine]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1143</guid>
		<description><![CDATA[You can watch it now or read this thing first. This post contains spoilers but it might help you to understand demo better. There are several ways to view this demo: 1. The blazing performance and highest quality way (recommended): a) Download the standalone player here. (NOT THE DEBUGGER) b) Download the swf + mp3 [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/demo/sparkle_a_moment/"><img src='http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkleamoment1.jpg' alt='SparkleaMoment' title='sparkleamoment' width='700' height='377' class='alignnone size-full wp-image-1778' /></a><a href="http://www.simppa.fi/demo/sparkle_a_moment/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34696579?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>You can watch it now or read this thing first. This post contains spoilers but it might help you to understand demo better.</p>
<p>There are several ways to view this demo:</p>
<p>1. The blazing performance and highest quality way (recommended):<br />
 a) <a href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">Download the standalone player here.</a> (NOT THE DEBUGGER)<br />
 b) <a href="http://www.simppa.fi/awaymole/sparkle/sparkle_a_moment_play_local.zip" target="_blank">Download the swf + mp3 here and open it with that player.</a></p>
<p>2. Play in browser. Great quality but not as good in performance.<br />
 a) <a href="http://www.simppa.fi/demo/sparkle_a_moment/" target="_blank">By visiting this link</a></p>
<p>3. Watch the video.<br />
 a) <a href="http://www.youtube.com/watch?v=e7NbwSnaXso&#038;hd=1">HD Video at YouTube</a></p>
<p><strong>Making of &#8216;Sparkle a Moment&#8217; by Away3D Development Team and Evoflash</strong></p>
<p>It was 18th of August when <a href="http://www.infiniteturtles.co.uk/blog/">Rob Bateman</a>, the head man of Away3D framework (the worlds most advanced open source flash 3D engine), sent me an email and asked for a demo for Robbie&#8217;s and <a href="http://twitter.com/#!/richardolsson">Richie</a>&#8216;s session at Adobe MAX 2011. We did <a href="http://www.simppa.fi/blog/making-of-disconnected/">this sort of</a> collaboration with Away3D guys last year. Although it was a insane job I was stoked to burn my self out a bit again for sake of art and passion for this sport.<br />
<span id="more-1143"></span><br />
I introduced an idea, made a little synapsis and created a <a href="http://www.simppa.fi/blog/wp-content/uploads/2011/10/moodboard.jpg" target="_blank">rough mood board</a>.<br />
<a href="http://soundcloud.com/minomus">Minomus</a> made the track for me last Spring for Assembly demo which I never coded so we had that with us from point zero. (a very good thing.)<br />
Here&#8217;s the synapsis:</p>
<p><em>&#8220;Into the endless darkness two light spheres are born. Slowly giving meaning and life to surroundings. In gentle moving light of spheres objects are showing their forms. Objects are symbols of science, history, society, evolution. nature, liquid and time. When a sphere come close to object it&#8217;ll be shown by the light of sphere and can become life. It can start levitate, sparkle, move, glow or break apart. Eventually spheres will light up everything. All is glamorous and flourishing. Suddenly spheres pop into little sparkles and disappear. Everything turn into deep endless darkness again.&#8221;</em></p>
<p>People liked it (or was too busy to dislike it) so I got a green light to do the direction again. <a href="http://www.flashonthebeach.com/" target="_blank">The Flash on the Beach</a> was closing and everybody was way too busy and could not work for demo. We had a little meet up at the conference and could pick up models for the demo. Other then that it was just drinking and fooling around. After all kind of delays we ended up creating this demo in less then two weeks. <a href="http://blog.closier.nl/" target="_blank">Fabrice Closier</a> and Richard Olsson was working with 3D models and <a href="http://www.ringo.nl/" target="_blank">Ringo Blanken</a> did examples of physics. <a href="http://www.derschmale.com/" target="_blank">David Lenaerts</a> committed a stack of his special effects and went to vacation. I tried to get things together. Worked epic hours with camera cuts, setup elements and desperately struggled to get something to screen so we could move on. Once we got things rolling the process was smooth as nylon. With this kind of abstract idea it&#8217;s very important to get something done and move on from there. It took a lot of everybody&#8217;s faith to get demo in state that it started to make at least some sort of sense. I&#8217;m quite sure it won&#8217;t make sense to most of the viewers after all, but at least we got it done!</p>
<p>Here are screenshots of scenes and some comments about them:</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_01.jpg" alt="" title="sparkle_a_moment_01" width="605" height="342" class="alignnone size-full wp-image-1144" /><br />
Sparkles are born in to darkness. Cold and warm light. You know&#8230; Symbols of Yin and yang, thermodynamics, sweet and bitter, life and death&#8230; all that kind of shit. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_02.jpg" alt="" title="sparkle_a_moment_02" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
A clock. And cogs. Symbols of time obviously, but also progress. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_03.jpg" alt="" title="sparkle_a_moment_03" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Eagle. Is a historical symbol of strength, courage, farsightedness and immortality. It is considered to be the king of the air and the messenger of the highest Gods. This is obviously nonsense as we&#8217;ll witness in near future where everything eventually vanish. (talking about the demo not 2012&#8230;) Eagle is also an animal and represents the Animalia.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_04.jpg" alt="" title="sparkle_a_moment_04" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We dive under water and what we find? no.. it&#8217;s not salmon. It&#8217;s tuna and David&#8217;s awesome realtime mirror ball. Fish is of course part of Animalia, but also very important symbol in various of religions.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_06.jpg" alt="" title="sparkle_a_moment_06" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Lunar eclipse is here to remind us of cycling nature of world. As a symbol it&#8217;s very important in all sort of nonsenses like astrology. It also looked nice with radial blur. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_08.jpg" alt="" title="sparkle_a_moment_08" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
The train leads us to humans and society. It&#8217;s developing extremely fast. The technological progress seems invincible. It slithers through all obstacles.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_09.jpg" alt="" title="sparkle_a_moment_09" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We&#8217;ll move on to military tanks. While band plays ironic smooth jazz they drive in perfect formation. Firmly and certainly jumping off the cliff and form pile of junk.  </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_10.jpg" alt="" title="sparkle_a_moment_10" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We follow sparks and see Hercules, the demigod, the son of Zeus at the bottom of highest stone pole. Eventually he will fall.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_12.jpg" alt="" title="sparkle_a_moment_10" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Demogod now fall into pile of stones. Gravity fade down. Sparkles vanish and void darkness continues.</p>
<p>Simply put demo is about lifespan. It&#8217;s constant property that everything has.</p>
<p>I&#8217;ve been mostly listening to these records during past two weeks while doing demo:<br />
<a href="http://open.spotify.com/album/0hvxqdv8Bg6BXIbTQFr2Sd" target="_blank">Tori Amos &#8211; Night of Hunters</a> and <a href="http://open.spotify.com/album/2JMPfwD9sExl3gzIZd9Bpk" target="_blank">Ladytron &#8211; Gravity The Seducer</a><br />
They might explain this madness a bit.</p>
<p>Big hugs to Away3D guys Rob, Richard, David and especially to Fabrice and Ringo who did a lot of work and had solution to all problems we faced during this process.</p>
<p>Ahh it feels good to have GPU support in Flash at last! Until next time&#8230;</p>
<p>Ohh and <a href="http://tv.adobe.com/watch/max-2011-develop/flash-and-3d-start-your-engines/">here&#8217;s guys shared session with Flare3D guys at Adobe MAX.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/sparkle-a-moment/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Throwing salmon into back seat of Lada</title>
		<link>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/</link>
		<comments>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 09:53:10 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[apexvj]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1121</guid>
		<description><![CDATA[I got a change to speak for three minutes at Flash on the Beach conference few days ago. I was one of the 20 speakers that got three minutes to show something they&#8217;ve done or discovered or whatever. The lineup was pretty damn hot in this session. One could build a conference around these people [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/SalmonFlyingIntoLadasBackSeat.jpg' alt='SalmonFlyingIntoLadasBackSeat' title='SalmonFlyingIntoLadasBackSeat' width='700' height='377' class='alignnone size-full wp-image-1780' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34659430?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>I got a change to speak for three minutes at <a href="http://www.flashonthebeach.com/" title="Flash on the Beach" target="_blank">Flash on the Beach</a> conference few days ago. I was one of the 20 speakers that got three minutes to show something they&#8217;ve done or discovered or whatever. The lineup was pretty damn hot in this session. One could build a conference around these people easily.</p>
<p>For some forsaken reason I was the last one of 20 to get into stage. So I had to wait 57 minutes behind the curtain. 57 minutes of nail eating, struggling against the pressure in my stomach and desperately meditating to keep my mental in some sort of order. The session it self went pretty well. I didn&#8217;t freeze too much. Hopefully FOTB will release videos from Elevator Pitch so I can see others stuff. They sounded really interesting behind the curtain. </p>
<p>My speech was about APEXvj of course. I&#8217;ll post video of it here if there&#8217;s gonna be one. The APEXvjDesktop is now in version 1.0 and we&#8217;ll move on to new project. We gonna get what we learned from earlier projects and build APEXvjHD with just Stage3D based effects. AWESOME! So related to that I showed this <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/" target="_blank">new Molehill experiment</a> at the end of my speech. There are 87 380 particles flying. Movements and rendering are done in GPU so it runs pretty easily in full HD.</p>
<p>Here are songs that I used in my session:<br />
 &#8211; <a href="http://www.apexvj.com/sc/?89930614" target="_blank">Ellie Goulding &#8211; Lights (Bassnectar Remix) by Bassnectar</a><br />
 &#8211; <a href="http://soundcloud.com/blumarten/blu-mar-ten-vs-erykah-badu-you-got-me-remix" target="_blank">Blu Mar Ten vs Erykah Badu &#8211; You Got Me Remix</a><br />
 &#8211; <a href="http://soundcloud.com/weareoliver/i-need-you" target="_blank">Oliver &#8211; I Need You</a></p>
<p>It was brilliant to meet so many web friends in real life. There are risks involved in these geeks + beer situations. No, it&#8217;s not that it&#8217;s only talking about coding.. ohh no, not at all. I spent several hours with <a href="http://www.derschmale.com/" target="_blank">David Lenaerts</a> talking about how we could throw all sort of fishes in to a car. Concludes are that best fish for this job is Salmon and old Lada has simply best back seat for this sort of sport. &#8220;You know what happens when shit hits the fan? -Fish hits the van&#8221;. I also witnessed chicken and ninja moves by party-<a href=" http://twitter.com/#!/nicoptere" target="_blank">@nicoptere</a> and learned some really kinky drinking games from <a href="http://twitter.com/#!/grapefrukt" target="_blank">@grapefrukt</a>. We also solved <a href="http://twitter.com/#!/jlansimaki/status/114097562276986880" target="_blank">the mathematics behind Joshua Davis&#8217;s talk</a>.</p>
<p>So it goes without saying that FOTB was simply epic experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>APEXvj &#8211; Chapter two</title>
		<link>http://www.simppa.fi/blog/apexvj-chapter-two/</link>
		<comments>http://www.simppa.fi/blog/apexvj-chapter-two/#comments</comments>
		<pubDate>Sat, 21 May 2011 10:33:03 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[apexvj]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1090</guid>
		<description><![CDATA[It has been 6 months since the first release of apexvj.com. During that time it has visualized songs for over 1.2 million visitors. Yeah that&#8217;s right. :) She did it all by her self. No advertising or such. It seems that people just like to share it. There aren&#8217;t specific group of people who share [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop04.jpg"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop04.jpg" alt="" title="apexvjdesktop04" width="605" height="284" class="alignnone size-full wp-image-1095" /></a></p>
<p>It has been 6 months since the first release of <a href="http://www.apexvj.com/" target="_blank">apexvj.com</a>. During that time it has visualized songs for over 1.2 million visitors. Yeah that&#8217;s right. :) She did it all by her self. No advertising or such. It seems that people just like to share it. There aren&#8217;t specific group of people who share it. According to Facebook people from teenages to more mature seems to enjoy it. It&#8217;s pleasant to see comments like <a href="http://youropenbook.org/?q=apexvj&#038;gender=any" target="_blank">these</a> . Also when I Google for APEXvj I found a stack of blog posts about it. To me this proofs the idea and execution isn&#8217;t entirely fail. It&#8217;s obvious that this concept can be pushed much more. </p>
<p><span id="more-1090"></span><br />
One thing people constantly ask for is ability to use APEXvj offline and to play their local files. Currently APEXvj can play only one mp3 file at the time. That isn&#8217;t enough. So obvious move is to go to desktop. I&#8217;ve been promising APEXvjDesktop for several months now and been slowly developing it on weekends and at nights. Plus this I&#8217;ve been working as Lead Developer on my day job. Naturally this isn&#8217;t very good mix. One cannot code 24/7 without becoming burnout human ruin at some point. </p>
<p>Although one of the most important component of APEXvj are visuals and they came by my hands a successful service needs much more. As I&#8217;ve blogged before a friend of mine Art Director Jani Länsimäki designed layouts, graphical lines and worked with me to clarify the concept and user experience. I believe that without this combo this toy would not be as good. Jani brings so much to table and also get best out of me. I wanted this combo back with full power.</p>
<p>It was not simple task but I&#8217;m happy to announce that team is back again! We managed to make a deal and have now been developing the APEXvjDesktop almost fulltime for a week. This will continue at least until end of this year. So there are 7 months to show what we are made of. We have a lot of ideas on the table waiting for their creation, but first we are working on getting the first release of desktop out before summer vacations. I won&#8217;t show you all the cards at this point but here are few sneak previews. Screenshots are taken from the current development version and they contain only offset graphics.</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop01.jpg"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop01.jpg" alt="" title="apexvjdesktop01" width="605" height="400" class="alignnone size-full wp-image-1092" /></a><br />
Bunch of new visualizations and ability to control their attributes in real time. Users can create combinations little like in demotools and share them. Users can also show the visualization on one screen and adjust their attributes on second.</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop03.jpg"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/05/apexvjdesktop03.jpg" alt="" title="apexvjdesktop03" width="605" height="267" class="alignnone size-full wp-image-1094" /></a><br />
New music sources such as Audiotool (maybe more&#8230; ;) ) and ability to play all local music files including the iTunes format .m4a. You can also create custom list as excepted.</p>
<p>I&#8217;ve been working fast phase projects for 10 years so guess how thrilled I am to have this opportunity to create something without compromises and with relatively long time phase! I think we&#8217;re going to setup a short beta test phase before first release so if you would like to take part on that just drop a message to this blog or <a href="http://www.twitter.com/simppafi" target="_blank">tweet me</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/apexvj-chapter-two/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>The way we name our classes</title>
		<link>http://www.simppa.fi/blog/way-we-name-our-classes/</link>
		<comments>http://www.simppa.fi/blog/way-we-name-our-classes/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 11:53:27 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1061</guid>
		<description><![CDATA[This minor detail has been haunting me for years. It&#8217;s not extremely significant, but really makes a difference with modern coding tools. I&#8217;m talking about the code hinting that all decent coding tools have. It&#8217;s such a priceless feature, but for some reason I often see libs that don&#8217;t take advantage of it. Most libs [...]]]></description>
			<content:encoded><![CDATA[<p>This minor detail has been haunting me for years. It&#8217;s not extremely significant, but really makes a difference with modern coding tools.</p>
<p>I&#8217;m talking about the code hinting that all decent coding tools have. It&#8217;s such a priceless feature, but for some reason I often see libs that don&#8217;t take advantage of it. Most libs are still coded in &#8220;clear English format&#8221;.<br />
<span id="more-1061"></span><br />
For example:</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.18.18-PM.png"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.18.18-PM.png" alt="" title="Screen shot 2011-04-01 at 2.18.18 PM" width="413" height="37" class="alignnone size-full wp-image-1066" /></a></p>
<p>Let&#8217;s pretend for a second that you are coding as3 for the first time. You heard that there are filters, but you don&#8217;t know what sort. In this case you need to open your manual and see the filters-section and save the names of all filters into your already overloaded brains. Or at least the first words of them. This leads you to jump back and forward with the manual during your development. For example you would like to add a shadow to image. So you might try to type something like Shad and ask code hint for some guidance. What do you get? Shader this and that&#8230; Where&#8217;s the shadow filter??? After some clicking you find from your manual that the correct word is DropShadowFilter.</p>
<p>Instead all this could be solved with extremely simple naming solution = <strong>FilterShadowDrop</strong>. In this case you could just type Filter and the code hint would serve you a list of all filters at the lib and there could even be different sort of Shadows.</p>
<p>So the idea is to name your classes with type first method. Here&#8217;s an example of lib that contains Frisbee&#8217;s:</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.12.59-PM.png"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.12.59-PM.png" alt="" title="Screen shot 2011-04-01 at 2.12.59 PM" width="622" height="148" class="alignnone size-full wp-image-1062" /></a></p>
<p>This is why I&#8217;ve named classes at evoCunningParticleEngine as follows:</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.20.46-PM.png"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.20.46-PM.png" alt="" title="Screen shot 2011-04-01 at 2.20.46 PM" width="282" height="340" class="alignnone size-full wp-image-1068" /></a></p>
<p>And this is exactly why command-type classes are named with C-letter at front:</p>
<p><a href="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.14.54-PM.png"><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-01-at-2.14.54-PM.png" alt="" title="Screen shot 2011-04-01 at 2.14.54 PM" width="398" height="67" class="alignnone size-full wp-image-1063" /></a></p>
<p>I don&#8217;t see why code should be clear English when instead it could be just clear code with good design patterns and named so that it&#8217;s intuitive to use. I can sure you that with this kind of naming the manual paddling will decrease fundamentally. </p>
<p>Or do you disagree?  Am I missing something here?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/way-we-name-our-classes/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

