Project Details: 2D Roguelike Multiplayer
Project Information
- Category: Multiplayer Game (Co-op)
- Role: Backend Lead & Gameplay Developer
- Tech Stack: Unity, C#, Photon PUN 2
- Backend: Node.js (Express), Firebase
- Project date: Oct 2025 - Jan 2026
- Source Code: View on GitHub
Project Overview
This project is a fast-paced 2D Action Roguelike designed for online co-op play. The core challenge was to bridge the gap between complex action mechanics (dashing, hitboxes, projectiles) and real-time network synchronization.
As the Backend Lead, I architected a Node.js API to handle persistent player progression while collaborating on the Unity client to implement high-performance gameplay systems. We utilized Photon PUN 2 to manage the networking layer, ensuring a seamless experience for multiple players in the same dungeon instance.
Technical Implementations
Finite State Machine (FSM)
Managed intricate character behaviors (Idle, Attack, Dash, Hit) using a modular FSM to ensure predictable logic across the network.
Network Synchronization
Implemented RPCs and OnPhotonSerializeView to sync health, combat states, and room properties via Photon PUN 2.
Performance Optimization
Utilized Object Pooling for projectiles and particle effects to minimize Garbage Collection spikes during intense combat.
Backend Integration
Designed RESTful APIs using ExpressJS for secure authentication and cloud-based data persistence with Firebase.
Challenges & Lessons Learned
1. Handling Network Latency
Challenge: In a fast-paced roguelike, even 100ms of lag makes combat feel "unfair".
Lesson: I learned to implement Client-side Prediction and Interpolation. Instead of waiting for the server, the client previews movement and reconciles later, making the experience much smoother for players.
2. Decoupling Game Logic
Challenge: As features grew, the code became "spaghetti", making it hard to fix bugs in multiplayer.
Lesson: I applied the Observer Pattern and Event-Driven Architecture. This allowed the UI and Audio systems to react to gameplay events (like player hit) without being tightly coupled to the combat logic.
3. Team Collaboration (Git Flow)
Challenge: Two people editing the same Unity Scene often caused merge conflicts.
Lesson: We switched to using Prefabs for almost everything and followed a strict Git Branching strategy. This taught me how to coordinate tasks effectively in a professional dev environment.