from pygame import Surface

from dark_stew.pgfw.GameChild import GameChild
from dark_stew.water.Layer import Layer

class Water(GameChild):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.display_surface = self.get_display_surface()
        self.load_configuration()
        self.set_background()
        self.add_layers()

    def load_configuration(self):
        config = self.get_configuration("water")
        self.opacity = config["opacity"]
        self.speed = config["speed"]
        self.color = config["color"]

    def set_background(self):
        background = Surface(self.display_surface.get_size())
        background.fill(self.color)
        self.background = background

    def add_layers(self):
        layers = []
        for ii, opacity in enumerate(self.opacity):
            layers.append(Layer(self, opacity, self.speed[ii], ii * 16))
        self.layers = layers

    def update(self):
        for layer in self.layers:
            layer.update()
        self.draw()

    def draw(self):
        self.display_surface.blit(self.background, (0, 0))
        for layer in reversed(self.layers):
            layer.draw()
from pygame import Surface
from pygame.image import load

from dark_stew.pgfw.GameChild import GameChild

class Layer(GameChild, Surface):

    def __init__(self, parent, opacity, speed, base_offset):
        GameChild.__init__(self, parent)
        self.opacity = opacity
        self.speed = speed
        self.base_offset = base_offset
        self.display_surface = self.get_display_surface()
        self.transparent_color = (255, 0, 255)
        self.offset = 0
        self.set_tile()
        self.init_surface()
        self.paint()

    def set_tile(self):
        path = self.get_resource("water", "tile-path")
        self.tile = load(path).convert_alpha()

    def init_surface(self):
        padding = self.tile.get_width()
        width, height = self.parent.parent.size
        Surface.__init__(self, (width + padding, height + padding))
        transparent_color = self.transparent_color
        self.fill(transparent_color)
        self.set_colorkey(transparent_color)
        self.set_alpha(self.opacity)
        self.padding = padding

    def paint(self):
        tile = self.tile
        for x in xrange(0, self.get_width(), tile.get_width()):
            for y in xrange(0, self.get_height(), tile.get_height()):
                self.blit(tile, (x, y))

    def update(self):
        offset = self.offset - self.speed
        padding = self.padding
        if offset < -padding:
            offset += padding
        self.offset = offset

    def draw(self):
        rect = self.parent.parent.move([int(self.offset)] * 2)
        rect.top += self.base_offset
        self.display_surface.blit(self, rect)
from math import sqrt
from os import listdir
from os.path import isdir, join
from re import match

from dark_stew.pgfw.GameChild import GameChild
from dark_stew.pool.Pool import Pool

class Pools(GameChild, list):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.add_pools()

    def add_pools(self):
        width = self.parent.w
        step = int(float(width) / sqrt(self.count_pools()))
        ii = 0
        for x in xrange(step / 2, width, step):
            for y in xrange(step / 2, width, step):
                self.append(Pool(self, (x, y), ii))
                ii += 1
        self.step = step

    def count_pools(self):
        count = 0
        root = self.get_resource("pool", "water-path")
        for name in listdir(root):
            if match("^[0-9]", name):
                count += 1
        return count

    def update(self):
        for pool in self:
            pool.update()
from os.path import join

from dark_stew.pgfw.Sprite import Sprite

class Ring(Sprite):

    def __init__(self, parent, index):
        Sprite.__init__(self, parent)
        self.index = index
        self.display_surface = self.get_display_surface()
        self.load_from_path(self.build_path(), transparency=True, ppa=False)
        self.rect.center = parent.center

    def build_path(self):
        return join(self.get_resource("pool", "ring-path"),
                    str(self.index) + ".png")

    def draw(self):
        x, y = self.rect.topleft
        frame = self.get_current_frame()
        surface = self.display_surface
        for dx, dy in self.parent.parent.parent.get_corners():
            surface.blit(frame, (x + dx, y + dy))
from os.path import join

from pygame import Surface
from pygame.image import load

from dark_stew.pgfw.Sprite import Sprite

class Water(Sprite):

    def __init__(self, parent, index):
        Sprite.__init__(self, parent)
        self.index = index
        self.display_surface = self.get_display_surface()
        self.transparent_color = (255, 0, 255)
        self.load_configuration()
        self.load_groove()
        self.set_framerate(self.framerate)
        self.load_from_path(join(self.frames_root, str(index)),
                            transparency=True, ppa=False)
        self.rect.center = parent.center

    def load_configuration(self):
        config = self.get_configuration("pool")
        self.framerate = config["framerate"]
        self.frames_root = self.get_resource("pool", "water-path")
        self.groove_path = self.get_resource(join(config["water-path"],
                                                  config["groove-path"]))

    def load_groove(self):
        image = load(join(self.groove_path, str(self.index) + ".png"))
        surface = Surface(image.get_size())
        transparent_color = self.transparent_color
        surface.fill(transparent_color)
        surface.set_colorkey(transparent_color)
        surface.blit(image, (0, 0))
        self.groove = surface

    def draw(self):
        x, y = self.rect.topleft
        frame = self.get_current_frame()
        surface = self.display_surface
        groove = self.groove
        for dx, dy in self.parent.parent.parent.get_corners():
            surface.blit(frame, (x + dx, y + dy))
            surface.blit(groove, (x + dx, y + dy))
3.235.179.79
3.235.179.79
3.235.179.79
 
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)