Transform your GitHub contribution grid into an auto-playing Tron Light Cycles arena! Watch AI-controlled motorcycles race through your coding activity, leaving glowing trails in their wake.
- Auto-Playing Game: Watch AI light cycles race without any interaction needed
- Real GitHub Data: Uses your actual contribution patterns as the game arena
- Advanced AI: Neural network-inspired pathfinding with 8 evaluation factors
- Continuous Loop: Perfect for embedding in GitHub profiles
- Easy Setup: One command creates a complete project
- Auto-Deploy: GitHub Actions automatically deploys to GitHub Pages
npx contrib-tron init --user YOUR_GITHUB_USERNAME
cd tron-github
npm install
npm run dev
- Fetches Your Data: Pulls your GitHub contribution SVG
- Maps the Arena: Converts 7×52 grid (days × weeks) into game space
- AI Racing: 4 light cycles with different strategies compete
- Persistent Trails: Cycles leave permanent light trails
- Collision Detection: Game resets when cycles crash
Each light cycle uses sophisticated pathfinding with:
- Safety Analysis: 10-step collision lookahead
- Space Evaluation: Open area detection
- Edge Avoidance: Boundary risk assessment
- Memory System: Path diversity tracking
- Future Planning: Multi-step option evaluation
- Exploration Bonus: Encourages new territory
- Weighted Decisions: Softmax-style action selection
your-tron-project/
├── src/
│ ├── main.ts # Game initialization
│ ├── game.ts # Core game logic
│ ├── renderer.ts # Canvas rendering
│ └── api.ts # GitHub data fetching
├── index.html # Game interface
├── package.json # Dependencies
└── .github/workflows/ # Auto-deployment
The generated project includes GitHub Actions for automatic deployment:
- Create a GitHub repository
- Push your code
- Enable GitHub Pages (source: GitHub Actions)
- Your game will be live at
https://username.github.io/repo-name/
Add this to your GitHub profile README:
[](https://username.github.io/tron-github/)
🎮 Watch AI light cycles race through my contribution data!
- 4 AI Cycles: Cyan, Red, Orange, Green
- Scoring:
survivalTime * 10 + activeCycles * 5 + trailLength
- Auto-Restart: 1-second delay between games
- Real-Time: Updates with your latest GitHub activity
# Start development server
npm run dev
# Build for production
npm run build
# Deploy to GitHub Pages
npm run deploy
- Canvas Rendering: Smooth 60fps animation
- TypeScript: Full type safety
- Vite: Fast development and building
- Responsive: Adapts to different screen sizes
- No Dependencies: Pure vanilla implementation
The generated project is fully customizable:
- Modify AI behavior in
game.ts
- Adjust visual styling in
renderer.ts
- Change game rules and scoring
- Add new cycle types or behaviors
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this in your own projects!
Check out these live examples:
- Demo Game - See it in action
- Profile Integration - Embedded in README
Transform your GitHub profile into a gaming arena! 🏍️✨