{"id":28986777,"url":"https://github.com/agentmorris/dragon-game","last_synced_at":"2025-08-19T03:03:59.111Z","repository":{"id":298999470,"uuid":"1001786165","full_name":"agentmorris/dragon-game","owner":"agentmorris","description":"Vibe-coded dragon combat game","archived":false,"fork":false,"pushed_at":"2025-06-14T03:04:18.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T20:49:51.381Z","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/agentmorris.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}},"created_at":"2025-06-14T03:00:15.000Z","updated_at":"2025-06-14T03:04:21.000Z","dependencies_parsed_at":"2025-06-14T04:18:42.969Z","dependency_job_id":"14aca835-3aba-4c15-86b6-ecdb5231ab19","html_url":"https://github.com/agentmorris/dragon-game","commit_stats":null,"previous_names":["agentmorris/dragon-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agentmorris/dragon-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fdragon-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fdragon-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fdragon-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fdragon-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentmorris","download_url":"https://codeload.github.com/agentmorris/dragon-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fdragon-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271092830,"owners_count":24697914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-06-24T20:33:59.033Z","updated_at":"2025-08-19T03:03:59.054Z","avatar_url":"https://github.com/agentmorris.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐉 Dragon Strike\n\nA real-time multiplayer 3D dragon combat flight simulator built for the web. Players control powerful dragons in aerial dogfights with unique abilities and medieval fantasy aesthetics.\n\n![Dragon Strike](https://img.shields.io/badge/Game-Multiplayer-blue) ![Tech](https://img.shields.io/badge/Tech-WebGL%20%7C%20Node.js-green) ![License](https://img.shields.io/badge/License-MIT-yellow)\n\n\u003cimg src=\"dragon-game-screenshot.jpg\"\u003e\n\n## 🎮 Game Features\n\n### Core Gameplay\n- **Real-time multiplayer combat** for 2-10 players per room\n- **Elimination-based battles** - last dragon standing wins\n- **Arcade-style flight physics** optimized for fun over realism\n- **No downloads required** - plays directly in web browsers\n\n### Dragon Types \u0026 Abilities\nEach dragon has unique combat abilities and visual effects:\n\n- **🔥 Fire Dragon** - Fast and agile with devastating fire breath attacks\n- **🧊 Ice Dragon** - Tanky with piercing ice shard projectiles  \n- **⚡ Lightning Dragon** - Highly maneuverable with lightning bolt strikes\n- **🌑 Shadow Dragon** - Stealthy with powerful shadow strike abilities\n\n### Game Systems\n- **Dynamic damage calculation** with distance-based falloff\n- **Real-time health tracking** with medieval-styled UI\n- **Radar system** showing nearby enemies with color-coded indicators\n- **AI opponents** for testing and single-player practice\n- **Room-based matchmaking** via shareable URLs\n\n## 🎨 Visual Design\n\n### Medieval Fantasy Aesthetic\n- **Cinzel \u0026 Philosopher fonts** for authentic medieval typography\n- **Golden/brown color palette** with wood textures and ornate borders\n- **Particle effects** for dragon abilities (fire, ice, lightning, shadow)\n- **Hit impact effects** with elemental-themed explosions\n\n### Rich 3D Environment\n- **Procedural terrain** with rolling hills and valleys\n- **375+ trees** arranged in realistic forest clusters\n- **35+ mountains** with varied sizes and rotations\n- **25+ floating clouds** at different altitudes\n- **Dynamic lighting** with shadows and ambient effects\n\n## 🚀 Quick Start\n\n### Local Development\n```bash\n# Install dependencies\nnpm install\n\n# Start the development server\nnpm start\n\n# Open browser to http://localhost:3000\n```\n\n### Quick Play URLs\nSkip the lobby screen with URL parameters:\n```\nhttp://localhost:3000?name=YourName\u0026dragon=fire\nhttp://localhost:3000/room/battle?name=Player1\u0026dragon=ice\n```\n\n### Multiplayer Testing\n1. Open multiple browser tabs\n2. Use different names and dragon types\n3. Press **'I'** in one tab to enable AI for testing\n\n## 🎯 Controls\n\n| Control | Action |\n|---------|--------|\n| **WASD** or **Arrow Keys** | Move dragon |\n| **Mouse** | Look around (click to lock cursor) |\n| **Space** | Attack with dragon's special ability |\n| **Shift** | Boost speed |\n| **P** | Pause movement (debug) |\n| **I** | Toggle AI control (debug) |\n\n## 🏗️ Tech Stack\n\n### Frontend\n- **Three.js** - 3D graphics and WebGL rendering\n- **Socket.io Client** - Real-time multiplayer communication\n- **HTML5 Canvas** - Hardware-accelerated graphics\n- **CSS3** - Medieval UI styling with gradients and shadows\n- **Google Fonts** - Cinzel and Philosopher typefaces\n\n### Backend\n- **Node.js** - Server runtime\n- **Express.js** - Web server framework\n- **Socket.io** - WebSocket real-time communication\n- **Authoritative server** - Server-side game state and hit detection\n\n### Architecture\n- **Client-server model** with authoritative game state\n- **Real-time synchronization** of player positions and actions\n- **Server-side damage calculation** to prevent cheating\n- **Room-based multiplayer** supporting up to 10 players per room\n- **WebSocket communication** for low-latency gameplay\n\n### Performance Features\n- **Efficient 3D rendering** with optimized geometry\n- **Client-side prediction** for smooth movement\n- **Level-of-detail** systems for distant objects\n- **Frustum culling** for better performance\n\n## 🔧 Deployment\n\n### Requirements\n- **Node.js 16+**\n- **Modern web browser** with WebGL support\n- **Linux/Windows/macOS** server\n\n### Production Deployment\n```bash\n# Install PM2 process manager\nnpm install -g pm2\n\n# Start with PM2\npm2 start server/server.js --name \"dragonstrike\"\n\n# Configure auto-start\npm2 startup\npm2 save\n\n# Open firewall ports\nsudo ufw allow 3000\nsudo ufw allow 80\n```\n\n### Docker Support\n```dockerfile\nFROM node:18-alpine\nWORKDIR /app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nEXPOSE 3000\nCMD [\"npm\", \"start\"]\n```\n\n### Nginx Reverse Proxy\n```nginx\nserver {\n    listen 80;\n    server_name your-domain.com;\n    \n    location / {\n        proxy_pass http://localhost:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection 'upgrade';\n        proxy_set_header Host $host;\n        proxy_cache_bypass $http_upgrade;\n    }\n}\n```\n\n## 🎮 Game Mechanics\n\n### Combat System\n- **Damage varies by dragon type**: Fire (25), Ice (20), Lightning (30), Shadow (35)\n- **Range-based combat** with 50-unit attack radius\n- **Damage falloff** based on distance from impact\n- **Elimination on 0 health** with victory conditions\n\n### Flight Physics\n- **Continuous forward momentum** - dragons always fly forward\n- **Turning controls** for direction changes\n- **Altitude management** with automatic ground collision prevention\n- **Boost mechanic** for increased speed during combat\n\n### AI System\n- **Combat mode** - actively hunts and attacks nearby players\n- **Patrol mode** - random flight patterns when no enemies detected\n- **Smart targeting** - turns toward enemies and adjusts pitch/yaw\n- **Collision avoidance** - maintains safe altitude automatically\n\n## 🛠️ Development\n\n### Project Structure\n```\ndragonstrike/\n├── client/           # Frontend assets\n│   ├── index.html   # Main game page\n│   └── game.js      # Game logic and Three.js rendering\n├── server/          # Backend Node.js application\n│   └── server.js    # Express server and Socket.io handlers\n├── package.json     # Dependencies and scripts\n├── deploy.sh        # Automated deployment script\n└── README.md        # This file\n```\n\n### Key Classes\n- **DragonStrike** - Main game class managing scenes, players, and networking\n- **GameRoom** - Server-side room management with player state\n- **Dragon Models** - Procedural 3D dragon generation with type variations\n- **AI Controller** - Autonomous dragon behavior for combat and patrol\n\n### Development Commands\n```bash\nnpm start          # Start development server\nnpm test           # Run tests (if implemented)\npm2 logs           # View production logs\npm2 restart all    # Restart all PM2 processes\n```\n\n## 🌍 Browser Support\n\n- **Chrome 80+** ✅\n- **Firefox 75+** ✅  \n- **Safari 13+** ✅\n- **Edge 80+** ✅\n- **Mobile browsers** ⚠️ (limited WebGL support)\n\n## 📈 Performance\n\n### Recommended Specs\n- **CPU**: 2+ cores, 2GHz+\n- **RAM**: 1GB+ available\n- **GPU**: Integrated graphics or better\n- **Network**: Broadband connection for multiplayer\n\n### Optimization Features\n- **LOD system** for distant objects\n- **Texture compression** for faster loading\n- **Geometry instancing** for trees and mountains\n- **Efficient particle systems** for effects\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🎯 Roadmap\n\n### Planned Features\n- [ ] **Power-ups** - Temporary abilities scattered across the map\n- [ ] **Team battles** - 2v2 or 3v3 dragon combat modes  \n- [ ] **Spectator mode** - Watch ongoing battles\n- [ ] **Leaderboards** - Track wins and kill/death ratios\n- [ ] **Custom dragon skins** - Unlockable cosmetic variations\n- [ ] **Mobile support** - Touch controls for tablets/phones\n- [ ] **Voice chat** - Built-in communication for teams\n\n### Technical Improvements\n- [ ] **WebRTC networking** - Peer-to-peer for lower latency\n- [ ] **Server clustering** - Support for larger player counts\n- [ ] **Anti-cheat systems** - Enhanced security measures\n- [ ] **Replay system** - Record and playback epic battles\n- [ ] **Performance profiler** - Built-in FPS and network monitoring\n\n## 🏆 Credits\n\nBuilt with ❤️ using modern web technologies. Special thanks to the Three.js and Socket.io communities for excellent documentation and examples.\n\n---\n\n**Ready to soar into battle? Deploy your server and share the realm with fellow dragon riders!** 🐲⚔️","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentmorris%2Fdragon-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentmorris%2Fdragon-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentmorris%2Fdragon-game/lists"}