|
| 1 | +# Color Constellation 🌟 |
| 2 | + |
| 3 | +A beautiful and interactive puzzle game where you connect stars to form constellations that match target patterns. Challenge your spatial reasoning skills while enjoying an animated night sky! |
| 4 | + |
| 5 | +## 🎮 Features |
| 6 | + |
| 7 | +### Core Gameplay |
| 8 | +- **Star Connection**: Click two stars to draw a connection between them |
| 9 | +- **Pattern Matching**: Match your constellation to the target pattern shown |
| 10 | +- **No Crossing Rule**: Lines cannot intersect with each other |
| 11 | +- **Progressive Difficulty**: 6+ levels with increasingly complex patterns |
| 12 | + |
| 13 | +### Visual Enhancements |
| 14 | +- **Animated Night Sky**: Beautiful gradient background with twinkling stars |
| 15 | +- **Star Physics**: Optional gravity simulation that gently moves stars |
| 16 | +- **Glowing Effects**: Stars pulse and glow with dynamic lighting |
| 17 | +- **Smooth Animations**: Responsive canvas-based rendering |
| 18 | + |
| 19 | +### Game Features |
| 20 | +- **Hint System**: Get hints for one connection (with score penalty) |
| 21 | +- **Score Tracking**: Earn points based on level difficulty |
| 22 | +- **Level Progression**: Unlock new constellation patterns |
| 23 | +- **Clear Function**: Reset all connections to start over |
| 24 | + |
| 25 | +## 🎯 How to Play |
| 26 | + |
| 27 | +1. **Observe the Target**: Look at the target constellation pattern in the left panel |
| 28 | +2. **Select Stars**: Click on a star to select it (it will be highlighted) |
| 29 | +3. **Create Connection**: Click on another star to draw a line between them |
| 30 | +4. **Match Pattern**: Continue connecting stars until you match the target |
| 31 | +5. **Check Your Work**: Click "Check Pattern" to verify your solution |
| 32 | +6. **Progress**: Successfully match the pattern to advance to the next level |
| 33 | + |
| 34 | +## 🎨 Game Patterns |
| 35 | + |
| 36 | +The game includes various constellation patterns: |
| 37 | +- **Level 1**: Simple Triangle (3 stars) |
| 38 | +- **Level 2**: Square (4 stars) |
| 39 | +- **Level 3**: Star Shape (10 stars) |
| 40 | +- **Level 4**: House (5 stars) |
| 41 | +- **Level 5**: Diamond with Center (5 stars) |
| 42 | +- **Level 6**: Complex Constellation (7 stars) |
| 43 | + |
| 44 | +## ⌨️ Controls |
| 45 | + |
| 46 | +- **Mouse Click**: Select and connect stars |
| 47 | +- **ESC Key**: Deselect current star |
| 48 | +- **Clear Button**: Remove all connections |
| 49 | +- **Hint Button**: Show one correct connection |
| 50 | +- **Check Pattern**: Verify if your constellation matches |
| 51 | + |
| 52 | +## 🛠️ Technical Details |
| 53 | + |
| 54 | +### Technologies Used |
| 55 | +- **HTML5 Canvas**: For rendering stars and connections |
| 56 | +- **Vanilla JavaScript**: No frameworks, pure ES6+ |
| 57 | +- **CSS3**: Modern styling with gradients and animations |
| 58 | +- **RequestAnimationFrame**: Smooth 60fps animations |
| 59 | + |
| 60 | +### Key Algorithms |
| 61 | +- **Line Intersection Detection**: Prevents lines from crossing |
| 62 | +- **Pattern Matching**: Compares user connections with target |
| 63 | +- **Gravity Simulation**: Optional physics for star movement |
| 64 | +- **Canvas Rendering**: Efficient drawing and updating |
| 65 | + |
| 66 | +## ♿ Accessibility Features |
| 67 | + |
| 68 | +- **Keyboard Support**: ESC key for deselection |
| 69 | +- **Focus Indicators**: Clear visual feedback for focused elements |
| 70 | +- **Reduced Motion**: Respects `prefers-reduced-motion` setting |
| 71 | +- **High Contrast**: Stars and connections are clearly visible |
| 72 | +- **Semantic HTML**: Proper structure for screen readers |
| 73 | + |
| 74 | +## 🎯 Scoring System |
| 75 | + |
| 76 | +- **Base Score**: 100 points × current level |
| 77 | +- **Hint Penalty**: -50 points if hint is used |
| 78 | +- **Progressive Rewards**: Higher levels give more points |
| 79 | + |
| 80 | +## 🔧 Future Enhancements |
| 81 | + |
| 82 | +Potential improvements: |
| 83 | +- More constellation patterns (zodiac signs, animals) |
| 84 | +- Difficulty modes (timed, limited connections) |
| 85 | +- Multiplayer mode |
| 86 | +- Custom constellation creator |
| 87 | +- Save/load game progress |
| 88 | +- Sound effects and music |
| 89 | +- Mobile touch support optimization |
| 90 | +- Achievement system |
| 91 | + |
| 92 | +## 🌟 Game Design Notes |
| 93 | + |
| 94 | +The game combines: |
| 95 | +- **Puzzle Solving**: Match patterns using logical thinking |
| 96 | +- **Spatial Reasoning**: Understand 2D relationships |
| 97 | +- **Strategy**: Plan connections to avoid crossing |
| 98 | +- **Visual Feedback**: Clear indication of success/failure |
| 99 | + |
| 100 | +## 📱 Responsive Design |
| 101 | + |
| 102 | +- Works on desktop and tablet devices |
| 103 | +- Adaptive canvas sizing |
| 104 | +- Responsive UI layout |
| 105 | +- Touch-friendly (basic support) |
| 106 | + |
| 107 | +## 🎨 Art Style |
| 108 | + |
| 109 | +- **Theme**: Night sky / astronomy |
| 110 | +- **Color Palette**: Deep purples, blues, and golden stars |
| 111 | +- **Effects**: Glow, twinkle, and gradient animations |
| 112 | +- **Style**: Modern, clean, and immersive |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +Enjoy connecting the stars! ✨ |
0 commit comments