Pranav Rajnish

Detective's Gambit

Detective’s Gambit is a blend between a 3D isometric murder-mystery detective game and a card-battler, made in Unity. The player must find clues and talk to suspects, before finally interrogating them through the card-battle. This is an in-progress team project where I am the systems and tools engineer as well as a gameplay programmer. Some of the systems I worked on are the complete dialogue system, player movement and controls, interaction and clue system, and game progression.

Cover of the game Detective's Gambit - A detective looking at a board with strings and card connected to each other.

The biggest feature I worked on in this project was the dialogue system that I made from scratch for the game. We knew that we would need a robust and dynamic dialogue system to facilitate the creation of complex dialogue interactions in our game, which is why I chose to go with a node-based system. I also wanted to make the tool visual so that it was as intuitive as possible for our narrative designer.

I used Unity’s GraphView API to construct a new editor window that displays the current dialogue tree. Each character in the game has its own dialogue tree asset that encapsulates every different possible interaction the player can have with them at any point in the game. Developers can use different types of nodes to create interesting dialogue interactions that change as the game progresses. These nodes are:

  • Root Node: Execution start of the dialogue tree.
  • Choice Node: A certain branch is chosen depending on a boolean parameter that can be set at runtime.
  • Sequence Node: Executes all of its children sequentially. Useful for chaining dialogues together.
  • Input Node: This node is used for player input in the dialogue; it displays options that correspond to its branches.
  • Dialogue Node: This node holds the dialogue information which is displayed in the dialogue box. It has many options and parameters, like gate conditions and update conditions.
Image showing nodes connected in a graph editor in Unity.
Scroll to Top