Skip to content

sh-ship-it/retro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retro Revival: AI What-If Snake Game 🕹️🤖

A retro-style Snake game inspired by classic Windows 95 aesthetics, enhanced with a modern AI-powered What-If Mode that analyzes alternate player decisions after game over.

This project was built for Week 4: Retro Revival Challenge, focusing on recreating classic gameplay while introducing complex AI-driven logic.


🎯 Project Theme

Retro Revival – Rebuilding a classic game with old-school visuals and adding a modern AI twist.


✨ Features

  • 🟩 Classic Snake gameplay
  • 🎨 Windows 95 / Arcade-style retro UI
  • 🧠 AI “What-If” Mode:
    • Simulates alternate player decisions after death
    • Shows how a different move could increase survival
    • Displays a ghost snake path overlay
  • 👻 Ghost visualization for AI replay
  • ⚙️ Complex logic with state cloning and simulation

🤖 AI What-If Mode (How It Works)

When the player loses:

  1. The game captures the last valid game state
  2. AI simulates alternate directions (left, right, forward)
  3. Each path is replayed in a sandbox simulation
  4. The best outcome is selected
  5. A ghost snake path is displayed along with an AI explanation:

“If you turned RIGHT, you would survive 6 more moves.”

This brings modern AI-driven analysis into a classic retro game.


🛠 Tech Stack

  • HTML
  • CSS (Retro / Win95 UI styling)
  • JavaScript
  • Rule-based AI simulation logic

📁 Project Structure

/retro-ai-snake ├── index.html ├── style.css ├── game.js ├── ai/ │ └── whatIf.js ├── assets/ ├── README.md └── .kiro/ ├── prompts.md ├── decisions.md └── iterations.md


alt text alt text alt text

📸 Screenshots & Demo

(Add screenshots and a short gameplay recording here)


⚡ How Kiro Accelerated Development

Kiro was used throughout development to:

  • Generate and refine game logic
  • Design AI simulation workflows
  • Iterate faster on alternate-path prediction
  • Improve visualization of AI outputs

The .kiro directory documents prompts, decisions, and iterations made with Kiro’s assistance.


🚀 How to Run

  1. Clone the repository
  2. Open index.html in a browser
  3. Play the game and explore the AI What-If Mode after game over

🏁 Conclusion

This project demonstrates how modern AI concepts can enhance classic retro games while preserving their original charm. By combining old-school UI with intelligent post-game analysis, the Retro Revival theme is fully realized.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published