A thrilling 2.5D racing/dodging game built with Three.js where you navigate a figure-8 track, avoid AI vehicles, and complete as many laps as possible!
- Objective: Complete as many laps as possible while avoiding AI vehicles
- Controls: Arrow keys (↑↓←→) for movement, SPACE to pause, R to reset
- Lanes: Switch between inner and outer lanes to avoid traffic
- Scoring: Each completed lap increases your score
- Install dependencies:
npm install
- Start development:
npm run dev
- Open browser and play!
TrafficRun/
├── src/
│ ├── main.ts # Application entry point
│ ├── audio.ts # Sound management
│ ├── collision.ts # Collision detection
│ ├── scene.ts # Three.js scene setup
│ ├── track.ts # Track generation
│ ├── types.ts # TypeScript definitions
│ ├── ui.ts # UI controls
│ └── vehicles.ts # Vehicle models
├── public/audio/ # Audio files
├── index.html # Main HTML
└── package.json # Dependencies
- Heroku: Play Traffic Run
- GitHub: View Source
- Use both lanes strategically - switch lanes to avoid traffic
- Accelerate on straight sections - decelerate on curves for better control
- Watch for patterns - AI vehicles spawn predictably based on your score
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.