{"id":49641254,"url":"https://github.com/setrf/racing-game","last_synced_at":"2026-05-05T19:37:42.075Z","repository":{"id":327700094,"uuid":"1110266702","full_name":"setrf/racing-game","owner":"setrf","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-09T19:44:40.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T04:42:45.848Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/setrf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-05T00:17:58.000Z","updated_at":"2026-01-09T19:44:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/setrf/racing-game","commit_stats":null,"previous_names":["setrf/racing-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/setrf/racing-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setrf%2Fracing-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setrf%2Fracing-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setrf%2Fracing-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setrf%2Fracing-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setrf","download_url":"https://codeload.github.com/setrf/racing-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setrf%2Fracing-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32665574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-05T19:37:40.950Z","updated_at":"2026-05-05T19:37:42.063Z","avatar_url":"https://github.com/setrf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highway Racer\n\nA feature-rich, addictive web-based top-down racing game built with HTML5 Canvas, CSS3, and vanilla JavaScript.\n\n## Game Description\n\nNavigate through traffic in this endless racing game! Choose from multiple game modes, collect power-ups, unlock achievements, customize vehicles, and compete for high score!\n\n## How to Play\n\n### Controls\n- **Arrow Keys (← →)** or **A/D**: Move left/right between lanes\n- **Touch Controls**: Swipe left/right or use on-screen buttons on mobile devices\n- **ESC**: Pause/Resume game\n\n### Game Modes\n- **Endless**: Classic mode - survive as long as you can with increasing difficulty\n- **Time Trial**: Score as many points as possible in 60 seconds\n- **Challenge**: Complete specific challenges to earn rewards\n- **Zen**: Relaxing mode without collisions or pressure\n\n### Objective\nSurvive as long as possible while avoiding obstacles. The game gets progressively harder as your speed increases over time.\n\n### Scoring\n- **Time Survival**: Earn 1 point for every 100ms you survive\n- **Near Misses**: Get bonus points for dodging obstacles at the last second\n- **Power-ups**: Collect temporary abilities to help you survive longer\n- **Multipliers**: Score 2x points with score multiplier power-up\n\n## Features\n\n### Core Gameplay\n- **Smooth Gameplay**: 60 FPS game loop with requestAnimationFrame\n- **Progressive Difficulty**: Dynamic difficulty system with level indicators\n- **Collision Detection**: Precise rectangle-based collision detection system\n- **Visual Effects**: Screen shake on collision, animated lane markings\n- **Score Tracking**: High score saved locally in your browser\n- **Responsive Design**: Works on desktop and mobile devices\n- **Multiple Obstacle Types**: Cars, trucks, and barriers with different colors\n\n### Game Modes\n- **Endless Mode**: Classic survival gameplay with increasing difficulty\n- **Time Trial Mode**: 60-second timed challenges\n- **Challenge Mode**: Sequential challenges with specific objectives\n- **Zen Mode**: Casual mode without collisions for relaxed play\n\n### Power-ups System\n- **Shield**: Protects from one collision\n- **Speed Boost**: Temporarily increases movement speed\n- **Slow Motion**: Reduces obstacle speed temporarily\n- **Score Multiplier**: Doubles point gains for limited time\n- **Clear Road**: Instantly removes all obstacles from screen\n- **Visual Indicators**: Active power-up effects with timers\n\n### Vehicle Customization\n- **Multiple Vehicle Types**: Sedan, Sports Car, Heavy Truck, Motorcycle\n- **Unique Stats**: Each vehicle has different speed, handling, and size characteristics\n- **Unlock System**: Vehicles unlock based on score achievements\n- **Visual Customization**: Different colors and styles for each vehicle\n- **Performance Impact**: Vehicle choice affects gameplay difficulty\n\n### Achievement System\n- **20+ Achievements**: Comprehensive achievement tracking across multiple categories\n- **Progress Tracking**: Real-time progress indicators for each achievement\n- **Categories**: Score achievements, time achievements, skill achievements, and special challenges\n- **Rewards**: Unlockable content and features\n- **Persistent Stats**: Lifetime statistics tracking\n\n### Particle Effects\n- **Multiple Effect Types**: Explosions, sparks, trails, and special effects\n- **Dynamic System**: Particle effects respond to game events\n- **Performance Optimized**: Automatic particle limit adjustment for smooth gameplay\n- **Visual Variety**: Different colors and behaviors for various effects\n- **Screen Integration**: Particles work with screen shake and other effects\n\n### Sound \u0026 Audio\n- **Synthesized Audio**: Procedurally generated sound effects using Web Audio API\n- **Dynamic Engine Sounds**: Speed-based engine noise that responds to gameplay\n- **Effect Sounds**: Collision, near miss, power-up collection, and achievement sounds\n- **Background Music**: Ambient music tracks for different game modes\n- **Volume Controls**: Separate controls for effects and music\n- **Mute Options**: Full audio control for accessibility\n\n### Environment System\n- **Multiple Environments**: Day, Night, Rain, Fog, Sunset, Desert\n- **Dynamic Weather**: Animated rain, starry night skies, and fog effects\n- **Road Variations**: Different road colors and lane markings per environment\n- **Unlock System**: Environments unlock based on achievements\n- **Atmospheric Effects**: Immersive weather and lighting effects\n\n### Leaderboard System\n- **Multiple Leaderboards**: Separate leaderboards for each game mode\n- **Local Storage**: Persistent high score tracking\n- **Player Names**: Customizable player name entries\n- **Date Tracking**: Automatic date and time recording\n- **Rank Display**: Visual indicators for top performances\n- **History**: Comprehensive score history tracking\n\n### Accessibility Features\n- **High Contrast Mode**: Enhanced visibility with increased color contrast\n- **Reduced Motion**: Minimized animations for motion sensitivity\n- **Large Text**: Increased font sizes for better readability\n- **Color Blind Modes**: Support for protanopia, deuteranopia, and tritanopia\n- **Difficulty Settings**: Easy, Normal, and Hard modes\n- **Persistent Settings**: Accessibility preferences saved locally\n\n### Touch Controls\n- **Mobile Optimized**: Full touch support for mobile devices\n- **Gesture Support**: Swipe controls for natural mobile interaction\n- **On-screen Buttons**: Visual control buttons for touch devices\n- **Haptic Feedback**: Vibration support on capable devices\n- **Responsive Design**: Touch controls adapt to screen size\n- **Desktop Support**: Mouse support for testing and alternative control\n\n### Performance Optimizations\n- **Object Pooling**: Efficient memory management for game objects\n- **Frame Rate Monitoring**: Real-time FPS tracking and optimization\n- **Dynamic Adjustments**: Automatic quality adjustment based on performance\n- **Particle Limits**: Intelligent particle count management\n- **Optimized Rendering**: Efficient canvas drawing techniques\n- **Performance Indicators**: Visual performance feedback system\n\n## Technical Details\n\n### Technology Stack\n- **HTML5 Canvas**: For game rendering\n- **Vanilla JavaScript**: Game logic and state management\n- **CSS3**: UI styling and responsive design\n- **LocalStorage**: For high score and settings persistence\n- **Web Audio API**: For synthesized sound effects\n\n### File Structure\n```\nracing-game/\n├── index.html              # Main HTML file\n├── css/\n│   └── style.css           # Game styling\n├── js/\n│   ├── game.js             # Main game loop and state management\n│   ├── player.js           # Player car logic and controls\n│   ├── obstacles.js        # Obstacle generation and movement\n│   ├── utils.js            # Helper functions and constants\n│   ├── achievements.js      # Achievement system\n│   ├── powerups.js         # Power-ups system\n│   ├── particles.js        # Particle effects system\n│   ├── sound.js            # Sound effects system\n│   ├── gamemodes.js        # Game mode management\n│   ├── leaderboard.js       # Leaderboard system\n│   ├── vehicles.js          # Vehicle customization\n│   ├── environments.js      # Environment system\n│   ├── accessibility.js     # Accessibility features\n│   ├── touchControls.js     # Touch controls for mobile\n│   └── performance.js      # Performance optimizations\n├── assets/                 # Asset folders\n│   ├── images/\n│   └── sounds/\n└── README.md               # This file\n```\n\n## Game Architecture\n\n### Core Components\n\n1. **Player**: Manages the player's car with smooth lane transitions\n2. **Obstacle Manager**: Generates and controls obstacles with increasing difficulty\n3. **Game Controller**: Handles game states, input, and scoring\n4. **Collision Detection**: Rectangle-based collision detection system\n5. **Visual Effects**: Screen shake and animations for better feedback\n6. **Achievement System**: Comprehensive progress tracking and rewards\n7. **Power-up System**: Temporary abilities and visual effects\n8. **Vehicle Manager**: Multiple vehicle types with customization options\n9. **Environment Manager**: Dynamic backgrounds with weather effects\n10. **Sound Manager**: Procedural audio generation and playback\n\n### Game States\n\n1. **Menu**: Start screen with instructions and high score\n2. **Playing**: Active gameplay with HUD\n3. **Paused**: Temporary game pause\n4. **Game Over**: End screen with final score and restart option\n\n### Advanced Features\n\n1. **Progressive Difficulty**: Speed increases every 5 seconds with visual indicators\n2. **Near Miss Bonus**: Rewards for skillful dodging with bonus points\n3. **Combo System**: Multipliers for consecutive successful dodges\n4. **Screen Shake Impact**: Visual feedback system for collisions\n5. **Animated UI Elements**: Smooth transitions and hover effects\n6. **Performance Monitoring**: Real-time FPS tracking with automatic optimization\n\n## Getting Started\n\n1. Clone or download the repository\n2. Open `index.html` in your web browser\n3. Click \"Start Game\" to begin playing\n\n## Browser Compatibility\n\nThe game works in all modern browsers:\n- Chrome (recommended)\n- Firefox\n- Safari\n- Edge\n- Mobile browsers (with full touch control support)\n\n## Performance Recommendations\n\n- **Desktop**: Chrome or Firefox recommended for best performance\n- **Mobile**: Modern iOS/Android browsers for touch control support\n- **Hardware**: WebGL acceleration support improves performance\n- **Network**: No internet connection required after initial page load\n\n## Contributing\n\nThis is a feature-rich project demonstrating modern web development capabilities. Feel free to fork it and make your own improvements!\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n---\n\nEnjoy the game and try to beat your high score!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetrf%2Fracing-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetrf%2Fracing-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetrf%2Fracing-game/lists"}