Flappy Birds clone with ChatGPT and Python

Originally posted on Medium

Inspired by Andy Touch’s tweet, I thought I’d see if ChatGPT could create a Flappy Bird clone.

Let’s go!

“in python, make a flappy birds clone”

It generated the following Python:

Ok but did it run? It did! Repeatedly hit the spacebar to move up, gravity pulls you down.

There’s no obstacles though. Let’s add some:

Does it work? Yup!

I want more obstacles though, so let’s just ask ChatGPT for that:

Here it is in action:

Let’s add some colour:

It works:

Finally, lets add collision detection and a game over screen:

The final result:

I’m impressed! This only took a few minutes in total, and I can’t wait to see what future generations of ChatGPT is capable of.

While ChatGPT can work with many languages, I’m particularly excited about Python, due to the amount of free packages available (over 400k on PyPl). I have another blog post on ChatGPT here where I have some experiments with face recognition.

If you’re interested in the source code for this Flappy Birds “clone”, it can be found here.

Original thread here: https://twitter.com/yezzer/status/1599336356357894144

Leave a Reply

Your email address will not be published. Required fields are marked *