BUILDSbot: 12 Ounce

Chris Woodall | 22 Mar 2012 | | projects

BUILDSbot 12 Ounce is part of the overarching BUILDSbot project. The goal is to create a functional robot which can take commands from a USB serial connection (possibly move to a wireless connection eventually). The robot should also be capable of doing line following as its main function. USB connectivity is simply for testing and possibly to help simplify future wireless based communication schemes.

Documentation can be found at the BUILDS Wiki and a Flickr photo galler can be found here


Older · View Archive (146)

LAN-Tunes

Lan-Tunes is a collaborative multimedia server written in python by Allan Wirth that is licensed under the MIT License. You can see what we’ve been playing at http://www.last.fm/user/builds. Version 0.1 is planned for release by the end of March 2012. 0.1 Beta will be coming slightly before.

You can download the wrapper script here.

Contents

  • 1 Repository
  • 2 Bugs/TODO
  • 3 Creating a new plugin
    • 3.1 Frontend
    • 3.2 Backend

Repository

The bzr repository for Lan-Tunes can be found on Launchpad at http://launchpad.net/lan-tunes.

Bugs/TODO

To see the current bug list check the launchpad bug tracker at https://bugs.launchpad.net/lan-tunes.

Creating a new plugin

Creating new plugins for Lan-Tunes is easy. Plugins fall into two categories, frontends and backends. Backends plugins add new media types to display, whereas frontend plugins mostly either modify the playlist state or respond to changes in the playlist. For example, youtube is a backend plugin whereas last.fm is a frontend.

Frontend

Creating a new frontend plugin is easy. A frontend plugin is merely a module (or package, if the plugin requires multiple source files) that defines a class Plugin that subclasses FrontendPlugin (from src/frontendplugin.py). Plugin must have the same constructor signature as FrontendPlugin and must also call FrontendPlugin’s constructor. Frontend plugins are designed to run in their own thread, although they are not required to (for example, the lastfm plugin has no thread of its own).

Frontend plugins that require their own thread should override the functions run() and kill(). run() will be called in a separate thread, and calling kill from the main thread SHOULD cause run to return (and ideally join with it). Note: Because run will be in a separate thread, all calls to GUI methods must be made through the util.idle_add interface in order to avoid locking problems.

Frontend plugins can also connect to the methods of the playlistmanager object that they are passed in the constructor.

For an example of a simple, non-threaded plugin see src/frontends/lastfm/init.py.

For additional documentation see src/frontendplugin.py.

Backend

Backend plugins are slightly more complicated. Like a frontend plugin, a backend plugin is merely a module (or package) that defines a class Plugin that subclasses BackendPlugin (from src/backendplugin.py). Again, Plugin must have the same constructor signature as BackendPlugin and must call BackendPlugin’s constructor. Unlike frontend plugins, backend plugins do not explicitly have their own threads (although they can for playback).

The following methods of BackendPlugin must be overridden:

  • init(self, backends, conf) - Should passthrough to backendplugin.init. backends contains a dictionary of the names of the already loaded modules mapped to their Plugin.
  • get_widget(self) - Should return a gtk widget that will be used for url that have ‘video’: True in their metadata. Will be called in the gtk main loop. This method is REQUIRED unless get_metadata never sets the video field to true.
  • can_play(self, url) - Returns true if this backend can play a given url. This MIGHT be called OUTSIDE of the gtk main loop. This method is REQUIRED.
  • play(self, url) - Plays a url. This may be called outside the gtk main loop. Sometime after a call to play, the plugin MUST emit(“stopped”) in the gtk main loop (potentially using util.idle_add). This method is REQUIRED. This function MUST NOT BLOCK.
  • get_metadata(self, url) - Retrieves metadata for a url. This will be called OUTSIDE the main loop. This should return a dictionary containing at least the key ‘video’ which will determine if the the gui will use the widget while playing this url. It can (and should) also contain the keys ‘title’, and ‘duration’. Additionally ‘artist’ and ‘album’ are optional, but recommended if available. This function is expected to block for some indeterminate amount of time (ideally short). This method is REQUIRED.
  • set_volume(self, val) - This sets the volume of the backend. This will be called OUTSIDE of the main loop. val will be an integer between 0 (min volume) and 100 (max volume). This method is REQUIRED. Backend plugins MUST also define a variable DEPS that contains an iterable of names of plugins that this plugin depends upon.

For a simple example of a backend plugin see /src/backends/youtube/init.py. For an example of a plugin that wraps the core VLC plugin see /src/backends/xhamster/init.py.

For additional documentation see /src/backendplugin.py and /README.

Newer

Video Game Collective

Current Status

Preparations are being made to display several of our projects at the upcoming BUILDS open house.

Meetings are tentatively set for Wednesdays from 2-3.

Overview

The Video Game Collective is designed around a loose group of projects in game development that have been proposed by members. Some are personal projects or extensions of existing projects from academic coursework. Anyone looking to help or just learn more about game design and creation are welcome.

Interests

  • Java, C++, and C, and using OpenGL with these
  • Python, using Pygame
  • Blender
  • Game Design

Existing Projects

  • Untitled: A 2.5 steampunk platformer. Main weapon/tool is a gear yo-yo, used for solving puzzles to escape the underbelly of a giant mechanical city.
  • Cartographer: An exploration platformer based on an alternate 1800’s Lewis and Clark America.
  • Untitled: A rogue-like text adventure game in Python.
  • Ghost in the Gymnasium: A high school janitor must escape endless waves of monsters on the night before prom. Done using Pygame.

Members

Project Leader: Liam Wang