
Pirate Adventure is an Action RPG multiplayer sample for Photon Fusion - Shared Authority. Explore islands, fight a multi-stage boss, collect loot, and fight AIs with 8 players.Pirate Adventure is a fully playable, multiplayer cooperative Action RPG sample for 8 players built with Photon Fusion’s - Shared Authority topology. Pirate Adventure is frictionless with a drop-in/drop-out multiplayer map which comes with a multi-stage boss battle, RPG-style leveling, item-collection systems and leverages Unity’s NavMesh for dynamic AI pathfinding with a clean finite state machine architecture for enemies and boss encounters demonstrating how to integrate robust multiplayer gameplay features that appeal to modern players.Comprehensive cross-platform input (keyboard, gamepad, mobile UI) is built in, along with networked physics and shared-authority topology for seamless co-op sessions. If you’re looking for a fully featured, scalable starting point for your next Unity project—complete with the technical underpinnings of a polished simple multiplayer adventure—this package shows how to pull it all together.📄 Documentation and Getting Started guide⚡ Key Features ⚡Shared Authority TopologyNo Dedicated Server/Host: All players can own various network objects (like their own characters or AI states).When players leave, any objects they own will automatically transfer authority to the SharedModeMasterClient, ensuring the simulation remains stable.Photon Fusion Add-OnsSimple KCC: Photon Fusion Kinematic Character Controller manages collisions and movement over the network.FSM Add-On: The Finite State Machine system is used for both player animations (idle, attack, run) and enemy AI states (idle, chase, return, attack).NavMesh-Based AISharks rely on Unity’s built-in NavMesh Agents for movement, combined with FSM logic.They detect players in range, chase them, switch to an attack state, and if they lose line-of-sight or defeat the target, they return to a “home” position.Networked Physics & CollisionUses NetworkRunner.GetPhysicsScene() for operations like OverlapCapsule() to detect collectible items.Large objects (e.g., the boss) also integrate with Fusion’s Runner Simulate Physics 3D for consistent collisions across peers.Real-Time Authority TransferFor instance, sword-wielding sharks transfer their “State Authority” to whichever player they’re chasing. This ensures that local collisions and animations for that player appear responsive.Items (gems, barrels, chests) typically have a “master” owner that confirms or rejects pickup/break events.Local vs. Networked ResponsesLocal Feedback: The collecting or attacking player sees immediate effects—particles, sound, or UI updates.Authoritative RPC: An RPC confirms that the event (like picking up a gem) is valid network-wide. This prevents duplicates when multiple players try to grab the same item simultaneously.Multi-Peer Mode for TestingIn the Unity Editor, you can spawn multiple players on the same machine for quick playtesting.The sample uses OnEnableSingleRunner and RunnerEnableVisibility to properly handle which objects render in each peer’s view.UI & Region SelectionRegion Codes can be customized; you can add new ones in the main menu “Region Info” array.Best Region automatically picks the region with the lowest latency for each player.Cross-Platform CompatibilityPC (Windows/Mac), WebGL, and mobile (Android/iOS) are supported out of the box.The same codebase can be built for all platforms with minimal tweaks.Code Organization & ExtensibilityStartGameUtility.cs demonstrates how to spin up a new session or join existing sessions automatically.PirateAdventureSimulationBehaviour ties together the main callbacks (OnPlayerJoined, OnPlayerLeft, OnShutdown) to keep the session consistent when new players connect or existing players exit.Because each piece (AI, players, pickups, boss scripts) is modular, you can easily replace assets or expand mechanics while keeping the underlying networking in place.📄 Documentation and Getting Started guide🤝 Gaming Circle 🤝Join the conversation and become a part of an exclusive community by engaging with the Photon Gaming Circle. Kickstart your project with a robust foundation, enabling limitless creativity with 80+ exclusive samples. Benefit from our fully networked samples library to save time and resources while ensuring the highest quality for your project.Members of the Gaming Circle not only have access to all the samples but also to our latest SDKs, our private Circle Discord, and premium development support. The Photon Gaming Circle is a hub for developers to discuss ideas, seek advice, and collaborate on exciting projects. Dive deeper into multiplayer game development and explore the Photon Gaming Circle today.This asset is governed by the Photon Engine license terms.