Hello dear Community. I would like to know how I make bad A.I for my Ping Pong game. What that means? It means, that the Enemy paddle should'n hit the ball always. I've already tried a few variants of coding that, but it totally messed up the paddle (it still hit the ball lol) Thanks to everyone who can help me. Greets, PrideRage
Well, you could define a certain amount of randomness... sorta like accuracy. You want it to hit, but not all the time... this way you can build it with a predefinable amount of skill. The higher the skill, the less variation (over / undershoot) the enemy's bat will have
I made a pong game where the paddle moved back and forth and it was REALLY LAME. People would always ask me why it was so easy and why the cpu didn't try at all. I suggest that you just make the cpu paddle slower that the ball's speed and then make the paddle always target the ball. That way, if the paddle is on one side of the screen and you hit to the other side of the screen, the enemy will be too slow to reach it in time.