Hope it`s ok to bump this thread again. I have a small problem. I get the loading image fine, and every time the game pauses I have a clear image, but when the ball moves, the screen jumps alot. I can see the paddle move, so it works aswell.Anyone have some thoughts?

This is an awesome project, if I can get it to work I`ll make my own cases and PCB, and give as DIY-kits to my 10-12 year old cousins. "This is what we played in the old days"

I was inspired by this post to create my own implementation of Pong with my newly acquired Arduino. Though NTSC isn't really my thing, so I made use of this awesome TV out library:

http://code.google.com/p/arduino-tvout/

It comes complete with fun intro screen with a "ball" that slowly eats away at the title (spoiler alert: it doesn't ever eat the whole thing, it checkerboards it as you might expect if you think hard about the mechanics of it) and a "Game Over" screen. Here are some more little tidbits:

The game plays to a score of 7 right now because I didn't feel like implementing multi-digit scores.

There's no color at all (just black and white). I have no idea how to make it color, since I don't know anything about how the TV interface works.

It can be played using one "controller" or two. I only had one potentiometer at the time, so it's configured for one controller that controls both paddles. But having two controllers should work just fine. Just alter the WHEEL_TWO_PIN setting.

Paddle sizes are configurable if you want to mess with that.

Most of the #defines can be tinkered with to alter the game experience except for "LEFT" and "RIGHT" which are used exclusively for scoring, so just ignore those.

There's a very simple hardware setup. I found that only a couple resistors (a 1K and 330) were required for both TVs I tested on.

Supposedly, with minor modification, the game should work on PAL TVs. But I haven't tried it and small parts of my code are resolution-dependent, so your mileage may vary.

If you don't care to build your own, you can just check out a video here:

http://www.youtube.com/watch?v=m_PoMv7Mt28(note that I added the "eats away at the title" feature after making the video, so just use your imagination there).

You can see a picture of my hardware setup, along with complete source code, here:

http://www.flickr.com/photos/29973568@N07/4822416805/

I'm very new to Arduino programming (only been doing in a couple weeks), so be gentle when it comes to commenting on my hardware.

Thats great PlayMoney I was going to mention my library in this thread, then you had created a full pong game on top of it, if I had a pot that did not require a screw driver to operate I would have to try it.

As far as color goes thats beyond the scope of the library, gray scale is possible with some slight modifications to the library but it would require twice as much memory.

@robinh: what was the behavior before you added the 75ohm resistor? I've been trying to figure out what circumstances lead to the need for the 75ohm resisotor. How does one know they need it? Which TVs would require it? Thanks.

The behavior was no picture, only sound (I have added some basic audio out through RCA as well).

I knew it worked with 75 Ohm, cause I had used it when I breadboarded the circuit. But when I moved it over to a protoboard I tried without 75 Ohm since several people here mentioned that it wasn`t needed.

An "End-Resistor" (75Ohm) has the impendancy of the signal-way (wire) to get rid of signalreflections on the singal-way ending. The Resistor is killing signal destroying by eliminating returning singnalwaves and errors.

End-Resistor ist Standard by old professional Pal/BNC Video connections...

So, if your Signal is destroyed by returning SignalWaves and the resulting Signalerrors or "Signalcrashes" this resistor eliminates the signalreflection on signal-way-ending to corret the signal.

Result is a working or better signal, which now possibly work on your tv. If there are to much errors the signal maybe unusable for your tv.So, if you have Signalproblems on Pal, you could try a 75Ohm resistor to enhance the signal by eliminating signal "interferences"?1? errors.

Thank you, robinh and danke, ChrisS. It sounds like the 75 ohm resistor is required for at least some TVs. I'm considering making a product that generates video and I'm trying to figure out if I should include the 75 ohm resistor (at least as an optional component) and the diodes. I did experiments with diodes and they degraded picture some, and I was told that they were not strictly required. I'm just trying to design a device that would work on the *most* TVs possible.

The 168 does not have enough memory for the default resolution. It will return an error while calling TV.begin()/TV.start_render() (error code 4). The horizontal resolution/8*vertical resolution must be lower than the amount of sram that the device has. I don't know how much memory pong requires so a change in resolution will be required but to what I don't know. The lowest horizontal resolution is 104(must be a multiple of and there is no limit to how small the vertical resolution is.

this is just briliant. i also started with the first PONG version and had some flickerings and strugled as the others did and iwas not really happy about the BIG resolution. but then i have found this briliant tvout application and tried out...a few errors in first but my fault because as i am also a absolute newbie in arduino i did not even know that it is possible to implement librarier or HOW to do that. but now i have this cool PONG from PlayMoney on my arduino duemillanove and it works smooth and without error in my _PAL tv. thanks a lot!! i wonder if you could code another game like tennis? where you have to push a button to release the ball and two potentiometers for each player for horizontal and vertical slide?

you also did that radar thing? (video) any code for this? sorry i am a newbie and i am very "thirsty" for codes like this