missile command
Another Mutli-Missile Command!
by admin on May.13, 2008, under Lasers, missile command
Looks like Obscura Digital has made their own version of Missile Command. Instead of lasers and webcams their implementation uses a giant multi-touch screen. It is very similar to the Insight VR missile command, but playing it looks like a different experience. In terms of game play, both my implementation and Obsucra Digital’s are missing elements of the original arcade game. Neither one limits the number of missiles you can launch. Theirs is missing chain reaction effects. Mine is missing the launching of your own missiles as an explosion occurs right where the laser was seen.
Given the similarity of the two projects, I really have to wonder if they came up with this idea after seeing or hearing about my demo. But then again, if you sit down and try to think of a game that would be fun to play with either the laser or the multi-touch interface (which are very similar) Missile Command is the first thing that comes to mind…
Linux porting notes
by matt on Mar.25, 2008, under Lasers, missile command
Hello, Matt here. I’m going to discuss the Linux port of the Missile Command game. I have a Logitech QuickCam Messenger. After I installed gspcav1 on Gentoo Linux, the webcam “just worked”. Now I needed to get it working with the game.
The main task in porting to linux is to poll the webcam and push a buffer of image data to the process function that looks for red. A simple enough task.
A month or so ago, I had looked for python wrappers to the v4l interface, and I thought I came across one for v4l2 (v4l v. 1 doesn’t work now), but alas I downloaded into my /tmp directory and it has now gone into the bit bucket, and my search-fu isn’t good enough to find it again. So after getting frustrating that I’m either losing my memory or just retarded, I started looking for other wrappers. I found one called Fluendo Halogen. Using their example code I soon had image data going to the process function. But when I tried to play the game there appeared to be some weird feedback loop going on and the laser had no effect. What to do?
Debugging here is a tiny bit different that normal debugging. How do I know if the webcam is seeing the laser? And if it is why is it not being detected? Turns out that PIL has a nice function to convert a data buffer to an image. So by converting the buffer to an image, I could see what the webcam was seeing. To make a long story short, instead of giving my back a stream of RGBA values, I was getting back BGRA values (red and blue were switched) and the image was upside down. I tried the naive method of rearranging the buffer, but it was prohibitivly slow. So my brother told me to alter the processing matrices that searched for red. I also added a flip Y coordinate argument and the game was off and running.
So if you are interesting in running under linux, make sure you have Fluendo Halogen installed (or in your PYTHONPATH). Good luck!
Laser Missle Command Video Up
by john on Mar.24, 2008, under Lasers, PyCon, missile command, pySight
Laser Missile Command Ported to Linux
by john on Mar.24, 2008, under Lasers, missile command, pySight
There is a new download up for Laser Missile Command. This version now works with Linux as well as on the Mac. My brother did the port so I don’t know all the details. In fact, I don’t even remember exactly what webcam he has, but I know that it was purchased at SurplusComputers.com since we bought the laser pointers there at the same time. I’ll have to have him post on the details. If anybody out there is using Linux and wants to try this out I’d be interested in hearing how it works for you.
Working Missile Command Posted!
by john on Mar.17, 2008, under Lasers, PyCon, missile command, pySight
I spent the plane ride home ripping all traces of py2app out of my code. This has resulted in a version of the missile command game that can be installed with more ease on other computers. At least I think so. Please let me know what your experience is.
The code is here and includes a READ ME file, the text of which I’ve pasted below:
Got Pics? Got Video?
by john on Mar.16, 2008, under Head Tracking, Lasers, Marshie Attacks, PyCon, missile command, pySight, wiimote
I completely failed to bring my camera to PyCon. If anyhow has pictures or video from either my presentation or the BOF session I’d love to hear from you and get copies. Thanks.