
-----------------------------------
trevorprella
Sat Feb 21, 2009 3:42 pm

Pong With Single Player - Suggestions?
-----------------------------------
Is there any way to shorten this a bit, because it took up alot of space to do the scores, and when youre writing text with a font, it wont let you put in integer variables. Is there any way to get around that?

-----------------------------------
BigBear
Sat Feb 21, 2009 3:49 pm

Re: Pong With Single Player - Suggestions?
-----------------------------------
I have not looked at your code but to add integers into Font.Draw you have to convert them into a string with intstr.
So instead of just putting your variable put intstr(variable)
Edit:
I understand what you mean about the scoring. If you use intstr(p1s) or intstr(p2s) you should shorten it quite a bit.

-----------------------------------
trevorprella
Sat Feb 21, 2009 3:57 pm

RE:Pong With Single Player - Suggestions?
-----------------------------------
Ok thanks
it works alot better now without the extra 50 lines of code

-----------------------------------
BigBear
Sat Feb 21, 2009 4:02 pm

Re: Pong With Single Player - Suggestions?
-----------------------------------
You mean 68 in both single player and 2 player. 

Also you need to make the AI not have the same y position as the ball.

-----------------------------------
Insectoid
Sat Feb 21, 2009 5:33 pm

RE:Pong With Single Player - Suggestions?
-----------------------------------
What I did for my AI was check the ball's Y in relation to the AI paddle's Y. If it's greater, move the paddle up. If it's less, move it down. By varying the speed of the paddle I was able to make differing levels of difficulty.

-----------------------------------
saltpro15
Sat Feb 21, 2009 6:03 pm

Re: Pong With Single Player - Suggestions?
-----------------------------------
here's my pong with AI, hope it helps
