icon

The Game

Final Score
Final Score
For the past several weeks, I’ve been working on my final project for my embedded systems course. The past few times the embedded systems course has been offered, the final project simulated a flock of “birds” (actually small circuit boards that made bird noises) that would communicate wirelessly to share songs and silence the whole flock if one of them was “startled” by covering its light sensor.


iMote 2
iMote 2
This quarter we moved to a much more powerful development platform and a completely different project. The iMote2 board (shown at right) is about half the size of a business card and is a little computer running Linux with 32 MB of Flash and 32 MB of RAM. The iMote2 also has a 802.15.4 wireless radio on it so that they can communicate with each other. We plugged it into another board about the same size that had a 3-axis accelerometer on it. The accelerometer lets the system know how it’s being moved and how the board is tilted. (The Nintendo Wii uses the same technology in its controller.) Finally, we attached yet another board called the Superbird (the name comes from the aforementioned bird project) that had an LCD display and a speaker that we could use as additional output devices.

We programmed the boards to allow us to control players in a virtual soccer-like game. Tilting the board would cause the player (represented by a dot on the field) to go in the corresponding direction. The player boards reported their information back to the master program running on a computer wirelessly.

Since there was no ball in our modified version of soccer, we scored by going into the goal. If two players from opposite teams collided, they would be returned to random positions on their sides of the field. If two players on the same team collided, they would merge together into one bigger player. This bigger player could travel faster, but its movements were the average of all of the individual players that comprised it, so it would become more difficult to coordinate as more players merged together into one. When a merged player collided with a player from the other team, some of its players would be broken off. If a merged player went through the goal, the number of points scored was the number of players that comprised it.

These last few weeks have been a blur because I’ve spent so much time in the lab working on this project, especially since I ended up writing the master program that controlled the game logic and displayed the field on the projector. I started writing it as a way to test my own player code before the official game controller was ready, and in the interests of time and not duplicating effort, my game controller software ended up being the official one.

Today we held the big game in the atrium of the computer science building. Starting at 12:30 PM, we played two 15-minute halves with a break for donuts and orange juice in between. The Tuesday lab section (blue team) competed against the Thursday lab section (red team).

When we started the game, it was really the first time that everyone had tried playing together in the same game. Most of us were still tweaking our player code until late last night, and I was working on the game controller minutes before the game started. Amazingly, nearly everything worked! There were some problems with the projector (of all things!) but once that was sorted out, the game actually worked pretty well. It was neat to see what strategies people developed and how the merged players worked.

At the end of the game, the score was 122 (Tuesday) to 134 (Thursday). Yay Thursday lab section!

Soccer in the AtriumSoccer in the Atrium

Date/Time: 2007:03:09 13:25:26 Camera: NIKON E5200
Aperture: F3.5 Exposure Time: 1/14.6 s
ISO: 64 Flash: No
Size: 2592x1944 Focal Length: 12.7 mm
click to enlarge
Group 1
Group 1
Group 2
Group 2
Group 3
Group 3