A multiplayer aerial combat game featuring drones and planes with realistic physics and network synchronization.
MicroDroneWars is a real-time multiplayer game where players control either drones or planes in aerial combat. The game features:
- Realistic physics simulation for both drones and planes
- Multiplayer support with client-server architecture
- Team-based gameplay with flag capture mechanics
- Smooth network synchronization and state interpolation
- Customizable vehicle controls and physics parameters
The project is built using a client-server architecture with the following key components:
- Built with Babylon.js for 3D rendering
- Custom physics implementation for vehicle control
- State interpolation for smooth multiplayer experience
- Input handling and vehicle control systems
- Built with Colyseus for multiplayer support
- Authoritative physics simulation
- Game state management
- Network synchronization
- Common physics and game state types
- Vehicle settings and configurations
- Network message protocols
- Custom physics implementation for realistic flight dynamics
- Separate controllers for drones and planes
- Collision detection and response
- Ground interaction and terrain following
- Quadcopter-style control
- Hover capability
- Precise movement control
- Particle effects for thrusters
- Fixed-wing aircraft physics
- Control surfaces (ailerons, elevators, rudder)
- Lift and drag simulation
- Engine thrust effects
- Real-time state synchronization
- Client-side prediction and server reconciliation
- Network latency compensation
- Smooth interpolation for remote players
- Node.js (v14 or higher)
- npm or yarn
- Git
- Clone the repository:
git clone https://github.com/yourusername/MicroDroneWars.git
cd MicroDroneWars- Install dependencies:
# Install shared dependencies
cd shared
npm install
# Install client dependencies
cd ../client
npm install
# Install server dependencies
cd ../server
npm install- Build the project:
# Build shared code
cd ../shared
npm run build
# Build client
cd ../client
npm run build
# Build server
cd ../server
npm run build- Start the server:
cd server
npm start- Start the client:
cd client
npm start- Open your browser and navigate to
http://localhost:3000
MicroDroneWars/
├── client/ # Client-side code
│ ├── src/
│ │ ├── game/ # Game logic
│ │ ├── physics/ # Client physics
│ │ └── vehicles/ # Vehicle implementations
├── server/ # Server-side code
│ ├── src/
│ │ ├── physics/ # Server physics
│ │ └── rooms/ # Game rooms
└── shared/ # Shared code
├── src/
│ ├── physics/ # Physics types and base classes
│ └── schemas/ # Game state schemas
BasePhysicsController: Base class for vehicle physicsDronePhysicsController: Drone-specific physicsPlanePhysicsController: Plane-specific physicsPhysicsWorld: Main physics simulation
Vehicle: Base vehicle classDrone: Drone implementationPlane: Plane implementationCollisionManager: Handles collision detection
ClientPhysicsWorld: Client-side physics and state managementMicroDroneRoom: Server-side game room- State synchronization and interpolation
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Babylon.js for the 3D engine
- Colyseus for multiplayer support
- Cannon.js for physics simulation