Unity-Multiplayer-PhotonPUN2
๐งโโ๏ธ FPS Zombie Shooter
FPS Zombie Shooter is a first-person survival shooter built in Unity with robust multiplayer capabilities powered by Photon PUN 2. Players must survive endless waves of zombies in a cooperative multiplayer environment, utilizing diverse weapons, strategic positioning, and resource management to achieve maximum survival time.
๐ฎ Game Overview
Step into a post-apocalyptic world where waves of zombies continuously spawn and grow stronger. Team up with up to 6 players online or brave the challenge solo. Each round brings more enemies, testing your shooting skills, resource management, and survival instincts. Purchase health and ammunition from strategic shop stations between waves to stay in the fight.
๐ Key Features
- Seamless Online Co-op: Up to 6 players can join forces using Photon PUN 2 with automatic matchmaking and room creation
- Dynamic Wave System: Escalating difficulty with each wave spawning more enemies, controlled by master client for consistency
- Arsenal & Combat: Multiple weapon types with realistic mechanics including reload systems, ammo management, and weapon sway
- Cross-Platform Support: Supports both desktop (mouse/keyboard) and mobile (touch) input systems
- Survival Mechanics: Health/damage system with visual feedback and shop system for purchasing upgrades
๐ Multiplayer Architecture
Photon PUN 2 Integration
The game implements a sophisticated multiplayer foundation using Photon PUN 2 with automatic connection management, dynamic room creation, and synchronized scene loading. The networking system handles up to 6 concurrent players with smart matchmaking that creates new rooms when existing ones are full.
Network Synchronization Strategy
- Authority Distribution: Master client controls global game state like wave progression and enemy spawning, while individual clients handle personal player data to prevent conflicts.
- Real-Time Communication: Critical events like player damage, enemy deaths, and weapon effects are synchronized using Remote Procedure Calls (RPCs), while persistent states like weapon selection use Photon's Custom Properties system.
- Ownership-Based Updates: Each player only processes input and updates for their own character, with visual representations synchronized across all clients for consistency.
๐๏ธ Technical Implementation
Component-Based Architecture
The codebase follows Unity best practices with modular, single-responsibility components. Player management, weapon handling, enemy AI, and game state are cleanly separated, allowing for easy expansion and maintenance.
Advanced Unity Integration
- Multi-Platform Input: Separate input handlers for desktop and mobile ensure responsive controls across different platforms.
- AI & Navigation: Zombies utilize Unity's NavMesh system for pathfinding and automatically target the closest player in multiplayer scenarios.
- Audio-Visual Systems: 3D spatial audio, particle systems for weapon effects, and synchronized UI elements create an immersive experience across all connected players.
Performance & Quality
- Network Optimization: Ownership validation and efficient update loops reduce unnecessary processing and traffic.
- Defensive Programming: Null checks, early returns, and proper cleanup ensure stable multiplayer performance.
- Cross-Mode Compatibility: Seamlessly supports both online and offline play without architectural compromise.
๐ฏ Technical Highlights
This project demonstrates advanced understanding of networked game development with proper authority distribution, efficient synchronization mechanisms, and robust handling of connection states. The implementation showcases expertise in Unity's core systems including NavMesh AI, Coroutines, Animation systems, and Photon PUN 2 integration.
The modular architecture and cross-platform compatibility reflect strong software engineering principles, making the codebase maintainable and easily extensible for future features and content updates.
Published | 9 days ago |
Status | Released |
Platforms | HTML5 |
Author | SayanNandi |
Genre | Action |
Made with | Unity |
Leave a comment
Log in with itch.io to leave a comment.