<?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: Fabio Ferreira</title>
    <description>The latest articles on DEV Community by Fabio Ferreira (@fabiocore).</description>
    <link>https://dev.to/fabiocore</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%2F3111898%2F8d939377-3285-4d2e-a100-2d5f568740a7.jpeg</url>
      <title>DEV Community: Fabio Ferreira</title>
      <link>https://dev.to/fabiocore</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fabiocore"/>
    <language>en</language>
    <item>
      <title>💍 aws-vault-lite: One AWS Secret to Rule Them All</title>
      <dc:creator>Fabio Ferreira</dc:creator>
      <pubDate>Sat, 10 May 2025 01:25:29 +0000</pubDate>
      <link>https://dev.to/fabiocore/aws-vault-lite-one-aws-secret-to-rule-them-all-h6e</link>
      <guid>https://dev.to/fabiocore/aws-vault-lite-one-aws-secret-to-rule-them-all-h6e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/aws-amazon-q-v2025-04-30"&gt;Amazon Q Developer "Quack The Code" Challenge&lt;/a&gt;: Exploring the Possibilities&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;At my company, we still don’t have a proper tool to manage secrets. So, naturally, people come up with their own solutions—some of them not very secure.&lt;/p&gt;

&lt;p&gt;I had the idea of using AWS Secrets Manager as a secure place to store our secrets. But there was a challenge:&lt;br&gt;
We didn’t want to create a separate secret for every single thing. Some secrets might never even be used, and at $0.40 per secret, that adds up quickly.&lt;/p&gt;

&lt;p&gt;Then I discovered that a single AWS Secret can store up to 64KB, which is more than enough for a bunch of simple strings.&lt;/p&gt;

&lt;p&gt;That got me thinking...&lt;br&gt;
What if I could build a secret manager using just one AWS Secret?&lt;/p&gt;

&lt;p&gt;So I did it! :)&lt;/p&gt;

&lt;p&gt;Introducing aws-vault-lite — a lightweight secret manager I built in just one night (with a hand from Amazon Q).&lt;/p&gt;

&lt;p&gt;What is?&lt;br&gt;
The Single Secret Design (SSD) is a cost-effective and flexible strategy for managing secrets in AWS Secrets Manager. Instead of creating individual secrets for every credential or config item, SSD consolidates all secrets for a single department (e.g., CloudOps, Networking, Infra) into one structured JSON secret, significantly reducing monthly costs and improving manageability.&lt;/p&gt;

&lt;p&gt;That was a pretty polite intro, wasn’t it?&lt;br&gt;
But hey, this is going on my GitHub, so I had to make it sound somewhat professional. 😅&lt;br&gt;
(You know, for the future me, recruiters, and curious developers judging my README skills.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;This what you could expect from the app.&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%2Fcg8vilmnix67x5a9vnjo.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%2Fcg8vilmnix67x5a9vnjo.png" alt="Image description" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;Try it at:&lt;br&gt;
&lt;a href="https://github.com/fabiocore/aws-vault-lite" rel="noopener noreferrer"&gt;https://github.com/fabiocore/aws-vault-lite&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Amazon Q Developer
&lt;/h2&gt;

&lt;p&gt;I always like to start with a file that gives some context to the LLM, so I created the repo and added a README.md file first.&lt;/p&gt;

&lt;p&gt;The README.md gives a high-level overview of what we’re about to build — what it is, what it does, and why it’s useful. No implementation details yet, just the big picture.&lt;/p&gt;

&lt;p&gt;It ended up being pretty short — about a page and a half. Just enough to set the stage.&lt;/p&gt;

&lt;p&gt;Now let me show you my PROMPT skills... 😅&lt;/p&gt;

&lt;h2&gt;
  
  
  1st PROMPT
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; Let's create the project in this folder.&lt;br&gt;
First of all, take a look in the README.md file and make a resume of what do you understand about it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Based on the README.md file, I understand that this project is about implementing the Single Secret Design (SSD) pattern for AWS Secrets Manager. Here's a summary of the key&lt;br&gt;
points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Purpose: SSD is a cost-effective approach to manage secrets in AWS Secrets Manager by consolidating multiple credentials into a single JSON secret per department.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Structure: Each secret is organized as a JSON object where:&lt;br&gt;
• Keys represent systems or tools (like "argocd-staging" or "terraform-provisioner")&lt;br&gt;
• Values are flexible objects containing credentials (username, password, URL, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benefits:&lt;br&gt;
• Cost efficiency: Reduces the $0.40/secret/month pricing by using fewer secrets&lt;br&gt;
• Security: Maintains centralized encryption with IAM access control&lt;br&gt;
• Flexibility: No rigid schema requirements&lt;br&gt;
• Simplicity: Easy integration with AWS SDKs and CLI&lt;br&gt;
• Scalability: Can store many credentials (up to 64KB) in a single secret&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use Cases: Designed for teams like CloudOps, Infrastructure, and Networking to store various credentials for tools, systems, and services.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It seems the project "aws-vault-lite" will likely be a tool to implement this Single Secret Design pattern, providing a simpler interface to manage these consolidated secrets&lt;br&gt;
in AWS Secrets Manager.&lt;/p&gt;

&lt;p&gt;Would you like me to help you set up the initial project structure based on this understanding?&lt;/p&gt;

&lt;h2&gt;
  
  
  2nd PROMPT
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; ok, we will use Python to create it, but I would like to do something graphical, simple but graphical, not cli.&lt;br&gt;
what do you recommend me to use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a simple graphical Python application to implement the Single Secret Design pattern, I'd recommend using one of these frameworks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Tkinter - Built into Python's standard library, making it easy to get started without additional dependencies. It's lightweight and works well for simple interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PyQt5/PySide6 - More modern-looking UI with comprehensive widgets. Good for creating professional applications with more complex interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kivy - Cross-platform framework that works well on desktop and mobile, though it has a steeper learning curve.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CustomTkinter - A modern-looking extension of Tkinter with better-looking widgets and themes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For this project, I'd recommend either Tkinter or CustomTkinter since:&lt;br&gt;
• They're lightweight and perfect for simple applications&lt;br&gt;
• Easy to learn and implement&lt;br&gt;
• CustomTkinter gives a more modern look while maintaining Tkinter's simplicity&lt;br&gt;
• Both are well-suited for creating forms and interfaces to manage JSON data&lt;/p&gt;

&lt;p&gt;Would you like me to help you set up a basic structure using one of these frameworks? CustomTkinter would give you a more modern look with minimal additional complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  3rd PROMPT
&lt;/h2&gt;

&lt;p&gt;&amp;gt; ok, lets try CustomTkinter.&lt;br&gt;
What I expect from this app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user will execute python3 aws-vault-lite.py and a interface will be loaded.&lt;/li&gt;
&lt;li&gt;The interface will use the env variables AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN(if exists)&lt;/li&gt;
&lt;li&gt;If the secret /aws-vault-lite/vault doesn't exist, the app will ask the user to create it.&lt;/li&gt;
&lt;li&gt;If it already exists the app will open and the user will see the secrets names on the left and the values on the center/center-right.&lt;/li&gt;
&lt;li&gt;The user can add new items, the attributes are flexible, the secret name is mandatory.&lt;/li&gt;
&lt;li&gt;Password values are hidden by default and a text 'show hidden' is available for the user to show all hidden contents in that secret.&lt;/li&gt;
&lt;li&gt;The user should confirm before deleting a secret.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think step by step, think hard, give me an overview of you deployment plan and how the interface will look like at your perspective right now. Wait my agreement before creating the code.&lt;/p&gt;

&lt;p&gt;The response from Amazon Q was...&lt;/p&gt;

&lt;p&gt;I'll design a CustomTkinter application for the aws-vault-lite project based on your requirements. Let me think through this step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment Plan
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Project Setup
&lt;/h3&gt;

&lt;p&gt;• Create the main Python file aws-vault-lite.py&lt;br&gt;
• Set up dependencies (CustomTkinter, boto3 for AWS interaction)&lt;br&gt;
• Create a requirements.txt file&lt;/p&gt;

&lt;h3&gt;
  
  
  2. AWS Authentication
&lt;/h3&gt;

&lt;p&gt;• Read AWS credentials from environment variables&lt;br&gt;
• Implement AWS Secrets Manager client initialization&lt;br&gt;
• Add error handling for missing credentials&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Secret Management
&lt;/h3&gt;

&lt;p&gt;• Function to check if /aws-vault-lite/vault exists&lt;br&gt;
• Create secret functionality if it doesn't exist&lt;br&gt;
• Load secret data if it exists&lt;br&gt;
• Functions for CRUD operations (Create, Read, Update, Delete)&lt;/p&gt;

&lt;h3&gt;
  
  
  4. UI Components
&lt;/h3&gt;

&lt;p&gt;• Main window with split layout&lt;br&gt;
• Left panel: List of secret names (keys)&lt;br&gt;
• Right panel: Form to view/edit secret details&lt;br&gt;
• Add/Edit/Delete buttons&lt;br&gt;
• Password field handling with show/hide functionality&lt;br&gt;
• Confirmation dialogs for destructive actions&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Data Handling
&lt;/h3&gt;

&lt;p&gt;• JSON parsing and formatting&lt;br&gt;
• Data validation&lt;br&gt;
• Error handling&lt;/p&gt;

&lt;h3&gt;
  
  
  Interface Design
&lt;/h3&gt;

&lt;p&gt;+-----------------------------------------------+&lt;br&gt;
|  AWS Vault Lite                         [X]   |&lt;br&gt;
+---------------+-----------------------------+&lt;br&gt;
| Secret List   |  Secret Details             |&lt;br&gt;
|               |                             |&lt;br&gt;
| [argocd-stag..]| Name: argocd-staging       |&lt;br&gt;
| [terraform-p..]|                            |&lt;br&gt;
| [site-xyz    ]| Attributes:                 |&lt;br&gt;
|               |  user: admin                |&lt;br&gt;
|               |  password: •••••• [Show]    |&lt;br&gt;
|               |  url: &lt;a href="https://argocd" rel="noopener noreferrer"&gt;https://argocd&lt;/a&gt;...     |&lt;br&gt;
|               |                             |&lt;br&gt;
|               | [+ Add Attribute]           |&lt;br&gt;
|               |                             |&lt;br&gt;
+---------------+-----------------------------+&lt;br&gt;
| [+ Add Secret]   [Save]   [Delete Secret]   |&lt;br&gt;
+-----------------------------------------------+&lt;/p&gt;

&lt;h3&gt;
  
  
  Key UI Features:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Left Panel: Scrollable list of secret names&lt;/li&gt;
&lt;li&gt;Right Panel:
• Secret name field
• Dynamic attribute fields (key-value pairs)
• Password fields masked with dots and individual "Show" buttons
• Button to add new attributes&lt;/li&gt;
&lt;li&gt;Bottom Controls:
• Add new secret
• Save changes to current secret
• Delete current secret (with confirmation)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  User Flow:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;App starts, checks AWS credentials&lt;/li&gt;
&lt;li&gt;Checks if /aws-vault-lite/vault exists
• If not, shows dialog to create it
• If yes, loads secret data&lt;/li&gt;
&lt;li&gt;User can select secrets from the left panel&lt;/li&gt;
&lt;li&gt;Selected secret details appear in the right panel&lt;/li&gt;
&lt;li&gt;User can edit values, add/remove attributes&lt;/li&gt;
&lt;li&gt;Changes are saved to AWS when "Save" is clicked&lt;/li&gt;
&lt;li&gt;Confirmation dialog appears for destructive actions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Does this approach align with your vision for the application? Would you like me to make any adjustments before I start creating the code?&lt;/p&gt;

&lt;h2&gt;
  
  
  4th PROMPT
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; how it will look like to add a new secret? can you describe/design for me?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When adding a new secret in the AWS Vault Lite application, here's how the interface would look and function:&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding a New Secret - Interface Design
&lt;/h3&gt;

&lt;p&gt;When the user clicks the "+ Add Secret" button at the bottom of the main window, a new view would appear in the right panel:&lt;/p&gt;

&lt;p&gt;+-----------------------------------------------+&lt;br&gt;
|  AWS Vault Lite                         [X]   |&lt;br&gt;
+---------------+-----------------------------+&lt;br&gt;
| Secret List   |  New Secret                 |&lt;br&gt;
|               |                             |&lt;br&gt;
| [argocd-stag..]| Secret Name*: [_____&lt;strong&gt;&lt;em&gt;]   |&lt;br&gt;
| [terraform-p..]|                            |&lt;br&gt;
| [site-xyz    ]| Attributes:                 |&lt;br&gt;
|               |                             |&lt;br&gt;
|               |  Key: [&lt;/em&gt;&lt;/strong&gt;_____]            |&lt;br&gt;
|               |  Value: [________] [🔒]     |&lt;br&gt;
|               |                             |&lt;br&gt;
|               |  [+ Add Another Attribute]  |&lt;br&gt;
|               |                             |&lt;br&gt;
|               |                             |&lt;br&gt;
+---------------+-----------------------------+&lt;br&gt;
| [+ Add Secret]   [Save]   [Cancel]          |&lt;br&gt;
+-----------------------------------------------+&lt;/p&gt;

&lt;h3&gt;
  
  
  Process Flow:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initial State:&lt;br&gt;
• The right panel clears and shows a form with:&lt;br&gt;
 • Required "Secret Name" field (marked with )&lt;br&gt;
 • One initial attribute row with key-value fields&lt;br&gt;
 • A lock/unlock toggle button (🔒) next to value fields to mark as password&lt;br&gt;
 • "+ Add Another Attribute" button&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adding Attributes:&lt;br&gt;
• When the user clicks "+ Add Another Attribute", a new row appears:&lt;/p&gt;

&lt;p&gt;Key: [________]&lt;br&gt;
 Value: [________] [🔒]&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Each row also gets a small "X" button to remove that attribute&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Marking Password Fields:&lt;br&gt;
• Clicking the lock icon (🔒) marks that value as a password field&lt;br&gt;
• Password fields will be displayed as dots (•••••) when viewing later&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validation:&lt;br&gt;
• The "Save" button is disabled until the required Secret Name is filled&lt;br&gt;
• Secret names must be unique (validation against existing names)&lt;br&gt;
• Empty attribute rows are ignored when saving&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Saving:&lt;br&gt;
• When the user clicks "Save", the application:&lt;br&gt;
 • Validates all inputs&lt;br&gt;
 • Creates a new entry in the JSON structure&lt;br&gt;
 • Updates the AWS secret&lt;br&gt;
 • Adds the new secret name to the list on the left&lt;br&gt;
 • Shows the newly created secret details&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cancellation:&lt;br&gt;
• "Cancel" button clears the form and returns to the previously selected secret&lt;br&gt;
• Or shows empty state if no secrets exist&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This design provides a simple, intuitive way for users to add new secrets with flexible attributes while ensuring the required information is provided.&lt;/p&gt;

&lt;p&gt;After that, I asked for the first draft — but it turns out the result was pretty much perfect on the first try!&lt;br&gt;
Honestly, I’m impressed! 🎯✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Done
&lt;/h2&gt;

&lt;p&gt;I ran into a few issues while installing the dependencies on my machine (because of course I did 😅).&lt;br&gt;
Amazon Q helped fix some minor problems related to loading environment variables and setting the default region — just small tweaks overall.&lt;/p&gt;

&lt;p&gt;Now it’s working like a charm, and honestly, it feels like a great fit for small teams.&lt;/p&gt;

&lt;p&gt;It still needs a few perks — like the ability to select a specific key, and maybe even support for password-based encryption so multiple teams can safely share secrets within a single AWS account.&lt;/p&gt;

&lt;p&gt;Feel free to fork it and ask Amazon Q to tweak it to your needs. That’s what I did, and look how far we got! 😄🔧&lt;/p&gt;

&lt;p&gt;That’s all, folks! Thanks for reading — and may your secrets always stay secret. 🕵️‍♂️🔐&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Pac-Ghost - A battle-royale style maze game inspired by Pac-Man</title>
      <dc:creator>Fabio Ferreira</dc:creator>
      <pubDate>Tue, 06 May 2025 00:46:22 +0000</pubDate>
      <link>https://dev.to/fabiocore/pac-ghost-a-battle-royale-style-maze-game-inspired-by-pac-man-3bg7</link>
      <guid>https://dev.to/fabiocore/pac-ghost-a-battle-royale-style-maze-game-inspired-by-pac-man-3bg7</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/aws-amazon-q-v2025-04-30"&gt;Amazon Q Developer "Quack The Code" Challenge&lt;/a&gt;: That's Entertainment!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Pac-Ghost turns the classic maze into a battle-royale: you're the blue ghost competing against nine colorful AI ghosts.&lt;/p&gt;

&lt;p&gt;You must level up "eating/killing" the random PacMan's that appears in the maze. When you kill a PacMan in the maze you will level up; if your level is higher than other ghosts level, you can kill them too; if your level is the same as other ghost, both are killed.&lt;/p&gt;

&lt;p&gt;Win who is the last ghost stand in the maze.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo and Code Repository
&lt;/h2&gt;

&lt;p&gt;Use Python and PyGame to run it, fly to:&lt;br&gt;
&lt;a href="https://github.com/fabiocore/pac-ghost" rel="noopener noreferrer"&gt;https://github.com/fabiocore/pac-ghost&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Amazon Q Developer
&lt;/h2&gt;

&lt;p&gt;In the project's directory I've created a file called &lt;a href="https://github.com/fabiocore/pac-ghost/blob/main/GAME.md" rel="noopener noreferrer"&gt;GAME.md&lt;/a&gt; and used the feature of 'Context management and profiles' of Amazon Q (&lt;a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-context-profiles.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-context-profiles.html&lt;/a&gt;) to add the file.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/fabiocore/pac-ghost/blob/main/GAME.md" rel="noopener noreferrer"&gt;GAME.md&lt;/a&gt; file has some guidance for the Amazon Q on what is the project is, about the game, how I would like the game to be and other things like mechanics, look and feel and etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  1st PROMPT
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Let's create a new Game using PyGame.&lt;br&gt;
Use the context(GAME.md file) to understand what we will gonna build.&lt;br&gt;
Plan first, Think step by step, think hard.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The response from Amazon Q was:&lt;/p&gt;

&lt;p&gt;-- Response for the #1 PROMPT&lt;br&gt;
I'll help you create the Pac-Ghost game using PyGame based on the information in the GAME.md file. Let's plan this step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Game Planning for Pac-Ghost
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Game Overview
&lt;/h3&gt;

&lt;p&gt;Pac-Ghost is a battle-royale style maze game where:&lt;br&gt;
• 10 ghosts (1 player, 9 AI) compete to be the last one standing&lt;br&gt;
• Ghosts level up by consuming stationary PacMan characters&lt;br&gt;
• Higher level ghosts can eliminate lower level ones&lt;br&gt;
• Equal level ghosts eliminate each other&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Core Components
&lt;/h3&gt;

&lt;h4&gt;
  
  
  A. Game Structure
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Main game loop&lt;/li&gt;
&lt;li&gt;State management (menu, gameplay, game over)&lt;/li&gt;
&lt;li&gt;Rendering system&lt;/li&gt;
&lt;li&gt;Input handling&lt;/li&gt;
&lt;li&gt;Collision detection&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  B. Game Elements
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Maze generation&lt;/li&gt;
&lt;li&gt;Ghost entities (player and AI)&lt;/li&gt;
&lt;li&gt;PacMan spawning system&lt;/li&gt;
&lt;li&gt;Level and speed progression&lt;/li&gt;
&lt;li&gt;Collision rules implementation&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Implementation Plan
&lt;/h3&gt;

&lt;p&gt;Let's break down our implementation into manageable steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Project Setup&lt;br&gt;
• Create directory structure&lt;br&gt;
• Initialize PyGame&lt;br&gt;
• Set up basic game loop&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maze Generation&lt;br&gt;
• Procedural maze generator (25-35 tiles square)&lt;br&gt;
• Ensure at least 60% walkable area&lt;br&gt;
• Add warp tunnels on edges&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entity Creation&lt;br&gt;
• Ghost class (player and AI)&lt;br&gt;
• PacMan class&lt;br&gt;
• Level and speed attributes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Game Mechanics&lt;br&gt;
• Movement system (grid-locked with tweening)&lt;br&gt;
• PacMan spawning timer&lt;br&gt;
• Collision detection and rules&lt;br&gt;
• Level progression&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI Implementation&lt;br&gt;
• Pathfinding with A*&lt;br&gt;
• Decision making (target PacMan or weaker ghosts)&lt;br&gt;
• Movement execution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Graphics and UI&lt;br&gt;
• Ghost sprites with level indicators&lt;br&gt;
• PacMan sprites&lt;br&gt;
• Maze rendering&lt;br&gt;
• Death animation effects&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Audio System&lt;br&gt;
• Sound effects for pickups&lt;br&gt;
• Sound effects for ghost eliminations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Game States&lt;br&gt;
• Main menu&lt;br&gt;
• Gameplay&lt;br&gt;
• Spectator mode&lt;br&gt;
• Victory/defeat screen&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  4. File Structure
&lt;/h3&gt;

&lt;p&gt;Let's organize our project with this file structure:&lt;/p&gt;

&lt;p&gt;pac-ghost/&lt;br&gt;
├── main.py              # Entry point&lt;br&gt;
├── game/&lt;br&gt;
│   ├── &lt;strong&gt;init&lt;/strong&gt;.py&lt;br&gt;
│   ├── constants.py     # Game constants&lt;br&gt;
│   ├── game.py          # Main game class&lt;br&gt;
│   ├── maze.py          # Maze generation&lt;br&gt;
│   ├── entities/&lt;br&gt;
│   │   ├── &lt;strong&gt;init&lt;/strong&gt;.py&lt;br&gt;
│   │   ├── ghost.py     # Ghost class&lt;br&gt;
│   │   └── pacman.py    # PacMan class&lt;br&gt;
│   ├── ai/&lt;br&gt;
│   │   ├── &lt;strong&gt;init&lt;/strong&gt;.py&lt;br&gt;
│   │   └── pathfinding.py  # A* implementation&lt;br&gt;
│   └── ui/&lt;br&gt;
│       ├── &lt;strong&gt;init&lt;/strong&gt;.py&lt;br&gt;
│       ├── menu.py      # Menu screens&lt;br&gt;
│       └── hud.py       # In-game UI&lt;br&gt;
├── assets/&lt;br&gt;
│   ├── images/&lt;br&gt;
│   │   ├── ghost.svg&lt;br&gt;
│   │   ├── ghost-colors.svg&lt;br&gt;
│   │   ├── pacman.svg&lt;br&gt;
│   │   └── death-effect.svg&lt;br&gt;
│   └── sounds/&lt;br&gt;
│       ├── pickup.wav&lt;br&gt;
│       └── elimination.wav&lt;br&gt;
└── utils/&lt;br&gt;
    ├── &lt;strong&gt;init&lt;/strong&gt;.py&lt;br&gt;
    └── helpers.py       # Utility functions&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Implementation Details
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Let's start by creating the core files for our game. I'll begin with the main entry point and the basic game structure.
&lt;/h2&gt;

&lt;p&gt;After some time waiting Amazon Q developing the game, I got the first working version of the game, with some issues that I ask it to solve, so iterate with my second prompt.&lt;/p&gt;

&lt;h1&gt;
  
  
  2nd PROMPT
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;OK, I guess we are almost there, but we need to fix some things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The level is not visible, although I can see it, is kind inside the ghost image and the lvl is not easy to read.&lt;/li&gt;
&lt;li&gt;The IA ghosts are cheating, they kill me passing through the walls without respecting the maze walls.&lt;/li&gt;
&lt;li&gt;I was able to kill another ghost in the same level as me, If the ghosts are in the same level, both got killed.&lt;/li&gt;
&lt;li&gt;I would like the game looking and feel like the original classic PacMan with black background and blue walls like 1980 game.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the second iteration, the ghosts are still cheating, but the speed was better.&lt;/p&gt;

&lt;h1&gt;
  
  
  3rd PROMPT
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;ok, for some reason the ghosts are still cheating. I saw them ignoring the maze walls. Besides that, when they are 'cheating' the also increase their own speed at insane speed!&lt;br&gt;
The speed should be equal at start, and only when a ghost level up it gots a little bit more speed, not much.&lt;br&gt;
Also, I got the below error in the console(although the game is working)&lt;br&gt;
:488: RuntimeWarning: Your system is avx2 capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.&lt;br&gt;
pygame 2.5.2 (SDL 2.30.0, Python 3.12.3)&lt;br&gt;
Hello from the pygame community. &lt;a href="https://www.pygame.org/contribute.html" rel="noopener noreferrer"&gt;https://www.pygame.org/contribute.html&lt;/a&gt;&lt;br&gt;
Could not load sound file: pickup.wav, error: RIFF form type is not WAVE (not a Waveform file)&lt;br&gt;
Could not load sound file: elimination.wav, error: RIFF form type is not WAVE (not a Waveform file)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now the ghost are better, but still cheating for some reason. I guess the machines find out its way to break the rules too. :D&lt;/p&gt;

&lt;p&gt;But I'm satisfied with the current version of the game and perhaps I'll iterate more on the future and add some features.&lt;/p&gt;

&lt;p&gt;That's all! Thank you!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
