EVR.include("level/road/racer/flash/Strip.js");

EVR.Level.Road.Racer.Flash = function(racer)
{
   this.racer = racer;
   this.milestone_difference = FLASH_MILESTONE_DIFFERENCE;
   this.active_frequency = 0;
   this.last_streak = 0;
   // this.strip = new EVR.Level.Road.Racer.Flash.Strip(this);
}

EVR.Level.Road.Racer.Flash.prototype.update = function(streak)
{
   // var streak = parseInt(this.racer.level.streak);
   // var difference = Math.abs(streak - this.last_streak);
   // if (difference >= this.milestone_difference)
   // {
   //    this.setActiveLevel(streak);
   //    this.displayLevel();
   //    this.last_streak = streak;
   // }
}

EVR.Level.Road.Racer.Flash.prototype.setActiveLevel = function(streak)
{
   // var milestone = parseInt(streak/this.milestone_difference);
   // if (milestone < FLASH_FREQUENCIES)
   // {
   //    this.active_level = milestone;
   // }
}

EVR.Level.Road.Racer.Flash.prototype.displayLevel = function()
{
   // this.strip.slide(this.active_level);
}

EVR.Level.Road.Racer.Flash.prototype.draw = function()
{
   // this.strip.draw();
}
EVR.Level.Road.Racer.Flash.Level = function(flash, index)
{
   EVR.Graphic.call(this, flash.racer.avatar);
   this.flash = flash;
   this.index = index;
   this.animations_path = FLASH_ANIMATIONS_PATH;
   this.setAttributes();
   this.setImage();
   this.append();
   this.hide();
}
EVR.Level.Road.Racer.Flash.Level.prototype = new EVR.Graphic;
EVR.Level.Road.Racer.Flash.Level.prototype.setAttributes = function()
{
   this.set_proportions(1, 1);
   this.set_opacity(FLASH_OPACITY);
}
EVR.Level.Road.Racer.Flash.Level.prototype.setImage = function()
{
   var element = document.createElement("img");
   element.src = this.buildAnimationPath();
   element.style.width = "100%";
   element.style.height = "100%";
   this.element.appendChild(element);
}
EVR.Level.Road.Racer.Flash.Level.prototype.buildAnimationPath = function()
{
   return this.animations_path + (this.index + 1) + ".gif";
}
EVR.Level.Road.Racer.Flash.Level.prototype.show = function()
{
   this.css.visibility = "";
}
EVR.Level.Road.Racer.Flash.Level.prototype.hide = function()
{
   this.css.visibility = "hidden";
}
<?php
$GLOBALS["RELATIVE_IMAGE_DIRECTORY_PATH"] = "img/";
$GLOBALS["RELATIVE_IMAGE_CACHE_PATH"] = "flash/cache/";
$GLOBALS["IMAGE_FILE_FORMAT"] = "gif";
$GLOBALS["FLASH_COLORS"] = array("red", "green", "blue");
$GLOBALS["MIN_FREQUENCY"] = 10;
create_strip();
function create_strip()
{
   $height = $_GET["height"];
   $frequencies = $_GET["frequencies"];
   $image = build_strip($height, $frequencies);
   $file_name = save_image($image);
   echo $file_name;
}
function build_strip($height, $cell_count)
{
   $image = new Imagick();
   $min_frequency = $GLOBALS["MIN_FREQUENCY"];
   $palette = $GLOBALS["FLASH_COLORS"];
   $palette_count = count($palette);
   $frame_count = pow(2, $cell_count - 1) * $palette_count;
   $draw = new ImagickDraw();
   for ($frame_index = 0; $frame_index < $frame_count; $frame_index++)
   {
      $image->newImage($height * $cell_count, $height, "none");
      $x = 0;
      for ($cell_index = $cell_count - 2; $cell_index >= 0; $cell_index--)
      {
         $palette_index = ($frame_index / pow(2, $cell_index)) % $palette_count;
         $color = $palette[$palette_index];
         $x += $height;
         $draw->setFillColor($color);
         $draw->rectangle($x, 0, $x + $height, $height);
         $image->drawImage($draw);
         $image->setImageDelay($min_frequency);
      }
   }
   $image->setImageFormat($GLOBALS["IMAGE_FILE_FORMAT"]);
   return $image;
}
function save_image($image)
{
   go_to_save_path();
   $index = find_available_image_index();
   $file_name = build_file_name($index);
   $image->writeImages($file_name, true);
   return $file_name;
}
function go_to_save_path()
{
   go_to_image_directory();
   go_to_cache_directory();
}
function go_to_image_directory()
{
   $path = $GLOBALS["RELATIVE_IMAGE_DIRECTORY_PATH"];
   while (!is_dir($path))
   {
      chdir("..");
   }
   chdir($path);
}
function go_to_cache_directory()
{
   $path = $GLOBALS["RELATIVE_IMAGE_CACHE_PATH"];
   if (!is_dir($path))
   {
      $dirs = explode("/", $path);
      foreach ($dirs as $dir)
      {
         if ($dir != "")
         {
            mkdir($dir, 0770);
            chdir($dir);
         }
      }
   }
   else
   {
      chdir($path);
   }
}
function find_available_image_index()
{
   $index = 0;
   while (count(glob(++$index . "_*")));
   return $index;
}
function build_file_name($index)
{
   return $index . "_" . time() . "." . $GLOBALS["IMAGE_FILE_FORMAT"];
}
<?php
chdir("../../../../../../../../img/flash/animations/");
$files = glob("*.gif");
echo count($files);
EVR.Level.Road.Racer.Flash.Strip = function(flash)
{
   EVR.Graphic.call(this, flash.racer.avatar);
   this.index = 0;
   this.step = null;
   this.current_cache_index = null;
   this.setAttributes();
   this.append();
}
EVR.Level.Road.Racer.Flash.Strip.prototype = new EVR.Graphic;
EVR.Level.Road.Racer.Flash.Strip.prototype.setAttributes = function()
{
   this.set_proportions(1, 1);
   this.set_opacity(FLASH_OPACITY);
   this.css.backgroundAttachment = "fixed";
}
EVR.Level.Road.Racer.Flash.Strip.prototype.setStep = function()
{
   this.step = -this.container.get_dimensions()[0];
}
EVR.Level.Road.Racer.Flash.Strip.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   if (this.container.get_dimensions()[0] != -this.step)
   {
      this.removeCachedStrip();
      this.setStep();
      this.setBackground();
      this.slide(this.index);
   }
}
EVR.Level.Road.Racer.Flash.Strip.prototype.removeCachedStrip = function()
{
   var index = this.current_cache_index;
   if (index)
   {
      var script = this.buildPathToSelf() + "remove_cached_strip.php";
      var query = "index=" + index;
      new EVR.Requester(script, query, true).execute();
   }
}
EVR.Level.Road.Racer.Flash.Strip.prototype.buildPathToSelf = function()
{
   return SOURCE_PATH + "level/road/racer/flash/";
}
EVR.Level.Road.Racer.Flash.Strip.prototype.setBackground = function()
{
   var script = this.buildPathToSelf() + "create_strip.php";
   var query = "height=" + -this.step + "&frequencies=" + FLASH_FREQUENCIES;
   var file_name = new EVR.Requester(script, query, true).execute();
   var path = "img/flash/cache/" + file_name;
   var cache_index = parseInt(file_name.split("_")[0]);
   this.css.background = "url('" + path + "')";
   this.current_cache_index = cache_index;
}
EVR.Level.Road.Racer.Flash.Strip.prototype.slide = function(index)
{
   this.css.backgroundPosition = index * this.step + "px 0";
   this.index = index;
}
EVR.Level.Road.Racer.Flash.Strip.prototype.toString = function()
{
   return "[object EVR.Level.Road.Racer.Flash.Strip]";
}
54.166.150.10
54.166.150.10
54.166.150.10
 
December 3, 2013

Where in the mind's prism does light shine, inward, outward, or backward, and where in a plane does it intersect, experientially and literally, while possessing itself in a dripping wet phantasm?


Fig 1.1 What happens after you turn on a video game and before it appears?

The taxonomy of fun contains the difference between gasps of desperation and exaltation, simultaneously identical and opposite; one inspires you to have sex, while the other to ejaculate perpetually. A destruction and its procession are effervescent, while free play is an inseminated shimmer hatching inside you. Unlikely to be resolved, however, in such a way, are the climaxes of transitions between isolated, consecutive game states.

You walk through a door or long-jump face first (your face, not Mario's) into a painting. A moment passes for eternity, viscerally fading from your ego, corpus, chakra, gaia, the basis of your soul. It happens when you kill too, and especially when you precisely maim or obliterate something. It's a reason to live, a replicating stasis.


Fig 1.2 Sequence in a video game

Video games are death reanimated. You recurse through the underworld toward an illusion. Everything in a decision and logic attaches permanently to your fingerprint. At the core, you use its energy to soar, comatose, back into the biosphere, possibly because the formal structure of a mind by human standards is useful in the next world.


↠ RSS Feed ↞