EVR.include("animation/ending/family/Member.js");
EVR.Animation.Ending.Family = function(ending)
{
   this.ending = ending;
   this.tombstone = ending.tombstone;
   this.container = ending.container;
   this.add_members();
}
EVR.Animation.Ending.Family.prototype.add_members = function()
{
   var attributes = FAMILY_ATTRIBUTES;
   var members = [];
   for (var ii = 0; ii < attributes.length; ii++)
   {
      members.push(
	 new EVR.Animation.Ending.Family.Member(this, attributes[ii]));
   }
   this.members = members;
}
EVR.Animation.Ending.Family.prototype.append = function()
{
   this.apply_to_members("append");
}
EVR.Animation.Ending.Family.prototype.apply_to_members = function(method)
{
   var member, members = this.members;
   var args = Array.prototype.slice.call(arguments);
   for (var ii = 0; ii < members.length; ii++)
   {
      member = members[ii];
      member[method].apply(member, args.slice(1));
   }
}
EVR.Animation.Ending.Family.prototype.play = function(name, delay)
{
   this.apply_to_members("play", name, delay);
}
EVR.Animation.Ending.Family.prototype.stop = function()
{
   this.apply_to_members("stop");
}
EVR.Animation.Ending.Family.prototype.reset = function()
{
   this.apply_to_members("reset");
}
EVR.Animation.Ending.Family.prototype.draw = function()
{
   this.apply_to_members("draw");
}
EVR.Animation.Ending.Family.prototype.remove = function()
{
   this.apply_to_members("remove");
}
EVR.Animation.Ending.Family.prototype.toString = function()
{
   return "[object EVR.Animation.Ending.Family]";
}
EVR.Animation.Ending.Family.Member = function(family, attributes)
{
   EVR.Animation.call(this, FAMILY_FRAME_RATE);
   this.attributes = attributes;
   this.step = FAMILY_STEP;
   this.jump_step = FAMILY_JUMP_STEP;
   this.shifted = false;
   this.avatar = new EVR.Emoticon(family.container, family.tombstone);
   this.set_attributes();
   this.remove();
}
EVR.Animation.Ending.Family.Member.prototype = new EVR.Animation;
EVR.Animation.Ending.Family.Member.prototype.set_attributes = function()
{
   var attributes = this.attributes;
   var size = attributes[0];
   var offset = attributes[1];
   var color = attributes[2];
   var avatar = this.avatar;
   avatar.set_proportions(1, size);
   avatar.place(offset, 0);
   avatar.set_color(color);
}
EVR.Animation.Ending.Family.Member.prototype.remove = function()
{
   this.avatar.remove();
}
EVR.Animation.Ending.Family.Member.prototype.append = function()
{
   this.avatar.append();
}
EVR.Animation.Ending.Family.Member.prototype.sequence = function()
{
   var avatar = this.avatar;
   if (this.shifted)
   {
      avatar.move(-this.step);
      this.shifted = false;
   }
   if (Math.random() < FAMILY_SHIFT_PROBABILITY)
   {
      avatar.move(this.step);
      this.shifted = true;
   }
}
EVR.Animation.Ending.Family.Member.prototype.jump = function()
{
   var avatar = this.avatar;
   var returned = false;
   if (this.jumped)
   {
      avatar.move(null, -this.jump_step);
      this.jumped = false;
      returned = true;
   }
   if (!returned && Math.random() < FAMILY_JUMP_PROBABILITY)
   {
      avatar.move(null, this.jump_step);
      this.jumped = true;
   }
}
EVR.Animation.Ending.Family.Member.prototype.reset = function()
{
   var avatar = this.avatar;
   if (this.jumped)
   {
      avatar.move(null, -this.jump_step);
      this.jumped = false;
   }
   if (this.shifted)
   {
      avatar.move(-this.step);
      this.shifted = false;
   }
}   
EVR.Animation.Ending.Family.Member.prototype.draw = function()
{
   this.avatar.draw();
}
EVR.Animation.Ending.Family.Member.prototype.toString = function()
{
   return "[object EVR.Animation.Ending.Family.Member]";
}
EVR.include("animation/ending/corpse/Soul.js");
EVR.Animation.Ending.Corpse = function(ending)
{
   EVR.Animation.call(this, CORPSE_FRAME_RATE);
   this.ending = ending;
   this.container = ending.container;
   this.add_children();
   this.set_attributes();
   this.place_offscreen();
}
EVR.Animation.Ending.Corpse.prototype = new EVR.Animation;
EVR.Animation.Ending.Corpse.prototype.add_children = function()
{
   this.soul = new EVR.Animation.Ending.Corpse.Soul(this);
   this.add_avatar();
}
EVR.Animation.Ending.Corpse.prototype.add_avatar = function()
{
   var ending = this.ending;
   var avatar = new EVR.Emoticon(ending.container, ending.tombstone, ALIGN_TOP);
//    avatar.ratio_type = RATIO_WIDTH;
   avatar.remove();
   this.avatar = avatar;
}
EVR.Animation.Ending.Corpse.prototype.set_attributes = function()
{
   var avatar = this.avatar;
   avatar.set_proportions(1, CORPSE_HEIGHT);
   avatar.set_z(CORPSE_Z_INDEX);
}
EVR.Animation.Ending.Corpse.prototype.reset = function()
{
   var avatar = this.avatar;
   avatar.set_proportions(1, CORPSE_HEIGHT);
   avatar.set_z(CORPSE_Z_INDEX);
   this.place_offscreen();
   this.soul.reset();
}
EVR.Animation.Ending.Corpse.prototype.place_offscreen = function()
{
   this.avatar.place(0, .1);
}
EVR.Animation.Ending.Corpse.prototype.append = function()
{
   this.avatar.append();
   this.soul.append();
}
EVR.Animation.Ending.Corpse.prototype.sequence = function()
{
   var avatar = this.avatar;
   avatar.move(null, CORPSE_STEP);
   var y = avatar.get_coordinates(true)[1] + avatar.get_dimensions(true)[1];
   if (y < 0)
   {
      this.stop();
      avatar.set_z(CORPSE_ZOOM_Z_INDEX);
      this.play("zoom", CORPSE_ZOOM_DELAY);
   }
}
EVR.Animation.Ending.Corpse.prototype.zoom = function()
{
   var avatar = this.avatar;
   avatar.grow(avatar.get_dimensions(true)[1] * CORPSE_ZOOM_RATE);
   var coordinates = avatar.get_coordinates(true);
   var size = avatar.get_dimensions(true);
   if (size[1] > .8 && !this.soul.playing)
   {
      this.soul.play();
   }
   if (size[1] > 1000)
   {
      this.stop();
   }
   var eye_offset = CORPSE_EYE_OFFSET;
   var offset = [size[0] * eye_offset[0], size[1] * eye_offset[1]];
   var eye_coordinates = 
      [coordinates[0] + offset[0], coordinates[1] + offset[1]];
   var endpoint = CORPSE_ZOOM_ENDPOINT;
   var step = CORPSE_ZOOM_STEP;
   var x = (endpoint[0] - eye_coordinates[0]) * step;
   var y = (endpoint[1] - eye_coordinates[1]) * step;
   avatar.move(x, y);
}
EVR.Animation.Ending.Corpse.prototype.draw = function()
{
   this.avatar.draw();
   this.soul.draw();
}
EVR.Animation.Ending.Corpse.prototype.remove = function()
{
   this.avatar.remove();
   this.soul.remove();
}
EVR.Animation.Ending.Corpse.prototype.toString = function()
{
   return "[object EVR.Animation.Ending.Corpse]";
}
54.162.203.39
54.162.203.39
54.162.203.39
 
June 29, 2013

A few weeks ago, for Fishing Jam, I made a fishing simulation from what was originally designed to be a time attack arcade game. In the program, Dark Stew, the player controls Aphids, an anthropod who fishes for aquatic creatures living in nine pools of black water.



Fishing means waiting by the pool with the line in. The longer you wait before pulling the line out, the more likely a creature will appear. Aside from walking, it's the only interaction in the game. The creatures are drawings of things you maybe could find underwater in a dream.

The background music is a mix of clips from licensed to share songs on the Free Music Archive. Particularly, Seed64 is an album I used a lot of songs from. The full list of music credits is in the game's README file.

I'm still planning to use the original design in a future version. There would be a reaction-based mini game for catching fish, and the goal would be to catch as many fish as possible within the time limit. I also want to add details and obstacles to the background, which is now a little boring, being a plain, tiled, white floor.

If you want to look at all the drawings or hear the music in the context of the program, there are Windows and source versions available. The source should work on any system with Python and Pygame. If it doesn't, bug reports are much appreciated. Comments are also welcome :)

Dark Stew: Windows, Pygame Source

I wrote in my last post that I would be working on an old prototype about searching a cloud for organisms for Fishing Jam. I decided to wait a while before developing that game, tentatively titled Xenographic Barrier. Its main interactive element is a first-person scope/flashlight, so I'd like to make a Wii version of it.

I'm about to start working on a complete version of Ball & Cup. If I make anything interesting for it, I'll post something. There are a lot of other things I want to write about, like game analyses, my new GP2X and arcades in Korea, and there's still music to release. Lots of fun stuff coming!


↠ RSS Feed ↞