Skip to content

Chrome Arcade is a comprehensive gaming suite featuring six unique AI-powered games, each showcasing different aspects of Chrome's built-in AI capabilities:

License

Notifications You must be signed in to change notification settings

Techatech/chrome-arcade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Chrome Arcade ๐ŸŽฎ

A comprehensive game suite featuring six AI-powered games built as a Chrome extension, leveraging Chrome's built-in AI APIs for intelligent gameplay experiences.

Chrome Arcade

๐ŸŒŸ Features

  • Six Unique AI-Powered Games - Each game utilizes different Chrome AI APIs
  • Real-time Leaderboard - Persistent high score tracking with localStorage
  • Immersive Audio - Background music and sound effects for each game
  • Responsive Design - Works seamlessly across different screen sizes
  • Modern UI/UX - Beautiful gradient themes and smooth animations
  • Chrome AI Integration - Leverages Gemini Nano and other built-in AI capabilities

๐ŸŽฏ Games Included

1. ๐Ÿ” Cipher Codex

AI APIs Used: Translation API, Language Detection API

  • Decode cryptic messages as a master cryptographer
  • Translate and refine mysterious texts while racing against time
  • Features real-time language detection and translation

2. ๐Ÿง  Mind Meld Trivia

AI APIs Used: Prompt API (LanguageModel), Writer API

  • Test your knowledge in a futuristic AI-powered game show
  • Dynamic question generation using Gemini Nano
  • AI-powered answer evaluation for semantic accuracy

3. ๐ŸŒ Polyglot Pursuit

AI APIs Used: Language Detection API

  • Become a linguistic detective
  • Identify languages from mysterious text snippets
  • Real-time language detection with confidence scoring

4. โœ๏ธ Riddle Rewriter

AI APIs Used: Rewriter API, Writer API

  • Channel your inner word magician
  • Rewrite cryptic riddles for clarity while preserving mystery
  • AI-powered text rewriting and enhancement

5. ๐Ÿ“Š Summarize Sprint

AI APIs Used: Summarizer API

  • Race against time as an intelligence analyst
  • Create concise, accurate summaries of complex documents
  • AI-powered summary evaluation and scoring

6. ๐Ÿ“ The Proofreader's Gauntlet

AI APIs Used: Rewriter API, Writer API

  • Master editor under pressure
  • Find and fix errors in text passages before the deadline
  • AI-assisted error detection and correction suggestions

๐Ÿš€ Installation

Prerequisites

  • Chrome Browser version 127 or later (Chrome Beta browser works awesome)
  • Chrome AI APIs enabled (see setup instructions below)

Chrome AI APIs Setup

  1. Update Chrome to version 127 or later
  2. Navigate to chrome://flags/
  3. Enable the following flags:
    • "Prompt API for Gemini Nano"
    • "Built-in AI APIs"
    • "Translation API"
    • "Language Detection API"
    • "Writer API for Gemini Nano"
    • "Rewriter API for Gemini Nano"
    • "Summarizer API for Gemini Nano"
  4. Restart Chrome
  5. Visit chrome://on-device-internals/ to check model status

Extension Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/chrome-arcade.git
    cd chrome-arcade
  2. Open Chrome and navigate to chrome://extensions/

  3. Enable "Developer mode" in the top right corner

  4. Click "Load unpacked" and select the project directory

  5. The Chrome Arcade extension should now appear in your extensions list

๐ŸŽฎ How to Play

  1. Click the Chrome Arcade extension icon in your browser toolbar
  2. Click "Launch Arcade" to open the main game interface
  3. Select any game from the arcade screen
  4. Each game includes:
    • Game Controls: Quit, Leaderboard, Music/SFX toggles, Pause
    • Real-time Scoring: Your progress is tracked and saved
    • High Score System: Beat your personal bests

๐Ÿ† Leaderboard System

  • Persistent Storage: High scores are saved locally using localStorage
  • Real-time Updates: Leaderboard updates immediately when new records are set
  • Ranked Display: Games are ranked with medal emojis (๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰)
  • Reset Functionality: Clear all scores with confirmation dialog
  • Cross-Session Persistence: Scores survive browser restarts

๐Ÿ› ๏ธ Technical Architecture

Core Technologies

  • Manifest V3 Chrome Extension
  • Chrome Built-in AI APIs (Gemini Nano integration)
  • HTML5 localStorage for persistent data
  • Modern JavaScript (ES6+ classes and async/await)
  • CSS3 with gradients and animations
  • Web Audio API for sound management

Project Structure

chrome-arcade/
โ”œโ”€โ”€ manifest.json           # Extension configuration
โ”œโ”€โ”€ arcade.html            # Main game interface
โ”œโ”€โ”€ arcade.js              # Core arcade logic and AI API integration
โ”œโ”€โ”€ arcade.css             # Main styling and responsive design
โ”œโ”€โ”€ popup.html             # Extension popup interface
โ”œโ”€โ”€ popup.js               # Popup functionality
โ”œโ”€โ”€ background.js          # Service worker for extension
โ”œโ”€โ”€ games/                 # Individual game implementations
โ”‚   โ”œโ”€โ”€ cipher-codex.js
โ”‚   โ”œโ”€โ”€ mind-meld-trivia.js
โ”‚   โ”œโ”€โ”€ polyglot-pursuit.js
โ”‚   โ”œโ”€โ”€ riddle-rewriter.js
โ”‚   โ”œโ”€โ”€ summarize-sprint.js
โ”‚   โ””โ”€โ”€ proofreader-gauntlet.js
โ”œโ”€โ”€ images/                # Game logos and icons
โ”œโ”€โ”€ sounds/                # Audio files for games

Key Features Implementation

  • Score Management: Centralized localStorage-based system
  • AI API Integration: Proper availability checking and error handling
  • Audio System: Preloaded sounds with 4-second countdown limit
  • Responsive Design: Mobile-friendly interface
  • Error Handling: Comprehensive error management for AI APIs

๐Ÿ”ง Development

Adding New Games

  1. Create a new game class in the games/ directory
  2. Implement required methods: init(), pause(), resume(), destroy()
  3. Add game configuration to arcade.js
  4. Update the game interface in createXXXGame() method
  5. Add game assets (images, sounds) to respective directories

API Integration Guidelines

  • Always check API availability before use
  • Implement proper error handling and fallbacks
  • Use the guides in the guides/ folder for implementation details
  • Follow the established patterns for consistency

๐ŸŽต Audio Credits

The extension includes various audio files for enhanced gaming experience:

  • Background music for each game theme
  • Sound effects for interactions and feedback
  • Countdown timers and victory sounds

Audio assets obtained for free from MixKit.com

๐Ÿ“‹ System Requirements

Hardware Requirements (for AI APIs)

  • Operating System: Windows 10/11, macOS 13+, Linux, or ChromeOS
  • Storage: At least 22 GB free space for AI models
  • Memory: 16 GB RAM (for CPU inference) or 4+ GB VRAM (for GPU)
  • Network: Unlimited data connection for model downloads

Browser Requirements

  • Chrome 127+ (stable channel)
  • Chrome AI APIs enabled
  • JavaScript enabled
  • localStorage support

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style and patterns
  • Test all AI API integrations thoroughly
  • Ensure responsive design compatibility
  • Add appropriate error handling
  • Update documentation for new features

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Google Chrome Team for the built-in AI APIs
  • Gemini Nano for powering the AI capabilities
  • Chrome Extensions Platform for the development framework

๐Ÿ› Known Issues

  • AI APIs require specific Chrome versions and flags to be enabled
  • Model downloads may take time on first use
  • Some features may not work in incognito mode
  • Mobile Chrome may have limited AI API support

๐Ÿ“ž Support

If you encounter issues:

  1. Check that Chrome AI APIs are properly enabled
  2. Verify Chrome version compatibility
  3. Check chrome://on-device-internals/ for model status
  4. Review browser console for error messages

๐Ÿ”„ Version History

v1.0.0

  • Initial release with six AI-powered games
  • Complete leaderboard system with localStorage
  • Full Chrome AI API integration
  • Responsive design and audio system
  • Comprehensive error handling

Made with โค๏ธ and AI - Chrome Arcade brings the future of gaming to your browser!

About

Chrome Arcade is a comprehensive gaming suite featuring six unique AI-powered games, each showcasing different aspects of Chrome's built-in AI capabilities:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published