EVR.Level.Delegate = function(level)
{
   this.level = level;
   this.evr = level.evr;
   this.prompt = level.prompt;
   this.countdown = level.countdown;
   this.racer = level.road.racer;
   this.path = level.road.path;
}
EVR.Level.Delegate.prototype.enter = function()
{
   var level = this.level;
   var prompt = this.prompt;
   if (level.states[LEVEL_STATE_WAITING])
   {
      prompt.remove();
      this.countdown.start();
      prompt.set_text(LEVEL_PAUSE_PROMPT_TEXT);
   }
   else if (level.states[LEVEL_STATE_RACING])
   {
      level.pause();
   }
   else if (level.states[LEVEL_STATE_SUMMARIZING])
   {
      level.show_records();
   }
   else if (level.states[LEVEL_STATE_FINISHED])
   {
      prompt.set_finish_text();
      prompt.toggle();
   }
}
EVR.Level.Delegate.prototype.up = function()
{
   if (this.path.playing)
   {
      this.racer.move(-1);
   }
}
EVR.Level.Delegate.prototype.down = function()
{
   if (this.path.playing)
   {
      this.racer.move(1);
   }
}
EVR.Level.Delegate.prototype.sprint = function()
{
   this.path.sprint();
}
EVR.Level.Delegate.prototype.cancel_sprint = function()
{
   this.path.sprinting = false;
}
EVR.Level.Delegate.prototype.restart = function()
{
   var level = this.level;
   if (level.states[LEVEL_STATE_PAUSED] || level.states[LEVEL_STATE_FINISHED])
   {
      this.evr.load_level(level.id, level.practice);
   }
}
EVR.Level.Delegate.prototype.main_menu = function()
{
   var level = this.level;
   if (level.states[LEVEL_STATE_PAUSED] || level.states[LEVEL_STATE_FINISHED])
   {
      this.evr.unload_level();
   }
}
EVR.Level.Delegate.prototype.next_level = function()
{
   var level = this.level;
   if (level.states[LEVEL_STATE_FINISHED])
   {
      var id = parseInt(level.id);
      var evr = this.evr;
      if (level.next_level_is_available())
      {
	 evr.load_level(id + 1);
      }
      else if (id == LEVEL_LIMIT && level.is_clear())
      {
	 evr.load_ending();
      }
   }
}
EVR.Level.Delegate.prototype.toString = function()
{
   return "[object EVR.Level.Delegate]";
}
EVR.Level.Clock = function(level)
{
   EVR.Graphic.call(
      this, level.road, null, null, ALIGN_RIGHT, level.road.container);
   this.road = level.road;
   this.height = CLOCK_HEIGHT;
   this.build();
   this.append();
}
EVR.Level.Clock.prototype = new EVR.Graphic;
EVR.Level.Clock.prototype.build = function()
{
   this.set_proportions(CLOCK_WIDTH, this.height);
   this.set_opacity(CLOCK_OPACITY);
   this.set_color(CLOCK_BACKGROUND);
   this.set_text("00:00.000", CLOCK_FONT, CLOCK_TEXT_COLOR, CLOCK_TEXT_SIZE);
   this.css.fontWeight = CLOCK_FONT_WEIGHT;
   this.css.letterSpacing = CLOCK_LETTER_SPACING;
   this.set_line_height();
   this.css.overflow = "hidden";
   this.time = new EVR.Time();
}
EVR.Level.Clock.prototype.set_line_height = function()
{
   this.css.lineHeight = this.get_dimensions()[1] + "px";
}
EVR.Level.Clock.prototype.start = function()
{
   var current = this;
   this.timestamp = +new Date;
   this.interval = window.setInterval(
      function() {
	 current.measure();
      }, CLOCK_INTERVAL);
}
EVR.Level.Clock.prototype.measure = function()
{
   var timestamp = +new Date;
   var difference = timestamp - this.timestamp;
   this.time.add(difference);
   this.timestamp = timestamp;
   this.text.set(this.time.get_formatted());
}
EVR.Level.Clock.prototype.stop = function()
{
   if (!!this.interval)
   {
      window.clearInterval(this.interval);
      this.interval = null;
      this.measure();
   }
}
EVR.Level.Clock.prototype.toggle = function()
{
   if (!!!this.interval)
   {
      this.start();
   }
   else
   {
      this.stop();
   }
}
EVR.Level.Clock.prototype.place = function()
{
   EVR.Graphic.prototype.place.call(this);
   var y = this.road.borders.get_dimensions()[1];
   y += this.road.get_dimensions()[1];
   this.set_coordinates([null, y])
}
EVR.Level.Clock.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   this.set_line_height();
}
EVR.Level.Clock.prototype.toString = function()
{
   return "[object EVR.Level.Clock]";
}
<?php
require_once "../account/get_user_path.php";
$GLOBALS["PROGRESS_FILE_NAME"] = "progress";
$path = account\get_user_path() . $GLOBALS["PROGRESS_FILE_NAME"];
$progress = trim(file_get_contents($path));
if (isset($_GET["clear"]) && $_GET["clear"] > $progress)
{
   $progress++;
   file_put_contents($path, $progress);
}
echo $progress;
<?php
require_once "../account/get_user_path.php";
$GLOBALS["FILE_NAME"] = "expert";
add_id_to_list();
function add_id_to_list()
{
   $id = $_GET["id"];
   $levels = get_list();
   if (!in_array($id, $levels))
   {
      $levels[] = $id;
   }
   file_put_contents(build_path(), implode(" ", $levels));
}
function get_list()
{
   $raw = file_get_contents(build_path());
   if ($raw == "")
   {
      return array();
   }
   return explode(" ", $raw);
}
function build_path()
{
   return account\get_user_path() . $GLOBALS["FILE_NAME"];
}
184.73.55.221
184.73.55.221
184.73.55.221
 
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 ↞