Project Page | Ghost Banishers
Ghost Banishers
Published: Oct 7th, 2024 | Updated: Nov 1st, 2024
Introduction
Welcome to the Project Page for Ghost Banishers, 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 it's core features, strengths, and limitations, as well as summary of the key technical challenges and how I overcame them. Finally, this article will conclude with a reflection on what I learnt and future plans for the project. Code samples can be found at the end of this page.
Concept
Ghost Banishers is a cooperative VR game which tasks players with solving a puzzle to banish ghosts lurking in the darkness. Players are required to light candles and place them onto pedestals, but must ensure that the flame colour of each candle is correct for the pedestal it is placed on according to the rules laid out in the player's rule book. New flame colours can be created by mixing flame colours together, however the colour mixing rules may vary depending on the current puzzle sequence in play which is randomly selected at the beginning of each game. The puzzle sequence can be identified by players by asking the VR user to locate a series of specific symbols (shapes) that are present on certain pedestals and relaying what symbols they see to the player with the rule book so that the puzzle sequence can be determined.
This game originated from a larger collection of ghost-banishing minigames designed to be played by six players using only one VR device. This unique restriction forced players to work in close collaboration with each other, encouraging efficient communication and teamwork in order to succeed, creating a frantic yet very engaging gameplay experience.
Tech Stack
- Engine/Framework/Library: Unity (2022.1.16)
- Programming Language: C#
- IDE: JetBrains Rider
- Operating System: Windows
- Platform: Oculus Quest 2
My Contributions
- Design and development of the candle puzzle
- Flame colour mixing rule system
- Flammable system
- Haunting system & enemies
- VR setup
Key Game Mechanics
- Flame Colour Mixing - Flame colours can be mixed together to create new colours, the mixing rules of which are defined in the players' rulebook.
- Flammable Object System - A dynamic flammable system that enables 'flammable' objects including matchsticks, fire pots, and candles to be ignited and easily ignite with each other when touching.
- Dynamic Puzzle Sequences - Each game begins with a randomly selected puzzle sequence that the players can figure out by identifying symbols in the gamespace and matching them to pre-defined sequences in the rulebook.
- Haunting System - An underlying AI system that monitors the pacing of the game and spawns ghosts depending on particular player metrics.
- Player Roles - The VR player must work to light candles with the correct flame colours and place them onto specific pedestals, whilst the non-VR players must consult the rulebook and monitor the VR player's projected game display to help guide the VR player through the puzzle.
Technical Challenges
Flame Colour Mixing Rule System
One of the key technical challenges in this project was developing the flame colour mixing mechanic. The goal was to create a system which would enable two different coloured flames to be combined together to produce a new colour, and provide an architecture that prohibited easy modification of colour mixing rules. This flexibility was crucial for enabling designers to implement their own colour mixing rulesets, which could then be utilised randomly on each play to add another layer of puzzle complexity.
To address this challenge a rule-based system was implemented using C# dictionaries, a generic collection type that stores keys and values. The key components of this system include:
- Rules Dictionary - Stores colour pair combinations within a tuple as the dictionary keys, and their resulting mixed colours as the dictionary values.
- CombineColours Method - Returns the produced colour of two queried colours, if a rule exists for it.
- CheckRule Method - Queries if a colour pair rule currently exists.
- CreateRule Method - Used by designers internally to add new colour pair combinations and their colour outputs to the rules dictionary.
- SetRuleset Method - Allows designers to define multiple rulesets with varying complexities.
The system also supported the creation of rules of three levels of rule complexity:
This approach allowed for easy definition and modification of colour mixing rules, and offered a performative approach through the use of dictionaries and it's quick lookup capabilities.
The full code sample can be found by clicking the button below:
Strengths
- Fun Flame Mixing Mechanic - Blending together different coloured flames to produce new colours is a fun and engaging mechanic that is well-suited to the VR nature of the game.
- Engaging Co-op Experience - The gameplay loop serves a cooperative experience well, with the VR player being responsible for navigating the gamespace and completing the puzzle directly, whilst other players must consult the rulebook and monitor the projected game display to help guide the VR player through the puzzle.
- Challenging Puzzles - The puzzle features a sufficent level of depth which is simple yet challenging given the fast-paced nature of the game.
Limitations
- Lack of VR Passthrough Integration Into Gameplay - The game lacks any integration of VR passthrough within gameplay. Integrating this into gameplay could involve requiring the VR player to first draw out their gamespace and then having the game dynamically spawn key gameplay items such as candles onto real-world furniture such as a table or shelf.
- Lack of Haunting Rules - Currently the games haunting system only features a single rule for passively increasing the haunt meter over time. The game would benefit from a more comprehensive set of rules to promote better pacing and challenge for players depending on their performance to encourage replayability.
- Puzzle Sequences Can Be Identified Too Quickly - Identifying which puzzle sequence is currently in play is too easy. Symbols should instead be hidden within the level for players to find to provide an increased challenge.
Learning Highlights
-
Design Patterns
- Rule pattern
- State pattern
-
System Design
- Modular architectures
-
Data Structures
- Tuples
- Dictionaries
-
VR
- Head and Motion Tracking
- Object Interaction
- Oculus Quest 2 Support
-
Editor Tools
- OnValidate (function)
Conclusion
This project served as a great introduction to VR game development. Developing this game as part of a nine-person team was certainly a challenge but helped strengthen my ability to work effectively with others. The result of this project was an engaging, cooperative VR experience that required every player to work together in unison to solve the games puzzles and banish the ghosts for good.