7x8 pong game

Rickharris

Senior Member
28x can have up to 18 outputs and has 21 I/O pins so you need to matrix the LEDs - Other posts have covered this idea as well as the interface PDF files.

You will need to track the ball position and the bat positions the rest is just a matter of comparing them to see if they are in the same place i.e. you hit the ball.

Search for information on arrays and try writing a flow chart (in pencil) for how you think the game should go.
Otherwise it looks possible.



Edited by - rickharris on 04/02/2007 12:12:54
 

lake

New Member
yes i no that lol i need help with programming the ball how would you get it to bounce back and forth and depending on where it hits the paddle bounces off i am quite new to programming but i know 90% of da basics
 

lake

New Member
the matrix will be 7 tall and 8 wide and the little paddles will be three long i want it so if the ball hits the lowest led on the paddle it bounces off 45 degres down or up depending on which side the ball was travilling if you get that lol
 

Rickharris

Senior Member
<BLOCKQUOTE><font size=1 face=arial>quote:<hr height=1 noshade>yes i no that lol i need help with programming the ball how would you get it to bounce back and forth and depending on where it hits the paddle bounces off i am quite new to programming but i know 90% of da basics <hr height=1 noshade></BLOCKQUOTE></font><font face='Verdana, Arial, Helvetica' size=2>

Like I said look up arrays because one way to do this is to make each LED an element in an array. You can then know where the bat/ball is and so compute if you hit it and where on the bat you hit it and where the ball has to go after than - IF you are not yet skilled enough to start with this then perhaps you are not yet ready for a fairly complex problem.

I suggest you start by getting LEDs to light - Use an array if you like and learn the basics so you can light any LED when you need to.

One step at a time will get you there and you will learn so much on the way. Then you can start asking specific questions that are relevant to direct problems you have rather than a general query &quot;how do I do this?&quot;

I know this isn't the ready answer you are wanting but I doubt that anyone in this forum will write your game for you. We help rather than do.

PS we really like proper English if possible. thanks.

Edited by - rickharris on 04/02/2007 12:59:43
 

Brietech

Senior Member
I implemented a 6x8 pixel display using LED's one time for a PONG game for class. The wiring is a lot of work! Mine only used 12 outputs (3 for each paddle, to select 1 of 6 LED's, and 6, using a 3x3 array, to do the ball). It is a lot of fun to get it working, mine even had little controllers and stuff.
 
Top