Computer controlled opponents???
QuantumGames94
Member Posts: 13
Hi is it possible to give actors the ability to be controlled as a CPU so for example I have a paddle on one side of the screen and if I hit the ball forward off my paddle and it moves towards another paddle not controlled by anyone can it hit it back and can it move so it can hit the ball as the ball can move around off the walls at different angles???
How do I do this as am on the windows beta and am relatively new to the software
How do I do this as am on the windows beta and am relatively new to the software
Best Answer
-
jn2002dk Posts: 102What you're looking for is AI, artificial intelligence, one of the most complicated aspects of game design
Basically you'll need to translate the behavior you want to math and functions
For a pong like game you'd probably set the linear velocity of the bat to either positive or negative depending on the position of the ball. That would keep the cpu controlled bat moving towards the bat. It's exact speed would vary depending on the difficulty level you want where faster bats equals better opponents
Answers
Darren.
Cheers Josh