<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Afnan Khan</title>
    <description>The latest articles on DEV Community by Afnan Khan (@afnan_khan).</description>
    <link>https://dev.to/afnan_khan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2230743%2F38bde2b9-2d2b-4ba1-9c35-58e88ad6b666.jpg</url>
      <title>DEV Community: Afnan Khan</title>
      <link>https://dev.to/afnan_khan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afnan_khan"/>
    <language>en</language>
    <item>
      <title>Flappy Bird Game using Amazon Q CLI 🎮</title>
      <dc:creator>Afnan Khan</dc:creator>
      <pubDate>Fri, 13 Jun 2025 18:40:23 +0000</pubDate>
      <link>https://dev.to/afnan_khan/flappy-bird-game-using-amazon-q-cli-25c2</link>
      <guid>https://dev.to/afnan_khan/flappy-bird-game-using-amazon-q-cli-25c2</guid>
      <description>&lt;p&gt;Hey there! &lt;br&gt;
I recently created a Flappy Bird game using &lt;strong&gt;Amazon Q CLI&lt;/strong&gt;. In this blog post, I'll walk you through everything you need to create your own version of the game, including setup, game mechanics, and running the project on Windows.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing Amazon Q CLI on Windows
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Install Python&lt;/strong&gt;(if you don’t have it already):&lt;br&gt;
Download Python from &lt;a href="https://dev.tourl"&gt;python.org&lt;/a&gt; and make sure to check the box to add Python to your system’s PATH during installation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install AWS CLI using pip:&lt;/strong&gt;&lt;br&gt;
Open your Command Prompt and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install awscli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Configure AWS CLI with your credentials:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll need to provide your AWS Access Key ID and Secret Access Key, which you can get from the &lt;a href="https://dev.tourl"&gt;AWS Console&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Amazon Q CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install amazon-q-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Verify the installation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Start Amazon Q CLI by running:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the chat, &lt;strong&gt;ask&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Can you help me make a Flappy Bird game using Pygame?&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing the Game Structure
&lt;/h2&gt;

&lt;p&gt;I wanted my Flappy Bird clone to have the following features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Menu State:&lt;/strong&gt; A welcoming main menu where the player can start the game.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Playing State:&lt;/strong&gt; The player controls the bird’s jump.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result State:&lt;/strong&gt; When the game ends, the player can restart.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Implementing Core Game Mechanics
&lt;/h2&gt;

&lt;p&gt;Let’s talk about how the game works under the hood:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bird Movement:&lt;/strong&gt; The bird continuously falls due to gravity, but when the player presses Space, the bird jumps!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipe Generation:&lt;/strong&gt; Pipes randomly appear from the right side and move leftward at a constant speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collision Detection:&lt;/strong&gt; The bird collides with pipes or the ceiling/floor, ending the game if either happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Run the Game
&lt;/h2&gt;

&lt;p&gt;Now, let’s get this game up and running. Here’s how you can set up the game on your own machine:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clone the Repository:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/afnank070/flappy-bird-amazon-q-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Navigate to the Project Folder:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd flappy-bird-python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install Pygame:&lt;/strong&gt;&lt;br&gt;
You’ll need Pygame for the game’s graphics. Install it by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install pygame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Run the Game:&lt;/strong&gt;&lt;br&gt;
Once everything is set up, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flappy_bird.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
Building this game was an absolute blast! Amazon Q CLI really sped up the development process.&lt;br&gt;
If you're new to game development or want to make your own version of Flappy Bird, I highly recommend giving this a try.&lt;/p&gt;

</description>
      <category>amazonqcli</category>
      <category>aws</category>
      <category>awschallenge</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
