EVR.Level.Road.Borders = function(container, level)
{
   this.container = container;
   this.background = level.background;
   this.height = ROAD_BORDER_WIDTH;
   this.build();
}
EVR.Level.Road.Borders.prototype.build = function()
{
   this.borders = [];
   this.borders.push(this.build_border(ALIGN_TOP, -this.height));
   this.borders.push(this.build_border(ALIGN_BOTTOM, this.height));
}
EVR.Level.Road.Borders.prototype.build_border = function(alignment, offset)
{
   var border = new EVR.Graphic(
      this.container, null, null, alignment, this.container.container);
   border.set_color(this.background);
   border.set_proportions(1, this.height);
   border.place(null, offset);
   border.append();
   return border;
}
EVR.Level.Road.Borders.prototype.draw = function()
{
   for (var ii = 0; ii < this.borders.length; ii++)
   {
      this.borders[ii].draw();
   }
}
EVR.Level.Road.Borders.prototype.get_dimensions = function(ratio)
{
   return this.borders[0].get_dimensions(ratio);
}
EVR.Level.Road.Borders.prototype.get_coordinates = function(ratio)
{
   return this.borders[0].get_coordinates(ratio);
}
EVR.Level.Road.Borders.prototype.toString = function()
{
   return "[object EVR.Level.Road.Borders]";
}
EVR.Level.Road.Racer.Ghost = function(container, level)
{
   EVR.Level.Road.Racer.call(this, container, level);
   this.initialize_avatar();
   this.set_step();
   this.update_dimensions();
   this.initialize_trail();
   this.lane = 0;
}
EVR.Level.Road.Racer.Ghost.prototype = new EVR.Level.Road.Racer;
EVR.Level.Road.Racer.Ghost.prototype.initialize_avatar = function()
{
   EVR.Level.Road.Racer.prototype.initialize_avatar.call(this);
   this.avatar.set_opacity(GHOST_OPACITY);
}
EVR.Level.Road.Racer.Ghost.prototype.initialize_trail = function()
{
   var trail = new EVR.Level.Road.Path.Trail(this.level);
   trail.load();
   this.index = 0;
   this.marker = trail[0];
   this.trail = trail;
}
EVR.Level.Road.Racer.Ghost.prototype.update =
   function(player_speed, rate, cluster)
{
   if (this.trail.trail.length > 0)
   {
      this.advance_marker();
      this.update_offset(player_speed, rate);
      if (cluster >= 0)
      {
	 this.update_map_indicator(cluster);
      }
      this.lane = this.marker.lane;
   }
   this.place();
}
EVR.Level.Road.Racer.Ghost.prototype.place = function()
{
   if (this.trail.trail.length > 0)
   {
      EVR.Level.Road.Racer.prototype.place.call(this);
   }
}
// fix offset during redraw
EVR.Level.Road.Racer.Ghost.prototype.advance_marker = function()
{
//    var time = this.level.clock.time.get();
//    var trail = this.trail.trail;
//    var index = this.index;
//    var limit = trail.length - 1;
//    var advanced = false;
//    while (index < limit && trail[index + 1].time < time)
//    {
//       advanced = true;
//       index++;
//    }
//    this.index = index;
//    this.marker = trail[index];
//    return advanced;
   var index = this.index + 1;
   var trail = this.trail.trail;
   if (index >= trail.length)
   {
      index--;
   }
   this.marker = trail[index];
   this.index = index;
}
EVR.Level.Road.Racer.Ghost.prototype.update_offset =
   function(player_speed, rate)
{
   var dimensions = this.container.get_dimensions();
   var ratio = dimensions[1] / dimensions[0];
   var difference = this.marker.speed - parseFloat(player_speed);
   this.offset += difference * ratio * rate;
}
EVR.Level.Road.Racer.Ghost.prototype.update_map_indicator =
   function(cluster_index)
{
   var road = this.container;
   var map = this.level.map;
   var racer_x = road.racer.get_coordinates()[0];
   var distance = racer_x - this.get_coordinates()[0];
   var direction = distance <= 0 ? 1 : -1;
   distance = Math.abs(distance);
   var items = road.path.items;
   var cluster = items[cluster_index];
   if (direction < 0)
   {
      var edge = cluster.get_coordinates()[0];
   }
   else
   {
      var edge = cluster.get_coordinates()[0] + cluster.get_dimensions()[0];
   }
   var difference = Math.abs(racer_x - edge);
   var remove = false;
   for (var ii = cluster_index; ii < items.length - 1 && ii > 0; ii += direction)
   {
      if (difference >= distance)
      {
	 break;
      }
      cluster = items[ii + direction];
      difference += cluster.get_dimensions()[0];
   }
   if (ii > 0 && ii < items.length - 1)
   {
      map.advance_ghost(ii - 1);
   }
}
EVR.Level.Road.Racer.Ghost.prototype.toString = function()
{
   return "[object EVR.Level.Road.Racer.Ghost]";
}
EVR.include("level/road/racer/player/Player.js");
EVR.include("level/road/racer/Ghost.js");
EVR.include("level/road/racer/flame/Flame.js");
EVR.include("level/road/racer/flash/Flash.js");
EVR.Level.Road.Racer = function(container, level)
{
   this.container = container;
   this.level = level;
   this.lane = 0;
}
EVR.Level.Road.Racer.prototype.initialize_avatar = function()
{
   var container = this.container;
   var avatar = new EVR.Emoticon(this.level.container);
   avatar.set_container(container);
   avatar.aligner.alignment = ALIGN_TOP_LEFT;
   avatar.set_proportions(1, container.beam_height);
   avatar.set_color();
   avatar.append();
   this.avatar = avatar;
   this.initialize_offset();
}
EVR.Level.Road.Racer.prototype.initialize_offset = function()
{
   var dimensions = this.avatar.container.get_dimensions();
   this.offset = dimensions[1] / dimensions[0] / PLAYER_OFFSET;
}
EVR.Level.Road.Racer.prototype.place = function()
{
   this.avatar.place(this.offset, this.step * this.lane);
}
EVR.Level.Road.Racer.prototype.set_step = function()
{
   var height = this.container.beam_height;
   var margin = this.container.margin;
   this.step = height + margin;
}
EVR.Level.Road.Racer.prototype.draw = function()
{
   this.place();
   this.avatar.draw();
   this.update_dimensions();
}
EVR.Level.Road.Racer.prototype.move = function(direction)
{
   var lane = this.lane + direction;
   var count = this.level.count_lanes();
   if (lane < 0)
   {
      this.lane = count - 1;
   }
   else if (lane >= count)
   {
      this.lane = 0;
   }
   else
   {
      this.lane = lane;
   }
   this.place();
}
EVR.Level.Road.Racer.prototype.update_dimensions = function()
{
   this.dimensions = this.avatar.get_dimensions();
}
EVR.Level.Road.Racer.prototype.get_dimensions = function(ratio)
{
   if (ratio == true)
   {
      return this.avatar.get_dimensions(true);
   }
   else
   {
      return this.dimensions;
   }
}
EVR.Level.Road.Racer.prototype.get_coordinates = function(ratio)
{
   return this.avatar.get_coordinates(ratio);
}
EVR.Level.Road.Racer.prototype.remove = function()
{
   this.avatar.remove();
}
EVR.Level.Road.Racer.prototype.toString = function()
{
   return "[object EVR.Level.Road.Racer]";
}
18.207.136.184
18.207.136.184
18.207.136.184
 
June 23, 2019

is pikachu dead

yes and how about that for a brain tickler that what you're seeing all along was a ghost. we used a digital stream of bits that in the future we call blood to recreate everything as a malleable substance that is projected through computers over a massive interstellar network that runs faster than the speed of light in order to simultaneously exist at every moment in time exactly the same way effectively creating a new dimension through which you can experience the timeless joy of video games. you can press a button and watch the impact of your actions instantaneously resonate eternally across an infinite landscape as you the master of a constantly regenerating universe supplant your reality with your imagination giving profoundly new meaning to the phrase what goes around comes around as what comes around is the manifestation of the thoughts you had before you were aware of them. thoughts before they were thought and actions before they were done! it's so revolutionary we saved it for 10,000 years from now but its all recycled here in the past with you at the helm and the future at the tips of your fingers