Making A Simple AI for Pong - CS50G Week 0

Channel:
Subscribers:
58
Published on ● Video Link: https://www.youtube.com/watch?v=McEMFqWlVFw



Duration: 5:07
30 views
1


Harvard's CS50 Intro to Game Dev (https://courses.edx.org/courses/course-v1:HarvardX+CS50G+Games/course/ )


If you need help uploading (https://youtu.be/Ac6L83PcpxQ )

Files to be found here - (https://github.com/KaizNike/Kaiz-CS50G-2020 )

Feel free to play around!


This took me quite some time to get used to. First was the challenge of making the AI, which proved simple from prior experience making platformers. I wanted to make a hard and smart AI, but the simple one already breaks the game, no need to improve.

I had a plan to make a guidance system and calculate where the ball would be after every random event. I didn't get very far with that, but some remnants of my attempt remain.


For my process with this, I first started in notepad. I wrote down all the steps I needed to get to first playable build and then some extras for later. The next day I came back and reviewed it and made a copy of the code to edit. I documented what code I think I needed where to make things function, and after a few tweaks I had my first build. This build was just the new option select, and some precursor code to get the AI updating every frame. I then got the simple AI in and took a break for a few days, as I write this in September I am already a little behind, as I had a long game jam I was working on in August.

The hardest part was getting it uploaded to the right place in github. If you need help follow the link above. Make sure not to follow his directions exactly, put your own username and the name of the branch they want for the project. The me50 is used for both this class and the regular CS50, so when you have figured out for one - all that changes is the branch name.