<?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: Astha Gore</title>
    <description>The latest articles on DEV Community by Astha Gore (@astha_gore_4500d320c31960).</description>
    <link>https://dev.to/astha_gore_4500d320c31960</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%2F3196922%2Fff2b5bef-6252-4dd2-b830-e26461368744.png</url>
      <title>DEV Community: Astha Gore</title>
      <link>https://dev.to/astha_gore_4500d320c31960</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/astha_gore_4500d320c31960"/>
    <language>en</language>
    <item>
      <title># 👑 Building a Prince of Persia-Inspired Platformer with Amazon Q CLI &amp; Pygame on Linux</title>
      <dc:creator>Astha Gore</dc:creator>
      <pubDate>Thu, 22 May 2025 18:19:22 +0000</pubDate>
      <link>https://dev.to/astha_gore_4500d320c31960/-building-a-prince-of-persia-inspired-platformer-with-amazon-q-cli-pygame-on-linux-pon</link>
      <guid>https://dev.to/astha_gore_4500d320c31960/-building-a-prince-of-persia-inspired-platformer-with-amazon-q-cli-pygame-on-linux-pon</guid>
      <description>&lt;h2&gt;
  
  
  🎮 Introduction
&lt;/h2&gt;

&lt;p&gt;As a child, few games captured imagination like &lt;strong&gt;Prince of Persia&lt;/strong&gt;. From precise jumps to daring sword fights and timed traps, it wasn’t just a game—it was an adventure. Today, we’ll walk through building a simple 2D platformer inspired by Prince of Persia using &lt;strong&gt;Python&lt;/strong&gt;, &lt;strong&gt;Pygame&lt;/strong&gt;, and &lt;strong&gt;Amazon Q CLI&lt;/strong&gt;, all developed natively on &lt;strong&gt;Linux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But this isn't just about writing code. It’s about turning nostalgia into a working project using &lt;strong&gt;AI-assisted development&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧒 A Personal Note: Where It All Began
&lt;/h2&gt;

&lt;p&gt;When I was a kid, I used to watch my mother play games on her &lt;strong&gt;Nokia 310&lt;/strong&gt;. The game “Snake” fascinated me.&lt;br&gt;
&lt;strong&gt;How did it move? How did it know when to turn or end?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Back then, I didn’t have the answers. But today, I do—thanks to tools like &lt;strong&gt;Amazon Q CLI&lt;/strong&gt;, which lets me build games by simply describing what I want to create.&lt;/p&gt;

&lt;p&gt;Now, I’ve taken it a step further and started building &lt;strong&gt;my own version of Prince of Persia&lt;/strong&gt;, with all the fun and challenge of the classic.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Development Environment Setup (Linux)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Tools Required
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Q CLI&lt;/strong&gt; – AI code generation tool from AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python 3.8+&lt;/strong&gt; – Core programming language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pygame&lt;/strong&gt; – Game development library for Python&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux OS&lt;/strong&gt; – Ubuntu/Debian-based preferred&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Step-by-Step Setup on Linux
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install System Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; python3 python3-pip python3-venv git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Install Pygame
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip3 &lt;span class="nb"&gt;install &lt;/span&gt;pygame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🤖 Install Amazon Q CLI on Linux
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Download and install the &lt;code&gt;.deb&lt;/code&gt; package:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb
&lt;span class="nb"&gt;sudo &lt;/span&gt;dpkg &lt;span class="nt"&gt;-i&lt;/span&gt; amazon-q.deb
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify installation and start:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;q &lt;span class="nt"&gt;--version&lt;/span&gt;
q chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 Prompt-Driven Game Creation Using Amazon Q
&lt;/h2&gt;

&lt;p&gt;With Amazon Q CLI, you don't need to write everything manually. You can describe your idea and let the tool generate functional code.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqg3zlxhy3ul4tav5kbnk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqg3zlxhy3ul4tav5kbnk.png" alt="Screenshot 2025-05-22 022325" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 Step-by-Step Game Prompts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. 🧍 Character Movement &amp;amp; Gravity
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prompt&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create a Pygame-based platformer with a main character that can run left/right, jump with gravity, and collide with platforms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Player movement with physics&lt;/li&gt;
&lt;li&gt;Platform collision detection&lt;/li&gt;
&lt;li&gt;Gravity and jumping&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. 🏰 Level Design
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prompt&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add basic level design with platforms at varying heights and a floor. Include a simple background.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static level with platforms&lt;/li&gt;
&lt;li&gt;Decorative background&lt;/li&gt;
&lt;li&gt;Expandable layout for more levels&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fycacx5ljtif3665vas7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fycacx5ljtif3665vas7z.png" alt="Screenshot 2025-05-22 232942" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. ⚔️ Traps &amp;amp; Obstacles
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prompt&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add spike traps that reset the player's position if touched.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hazard detection logic&lt;/li&gt;
&lt;li&gt;Player reset or health mechanic&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. 🎯 Goal or Exit Door
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prompt&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add a door at the end of the level. When the player reaches it, show “You Win” and end the game.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Goal object&lt;/li&gt;
&lt;li&gt;Victory screen&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5. 🎵 Sound and Polish
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prompt&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add background music and jumping sound effects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrated audio playback&lt;/li&gt;
&lt;li&gt;Enhanced game feel&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧩 Feature Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Implemented via Amazon Q&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Player controls&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platform collisions&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Traps and obstacles&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Win condition&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio &amp;amp; UI&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  👑 Why This Project Matters
&lt;/h2&gt;

&lt;p&gt;This wasn’t just about building a game. It was about realizing a dream from childhood—understanding and building what once felt like magic.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Amazon Q CLI&lt;/strong&gt;, I could rapidly turn my thoughts into code, iterate on ideas, and focus on creativity instead of boilerplate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76lydhmr47vx98s8m2jj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76lydhmr47vx98s8m2jj.png" alt="Screenshot 2025-05-22 233224" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
