from os.path import join

from pygame import Rect
from pygame.image import load
from pygame.transform import flip

from dark_stew.pgfw.Sprite import Sprite

class Rod(Sprite):

    def __init__(self, parent):
        Sprite.__init__(self, parent)
        self.load_frames()
        self.center = self.display_surface.get_rect().center
        self.load_line()
        self.deactivate()
        self.frames = [self.normal_frame]
        self.measure_rect()

    def load_frames(self):
        image = load(join(self.parent.sitting_path,
                          self.get_configuration("aphids", "rod-path")))
        self.normal_frame = self.fill_colorkey(image)
        self.mirrored_frame = self.fill_colorkey(flip(image, True, False))

    def load_line(self):
        image = load(join(self.parent.sitting_path,
                          self.get_configuration("aphids",
                                                 "line-path"))).convert_alpha()
        self.line = image
        self.line_rect = self.line.get_rect()

    def activate(self, dx, dy, mirror=False):
        self.active = True
        cx, cy = self.center
        self.rect.topleft = cx + dx, cy + dy
        if mirror:
            self.frames = [self.mirrored_frame]
            self.line_rect.topleft = self.rect.topright
        else:
            self.frames = [self.normal_frame]
            self.line_rect.topleft = self.rect.topleft

    def deactivate(self):
        self.active = False

    def draw(self):
        if self.active:
            Sprite.draw(self)
            self.display_surface.blit(self.line, self.line_rect)
from pygame import event, key as keys, mouse
from pygame.locals import *

from GameChild import *
from EventDelegate import *

class Input(GameChild):

    command_event = EventDelegate.command_event
    left_mouse_button = 1

    def __init__(self, game):
        GameChild.__init__(self, game)
        self.subscribe_to_events()

    def subscribe_to_events(self):
        self.subscribe_to(KEYDOWN, self.translate_key_press)
        self.subscribe_to(MOUSEBUTTONDOWN, self.translate_mouse_down)
        self.subscribe_to(MOUSEBUTTONUP, self.translate_mouse_up)
        self.subscribe_to(MOUSEMOTION, self.translate_mouse_motion)

    def translate_key_press(self, evt):
        key = evt.key
        config = self.get_configuration()
        if key in config["keys-quit"]:
            self.post_command("quit")
        if key in config["keys-capture-screen"]:
            self.post_command("capture-screen")
        if key in config["keys-reset"]:
            self.post_command("reset")

    def post_command(self, name):
        EventDelegate.post_event(self.command_event, command=name)

    def translate_mouse_down(self, evt):
        if evt.button == self.left_mouse_button:
            self.post_command("grab")

    def translate_mouse_up(self, evt):
        if evt.button == self.left_mouse_button:
            self.post_command("release")

    def translate_mouse_motion(self, evt):
        if mouse.get_pressed()[0]:
            self.post_command("drag")

    def is_key_pressed(self, identifier):
        poll = keys.get_pressed()
        for key in self.get_configuration()[identifier]:
            if poll[key]:
                return True
import os
import sys
import time

from pygame import image

from GameChild import *
from Input import *

class ScreenGrabber(GameChild):

    def __init__(self, game):
        GameChild.__init__(self, game)
        self.subscribe_to(Input.command_event, self.save_display)

    def save_display(self, event):
        if event.command == "capture-screen":
            directory = self.get_resource("capture-path")
            try:
                if not os.path.exists(directory):
                    os.mkdir(directory)
                name = self.build_name()
                path = os.path.join(directory, name)
                capture = image.save(self.get_screen(), path)
                print "Saved screen capture to %s" % directory + name
            except:
                print "Couldn't save screen capture to %s, %s" % \
                      (directory, sys.exc_info()[1])

    def build_name(self):
        config = self.get_configuration()
        prefix = config["capture-file-name-format"]
        extension = config["capture-extension"]
        return time.strftime(prefix) + extension
from pygame import display

from GameChild import *

class Display(GameChild):

    def __init__(self, game):
        GameChild.__init__(self, game)
        self.set_screen()
        self.set_caption()

    def set_screen(self):
        configuration = self.get_configuration()
        self.screen = display.set_mode(configuration["display-dimensions"])

    def set_caption(self):
        display.set_caption(self.get_configuration()["game-title"])

    def get_screen(self):
        return self.screen

    def get_size(self):
        return self.screen.get_size()
from os.path import exists, join

from pygame import mixer

import Game

class GameChild:

    def __init__(self, parent=None):
        self.parent = parent

    def get_game(self):
        current = self
        while not isinstance(current, Game.Game):
            current = current.parent
        return current

    def get_configuration(self):
        return self.get_game().get_configuration()

    def get_input(self):
        return self.get_game().get_input()

    def get_screen(self):
        return self.get_game().display.get_screen()

    def get_timer(self):
        return self.get_game().timer

    def get_audio(self):
        return self.get_game().audio

    def get_delegate(self):
        return self.get_game().delegate

    def get_resource(self, key):
        config = self.get_configuration()
        path = config[key]
        if exists(path):
            return path
        else:
            return join(config["media-install-path"], path)

    def subscribe_to(self, kind, callback):
        self.get_game().delegate.add_subscriber(kind, callback)
18.119.136.146
18.119.136.146
18.119.136.146
 
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)