Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

treezy

Simple Pong AI

This topic is 6012 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

Hey everyone. I was wondering how I would inplement a some what advanced AI for a simple Pong game that I''ve put together in 2 days using SDL. I''m 16 and relatively new to game programming and artificial intelligence. I''ve searched the net looking for solutions but have only found a very basic algorithm that I figured out on my own: pseudo-code if batx < ballx then move bat right if batx > ballx then move bat left

Share this post


Link to post
Share on other sites
Advertisement
I''ve posted the source on my site. Feel free to take a peek at it and give me any suggestions to how I can make the AI better.

The code compiles under Linux, but should compile under Windows too with some minor adjustments to the Makefile. Just haven''t had the time to boot to XP and fix it.


Here''s the URL:
http://users.1st.net/jecoleman/airpong-0.1.0.tar.gz

Share this post


Link to post
Share on other sites
i made a pong game for a java applet not too long with some AI... not exactly very advanced ai but it did the job.
its up for show on my website at the moment
http://users.bigpond.net.au/bcowcher/test.html
take a look at it, if the ai in that is close to what your after i can send you the source for it, mind you tho my coding style is very err.. erratic

Get busy livin'' or get busy dyin''... - Shawshank Redemption

Share this post


Link to post
Share on other sites
basically to make it play more fun, you need to add reaction time, some randomness (like sometimes moving to far past the ball), and other mistakes the player makes. dont just limit the paddle speed (unless your really press for time).

just a slight siggestion. next time you post a question. dont have the title and the message conflict. the titel asks for simple pong ai, while the message asks for advanced pong ai.

[edited by - a person on July 1, 2002 3:52:06 AM]

Share this post


Link to post
Share on other sites
Ahh but the title and the message do correspond. The title says Simple Pong AI and the message asks for Advanced AI for Simple Pong. So technically they do.. sorry for being picky.

Share this post


Link to post
Share on other sites
I''ve created an actual site for the project.

Go to http://airpong.sourceforge.net and check it out and give me some feedback on what you think.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!