Skip to content

ARCADE PATHFINDER: An intensely visual computing experience. Neon, nostalgia, and algorithms meet in a reactive, beautiful retro-arcade environment.

Notifications You must be signed in to change notification settings

Ishant9504/RETRO-PATHFINDER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ RETRO PATHFINDER

Retro Pathfinder Banner React Tone.js

An immersive pathfinding visualizer with retro arcade aesthetics

๐ŸŽฎ Live Demo โ€ข ๐Ÿ“– Features โ€ข ๐Ÿš€ Quick Start


๐ŸŽฏ Overview

RETRO PATHFINDER is an interactive pathfinding algorithm visualizer that brings the excitement of classic arcade games to algorithm education. Experience 7 different pathfinding algorithms compete in real-time battles, generate complex maze patterns, and enjoy immersive sound design - all wrapped in a nostalgic 80s arcade aesthetic.

โœจ Features

๐ŸŽฎ Dual Mode Experience

  • Single Algorithm Mode: Choose and visualize individual algorithms with detailed performance statistics
  • Battle Mode: Watch multiple algorithms compete simultaneously with winner detection

๐Ÿค– 7 Pathfinding Algorithms

Algorithm Color Personality Best For
BFS ๐Ÿ”ต Cyan Steady Explorer Shortest path in unweighted graphs
A* โญ Gold Smart Pathfinder Optimal paths with heuristics
Dijkstra ๐ŸŸฃ Purple Thorough Searcher Weighted graphs
DFS ๐Ÿ”ด Crimson Deep Diver Maze exploration
Greedy ๐ŸŸข Lime Speed Runner Fast but suboptimal
Bidirectional ๐ŸŸฃ Magenta Pincer Attack Large grids
Jump Point ๐Ÿ’  Electric Cyan Teleporter Sparse grids

๐Ÿ—๏ธ 10 Maze Generators

  • Random Chaos: Pure randomness with protected start/end zones
  • Recursive Maze: Classic DFS-generated maze
  • Spiral Pattern: Hypnotic spiral formations
  • Vertical Bars: Horizontal movement challenges
  • Horizontal Bars: Vertical movement challenges
  • Checkerboard Grid: Alternating pattern maze
  • Diagonal Stripes: Diagonal movement corridors
  • Room Network: Connected room structures
  • Classic Maze: Traditional maze design
  • Organic Cavern: Natural cave-like formations

๐ŸŽต Immersive Audio Experience

  • Tone.js Integration: Professional audio synthesis
  • Algorithm Signatures: Unique sound profiles for each algorithm
  • Battle Soundtrack: Dynamic audio during competitions
  • Combo System: Audio feedback for wall-breaking combos
  • Maze Generation: Procedural audio during maze creation

๐ŸŽจ Retro Arcade Aesthetics

  • CRT Scanlines: Authentic monitor effects
  • Neon Glow Effects: Vibrant color schemes
  • Particle Systems: Visual feedback for interactions
  • Combo Easter Egg: Rainbow mode at 20+ combo
  • Responsive Design: Works on desktop and mobile

๐Ÿ“Š Performance Analytics

  • Path Length: Exact number of nodes in solution
  • Nodes Visited: Total exploration count
  • Execution Time: Precise millisecond timing
  • Battle Results: Winner detection and statistics

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16.x or higher
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/Ishant9504/retro-pathfinder.git
cd retro-pathfinder

# Install dependencies
npm install

# Start development server
npm start

Visit http://localhost:3000 to experience the visualizer!

Build for Production

# Create optimized production build
npm run build

# Serve the build locally
npx serve -s build

๐ŸŽฎ How to Use

Basic Controls

  1. Set Start/End Points: Click mode buttons, then click grid to place
  2. Create Walls: Select wall mode and click/drag on grid
  3. Generate Mazes: Choose pattern from dropdown and click "GENERATE MAZE"
  4. Run Algorithms: Select algorithm and click "EXECUTE"

Battle Mode

  1. Toggle "Battle Mode" switch
  2. Select multiple algorithms using checkboxes
  3. Click "EXECUTE" to watch them compete
  4. View results in the championship-style modal

Tips & Tricks

  • Combo System: Break walls quickly to build combos (20+ = rainbow mode!)
  • Audio: Click anywhere first to enable sound
  • Performance: Larger grids show algorithm differences more clearly
  • Maze Balance: All mazes are guaranteed solvable

๐Ÿ—๏ธ Architecture

Tech Stack

  • Frontend: React 19.2.0 with Hooks
  • Audio: Tone.js 15.1.22 for synthesis
  • Styling: CSS Grid + Custom Properties
  • Build: Create React App

Project Structure

retro-pathfinder/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ””โ”€โ”€ manifest.json
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ algorithms.js          # 7 pathfinding implementations
โ”‚   โ”œโ”€โ”€ App.js                 # Main component & state management
โ”‚   โ”œโ”€โ”€ App.css                # Retro arcade styling
โ”‚   โ”œโ”€โ”€ mazeGenerator.js       # 10 maze pattern generators
โ”‚   โ”œโ”€โ”€ SoundEngine.js         # Tone.js audio management
โ”‚   โ”œโ”€โ”€ index.js              # React entry point
โ”‚   โ””โ”€โ”€ setupTests.js
โ”œโ”€โ”€ build/                    # Production build output
โ””โ”€โ”€ package.json

Key Components

algorithms.js

Implements 7 pathfinding algorithms with consistent interfaces:

export function algorithmName(grid, startNode, endNode) {
  // Returns: { visitedNodes: [...], path: [...] }
}

SoundEngine.js

Manages all audio with Tone.js:

  • Algorithm-specific pitch signatures
  • Battle mode synchronization
  • Combo sound effects
  • Maze generation audio

mazeGenerator.js

10 different maze generation algorithms ensuring:

  • Guaranteed solvability
  • Protected start/end zones
  • Balanced difficulty
  • Visual variety

๐ŸŽจ Customization

Adding New Algorithms

  1. Implement in algorithms.js following the interface
  2. Add to algorithm registry in App.js
  3. Create CSS classes for visited/path states
  4. Add sound signature in SoundEngine.js
  5. Update UI selectors

Custom Maze Patterns

  1. Add generator function in mazeGenerator.js
  2. Export from module
  3. Add to dropdown in App.js
  4. Ensure consistent return format

Styling Themes

Modify CSS custom properties in App.css:

:root {
  --clr-primary: #00FFF2;    /* Cyan accent */
  --clr-accent: #FFD60A;     /* Gold highlights */
  --clr-bg: #0A0A0A;         /* Dark background */
}

๐Ÿ“ˆ Performance

Algorithm Complexity

Algorithm Time Space Optimality
BFS O(V + E) O(V) Optimal
A* O(b^d) O(V) Optimal
Dijkstra O((V + E) log V) O(V) Optimal
DFS O(V + E) O(V) Not optimal
Greedy O(b^d) O(V) Not optimal
Bidirectional O(b^{d/2}) O(V) Optimal
Jump Point O(b^d) O(V) Optimal

System Requirements

  • Browser: Modern browsers with ES6+ support
  • Audio: Web Audio API support (all modern browsers)
  • Performance: Smooth 60fps on grids up to 50x50
  • Memory: ~50MB for large grids with all algorithms

๐Ÿค Contributing

We welcome contributions! Here's how to get involved:

Development Setup

# Fork and clone
git clone https://github.com/your-username/retro-pathfinder.git
cd retro-pathfinder

# Install dependencies
npm install

# Start development
npm start

# Run tests
npm test

Contribution Guidelines

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

Areas for Contribution

  • New pathfinding algorithms
  • Additional maze generators
  • Performance optimizations
  • Mobile responsiveness
  • Accessibility improvements
  • Additional audio effects

๐Ÿ™ Acknowledgments

  • React Team for the amazing framework
  • Tone.js for professional audio synthesis
  • Create React App for the solid foundation
  • Pathfinding Algorithm Research community

๐Ÿ“ž Support


Made with โค๏ธ and lots of neon glow

โญ Star this repo if you find it helpful!

โฌ†๏ธ Back to Top

About

ARCADE PATHFINDER: An intensely visual computing experience. Neon, nostalgia, and algorithms meet in a reactive, beautiful retro-arcade environment.

Topics

Resources

Stars

Watchers

Forks