DEV Community

Cover image for 🐍 Bhai, AI se Bana Diya Snake Game! Q CLI + Python = Full Jugaadu Combo πŸ’»

🐍 Bhai, AI se Bana Diya Snake Game! Q CLI + Python = Full Jugaadu Combo πŸ’»

β€œBhaiya Nokia waala Snake yaad hai na?”

β€œHaan wahi, jo sabse pehle phone mein khela tha!”

Bas wahi nostalgia lekar aaya hoon ek naye andaaz mein β€” AI aur Python ke tadke ke saath πŸ”₯


🎯 Kyun Banaya Snake Game? (Aur koi Candy Crush thodi hai bhai!)

Dekho, baat simple thi...

AI ka power mila toh socha – β€œKya kare jo maze bhi de, seekhne bhi mile, aur baccho ka dil bhi jeet le?”

Tab yaad aaya – Nokia 1100 wala Snake Game 🐍

Jo kabhi mobile ki jaan tha, ab banega AI ke dum pe ek naya game!

Bas fir kya tha... Amazon Q CLI ko bola:

β€œBhai ek mast Snake game bana do Python mein, cartoon-style hona chahiye, baccho ke liye”

Aur Q CLI ne toh kamaal kar diya πŸ’₯


🧠 Prompting ka Desi Jugaad

Amazon Q CLI se kaam karwane ke liye prompt ekdum chaat masala jaisa hai β€” sahi diya toh mazaa aa jaata hai πŸ˜‹

Mera prompt tha:

Create a simple, kid-friendly Snake game using Python and Pygame.
β€’ The snake moves using arrow keys (← ↑ ↓ β†’).
β€’ The snake grows longer when it eats food.
β€’ The game ends if the snake hits the wall or collides with itself.
β€’ Display a score counter at the top in a large, playful font.
β€’ Use cartoon-style colors and visuals suitable for ages 4–10.
β€’ Food should appear as fun items like apples, candy, or stars.
β€’ Set the window title to "Snake Fun Game" and use a cute snake icon if possible.
β€’ Add fun sound effects for eating and game over.
β€’ Show a game over screen with score and a "Play Again" option.
β€’ Keep the code modular and beginner-friendly, with files like main.py, snake.py, and food.py.
β€’ Include comments and clean structure for learning purposes.


🧠 Tips:

  • Clear bolna: "Baccho ke liye", "pygame use karo", "cartoon visuals"
  • Thoda creative hona: "Fun sounds", "gameplay levels", "speed increase with score"

Bhai ek baar maine bola "retro nokia-style snake game" β€” toh Q ne wahi 8-bit look bana diya! πŸ˜†


πŸ’‘ Q CLI Ne Kya-Kya Automatically Kar Diya?

Socho tum chai pee rahe ho aur koi coding kar raha ho...

Wahi kaam kiya Amazon Q CLI ne! β˜•πŸ’»

  • βœ… Project structure bana diya (main.py, assets/, requirements.txt)
  • βœ… Snake ka movement, food, score β€” sab setup kar diya
  • βœ… Even .gitignore aur README.md bhi suggest kar diya!

Result: 3 ghante ka kaam sirf 30 minute mein! πŸš€


😎 AI Se Nikal Ke Aayi Yeh Coding Ki Chamatkaariyaan

# Game restart option
                if event.key == pygame.K_SPACE and self.game_over:
                    self.reset_game()
                # Pause game option
                elif event.key == pygame.K_p and not self.game_over:
                    self.paused = not self.paused
                # End game option
                elif event.key == pygame.K_ESCAPE:
                    self.game_over = True
Enter fullscreen mode Exit fullscreen mode

πŸ”— Chalo Khelo: snake-game-qcli

Yeh raha GitHub link bhai:

πŸ‘‰ Repo Link


πŸš€ Chalane ka Formula:

git clone https://github.com/Utkarshlearner/snake-game-qcli
cd snake-game-qcli
pip install -r requirements.txt
python main.py

Enter fullscreen mode Exit fullscreen mode

πŸ˜„ Agar chal gaya, toh chai pila dena!


πŸ“₯ Installation

Agar detail mein samajhna hai ki setup kaise hua, toh yeh full guide dekh lo:

πŸ‘‰ Amazon Q Installation

😎 Full jugaad documentation, bilkul step-by-step!


🏁 Competition Submission (Jahan Q CLI Ne Dhamaka Kiya!)

Yeh game banaya gaya tha as part of Amazon Q CLI Hackathon/Challenge.

Check out submission or voting link yahaan:

πŸ‘‰ Q CLI Challenge Entry


πŸ“Έ Q CLI Ne Kaise Jadoo Dikhaya – Screenshots Time!

β€œChai pee raha tha, aur Q CLI ne full game code bana diya!” – real story πŸ˜„

πŸ”§ Prompt Se Pehli Response:

q chat

πŸ“ Project Structure Ready-Made:

Code

🧠 Snake Logic Output:

Output

Output2


πŸ€“ Bhaiyon ke liye Pro Tip:

β€œAI toh majdoor hai, lekin kaam ka thekedar tum ho”

Sahi prompt doge, tabhi AI se sahi kaam milega.

Amazon Q CLI ne mera 90s wala pyaar β€” Snake Game β€” wapas laa diya ❀️


πŸ“£ Desi Developer Bhaiyon se Baat

Agar yeh game ne nostalgia jagaya ho ya tum bhi AI ke saath kuch cool banana chahte ho, toh milte hain yahaan:

  • 🌐 Utkarsh Rastogi
  • πŸš€ Weekend Project Ready β€” Coding bhi, Masti bhi!

πŸ”₯ Aakhri Line

"Code likhna easy hai, samajhna art hai β€” aur AI apna coder dost hai!"

Top comments (0)