The first puzzle


Somehow, I wasn’t uploading my devlogs for this game in the right place, but starting now they’ll be here! I’ll try to move the previous ones over later. For now, let’s talk about the first puzzle I worked on.

Puzzle Overview

The puzzle is part of the game’s detective theme and involves identifying the correct suspect using clues provided by an AI. It’s designed to flow naturally with the story, requiring the player to:

  1. Interact with an object (like a document scanner) to scan and reveal a list of suspects.
  2. Use clues to narrow down the list to one suspect.
  3. Present the correct suspect to the AI to progress the quest.

Initial Standalone Puzzle Implementation

At first, I focused on creating the puzzle logic as a standalone feature without worrying too much about integration. This included:

  1. Suspect Data:
    • I created a SuspectData ScriptableObject to define each suspect’s attributes, like:
      • name (the suspect’s name).
      • worksInFinance (a boolean to indicate if they’re part of the finance department).
      • frequentsClubs (another boolean for their habits).
      • wasCitedForIntoxication (the key clue for this puzzle).
  2. List UI:
    • I set up a UI to display the suspect list. Each suspect was shown as a row in the list, with placeholder data for testing.
    • The goal was to update this list dynamically as the player interacted with the puzzle.
  3. Document Scanner Interaction:
    • I wrote a script for the scanner that would decrypt the suspect data when the player interacted with it. This included:
      • Showing the suspect list UI.
      • Highlighting suspects based on the clues provided by the AI.

At this stage, the puzzle logic worked but wasn’t connected to the quest system or dialogue, and the presentation needed work.

Integrating with Dialogue and Quests

The next step was tying the puzzle into the larger systems. Here’s how I did it:

  1. Quest System Integration:
    • I made it so completing the puzzle would progress the active quest. This required:
      • Updating the QuestManager to handle quest progression based on puzzle completion.
      • Adding a reference to the QuestData object in the puzzle scripts.
  2. Dialogue Integration:
    • The AI character provided clues and confirmed the correct suspect. To do this, I:
      • Updated the DialogueManager to interact with the puzzle system.
      • Added dialogue nodes that would trigger when the player completed the puzzle or made mistakes.
  3. Triggering the Next Step:
    • Once the player identified the correct suspect and showed it to the AI, the quest system would trigger the next step in the story. This part felt rewarding to implement because it tied everything together.

Improving the UI

The suspect list UI needed a lot of work to make it intuitive and visually appealing. Here’s what I focused on:

  1. Dynamic Updates:
    • The list would update in real-time as the player scanned the document and decrypted more data. This gave a sense of progression and feedback.
  2. Highlighting Clues:
    • I added a feature to highlight suspects with certain attributes (e.g., intoxication citations) to guide the player.
  3. Cleaner Layout:
    • I refined the layout with clear labels and consistent spacing, so it was easier to read and navigate.

Challenges and Lessons Learned

This puzzle was a big learning experience for me, and there were a few notable challenges:

  1. Integrating Systems:
    • Getting the puzzle to interact seamlessly with the quest and dialogue systems was trickier than I expected. Debugging these interactions took a lot of time but made the systems feel cohesive.
  2. Dynamic UI Updates:
    • Making the suspect list update dynamically without breaking the layout was a challenge. I learned a lot about Unity’s UI system while solving this.
  3. Balancing Simplicity and Challenge:
    • I wanted the puzzle to be intuitive but still require the player to think. Striking this balance took some iteration and playtesting.

Final Thoughts

The first puzzle was a lot of work but incredibly rewarding to see in action. It now feels like a natural part of the game, blending gameplay, story, and progression. I’m proud of how it turned out but see plenty of room for improvement:

  1. The suspect list UI could use more polish, like animations or sound effects.
  2. I’d like to add more puzzles like this, with increasing complexity.
  3. Playtesting feedback will be crucial for refining the balance and making sure the puzzle feels fair and engaging.

Get NeoNoir

Leave a comment

Log in with itch.io to leave a comment.