EVR.include("animation/introduction/transmission/Projection.js");
EVR.Animation.Introduction.Transmission = function(
   container, black_hole, beam_count, jump, rate)
{
   this.container = container;
   this.black_hole = black_hole;
   this.colors = TRANSMISSION_COLORS;
   this.beam_count = beam_count;
   this.jump = jump;
   this.rate = rate;
   this.build_beams();
   this.build_projections();
}
EVR.Animation.Introduction.Transmission.prototype.build_beams = function()
{
   this.beams = [];
   for (var ii = 0; ii < this.beam_count; ii++)
   {
      this.beams.push(
	 new EVR.Beam(
	    this.container, this.colors[ii], this.black_hole.proportions[0], 0,
	    this.black_hole, ALIGN_CENTER));
   }
}
EVR.Animation.Introduction.Transmission.prototype.build_projections = function()
{
   this.projections = this.build_projection(0);
   var current = this.projections;
   for (var ii = 1; ii < this.beams.length; ii++)
   {
      current.next = this.build_projection(ii);
      current = current.next;
   }
}
EVR.Animation.Introduction.Transmission.prototype.build_projection =
function(index)
{
   return new EVR.Animation.Introduction.Transmission.Projection(
      this.beams[index], this.beam_count, this.jump, this.rate, this.black_hole,
      index);
}
EVR.Animation.Introduction.Transmission.prototype.redraw = function()
{
   for (var ii = 0; ii < this.beams.length; ii++)
   {
      this.beams[ii].draw();
   }
}
EVR.Animation.Introduction.Transmission.prototype.reset = function()
{
   var beam, projection = this.projections;
   while (projection)
   {
      beam = projection.beam;
      beam.proportions[1] = 0;
      beam.set_dimensions(0, 0);
      beam.place(0, 0);
      projection = projection.next;
   }
}
EVR.Animation.Introduction.Transmission.prototype.erase = function()
{
   var projection = this.projections;
   while (projection)
   {
      projection.stop();
      projection.beam.remove();
      projection = projection.next;
   }
}
EVR.Animation.Introduction.Transmission.prototype.toString = function()
{
   return "[object EVR.Animation.Introduction.Transmission]";
}
EVR.Animation.Introduction.Transmission.Projection = function(
   beam, beam_count, jump, rate, black_hole, index)
{
   EVR.Animation.call(this, rate);
   this.beam = beam;
   this.beam_count = beam_count;
   this.step = jump / 2;
   this.rate = rate;
   this.black_hole = black_hole;
   this.index = index;
   this.steps_per_jump = INTRODUCTION_STEPS_PER_JUMP;
   this.set_limit();
   this.steps = 0;
}
EVR.Animation.Introduction.Transmission.Projection.prototype =
   new EVR.Animation;
EVR.Animation.Introduction.Transmission.Projection.prototype.sequence =
function()
{
   this.beam.grow(INTRODUCTION_BEAM_GROWTH_RATE);
   if (this.beam.proportions[1] >= this.black_hole.proportions[1])
   {
      this.stop();
      this.beam.proportions[1] = this.black_hole.proportions[1];
      this.beam.draw();
      this.play("shift", 100, -1);
      if (typeof(this.next) != "undefined")
      {
	 this.next.play(null, 500);
      }
      else
      {
	 this.black_hole.play(null, 1000, -BLACK_HOLE_FADE_IN_SPEED);
      }
   }
}
EVR.Animation.Introduction.Transmission.Projection.prototype.set_limit =
function()
{
   this.step_limit = (this.beam_count - this.index) * this.steps_per_jump;
}
EVR.Animation.Introduction.Transmission.Projection.prototype.shift = function()
{
   if (this.steps < this.step_limit)
   {
      this.beam.move(0, -this.step);
      this.steps++;
   }
   else
   {
      this.steps = 0;
      this.stop();
   }
}
EVR.Animation.Introduction.Transmission.Projection.prototype.toString =
function()
{
   return "[object EVR.Animation.Introduction.Transmission.Projection]";
}
EVR.Animation.Scroller = function(graphics, step, rate)
{
   EVR.Animation.call(this, rate);
   this.graphics = graphics;
   this.step = step;
}
EVR.Animation.Scroller.prototype = new EVR.Animation;
EVR.Animation.Scroller.prototype.sequence = function()
{
   var graphics = this.graphics;
   var range = graphics[0].container.get_dimensions()[0];
   var current, width, x, difference, step = this.step * range;
   for (var ii = 0, len = graphics.length; ii < len; ii++)
   {
      current = graphics[ii];
      width = current.get_dimensions()[0];
      x = current.get_coordinates()[0] - step;
      if (x < -width)
      {
	 difference = -x - width;
	 x = range - difference;
      }
      current.set_coordinates([x]);
   }
}
EVR.Animation.Scroller.prototype.toString = function()
{
   return "[object EVR.Animation.Scroller]";
}
EVR.Animation.Fader = function(component, end, rate, length, repeat)
{
   EVR.Animation.call(this, rate);
   this.component = component;
   this.length = length;
   this.repeat = repeat || false;
   this.elapsed = 0;
   this.set_path(end)
}
EVR.Animation.Fader.prototype = new EVR.Animation;
EVR.Animation.Fader.prototype.set_path = function(end)
{
   this.elapsed = 0;
   this.set_range(end);
   this.set_deltas();
}
EVR.Animation.Fader.prototype.set_range = function(end)
{
   var start = new EVR.Color(this.component.get_color());
   this.current = new EVR.Color(this.component.get_color());
   if (typeof end == "string")
   {
      end = new EVR.Color(end);
   }
   this.range = [start, end];
}
EVR.Animation.Fader.prototype.set_deltas = function()
{
   var start = this.range[0];
   var end = this.range[1];
   this.deltas = [];
   this.deltas.push(this.calculate_delta(start.rgb[0], end.rgb[0]));
   this.deltas.push(this.calculate_delta(start.rgb[1], end.rgb[1]));
   this.deltas.push(this.calculate_delta(start.rgb[2], end.rgb[2]));
}
EVR.Animation.Fader.prototype.calculate_delta = function(start, end)
{
   return (end - start) / (this.length / this.rate);
}
EVR.Animation.Fader.prototype.sequence = function()
{
   this.current.rgb[0] += this.deltas[0];
   this.current.rgb[1] += this.deltas[1];
   this.current.rgb[2] += this.deltas[2];
   this.component.set_color(this.current.get_string());
   this.elapsed += this.rate;
   if (this.elapsed >= this.length)
   {
      this.component.set_color(this.range[1].get_string());
      if (this.repeat)
      {
	 this.set_path(this.range[0]);
      }
      else
      {
	 this.stop();
      }
   }
}
EVR.Animation.Fader.prototype.toString = function()
{
   return "[object EVR.Animation.Fader]";
}
50.16.108.167
50.16.108.167
50.16.108.167
50.16.108.167
50.16.108.167
50.16.108.167
 
May 20th, 2013  4:50 PM
Welcome! I will be posting here about open-source games and music I am making for free online distribution. Most recently, I made Ball & Cup for Ludum Dare 26, a game I will work on more in June. After finishing, if it's fun, I will build an arcade cabinet for it! Next week, I am joining the 7-Day Fishing Jam to develop an A-life prototype about searching a cloud of noise for organisms.

Before Ball & Cup, I was adding features like vehicle engines, new graphics and effects and detailed scoring to an updated version of E.S.P. Hadouken, currently a prototype about navigating five psychic hadoukens to save your Game Boy. The new version will be similar with a clearer story and more ways to judge your performance. I plan on finishing it after making a public version of Ball & Cup.

I will also upload some digital albums soon. One, Man's Womb, is a solo collection of chiptunes from Emoticon Vs. Rainbow, an online racing/rhythm game. The other, Tor Ghul/Spin Ghul is a guitar and synth record recorded with my friends last summer. The recording and sequencing are finished for both -- I just have to make their web pages and artwork and package them for downloading.

Later, I hope to write about games in their early stages, an abstract action-RPG called Panopticon: Swarm, a massively multiplayer exploration, voting, post-catastrophic city simulation, Vomit Inspector and a mobile mini-game compilation project that includes an external digital pet raising and social networking mode. I also plan to post analyses of games I'm playing as a design exercise and for fun.

I will write about more game stuff like arcade trips, game jams and electronics! Plus whatever I haven't thought of! If you use RSS, subscribe to my feed!