import os
import re
import shutil

class Item:

    def __init__(self, path, index, no_name):
        self.path = path
        self.index = index
        self.no_name = no_name
        self.next = None

    def __str__(self):
        return str(self.index) + "\t" + self.path

    def __len__(self):
        ii = 0
        current = self
        while current != None:
            ii += 1
            current = current.next
        return ii

    def insert(self, path, index=None):
        head = self
        previous = head.advance_to_index_predecessor(index)
        if index == None:
            index = previous.index + 1
        item = Item(path, index, self.no_name)
        if previous != None:
            item.next = previous.next
            previous.next = item
        else:
            item.next = head
            head = item
        item.increase_indices()
        return head

    def advance_to_index_predecessor(self, index=None):
        previous = None
        current = self
        while current != None:
            if index != None and current.index >= index:
                break
            previous = current
            current = current.next
        return previous

    def increase_indices(self):
        current = self.next
        previous_index = self.index
        while current != None and current.index == previous_index:
            current.index += 1
            previous_index += 1
            current = current.next

    def remove_path(self, path):
        head = self
        current = head
        previous = None
        while current != None:
            if os.path.samefile(path, current.path):
                if previous != None:
                    previous.next = current.next
                else:
                    head = current.next
                break
            previous = current
            current = current.next
        return head

    def bunch(self):
        index = 1
        current = self
        while current != None:
            current.index = index
            index += 1
            current = current.next

    def erase_index(self):
        self.index = None

    def save(self, directory_path, prefix_length, delimiter, copy, simulate,
             verbosity):
        name = self.extract_name()
        name = name.lstrip(delimiter)
        prefix = self.build_prefix(prefix_length)
        if self.no_name:
            file_name = prefix + self.extract_extension(name)
        else:
            file_name = prefix + delimiter + name
        path = os.path.join(directory_path, file_name)
        self.write_path(path, copy, simulate, verbosity)

    def build_prefix(self, prefix_length):
        prefix = ""
        if self.index != None:
            prefix = str(self.index).zfill(prefix_length)
        return prefix

    def extract_extension(self, name):
        return "." + name.split(".")[-1]

    def write_path(self, path, copy, simulate, verbosity):
        if not os.path.isfile(path) or not os.path.samefile(self.path, path):
            if not simulate:
                if copy:
                    shutil.copy(self.path, path)
                else:
                    shutil.move(self.path, path)
            if verbosity > 0:
                print "Wrote:", self.path, "=>", path

    def get_largest_index(self):
        current = self
        while current.next:
            current = current.next
        return current.index

    def extract_name(self):
        file_name = os.path.basename(self.path)
        match = re.match("^[0-9]*(.*)", file_name)
        return match.group(1)
<?php

define("STYLE_SHEET", "style.css");
define(
   "PAGE_TITLE",
   "Elemental Parents &#187; Lightweight Hierarchical Database");

display_page();
function display_page() { echo build_page(); }

function build_page()
{
   $markup = "<html>\n\n";
   $markup .= build_head();
   $markup .= build_body();
   $markup .= "</html>";
   return $markup;
}

function build_body()
{
   $markup = file_get_contents("elmp.html") . "\n";
   return $markup;
}

function build_head()
{
   $markup = "<head>\n";
   $markup .= "<title>" . PAGE_TITLE . "</title>\n";
   $markup .= build_style_sheet_tag();
   $markup .= "</head>\n\n";
   return $markup;
}

function build_style_sheet_tag()
{
   $markup = "<link href=\"";
   $markup .= STYLE_SHEET;
   $markup .= "\" rel=\"stylesheet\" type=\"text/css\"/>\n";
   return $markup;
}
<?php

define("OPEN_ELEMENT_CHAR", "(");
define("CLOSE_ELEMENT_CHAR", ")");

define("NAME_COMPONENT", 0);
define("ID_COMPONENT", 1);
define("DATA_COMPONENT", 2);
define("COMPONENT_COUNT", 3);

define("ELMP_VERBOSE", True);
<?php

// The refrigerator picked up a mix of transmissions from Andromeda, one of
// them was a loop, "Attention All Humans..."

class Element
{
   public function __construct($id=NULL, $name=NULL, $content=NULL)
   {
      $this->id = $id;
      $this->name = $name;
      $this->content = $content;
   }

   public function __toString()
   {
      return "Element $this->id -- $this->name\n";
   }

   public function count()
   {
      return ((is_object($this->content)) ? $this->content->count() : 0) +
         (($this->next) ? $this->next->count() : 0) + 1;
   }

   public function measure_depth()
   {
      $current = $this;
      while ($current)
      {
         if (is_object($current->content))
         {
            $nodes[] = 1 + $current->content->measure_depth();
         }
         $current = $current->next;
      }
      return ($nodes) ? max($nodes) : 1;
   }

   // Run a user supplied function on every member of the tree.  Return the
   // concatenation of the values given by each recursive call.
   public function format($editor, $indent=False, $level=0)
   {
      $markup = call_user_func($editor, $this, $indent, $level);
      if (is_object($this->content))
      {
         $markup .= $this->content->format($editor, True, $level+1);
      }
      if ($this->next)
      {
         $markup .= $this->next->format($editor, False, $level);
      }
      else
      {
         $markup .= call_user_func($editor, $this->next, $indent, $level);
      }
      return $markup;
   }

   public function convert_to_raw_string()
   {
      $message = "($this->name $this->id";
      $message .= ($this->content || $this->next) ? " " : "";
      $message .= (is_object($this->content)) ?
         $this->content->convert_to_raw_string() : "";
      $message .= (!is_object($this->content)) ? "$this->content)" : ")";
      $message .= ($this->next) ? $this->next->convert_to_raw_string() : "";

      return $message;
   }

   public function convert_to_tabbed_string($level=0)
   {
      $string = str_repeat("   ", $level);
      $string .= "$this->id $this->name";
      $string .= (is_object($this->content)) ? " »\n" : ": $this->content\n";

      $string .= (is_object($this->content)) ?
         $this->content->convert_to_tabbed_string($level+1) : "";
      $string .= ($this->next) ?
         $this->next->convert_to_tabbed_string($level) : "";

      return $string;
   }
}
18.97.14.85
18.97.14.85
18.97.14.85
 
May 17, 2018

Line Wobbler Advance is a demake of Line Wobbler for Game Boy Advance that started as a demo for Synchrony. It contains remakes of the original Line Wobbler levels and adds a challenging advance mode with levels made by various designers.


f1. Wobble at home or on-the-go with Line Wobbler Advance

This project was originally meant to be a port of Line Wobbler and kind of a joke (demaking a game made for even lower level hardware), but once the original levels were complete, a few elements were added, including a timer, different line styles and new core mechanics, such as reactive A.I.


f2. Notes on Line Wobbler

I reverse engineered the game by mapping the LED strip on paper and taking notes on each level. Many elements of the game are perfectly translated, such as enemy and lava positions and speeds and the sizes of the streams. The boss spawns enemies at precisely the same rate in both versions. Thanks in part to this effort, Line Wobbler Advance was awarded first prize in the Wild category at Synchrony.


f3. First prize at Synchrony

Advance mode is a series of levels by different designers implementing their visions of the Line Wobbler universe. This is the part of the game that got the most attention. It turned into a twitchy gauntlet filled with variations on the core mechanics, cinematic interludes and new elements, such as enemies that react to the character's movements. Most of the levels are much harder than the originals and require a lot of retries.

Thanks Robin Baumgarten for giving permission to make custom levels and share this project, and thanks to the advance mode designers Prashast Thapan, Charles Huang, John Rhee, Lillyan Ling, GJ Lee, Emily Koonce, Yuxin Gao, Brian Chung, Paloma Dawkins, Gus Boehling, Dennis Carr, Shuichi Aizawa, Blake Andrews and mushbuh!

DOWNLOAD ROM
You will need an emulator to play. Try Mednafen (Windows/Linux) or Boycott Advance (OS X)