Project Page | Drone Interceptors

Drone Interceptors

Published: Nov 2nd, 2024 | Updated: Feb 4th, 2025


Preview of the Drone Interceptors workshop and simulator.

Introduction

Welcome to the Project Page for Drone Interceptors, a group project I undertook as part of my postgraduate diploma in Commercial Games Development. The following sections will give an overview of the project, highlighting the core features, strengths, limitations, and key technical challenges regarding my contributions. Finally, this article will conclude with a reflection on what I learnt. Code samples can be found at the end of this page.

Concept

Drone Interceptors is a single-player, drone simulation game that was built for testing and refining drone interception strategies in realistic combat scenarios. The player is able to tinker and experiment with a wide array of drone configurations within the games drone workshop before deploying them into battle for testing.

My Contributions

  • Drone workshop and customisation system
  • Budgeting system
  • Save system

Tech Stack

  • Engine/Framework/Library: Unity (2022.1.16)
  • Programming Language: C#
  • IDE: JetBrains Rider
  • Operating System: Windows
  • Platform: PC

Technical Challenges

Drone Workshop & Customisation System

COMING SOON

Save System

Each drone build begins with a base set of attributes. As new augments are added during customisation, these attributes are modified. It was crucial to retain these updated attributes not only when transitioning from the customisation stage through to the simulation scene but also across sessions, allowing the data to persist even after the player reboots the game. This was essential for providing the player with the ability to iteratively test their drone configurations.

This meant that we required a save system of sorts, that would enable us to save and retrieve a player's drone configurations from file. Coincidentally at this stage in development we also required a save system for the drone budgeting system, as well as a way to preserve post-match analytic data. Due to these additional needs, it made sense to us to build a singular agnostic system that was flexible in the different types of save data that it could support.

Building this system initially proved to be a challenge. The system needed to be lightweight and easy to use, as well as flexible and extensible should new types of save data need to be introduced later on in development. We settled on building a JSON-based system using Unity's JsonUtility as it could provide the lightweightness, readability, and flexibility we were after.

An Inheritance-based Architecture

An abstract base class was made that all saveable data types would inherit from, which we aptly named "SaveData". We then created the following specific data classes:

Creating new save types is as simple as creating a new class and ensuring it inherits from SaveData.

File Operations

We created a class called JsonFileHandler that was designed around our SaveData architecture and served as our core file management system, providing static methods for saving and loading data from a file as shown below.

For type safety and convenience, we opted to use generics for the load method.

The following code demonstrates how straightforward the system is to use:

Combined with Unity ScriptableObjects, an inheritance-based architecture, interfaces, and generics, a robust system was forged that satisfied all of our requirements.

Click the button below to jump to the full code sample found at the bottom of this page.

Strengths

  • Immersive Workshop Environment - The drone workshop is highly detailed and interactive in nature which helps allow the player to feel like a true drone engineer.
  • Clear Presentation of Drone Specs - Drone specificiations are presented in a clear manner and in an engaging way on the workshops whiteboard.
  • Diverse Drone Arsenal - The player can choose from a wide array of drone models and attachments which encourages experimentation.
  • Modular Customisation System - The robust architecture developed for drone customisation allows attachments to be added and removed from a drone with technical ease.

Limitations

  • Workshop UI Scalability Concerns - As the game expands with more drone models and attachments, the UI will have to be revamped to accomodate all the drone models and attachments in a way that is presentable.
  • Unrealisic Drone Size Representation In The Workshop - The true scale of various drone models are misrepresented in the workshop. All models are sized down to fit on the workshop workbench.

Learning Highlights

  • Design Patterns
    • Decorator
    • Factory
  • Data Management & Sorting
    • JSON File Reading/Writing
    • Dictionaries
    • LINQ
  • Unity Concepts
    • Action Events
    • Gizmos
    • Editor Scripts
  • System Design
    • Templates
    • Interfaces

Conclusion

Strikes a balance between gamification and simulation.

An educational tool, offering a playground for exploring drone interception strategies while providing an entertaining experience.

A comprehensive drone workshop for drone tinkering and experiementation.

Code Samples

Core


Drone Customisation Architecture

Core


Decorator System


Attachment System


Workshop GUI/HUD Components and Controllers


Camera & Visualisation


Budgeting System


Save System


Editor Scripts


Other Resources

GitHub Repository