A fast-paced 2-player isometric twin-stick shooter game built with Phaser 3. Battle your friends in local multiplayer with Xbox controller support!
- 🎮 Twin-stick controls - Move with one stick, aim with the other
- 🎯 2-player local multiplayer - Battle against a friend on the same screen
- 🕹️ Xbox controller required - Full gamepad support for both players
- 🎯 Analog sensitivity - Movement speed varies with stick pressure
- 💨 Dash mechanic - Quick dodge with cooldown indicator
- ⚔️ Melee combat - Slash attack that damages enemies and reflects bullets
- 💚 Health system - Each player has 100 HP, bullets deal 25 damage
- 🏆 Score tracking - Keep track of wins across multiple rounds
- 🔄 Automatic round restart - New round starts after each victory
- 2 Xbox Controllers (or compatible gamepads)
- Controller 1
- Controller 2
- Left Stick: Movement (analog - push gently for slow movement)
- Right Stick: Aim direction
- Right Trigger (RT/R2): Shoot bullets
- Left Trigger (LT/L2): Melee slash (50 damage, reflects bullets, 2s cooldown)
- Right Bumper (RB/R1): Dash (2 second cooldown)
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/turtlbattl.git
cd turtlbattl
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser to
http://localhost:5173
npm run build
The built files will be in the dist/
directory.
turtlbattl/
├── src/
│ ├── config/
│ │ └── GameConfig.js # Centralized game configuration
│ ├── entities/
│ │ ├── Player.js # Player entity with controls and health
│ │ └── Bullet.js # Bullet entity with physics
│ ├── managers/
│ │ └── GameStateManager.js # Game state and score management
│ ├── scenes/
│ │ └── GameScene.js # Main game scene
│ ├── utils/
│ │ ├── IsometricUtils.js # Isometric projection utilities
│ │ └── TextureFactory.js # Texture generation utilities
│ └── main.js # Game initialization
├── index.html # Entry HTML file
├── package.json # Project dependencies
└── README.md # This file
- Phaser 3 - HTML5 game framework
- Vite - Fast build tool and dev server
- JavaScript ES6+ - Modern JavaScript features
- Modular design with clear separation of concerns
- Configuration-driven development for easy tweaking
- Physics groups for efficient collision detection
- Error handling throughout for robustness
- Performance optimized with texture caching and smart updates
Feel free to submit issues and pull requests!
MIT