1/2
1/2
13
13
55
55
377
377

apexvj
APEXvj 2.0 was a huge challenge for me in so many ways. Most of it is something I’ve learned during last six months or so. From technical point of view I feel like I have found new horizons to explore. And design wise… oh well same shiz as always :)

In this post I’m covering several topics. So if you find some of them boring just keep on scrolling down.

→ Read the rest of this entry

21
21

What do you think of this? (6)

1/2
1/2
13
13
April 1, 2011at1:53 pm AS3.0, design patterns, flash, tips, 13 Comments
55
55
377
377

This minor detail has been haunting me for years. It’s not extremely significant, but really makes a difference with modern coding tools.

I’m talking about the code hinting that all decent coding tools have. It’s such a priceless feature, but for some reason I often see libs that don’t take advantage of it. Most libs are still coded in “clear English format”.

→ Read the rest of this entry

21
21

What do you think of this? (13)

1/2
1/2
13
13
55
55
377
377


After 4-5 months of twiddle it payed off and we won again at Assembly. You can checkout the outcome in realtime by clicking the picture or view it in HD at Youtube. Here’s also the link to the info file and link to pouet of course.

As I mentioned earlier I invited David Lenaerts to help with the demo. All those fancy Away3dLite stuff with shadows and reflections came by his hands. Awesome!

I also compiled the whole shit through Joa Ebert’s Apparat. It did speed up it a bit.

I also had a presentation at Assembly. I talked about my flash art and introduced the evoTinyEngine, evoCunningParticleEngine and evoSync-tool. I haven’t found the recording of the speech yet but here are some of the links I had there.

evoCunningParticleEngine at googlecode
evoTinyEngine at googlecode
download the evoSync air app

You can also download the presentation in pdf format.

Then the bad news. I had an accident last Friday. I fall down from the fence and my wedding ring got stuck at the top of the fence.
The ring peel off all the skin, muscles and stuff out of my finger. The main tragedy about it was that it also ruined my fingers blood vessels and the finger had to be amputated. So I won’t be coding new experiments for a while now I guess. I also need to learn how to type fast with 9 fingers. I will recover eventually, but it’ll take some time and hard work.

I’ll post more info about the particle engine later when it won’t hurt so much to type.

p.s. We also did this little demo with Jalava to show that 4k intro can be done with Flash. It’s not too fancy but it proofs the concept :)

21
21

What do you think of this? (12)

1/2
1/2
13
13
December 6, 2009at2:34 pm AS3.0, English, flash, tips, 16 Comments
55
55
377
377

z sort
(Warning! this will be technical mumbojumbo)

In real time computer graphics one thing has given headaches to artist for years: Z-sorting (iow. Z-buffering). Everything goes great until you need to sort objects on screen. It simply eats your CPU. In AS3 this is a huge bottle neck. Yeah the drawing is rather slow but sorting is even more slow. If the challenge is demanding you just need to be equally smart.

As you may have noticed in my works the z-sorting doesn’t seems to be very big issue. For example the GameOfLife3D rolls 13824 particles and does dozen other stuff as well. In worst case just the sort can take up to 40ms in every frame.

When creating an engine of 3D the handling and z-sorting of objects should not thought as separated blocks. To gain performance every piece need to work together. The perfect symbiosis has to be found to serve all step of the system.

→ Read the rest of this entry

21
21

What do you think of this? (16)

1/2
1/2
13
13
November 26, 2009at4:43 pm AS3.0, English, flash, tips, 30 Comments
55
55
377
377

Time to time a developer has to ask from Self: “is this really the fastest way to do it?”
After some investigation in most cases the result is “no it wasn’t”. Here’s an example:

I have used (a little modified version of) the Andre Michelle’s port from Bresenhams line algorithm and always thought it would be the fastest way to draw a line on BitmapData in Flash.

I was playing with lines and asked my self the previous question. After some Googling I found this Extremely Fast Line Algorithm (EFLA) written by Po-Han Lin. I gave it a try and ported it to as3. By default it was way faster then the Bresenhams version, but after some AS3 specific optimizations it came out TWO times faster and here it is for you:

private function efla(x:int, y:int, x2:int, y2:int, color:uint):void
{
  var shortLen:int = y2-y;
  var longLen:int = x2-x;

  if((shortLen ^ (shortLen >> 31))(shortLen >> 31) > (longLen ^ (longLen >> 31))(longLen >> 31))
  {
  shortLen ^= longLen;
  longLen ^= shortLen;
  shortLen ^= longLen;

  var yLonger:Boolean = true;
  }
  else
 {
  yLonger = false;
 }

  var inc:int = longLen < 0 ? -1 : 1;

  var multDiff:Number = longLen == 0 ? shortLen : shortLen / longLen;

  if (yLonger)
  {
    for (var i:int = 0; i != longLen; i += inc)
    {
      this.bit.setPixel(x + i*multDiff, y+i, color);
    }
  }
  else
  {
    for (i = 0; i != longLen; i += inc)
    {
      this.bit.setPixel(x+i, y+i*multDiff, color);
    }
  }
}

21
21

What do you think of this? (30)