<?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: Milan Patel</title>
    <description>The latest articles on DEV Community by Milan Patel (@milanpatel2003).</description>
    <link>https://dev.to/milanpatel2003</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%2F1603560%2Fe4da9931-0b2c-470d-ab7f-cb8d710f0339.png</url>
      <title>DEV Community: Milan Patel</title>
      <link>https://dev.to/milanpatel2003</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/milanpatel2003"/>
    <language>en</language>
    <item>
      <title>Build Games with Amazon Q CLI! 🏆👕</title>
      <dc:creator>Milan Patel</dc:creator>
      <pubDate>Tue, 27 May 2025 06:33:43 +0000</pubDate>
      <link>https://dev.to/milanpatel2003/build-games-with-amazon-q-cli-and-get-a-free-t-shirt-3ikk</link>
      <guid>https://dev.to/milanpatel2003/build-games-with-amazon-q-cli-and-get-a-free-t-shirt-3ikk</guid>
      <description>&lt;h1&gt;
  
  
  Building Shadow Link: My Journey with Amazon Q CLI Game Development Challenge
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Github repo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/MilanPatel2003/shadow-link" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When I stumbled upon the "Build Games with Amazon Q CLI" contest, I knew I had to participate. As someone passionate about game development and always eager to explore new AI tools, this was the perfect opportunity to combine both interests. In this blog post, I'll share my experience developing "Shadow Link" - a unique 2D platformer that challenges players to think in parallel dimensions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Initial Spark
&lt;/h2&gt;

&lt;p&gt;The idea for Shadow Link came from a simple yet intriguing concept: what if you had to control two characters simultaneously, where one's movement directly affects the other in opposite ways? This mechanic, while simple to understand, opens up a world of complex puzzle-solving possibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development Journey with Amazon Q CLI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Starting Point
&lt;/h3&gt;

&lt;p&gt;I began with a clear prompt to Amazon Q CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amazonq generate project &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--description&lt;/span&gt; &lt;span class="s2"&gt;"Build a unique Pygame-based 2D game called 'Shadow Link'. In this puzzle-platformer, players control two linked characters in parallel dimensions. Moving one character affects the other in inverse ways. Each level requires strategic positioning, shadow mechanics, and physics puzzles. Use Pygame for graphics, collision, and input. Include a level editor, save/load system using JSON, and scalable level design architecture. Keep the code modular and well-commented."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--language&lt;/span&gt; python &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--framework&lt;/span&gt; pygame &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--include-readme&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--include-tests&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This initial prompt gave me a solid foundation to build upon. Amazon Q CLI helped generate the basic project structure, but the real magic happened in the iterative development process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technical Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python 3.x&lt;/strong&gt;: For the core game logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pygame 2.5.2&lt;/strong&gt;: Handling graphics, input, and physics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Q CLI&lt;/strong&gt;: For code generation and debugging assistance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;

&lt;p&gt;The game follows a modular design pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shadow-link/
├── main.py              # Game entry point
├── src/
│   ├── game.py         # Main game logic
│   ├── player.py       # Player character mechanics
│   ├── level.py        # Level management
│   ├── level_editor.py # In-game level editor
│   └── constants.py    # Game settings
├── assets/             # Game resources
└── levels/            # Level data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Game Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Core Mechanics
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dual Character Control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Control two characters simultaneously&lt;/li&gt;
&lt;li&gt;Mirror movement mechanics&lt;/li&gt;
&lt;li&gt;Strategic positioning requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Level Editor&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create custom levels&lt;/li&gt;
&lt;li&gt;Save and load functionality&lt;/li&gt;
&lt;li&gt;Intuitive platform placement&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;User Interface&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean, minimal design&lt;/li&gt;
&lt;li&gt;Intuitive controls&lt;/li&gt;
&lt;li&gt;Clear visual feedback&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How to Play
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Controls
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Movement&lt;/strong&gt;: LEFT/RIGHT arrow keys&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jump&lt;/strong&gt;: UP arrow key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pause&lt;/strong&gt;: ESC&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reset&lt;/strong&gt;: R&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level Editor&lt;/strong&gt;: E (from main menu)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Objectives
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Guide the blue character to the red exit&lt;/li&gt;
&lt;li&gt;Guide the purple shadow character to the purple exit&lt;/li&gt;
&lt;li&gt;Master the mirroring mechanics to solve puzzles&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Development Challenges and Solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Challenge 1: Character Synchronization
&lt;/h3&gt;

&lt;p&gt;The biggest challenge was implementing the mirroring mechanics between the two characters. Amazon Q CLI helped me debug the physics calculations and ensure smooth character movement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenge 2: Level Editor Implementation
&lt;/h3&gt;

&lt;p&gt;Creating an intuitive level editor required careful consideration of user experience. Amazon Q CLI assisted in generating the basic structure, which I then refined for better usability.&lt;br&gt;
Absolutely! Here’s a section you can add to your blog post, describing the screenshot and how you interacted with Amazon Q CLI using prompts. This will help readers visualize your workflow and understand how you leveraged AI assistance in your development process.&lt;/p&gt;


&lt;h2&gt;
  
  
  Using Amazon Q CLI: My Interactive Coding Experience
&lt;/h2&gt;

&lt;p&gt;One of the most exciting aspects of this project was working directly with Amazon Q CLI in an interactive terminal environment. The screenshot below captures a moment from my development journey:&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%2Fb925a8g4gxd5k8h6uwli.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%2Fb925a8g4gxd5k8h6uwli.png" alt="Image description" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;![Amazon Q CLI Interactive Session]&lt;br&gt;
![Image description][&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1p27vyxf5yxq7xicvw6h.png)" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1p27vyxf5yxq7xicvw6h.png)&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;In this session, you can see how I initiated a chat with Amazon Q CLI by simply typing:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This brought up the Amazon Q CLI interface, where I could start giving prompts and receive real-time coding assistance. For example, I asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Can you run the game which is in folder pygame_game shadow one?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Amazon Q CLI responded by helping me check if the folder existed and guiding me through the process of running the game. This interactive, conversational approach made it incredibly easy to troubleshoot issues, get code suggestions, and even modify files on the fly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt-Driven Development
&lt;/h3&gt;

&lt;p&gt;Throughout the development of Shadow Link, I used prompts like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How to win this game?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make it easy to win&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix character movement so they can't leave the screen&lt;/strong&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%2Fwhshq1lbnkmqv8yjj6hn.png" alt="Image description" width="800" height="376"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Amazon Q CLI would not only provide step-by-step instructions but also directly edit my code when needed. For instance, when I encountered an issue where the character could leave the screen boundaries, I described the problem in plain English, and Amazon Q CLI generated the necessary code changes to fix it.&lt;/p&gt;

&lt;p&gt;This prompt-driven workflow allowed me to focus on game design and logic, while Amazon Q CLI handled much of the boilerplate and debugging. It truly felt like pair programming with an AI assistant!&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Enhancements
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Gameplay&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional levels with increasing difficulty&lt;/li&gt;
&lt;li&gt;New mechanics like switches and moving platforms&lt;/li&gt;
&lt;li&gt;Character animations and improved graphics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Technical&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sound effects and background music&lt;/li&gt;
&lt;li&gt;Level selection menu&lt;/li&gt;
&lt;li&gt;Performance optimizations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Developing Shadow Link with Amazon Q CLI was an enlightening experience. The AI assistant not only helped with code generation but also provided valuable insights during debugging and optimization. This project demonstrates how AI tools can enhance the game development process while maintaining creative control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/MilanPatel2003/shadow-link" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://community.aws/content/2xIoduO0xhkhUApQpVUIqBFGmAc/build-games-with-amazon-q-cli-and-score-a-t-shirt?lang=en" rel="noopener noreferrer"&gt;AWS Community Post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;pygame

&lt;span class="c"&gt;# Clone the repository&lt;/span&gt;
git clone https://github.com/MilanPatel2003/shadow-link.git
&lt;span class="nb"&gt;cd &lt;/span&gt;shadow-link

&lt;span class="c"&gt;# Run the game&lt;/span&gt;
python main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Note: This game was developed as part of the "Build Games with Amazon Q CLI" contest. The development process was significantly enhanced by the AI assistance provided by Amazon Q CLI, which helped with code generation, debugging, and game design improvements.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>amazonqcli</category>
      <category>amazonqdeveloper</category>
    </item>
  </channel>
</rss>
