DIY Pong - Part 4 of 4 - The Play

This is the final part of my four-part DIY Pong blog.
We now have all the ingredients in place to wrap this up. We have bats and a ball. Let's play ball.

Single Player Mode
To make things simple, let's begin with a single player game. We detect when the ball hits the paddle by ANDing the ball position with the paddle position. The output of the AND gate is stretched by a monostable multivibrator to about 1ms. The ball direction is switched by toggling the square wave generator at U9A.

Collision between the ball and left paddle triggers a positive going pulse at U13A, pin-6. Diode D1 is forward biased and pulls the non-inverting input of U9A above the reference voltage at the inverting input. This switches the direction of the ramp.

Collision between the ball and the right paddle triggers a negative going pulse at U13B, pin-9. Diode D2 is forward biased and pulls the non-inverting input of U9A below the reference voltage. This switches the ball motion to the opposite direction.

Ball rebound circuit
1574643272911.png


Single Player Demo

Breadboard Circuit
The complete circuit is now on the breadboard.
1574643280853.png



Two Player Demo


It has been a lot of fun putting this together in a matter of a few evenings over one week. I hope you enjoyed seeing the progress as much as I have in putting it all together.

Thanks for watching!

DIY Pong - Part 1 of 4 - Getting Started
DIY Pong - Part 2 of 4 - The Paddles
DIY Pong - Part 3 of 4 - The Ball

Blog entry information

Author
MrChips
Views
1,876
Comments
2
Last update

More entries in General

More entries from MrChips

Share this entry

Top