EVR.Delegate.Keys = function()
{
   this.codes = [];
}
EVR.Delegate.Keys.prototype.add = function(code)
{
   this.codes.push(code);
}
EVR.Delegate.Keys.prototype.remove = function(code)
{
   var index = this.find(code);
   if (index !== null)
   {
      this.codes.splice(index, 1)
   }
}
EVR.Delegate.Keys.prototype.find = function(code)
{
   var codes = this.codes;
   for (var ii = codes.length - 1; ii >= 0; ii--)
   {
      if (codes[ii] == code)
      {
	 return ii;
      }
   }
   return null;
}
EVR.Delegate.Keys.prototype.toString = function()
{
   return "[object EVR.Delegate.Keys]";
}
EVR.include("delegate/Keys.js")

EVR.Delegate = function(application)
{
   this.application = application;
   this.introduction = application.introduction;
   this.history = application.history;
   this.resize_response = false;
   this.keys_down = new EVR.Delegate.Keys();
}

EVR.Delegate.prototype.handle_key_down = function(event)
{
   event = this.fix_event(event);
   var code = event.keyCode;
   if (this.keys_down.find(code) !== null)
   {
      return;
   }
   if (code == KEY_C)
   {
      console.toggle_visibility();
      this.application.repopulate();
   }
   if (code == KEY_ENTER)
   {
      this.handle_enter();
   }
   if (code == KEY_UP || code == KEY_UP_ALTERNATE)
   {
      !!this.menu && this.menu.attached && this.menu.select(-1);
      !!this.level && this.level.delegate.up();
   }
   if (code == KEY_DOWN || code == KEY_DOWN_ALTERNATE)
   {
      !!this.menu && this.menu.attached && this.menu.select(1);
      !!this.level && this.level.delegate.down();
   }
   if (code == KEY_SPRINT || code == KEY_SPRINT_ALTERNATE)
   {
      !!this.level && this.level.delegate.sprint();
   }
   if (code == KEY_GRID)
   {
      !!this.album && this.album.attached && this.album.toggle_grid();
   }
   if (code == KEY_PREVIOUS_PAGE)
   {
      !!this.album && this.album.attached && this.album.previous();
   }
   if (code == KEY_NEXT_PAGE)
   {
      !!this.album && this.album.attached && this.album.next();
   }
   if (code == KEY_QUIT)
   {
      !!this.album && this.album.attached && this.application.unload_album();
      !!this.ending && this.ending.visible && this.application.unload_ending();
   }
   if (code == KEY_MENU)
   {
      !!this.level && this.level.delegate.main_menu();
   }
   if (code == KEY_NEXT_LEVEL)
   {
      !!this.level && this.level.delegate.next_level();
   }
   if (code == KEY_SOUND)
   {
      this.application.toggle_sound();
   }
   this.keys_down.add(code);
}

EVR.Delegate.prototype.handle_enter = function()
{
   if (!!this.ending && this.ending.finished)
   {
      this.application.unload_ending();
      return;
   }
   if (!!this.about && this.about.attached)
   {
      this.application.unload_about();
      return;
   }
   if (!!this.instructions && this.instructions.attached)
   {
      this.application.unload_instructions();
      return;
   }
   if (this.history.attached)
   {
      this.application.unload_history();
      return;
   }
   if (!!this.level)
   {
      this.level.delegate.enter();
   }
   if (!!this.menu && this.menu.attached)
   {
      this.menu.execute();
   }
   if (!!this.album)
   {
      this.album.attached && this.album.toggle_menu();
   }
   if (!!!this.level)
   {
      this.application.build_start_menu();
   }
}

EVR.Delegate.prototype.handle_key_up = function(event)
{
   event = this.fix_event(event);
   var code = event.keyCode;
   if (code == KEY_SPRINT || code == KEY_SPRINT_ALTERNATE)
   {
      !!this.level && this.level.delegate.cancel_sprint();
   }
   this.keys_down.remove(code);
}

EVR.Delegate.prototype.handle_key_press = function(event)
{
   event = this.fix_event(event);
   var code = event.keyCode || event.charCode;
   switch (code)
   {
      case KEY_RESTART:
      case KEY_RESTART + 32:
         !!this.level && this.level.delegate.restart();
   }
}

EVR.Delegate.prototype.handle_resize_event = function()
{
   if (this.resize_response !== false)
   {
      window.clearInterval(this.resize_response);
   }
   var current = this;
   this.resize_response = window.setTimeout(
      function() { current.respond_to_resize() }, 200);
}

EVR.Delegate.prototype.respond_to_resize = function()
{
   this.application.repopulate();
}

EVR.Delegate.prototype.fix_event = function(event)
{
   if (typeof(event) == "undefined")
   {
      event = window.event;
   }
   return event;
}

EVR.Delegate.prototype.toString = function()
{
   return "[object EVR.Delegate]";
}
54.81.119.123
54.81.119.123
54.81.119.123
 
September 30, 2015


Edge of Life is a form I made with Babycastles and Mouth Arcade for an event in New York called Internet Yami-ichi, a flea market of internet-ish goods. We set up our table to look like a doctor's office and pharmacy and offered free examinations and medication prescriptions, a system described by one person as "a whole pharmacy and medical industrial complex".

Diagnoses were based on responses to the form and observations by our doctor during a short examination. The examination typically involved bizarre questions, toy torpedoes being thrown at people and a plastic bucket over the patient's head. The form combined ideas from Myers-Briggs Type Indicators, Codex Seraphinianus and chain-mail personality tests that tell you which TV show character you are. In our waiting room, we had Lake of Roaches installed in a stuffed bat (GIRP bat). It was really fun!

The icons for the food pyramid are from Maple Story and the gun icons are from the dingbat font Outgunned. I'm also using Outgunned to generate the items in Food Spring.


↠ RSS Feed ↞