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
 
July 19, 2017


f1. BOSS

Games are corrupt dissolutions of nature modeled on prison, ordering a census from the shadows of a vile casino, splintered into shattered glass, pushing symbols, rusted, stale, charred, ultraviolet harbingers of consumption and violence, badges without merit that host a disease of destruction and decay.

You are trapped. You are so trapped your only recourse of action is to imagine an escape route and deny your existence so fully that your dream world becomes the only reality you know. You are fleeing deeper and deeper into a chasm of self-delusion.

While you're dragging your listless, distending corpus from one cell to another, amassing rewards, upgrades, bonuses, achievements, prizes, add-ons and status boosts in rapid succession, stop to think about what's inside the boxes because each one contains a vacuous, soul-sucking nightmare.

Playing can be an awful experience that spirals one into a void of harm and chaos, one so bad it creates a cycle between the greater and lesser systems, each breaking the other's rules. One may succeed by acting in a way that ruins the world.

May 19, 2013

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!


↠ RSS Feed ↞