Skip to content

Kieeran/FPS-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

655 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Introduction
Built with
Status
Features
How to Run
    In Unity Editor
    From Build (Standalone)
Sample Results
    Scene 1: Sign in
    Scene 2: Lobby List
    Scene 3: Lobby Room
    Scene 4: Play Scene
    Map Overview and Zone Partitioning
    InfoPoints
Links
Current Limitations and Future Development
    Current Limitations
    Future Development
Credits

Introduction

IntroGameFPS This project is a graduation thesis presents the development of a server-authoritative 3D multiplayer FPS game built using Unity and Unity Gaming Services. The system utilizes Unity Relay for serverless connectivity, Netcode for GameObjects (NGO) for real-time synchronization of networked entities, and Unity Lobby for matchmaking and session management.

Beyond basic multiplayer functionality, the project focuses on the integration of AI-controlled bots operating in a networked environment. These bots are fully controlled by the host and synchronized across all clients, ensuring consistent behavior and fairness in gameplay. A hybrid Finite State Machine – Behavior Tree (FSM–BT) architecture is employed to manage bot decision-making, balancing structured state control with flexible behavior execution.

The goal of this thesis is to design, implement, and evaluate a scalable multiplayer FPS architecture that supports both human players and network-synchronized AI agents using modern Unity networking services.

Built with

Status

Completed and closed after successful Graduation Thesis defense. Only minor refinements and bug fixes remain.

Features

  • Map game: the Italy map inspired by Counter-Strike
  • Character model: fully humanoid player model
  • Full basic movement sync (idle, walk, run, jump)
  • Complete weapon system including:
    • Weapon: Rifle, Sniper, Pistol, Melee, and Grenade
    • Core mechanics: shooting, aiming, reloading, and weapon switching
    • Server-authoritative damage system with hit and death effects to prevent cheating
  • Fully playable match loop:
    • Scoreboard system
    • Win/Loss (Victory / Defeat) conditions
  • AI Bots with a hybrid FSM–Behavior Tree architecture:
    • High-level states: Idle, Patrol, Combat
    • Detailed behaviors implemented as BT tasks: LookAround, ScanArea, Seek, AimAtPlayer, Attack
    • Hierarchical pathfinding system combining graph-based and navigation mesh approaches:
      • Dijkstra’s algorithm is used to compute paths between zones at the strategic level
      • Unity NavMesh is used for local pathfinding and movement within individual zones
  • Zone-based spatial reasoning system:
    • ZoneData and InfoPoint structures support area scanning, tactical positioning, and target pursuit
    • These spatial data are baked in the Unity Editor and serialized as ScriptableObjects
    • At runtime, the system loads and use these data to support AI decision-making and navigation processes
    • This approach enables bots to evaluate visible areas, select navigation targets, and perform contextual pathfinding

How to Run

In Unity Editor

  1. Open the project in Unity (version 2022.3+ recommended)
  2. Install all dependencies via Unity Package Manager
  3. Press Play to start

From Build (Standalone)

  1. Ensure the project is linked to Unity Services (Relay + Authentication enabled)
  2. Build the project via File > Build Settings
  3. Launch the game executable

Note: Internet connection is required for Unity Relay to work properly.

Sample results

Scene 1: Sign in

Capture

Scene 2: Lobby List

Capture2

Create lobby with info:

Capture5

Scene 3: Lobby Room

Capture3

Scene 4: Play Scene

Capture4

Map Overview and Zone Partitioning

Screenshot 2026-01-26 132402

Top-down view of the Italy-inspired map illustrating zone partitioning. The map is divided into multiple zones, each managing its own spatial data, forming the foundation for graph-based pathfinding algorithms Dijkstra.

InfoPoints

Screenshot 2026-01-26 132737

Visualization of InfoPoints in the T_Spawn area of the map. Yellow markers - InfoPoints, blue markers - TacticalPoints, and purple markers - PortalPoints. AI bots utilize the spatial data provided by these point types to perform area scanning within the zone.

Links

Current Limitations and Future Development

Current Limitations

  • UI/UX is still basic
  • Player character animations are not natural; movement lacks polish and proper animation logic
  • The game still experiences noticeable lag
  • High latency difference between host and clients causes gameplay imbalance
  • AI bot movement is sometimes unnatural, particularly when navigating sharp corners or narrow passages
  • Area scanning and perception behaviors remain mechanical and lack human-like variation

Future Development

  • Improve UI/UX (main menu, HUD, scoreboard, lobby navigation)
  • Add game modes (Team Deathmatch, Bomb Defusal)
  • Polish character animation, effects, and network optimization
  • Add save/load, progression, or stats system (optional for polish)
  • Develop more advanced combat behaviors (seeking cover, retreating)
  • Enable bots to use other weapon types(Grenade, Melee, ...)
  • Enhance perception systems (sound-based target detection)
  • Increase the number of AI bots, group behaviour

Credits

Developed by Kieeran and Haiseus
Special thanks to:

  • Haiseus - for your help with this project

And thanks to everyone who have helped with suggestions and feedback!

About

A server-authoritative 3D multiplayer FPS built with Unity Services (Lobby, Relay, NGO), featuring host-controlled AI bots synchronized across the network using a hybrid FSM–Behavior Tree architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors