Reflection Rejection: A Pygame Camera Game
Here is another Game Creation Society competition entry I wrote in an evening. The theme was “reflection”, and I took it literally. The game generates a jagged and changing world based on what a webcam sees. This of course, means that it requires a webcam supported by the Pygame Camera module, which should be just about any USB webcam that works in Linux.
In the game, you must steer the heart across the treacherous world without colliding with anything. If you do, you start back at the beginning. If you succeed, the heart gets bigger and you start again. Note that in many cases, the worlds generated will actually be impossible, just like real life.
The game uses the latest Pygame out of SVN, so I compiled it and included it locally for those who don’t have it.
Download:
Reflection Rejection i386
Reflection Rejection amd64
Deep Sheep: A Global Game Jam Entry
I spent last weekend at the Entertainment Technology Center (ETC) for the Global Game Jam, designing and programming a game about sheep. The process of coming up with a game concept in our team of 7 randomly thrown together geeks (though we ended the weekend with 5 [attrition, not cannibalism {though I did get pretty hungry from all the coding}]), was quite a whirlwind. Somehow we started at a blob of mercury and ended with a dream in which you control an alarm clock being chased and covered by bouncy sheep. The premise is that you’ve fallen asleep counting sheep, which follow you into your dream. The sheep try to keep you in the dream forever by smothering the alarm clock and preventing it from ringing. To win, you must knock all of the sheep off of the clock by ramming into obstacles or falling from heights, and then quickly roll back to the bed before any sheep catch up and reattach. It plays a lot like a reverse Katamari Damacy, though that was not necessarily the intent.
This is the second time I’ve done a 3d game, and this one came out far better than Robobear Apocalypse, an entry for the Wild Pockets Game Jam. The engine this uses is Panda3D, another product of the ETC. It was actually quite nice to learn and use, and I was impressed by how well it worked cross-platform. It helps that it uses regular old Python instead of proprietary languages that seem to be all the rage in game engines today. I also learned just how nice it was to have modellers/animators on a game project. Finally a game that isn’t made up of spheres, cubes, and stock models!
You can download the game on its Global Game Jam page. The .zip on that page contains the source and a Windows installer. You can also run the source directly in Linux or Windows if you have Panda3D installed. It seems most distros have it available in their repos, but if not, there are packages downloadable at the Panda3D site. It’ll run ok on just about anything that isn’t integrated graphics. The game isn’t perfect and certainly isn’t bug free, but it is a fun light hearted experience and the result of only 48 hours of work.
RocketPong: Now a Zero Button Voice Activated Game
I wasn’t planning on touching this one button game again, but I have one last improvement: removing the button. RocketPong is now a zero button game in which the player’s rocket thrust can be activated by yelling into the microphone. It feels… kind of right. I tried making the thrust relative to the loudness, but it felt less smooth.
I did this mainly as a proof of concept for a bigger and better future game idea. It is a game that will be controlled by voice input and hand gestures. The player yells into the microphone to recharge his or her ammo and makes shooting noises (pew! pew!) to fire. The player’s hand, closed into a gun shape, will control the crosshair on screen to target enemies. The game will probably be quite frustrating to play, but hilarious to watch other people play.
This version of RocketPong uses some code from CShadowRun in an Ubuntu Forums thread. It requires pygame 1.8 or newer and python-alsaaudio.
Download: rocketpong_voice.tar.gz
Augmenting Reality with Reality
I combined voxel carving and augmented reality to insert 3d reconstructions of real life objects into real life scenes for a final project for 15-463, Computational Photography. There is a more detailed writeup here. It looks kind of bleh at the moment, and it involves a lot of hacked together libraries. I really like the idea of it though, so this is something I’m planning on revisiting when I have more skill in the third dimension.
Pointillism: The “it works this time” Edition
I loaded the activities I’ve written in the past onto my new G1G1 XO and found that Pointillism probably never worked on any XO but my old one. This is something I probably should have tested.
In addition to actually working, this release has better performance, flips the image horizontally, and lets you save images to the Journal.
Download: Pointillism-2.xo
Give a Laptop. Get a Laptop. Change the World.
XO’s are available (and shipping fast) from Amazon (URL is via OLPC) through Give One Get One 2008. As you can see from the map above, G1G1 2007 is already having quite an impact on the world, with tens of thousands of donated XOs being deployed across Ethiopia, Rwanda, Mongolia, and other countries.
Face Morphing from Obama to McCain
This was for an assignment for Computational Photography, a course I’m taking this semester. As such, I can’t in good faith upload the MATLAB source. Some day, I might write a face morphing library in C or Python though.
There is no great social or political message here. I just thought it would look cool. Both of the images are from Wikipedia.
On the technical side of things, matching points are manually picked on both images. They are then formed into triangles using a Delaunay function. The matching triangles are then morphed using an affine transform by the fundamental matrix that matches the three specified pairs of points. A different amount of “morph” is applied to each of the 61 frames in this. It all comes together to look surprisingly smooth.
My Other Laptop
Thanks to Sameer Verma for the idea. G1G1 2008 is just around the corner!
SVG Version
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).