DEV Community

Mohith Pallala
Mohith Pallala

Posted on

Pong game remix using AWS Q CLI AI

Introduction

It all started in day while I was smashing buttons on my Atari. I was playing pong when I realized this game was very simple I could make it myself. That's when I talked with my dad and he showed my AWS Q CLI AI. Although I didn't know how to code this, AI did for me.

Setup

Although the AI would write the code I would have to test it plug it in and add tweaks and fixes. So first I download all the stuff in order to do this using Ricardo Sueiras's guide (https://dev.to/aws/the-essential-guide-to-installing-amazon-q-developer-cli-on-linux-headless-and-desktop-3bo7?trk=c09e10a1-6feb-4902-897f-846979733114&sc_channel=blog ). Finally I downloaded AWS Q CLI AI and paired it with pygames.

Now my first step was to tell my prompt to the AI.

Image description

The AI coded it form me and I was ready except for the fact it didn't really work.

Image description Here the bot is bugging out and glitching the ball causing it to stop moving as it is stuck on the bot.

Tweaking

I realized while testing that the bot was well unbeatable and I knew I had to make it a little slower or easier to beat so I told the AI to tweak the code and make it so the AI would be beatable and I also had it so once someone got to 11 points the would win.

Image description
Image description After this change, I plugged in the new code and tested only to realize there where a lot of bugs within this code.
Image description Here the bot is glitching and unable to move so I had the AI fix it.

Image description

Image description Finally the bot is perfect and I even got the win!

Conclusion

After a little bit of time and help of AI I was able to make my first ever game a pong remix and I felt proud. This was a unforgettable day I had picked a new productive hobby and managed to not be lazy. I really recommend to do this yourselves.
Thank you.

Top comments (0)