Sign in to follow this  

pong ai

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am building a very simple pong game using dx9 and c++.I want to build in some AI for the computer opponent.This is my first time working with AI and I want to know where to begin.I am new to this so go easy on me, please.

Share this post


Link to post
Share on other sites
My pong ai:

When the ball is moving away from the computer, move back to the middle
When the ball is moving towards the computer and is over halfway, align the centre of the paddle with the centre of the ball

Gives pretty solid AI and is coded in < 20 lines.

Share this post


Link to post
Share on other sites

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this