DEV Community

Cover image for 💻 Hacking the Grid: How I Built CypherCore with Amazon Q CLI
Ahnaf Ashique Adi
Ahnaf Ashique Adi

Posted on

💻 Hacking the Grid: How I Built CypherCore with Amazon Q CLI

🧠 Introduction
I wanted to build something vibe-heavy, immersive, and original — a retro-futuristic hacking sim you’d expect inside a cyberpunk movie.

So I made CypherCore — a Matrix-style puzzle game created using Python, Pygame, and Amazon Q CLI, an AI-powered coding assistant from AWS.
Image description

CypherCore isn’t just another retro game. While many rebuild classics like Pong or Tetris, I set out to create something that felt like you were diving headfirst into a digital mainframe.

Built with Python, Pygame, and the generative power of Amazon Q CLI, CypherCore simulates hacking terminals with logic puzzles and glitch aesthetics — all made on a Hackintosh ThinkPad running macOS Monterey.

⚡️ The twist?
I built the entire thing using natural language prompts, on a Hackintosh ThinkPad running macOS. No fancy rig. Just vibes and AI

🎮 What Is CypherCore?

CypherCore is a puzzle game set inside a simulated mainframe. The aesthetics are straight out of 90s hacker lore: ASCII visuals, green-glow Matrix animations, glitch FX, and logic-based gameplay.

🔐 Game Highlights:
Hacker terminal UI with Matrix-style backgrounds
Four cyberpunk-themed levels:

  • Binary Maze – Grid navigation + timing
  • Logic Gate Puzzle – Unlock via AND/OR logic
  • Memory Decryption – Short-term memory challenge
  • Core Breach – Rhythm-based circuit tapping

Built using modular code generated and refined with Amazon Q CLI

Playable entirely via keyboard

⚙️ My Setup

  • 💻 Device: ThinkPad T490 running macOS Monterey (Hackintosh)
  • 🧠 AI Assistant: Amazon Q CLI
  • 🐍 Language: Python 3.13+
  • 🎮 Framework: Pygame
  • 🧰 Tools: VS Code, Homebrew, GitHub

🔧 How I Installed Everything (on macOS)
Firstly we have to install python and pygame on macOS

brew install python
pip3 install pygame
Enter fullscreen mode Exit fullscreen mode

Here pip3 can be found in python but for brew we have to install Homebrew first using the terminal.


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Enter fullscreen mode Exit fullscreen mode

After downloading brew we now move forward to download Amazon's Q CLI as the AI Assistant using brew typing :


brew install amazon-q

Enter fullscreen mode Exit fullscreen mode

After downloading amazon q we can check its version typing-


q --version
Enter fullscreen mode Exit fullscreen mode

After getting the output we are ready to start prompting and making our game.But first we login to Q typing :

q login
q chat
Enter fullscreen mode Exit fullscreen mode

After Amazon Q's chat session is turned on we can start by giving it a prompt and try to give life to your imagination.For my case I have made some small games using unity and unreal so I already had an structured idea of what I wanted to Prototype.So at first I prompted:

Build a Python game called "CypherCore" using only Python and Pygame.

Start with an animated ASCII intro in the terminal using a typewriter + glitch effect for the following logo:

      ___                       ___         ___           ___           ___           ___           ___           ___           ___     
     /  /\          ___        /  /\       /__/\         /  /\         /  /\         /  /\         /  /\         /  /\         /  /\    
    /  /:/         /__/|      /  /::\      \  \:\       /  /:/_       /  /::\       /  /:/        /  /::\       /  /::\       /  /:/_   
   /  /:/         |  |:|     /  /:/\:\      \__\:\     /  /:/ /\     /  /:/\:\     /  /:/        /  /:/\:\     /  /:/\:\     /  /:/ /\  
  /  /:/  ___     |  |:|    /  /:/~/:/  ___ /  /::\   /  /:/ /:/_   /  /:/~/:/    /  /:/  ___   /  /:/  \:\   /  /:/~/:/    /  /:/ /:/_ 
 /__/:/  /  /\  __|__|:|   /__/:/ /:/  /__/\  /:/\:\ /__/:/ /:/ /\ /__/:/ /:/___ /__/:/  /  /\ /__/:/ \__\:\ /__/:/ /:/___ /__/:/ /:/ /\
 \  \:\ /  /:/ /__/::::\   \  \:\/:/   \  \:\/:/__\/ \  \:\/:/ /:/ \  \:\/:::::/ \  \:\ /  /:/ \  \:\ /  /:/ \  \:\/:::::/ \  \:\/:/ /:/
  \  \:\  /:/     ~\~~\:\   \  \::/     \  \::/       \  \::/ /:/   \  \::/~~~~   \  \:\  /:/   \  \:\  /:/   \  \::/~~~~   \  \::/ /:/ 
   \  \:\/:/        \  \:\   \  \:\      \  \:\        \  \:\/:/     \  \:\        \  \:\/:/     \  \:\/:/     \  \:\        \  \:\/:/  
    \  \::/          \__\/    \  \:\      \  \:\        \  \::/       \  \:\        \  \::/       \  \::/       \  \:\        \  \::/   
     \__\/                     \__\/       \__\/         \__\/         \__\/         \__\/         \__\/         \__\/         \__\/    

After the intro, create a transition to a green Matrix-style raining code background using Pygame (CMatrix visual effect) as the main background layer.

Then present the player with a terminal-based binary maze puzzle (only 0s and 1s) using the `curses` library for better full-screen interactivity.

After solving the maze, switch back to Pygame where the player must solve a logic gate puzzle. They’ll input correct AND/OR combinations to unlock a digital lock and progress to the next level.

Requirements:
- Use Python standard libraries and Pygame only
- Modular, beginner-friendly code with comments
- Reusable classes for effects, levels, logic gates, and maze
- Support arrow keys and typing input where necessary
- Include basic sound effects and level transition effects

Enter fullscreen mode Exit fullscreen mode

🔁 Prototype 1: Terminal Crash & Memory Overload

Issue: The ASCII logo was rendered in the terminal with print() in a loop, crashing the system due to memory overrun.

After almost like 10 min I got the cool looking prototype where the CypherCore is printed in the terminal in a loop and the window of the game being blank and a memory overload crashed the game.

Image description

Fix: Prompted Q CLI to use pygame.Surface and animated the text line-by-line with a typewriter effect in the game window.

After this Q thought for a while and helped to fix the issue making the new intro and the main menu in the game window as we can see here:

Image description

Image description

After the main menu was fixed I was able to see all the first levels created in the prototype.The initial levels generated was only 2 out of the 4 i theorized and those two are shown here :

Image description

Image description

But this was not the game I wanted so I rewrote the whole prompt to :

Create a Python game called "CypherCore" using only Pygame and Python standard libraries.

Overview:
"CypherCore" is a futuristic, cyberpunk-themed puzzle adventure game. It includes an animated ASCII intro, a dynamic Matrix-style background, 4 unique levels, background music, sound effects, and a hacker-inspired UI.

Requirements:

1. Intro Screen:
- Display the CypherCore ASCII logo in a Pygame window.
- Animate the logo with a typewriter effect and glitchy flicker.
- Play simple looped hacker-style music during the intro (e.g., synth pad).
- ASCII Art should appear in the Pygame window (not the terminal).

2. Matrix Background:
- After the intro, display a full-screen "CMatrix"-like effect.
- Rain down green characters in columns like the Matrix movie.
- Overlay UI and levels on top of this effect.

3. Levels (modularize using LevelManager):
- Level 1: Binary Maze
  - Maze made of 0s and 1s.
  - Move player with arrow keys.
  - Timer and highlighted correct path.

- Level 2: Logic Gate Puzzle
  - Nodes connected by logic gates (AND, OR, NOT).
  - Player clicks gates and inputs binary values to unlock.
  - Show feedback for correct/incorrect answers.

- Level 3: Memory Decryption
  - Grid of hidden memory sectors.
  - Show a hint pattern briefly, then hide.
  - Player must recall and decrypt sectors in correct order.

- Level 4: Core Breach Timing
  - Animated circuits rotate around a central core.
  - Tap in rhythm to unlock nodes without hitting traps.
  - Use sound cues for timing help.

4. Visual Style:
- Use cyberpunk colors (black, neon green, glitch red/blue).
- Neon glowing text and transitions.
- Futuristic fonts and smooth animations.

5. Audio:
- Loop background music (simple synth or ambient).
- Sounds for unlock, fail, success, and transitions.

6. Code Structure:
- Use clean classes and modules:
  - LevelManager: controls level transitions
  - MatrixEffect: handles dynamic background
  - Puzzle: base class for levels
  - AudioEngine: for music and sound effects
- Write beginner-friendly, well-commented code.

Enter fullscreen mode Exit fullscreen mode

After the prompt was given it made the code in a very structured way.

** 📦 Project Structure**

CypherCore/
├── main.py
├── LICENSE
├── README.md
├── audio_engine.py
├── matrix_effect.py
├── level_manager.py 
└──  requirements.txt

Enter fullscreen mode Exit fullscreen mode

So after a while q created a good file structure and very modular codes for all the part of the game and with improved UI and everything we got to see :

Image description

Image description

Image description

Image description

Even after getting the codes and the game running as we can see above that didn't mean it was completed it had lots off problems. Like :-

🔁 Prototype 2: Broken Countdown Timer & Static Background

  • Issue: Q CLI added a 60-second global timer affecting all levels.
  • Result: Levels would timeout before completion.
  • Fix: Refactored using LevelManager, giving each level its own timer.

To fix it a different prompt was given to handle the timer in a different way which fixed it.Other that that I have seen only some part of the game has sound but some doesn't this is a bug that I found but had little town to fix similar to the logic gate puzzle may have a bug sometimes when pressed it just assumes you are right. Other than that the game is playable.

🧠 My Experience with Amazon Q CLI

Using Amazon Q CLI for CypherCore felt like coding with a co-pilot that actually gets the vibe. Here’s what stood out:


- Speed: I didn’t waste time writing boilerplate. Q CLI handled that instantly—menus, classes, event loops—it filled in the blanks fast.
- Creative Fuel: Even when I had a clear idea, Q CLI threw in variations or reminded me of better patterns. Sometimes, it shifted my design for the better.
- Learning in Flow: Whether I blanked on syntax or wanted to structure something clean, Q CLI acted like a cheat sheet that explained itself. It’s great for devs leveling up.
- Problem Solving: When I hit logic walls—like managing level timers or handling broken audio modules—Q CLI gave solid fixes I could adapt fast.
Enter fullscreen mode Exit fullscreen mode

Of course, it’s not magic. You have to be clear with prompts, and what it gives is often a launchpad—not the final product. But that’s the beauty of it. You’re not just using AI to code; you’re jamming with it.

🎮 Conclusion:

Building CypherCore wasn’t just about making a game — it was about pushing the limits of creativity with AI as a coding partner. Amazon Q CLI turned out to be way more than just a code generator; it became part of my process. From kickstarting ideas to solving logic puzzles in real time, it made the whole build faster, smoother, and honestly, way more fun.

The final result? A neon and purplish-drenched cyberpunk puzzle game made with Python and vibes — and proof that with the right tools, even wild ideas can turn into something real.

🛠 Want to Build Your Own?

If this sparked something in you, here’s what I recommend:
Try out Amazon Q CLI for your next game idea — just open the terminal, start a chat, and prompt it like you're explaining to a dev buddy.

Check out the Amazon Q CLI Game Challenge for step-by-step guidance, and maybe even score a free tee.
Here:- https://s12d.com/BGWQCLI

Use my journey as a reference — break things, fix them, and have fun doing it.

🧪 Source Code: GitHub – https://github.com/Ahnaf-Ashique-Adi/CypherCore

Game on, hacker. AI isn’t here to replace us — it’s here to amplify us. Tools like Amazon Q CLI don’t just spit out code; they collaborate. You bring the vision, the vibe, the weird ideas. AI helps you bring it to life — faster, cleaner, and sometimes in ways you wouldn’t have thought of alone.

Sure, it’s not perfect. You still have to debug, tweak, and stitch the pieces together. But that’s the beauty of it. It’s like pair-programming with a tireless assistant who’s always ready to throw ideas at you.

For me, CypherCore was a test — could I vibe-code an entire game with just prompts and imagination? Turns out, yes. And that’s just the beginning

Top comments (0)