You are not logged in.
Pages: 1
(Pyng because it's developed in Python)
So today I was a little bored, and I made this little ping pong game in Python3 using Curses.
Basically it _really_ needs improvement. I need some advice regarding how to make AI able to loose (yep, it can't loose yet, so you can't win), and perhaps some edits to optimize it? Any feedback is welcome.
You can change the mapsize in defines.py, but take note that your terminal _has_ to be the same size or bigger, otherwise it will crash.
You can get the source code here:
https://sourceforge.net/projects/asciip … es/source/
Offline
One suggestion is to either package all files into a tarball or even better, host it on github for easy access.
Offline
Cool!
The AI is unable to lose because he can move at the same speed as the ball (and so can the player, who could theoretically also never lose). The ball needs to move slightly faster than the paddles so that the player and the AI have to predict and move ahead of the ball. This might be easier to accomplish with a bigger board, though.
Offline
cmtptr: If I make the ball move faster, I'm pretty sure it will be hard for the player to catch up. Perhaps I should lower the speed of the player and AI instead?
Offline
cmtptr: If I make the ball move faster, I'm pretty sure it will be hard for the player to catch up. Perhaps I should lower the speed of the player and AI instead?
You might have to play around with the speeds a bit to get it to feel right. I wasn't specifically saying that you should increase one or decrease the other, I'm just saying that whatever you do, the ball should move faster relative to the paddles. Also, I would probably make the board either the standard 80x25 terminal size, or if you wanted to get really complicated (not sure how well this would work without fluid movement) you could try to make it resize to fit the terminal size, and speeds adjust appropriately.
Offline
Pages: 1