Links Expanded: Snake On LED Matrix

[Yosh] came through with a link to the Snake playing LED matrix that he read about in our links post from yesterday. It seems that [Arty Fart] actually built three of these in green, yellow, and red. You can see him throw one together (an 8-10 hour job) in the video after the break. In addition to playing Snake the PIC 16F877A can also scroll messages, play a mean game of Tetris, and show a Pong screen saver on the 144 LED display. We love the clean build and the urge to make another LED matrix is becoming irresistible.

Now off to eBay for a good deal on a bulk LED order. Continue reading “Links Expanded: Snake On LED Matrix”

Tetris Code Theory Explained

 

[Graham] designed this PIC based Tetris game on a single board. The hardware is quite nice but we enjoyed his explanation of the graphics algorithm that he used. Having coded Tetris from the ground up ourselves we understand how difficult it is to explain how the program works. Tracking pieces already on the board as well as moving pieces, making sure that rotation won’t cause a collision with another piece or go out-of-bounds, and looking for completed lines all add up to one bid headache.

[Graham’s] method for handling rotation involves choosing a point around which to rotate, measuring how this affects each pixel in the piece, and then checking those pixels for overlaps. It may take a couple of readings, but he’s done a brilliant job of making it understandable. There’s a demo after the break and the link at the top takes you to his treatise on Tetris. Continue reading “Tetris Code Theory Explained”

Human Tetris: Object Tracking On An 8-bit Microcontroller

Elaborating on an item previously mentioned among last weekend’s Cornell final projects list, this time with video:

For their ECE final project, [Adam Papamarcos] and [Kerran Flanagan] implemented a real-time video object tracking system centered around an ATmega644 8-bit microcontroller. Their board ingests an NTSC video camera feed, samples frames at a coarse 39×60 pixel resolution (sufficient for simple games), processes the input to recognize objects and then drives a TV output using the OSD display chip from a video camera (this chip also recognizes the horizontal and vertical sync pulses from the input video signal, which the CPU uses to synchronize the digitizing step). Pretty amazing work all around.

Sometimes clever projects online are scant on information…but as this is their final grade, they’ve left no detail to speculation. Along with a great explanation of the system and its specific challenges, there’s complete source code, schematics, a parts list, the whole nine yards. Come on, guys! You’re making the rest of us look bad… Videos after the break…

[G’day Bruce]

Continue reading “Human Tetris: Object Tracking On An 8-bit Microcontroller”

Mindstorm Plays Tetris For You

Obviously you’ve got too much hacking to do right now, but that game of Tetris isn’t going to play itself. [Branislav Kisacanin] has you covered with his Tetris-playing robot which is build with LEGO Mindstorm pieces. The setup is actually pretty complicated. A Texas Instruments DM6437 video development board watches the computer screen via a webcam and calculates the next move. It then outputs that to a grid of LEDs which the Mindstorm watches using a light sensor. See it in action after the break and then take some time to check out our other various Tetris based hacks.

Continue reading “Mindstorm Plays Tetris For You”

More AVR Tetris

[Ben] built an AVR based Tetris game that uses a TV as the display. He linked his project in a comment from the AVR Tetris project featured last week. His work taps the power of his own tvText library to handle the composite video out. Using a TV takes all of the hardware work out of the equation, leaving just the composite jack and a few buttons to connect to the ATmega168 and its 20MHz clock. We’ve embedded the game play video after the break. It’s black and white but also clean and crisp.

[Ben] didn’t include music with his build but another commenter, [Eric], has started to work on that. We can’t help but think that they both should have tipped us off sooner about their projects.

Continue reading “More AVR Tetris”

AVR Tetris

Tetris, the timeless classic, is one of those concepts that someone will try to run on every conceivable hardware platform. I took on the challenge of programming a Tetris clone from the ground up using hardware I had on hand. At the heart of the build is an ATmega168 microcontroller. The game displays on a KS0108 128×64 LCD module with five momentary push switches to provide directional, rotational, and input controls. You can see the resulting monochrome action embedded after the break.

I had several goals in mind while writing the code for the game.  I wanted the code to be portable so that the size of the board and type of screen used could be easily changed. With that in mind I developed the trunk for a Nokia 3595 cellphone screen and a parallel branch for the graphic LCD. Originally I was working with an ATmega8 but upgraded so that I could operate at the 3.3v the cell phone screen required.

The firmware for the graphic LCD branch compiles to just over 6 kB which means it can still be run on a mega8. Also, the ATmega168 is the same processor used in the Arduino Duemilanove so another Tetris port is not out of the question. I just got a hold of my first Arduino so we’ll see if I find time to start a new branch in the code.

Continue reading “AVR Tetris”