Saturday, March 27, 2010

It's a Code

I wanted to post a section of the javascript that I mentioned in the last post because I found it very beautiful and strangely inspiring, almost like 'automatic writing' -- as I mentioned. Of course, if you have never coded this may leave you quite cold:

//Close to an 'end': If timeleft is less than elapsed time
//from last function call
if(ids_sub[k][m+2][7] <= elapsedTicks) {
//These redundant calls are for IE...and everybody else------
//depending on fadestate, opacity set to max or min
element.style.opacity = ids_sub[k][m+2][6] == 1 ?
ids_sub[k][m+2][4]/100 : ids_sub[k][m+2][3]/100;
element.style.filter =
'alpha(opacity = ' + (ids_sub[k][m+2][6] == 1 ?
ids_sub[k][m+2][4] : ids_sub[k][m+2][3]) + ')';
//------------------------------------------------------------
//Flip fade from transp. to opaque, or versa
ids_sub[k][m+2][6] = ids_sub[k][m+2][6] == 1 ? -1 : 1;
//Depending on FadeState, TimeLeft is assigned
//opaque or transparent TimeToFade
ids_sub[k][m+2][7] = ids_sub[k][m+2][6] == 1 ?
ids_sub[k][m+2][1] : ids_sub[k][m+2][2];
//This block is the main animation of the opacity,
//incrementing time left
} else {
//time left incremented down
ids_sub[k][m+2][7] -= elapsedTicks;
if(ids_sub[k][m+2][6] == 1) {
//Timeleft divided by TimeToFade multiplied by difference
//between opacity max, min
var newOpVal = (ids_sub[k][m+2][7]/ids_sub[k][m+2][1])*
((ids_sub[k][m+2][4]-ids_sub[k][m+2][3])/100);
//offset from max. opacity
newOpVal = (ids_sub[k][m+2][4]/100) - newOpVal;
} else {
var newOpVal = (ids_sub[k][m+2][7]/ids_sub[k][m+2][2])*
((ids_sub[k][m+2][4]-ids_sub[k][m+2][3])/100);
//offset by minimum opacity
newOpVal = (ids_sub[k][m+2][3]/100) + newOpVal;
}
//These redundant calls are for IE...and everybody else----------
element.style.opacity = newOpVal;
element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
//---------------------------------------------------------------
} //end if then else

For those of you who could possibly get something from this: all the abstract array entries are substitutes for functions that used to use word-like names, but which I wanted to store abstractly so I could just modify a template literal array for each comic page and therefore be able to compose each animation as a small series of parameters (combined with some url's for graphic content of course).
Note: for those of you appalled by the indenting...I had to compress it for the blog formatting, it really is a LOT more clear in the original...had to be or I wouldn't understand it one hour after I wrote it!

Psycho Java

In a lull of client-sponsored agendas, I have been able to focus on writing a javascript app that will present the webcomic. I am mega-pleased with the result! The basic idea is to have a series of animations that represent dialog balloons and subtly shifting environmental details that are triggered by clicked on arrow keys that go from each ‘statement’ into the next. Of course, all of this has the backdrop of the basic piece of art for that day’s ‘episode’, but there is no need for absolute scene-frames or even a particular left-right up-down reading order…which gives me precisely the language/culture-bias free framework that I have been striving for.

While I was working on the prototype I had a sudden insight aimed at the analogy between the perspective of comics – that of a reader looking at frozen time with an inner sense of narrative flow layered over and under – and that of the higher ‘fast’ time realms of the story. A person who experiences a million years for every year of ‘normal’ time (and 11.5 days for every second!) sees the whole world of ‘slow’ consciousness as a kind of frozen, comic subject.

Working on the code was, in itself, full of artistic weirdness and reflection. My way of doing this task is very hard to describe – but its success usually surprises even me. Basically, I stare at a coded primitive of some algorithm that I have cobbled together as an initial guess. I do this for a couple hours. Then, in a very brief flash, without almost any conscious oversight, I type out a thousand lines of code which is usually fully functional without debugging. Occasionally, like all coders, I run into some deeply mysterious malfunction which is inevitably the omission of a comma or the improper capitalization of a variable and I then spend 80 to 90 percent of all my project time chasing down some awful minutia and/or bug in the software environment I am working in. The inspiration, meditation cycle is deeply creative; the debugging is one of the most profoundly yucky tasks ever devised by the human race. Pure torture…a sense of wasted hours and wasted life. But that’s code.

Anyway: everything works – “so all’s well that ends well”. Now I just have to figure out how to turn this script into a unit of input in a Drupal-based blog and away we go Web 2.0 style. Of course, now that I have empowered animation layers, I have to get my moving image chops back on line. Have been practicing using Camtasia (a screen to video capture tool) and MCell (cellular automata) to create some very compelling gnarly chaos movies which will make just the kind of layer detail I need…I cannot wait for y’all to see this stuff. It is wicked strange, and borders on wonderful from time to time. Will link you up when I can get the prototype properly hosted outside my cozy little sandbox.

Thursday, March 18, 2010

Mom and Dad

So…that was the ‘gap’ in postings that one is NEVER supposed to do! The Google-bots are going to think that my weekly update schedule is a lie and never index again! I am a virtual pariah; I have abandoned my ‘post’ (hah!)…and all that. Well, by way of explanation, I have spent the last four weeks baby-sitting my IT consultant business and making sure a couple clients didn’t have a data apocalypse. It all worked out, and everyone seems ok for now – so back to my non-paying, utopian transition into full-time artist which will take…the rest of my life?

I started to work on the writing elements for my first web-comic again today and it felt great. Because the website will have only one or two one-page installments a week, it will be the first thing to get off the ground – pretty soon. I am thinking end of April. It would be even sooner, but I need to get back to consulting IT to myself and S’n’K as ‘client’ and get the Drupal site online. I want the whole thing to be Web 2.0 from the get-go, so you guys can tell me in constant feedback what a putz I am…only then do I have a chance of transitioning from being egregiously bad to tolerably bad!

The first ‘episode’ of the web comic is going to be focused on Soo’s journey through the womb. No, really, this is going to be a fun topic. The NewBirth Sindikat has quite a bit to do during the gestation of one of their members…really their inventions and interventions begin before that in planning sessions for new parents, nano-bots that interact with the sperm-egg dance, etc. It is key to remember that there are ‘high fast’ elements in this womb-process who experience the womb-year as a million subjective years…or a billion…

And you will get to meet Soo’s folks, which will add a lot of depth to your understanding of her later in life, when she appears as the protagonist of the for-paper-print series (the web-comic is a free, parallel product that will continue after the print version chapters start coming out bi-monthly). I had fun creating how they look using ‘genetic’ algorithms to morph an image of Soo’s face using factors that push mom in a Chinese-African direction and dad in a Russian one.