The New Look

I finally got around to updating k2 to the latest version, and with it, I got the site looking like I had intended it to. No more weird spacing and awkward half default look.

I tested it with Firefox 3, Internet Explorer 7, Safari 3, and Chrome in Windows and Firefox 3 and Opera 9.52 in Ubuntu. It seems to work as expected, aside from some weird spacing in IE (or maybe that should be expected). Google Analytics claims 11% of the visitors to this site use Internet Explorer, which feels strangely high considering the content. I’m ok with giving the remaining 11% another reason to switch.

I made the Sierpinski fractal background with Context Free. It is quite a fun program, and very simple to pick up. It took a few minutes to write the script for the background (about 1/100th the time it took to get the CSS looking right).

No Comments on The New Look

There’s a Mouse in my House (but I’m Smitten with a Kitten?)

The Mouse

I found a baby mouse in my hallway today.  I’m not sure how it made it that far from its mother; it was moving pretty slowly.  I saw the trail it made through the drywall dust in the partially finished bedroom in our house, so I placed it back in the hole it came out of.  I can only hope its mother finds it.  As much as I would have loved to take care of it, I live with a wonderful little kitten named Gizmo.  He didn’t pounce on the mouse when he saw it, but I don’t see them becoming fast friends…

The Kitten

5 Comments on There’s a Mouse in my House (but I’m Smitten with a Kitten?)

v4l2 camera module now in Pygame SVN

My Google Summer of Code Project has finally grown up and flown out of my personal git repo to enter the Pygame SVN. All development will now occur there, though I will leave my git up for archival purposes.

The project is a module for Pygame to support v4l2 cameras. The impetus for this was to make the webcam on the OLPC XO usable without intimate knowledge of GStreamer, and to allow for some basic computer vision. The module does, however, support many camera pixelformats beyond those used on the XO, and is pretty flexible to adding new ones.

At the moment, there is no support for v4l cameras beyond detecting that they are attached to the computer, and there is no support at all for Windows or OS X. René Dudfield is starting work on Windows support using directshow. OS X support will come eventually.

The API documentation for the module is pretty thorough, but I haven’t uploaded any tutorials or example scripts yet. For now, you can look at some of the scripts I’ve posted on this blog.

No Comments on v4l2 camera module now in Pygame SVN

RocketPong – A One Button Game

RocketPong

I couldn’t sleep, so I decided to write a quick entry for the Game Creation Society‘s One Button Game Compo.

It requires Pygame 1.8, which can be installed through a package manager on many distros, or can be downloaded from Pygame.

The game is a pong clone with gravity. The one button activates thrust on your paddle, which happens to look like a rocket. In theory, there is pixel perfect collision detection, so the angle of the ball against the curve of the rocket should matter. The opponent rocket is controlled by some really really horrible AI. The game would be infinitely more fun with two players, but I wasn’t sure if the one button rule meant per player or total…

Update: I uploaded a better version of it with more accurate collision detection and better AI.  There is also a two player mode that is activated by hitting the right arrow key, which is the thrust key for the second player.  This is the final version for the game competition, and very likely the last time I will touch the code.

Download:
rocketpong.tar.gz
rocketpong.zip

No Comments on RocketPong – A One Button Game

Things I’m Doing (or Queueing at least)

I am chronically unable to finish projects because I tend to pick up a new one more often than I complete an old one.  Here is a list of things I’m currently working on, in no particular order.

  • Turning Bridge into a real activity.  This means using the datastore, dropping Elements in favor of directly interfacing PyBox2D, and making multiple levels of play.
  • Writing a working Panorama activity. Ben Schwartz wrote some excellent autostitching using Numpy; it just needs some camera code to make capturing frames easier and to disable auto white balance and so on.  I stuck Ben’s activity in a git repo, and I plan on making my changes soon.
  • Commiting the rest of my GSoC project to Pygame SVN.  I committed everything but the actual camera module so far.  At the very least, I need to set up a build environment in Windows and make sure that the camera fails gracefully, since it only supports v4l2 at the moment.  Before Pygame 1.9 is released though, I plan on writing VFW and maybe Quicktime support.
  • Writing an Augmented Reality Game (ARG?).  Augmented Reality is pretty much the holy grail of computing for me. I played around with ARToolkit a bit, but I really want to get into it when I have more time.

Of course, in addition to that, there is attempting to find a job, taking care of my kitten, finishing moving into my house, and loads of schoolwork.  The schoolwork is mostly interesting though.  It currently consists of writing object classification and image seam carving in Matlab, coming up with screenplay ideas, and playing with a Gumstix board.  I’m also going to be starting some computer vision research with Professor Martial Hebert of the Vision and Mobile Robotics Laboratory at the Robotics Institute.  More on that when it happens…

2 Comments on Things I’m Doing (or Queueing at least)