Let’s Make Small Games – Series #1

The game design document.

Game Design Document: Code Guessing Game

Unity 6 (URP) – Technical and Structural Guidelines

1. Overview

The game concept places the player in the role of a bomb disposal specialist who must guess a six-digit code to defuse a bomb before time or attempts run out. The game is being developed for Unity 6 using Universal Render Pipeline (URP) and targets PC/Mac platforms.

The goal is to create an engaging, challenging experience with high replay value, where progression and a highscore system motivate players to improve their skills.

2. Core Mechanics

  • Code Guessing: The player enters a code (default: 6 digits) via a UI displayed on a laptop screen within the scene.
  • Attempts: Limited, depending on chosen difficulty level.
  • Timer: Countdown starts at the beginning of a level, time is adjusted based on difficulty and optional modifiers.
  • Feedback: Each guess yields feedback according to Mastermind principles—correct digits in correct places, correct digits in wrong places. Clear visual feedback is provided.

3. Main Menu and Navigation

  • Main Menu
    • New Character
    • Continue Career
      • With a chosen Character that still is alive
        • Progress through multiple levels with increasing difficulty, including statistics and log.
    • Highscore (Wall of Fame)
      • Active operators
      • Fallen operators
    • Settings
      • Difficulty (Beginner, Normal, Expert, Custom)
      • Sound Effects Volume
      • Music Volume
      • Scene Brightness (time of day adjustment – using Cozy Weather 3)
    • Exit
      • Saving progress and exit to Desktop (PC/Mac)

4. Character Creator

  • Features: Create and save player characters with appearance, gender, clothing, and accessories.
  • Integration: Support for Advanced People 2.0 (initial) and future compatibility with Synty Studios City theme (modular integration for models and accessories).
  • Options: Hairstyles, skin tone, facial features, clothing, accessories, name.
  • Save Functionality: Linked to career mode and highscore system.

5. Difficulty and Modifiers

  • Parameters:
  • Number of code digits (2–9, default 6)
  • Number of allowed attempts
  • Use timer (yes/no)
  • Starting time (e.g., 2–5 minutes)
  • Reward on success (added time, slower countdown)
  • Punishment on failure (removed time, faster countdown)

Modifiers: Timer may be dynamically adjusted based on player performance (e.g., bonus time for quick correct guesses, penalty for incorrect guesses).

Customization: Players can create custom difficulty profiles via the settings menu.

6. Scene Start and Camera Movement

  • Scene Start: The character is placed in front of a bomb and laptop at a table in a realistic environment.
  • Camera Movement: Pegasus is used for dynamic movements—flying into the scene, around the player, then settling into an over-the-shoulder view for code entry; dramatic shifts on bomb detonation.
  • Camera Angles: Overview, close-up on the laptop, dramatic angles during bomb explosion.

7. GUI and UI

  • Code Input: UI is displayed on the laptop screen in the scene; player interacts via mouse/keyboard or gamepad.
  • Feedback: Immediate visual indicators for guesses (e.g., colored markers, icons).
  • Design: The laptop’s screen UI is modeled to appear integrated into the 3D world, including text fields, buttons, and feedback panel.

8. Bomb Detonation and Ragdoll Effects

  • Failure: If time or attempts run out, the bomb explodes with sound, particle, and light effects.
  • Character Reaction: The character switches to ragdoll and is thrown back by the blast.
  • Reset: After the explosion, results are shown and the player can retry or return to the menu.

9. Asset Structure

  • Assets/Models/Characters – Character models (Advanced People 2.0, Synty Studios)
  • Assets/Models/Props – Bomb, laptop, table, environment objects
  • Assets/Audio/Music – Music tracks
  • Assets/Audio/SFX – Sound effects, explosions, UI sounds
  • Assets/UI – UI elements, icons, feedback symbols
  • Assets/Materials – Materials and textures
  • Assets/Scenes – Game and menu scenes
  • Assets/Scripts – Source code
  • Assets/Animations – Ragdoll, explosion, character animations

10. Code Structure: Class Suggestions

  • GameManager – Handles game flow, timer, attempts, win/lose conditions.
  • CodeGenerator – Creates random codes based on difficulty.
  • GuessEvaluator – Compares player guesses to the code and returns Mastermind-style feedback.
  • UIManager – Manages code input UI, feedback, and menu navigation.
  • SettingsManager – Stores and loads settings (audio, brightness, difficulty).
  • CharacterManager – Creates and stores characters, interface for Advanced People 2.0/Synty Studios.
  • CameraController – Manages Pegasus integration for camera movement and transitions.
  • HighscoreManager – Handles highscore logic, saves and loads Wall of Fame data.
  • ExplosionController – Handles bomb detonation and ragdoll transition.

11. Summary and Recommendations

This game design document outlines a Unity 6 game where code guessing, feedback, and time pressure are central. The features are modular to permit future expansion (e.g., additional environments, character models, game modes). Use clear folder and class structures for organization. Integrate with established character systems and Pegasus for a professional touch. The UI should be embedded in the game world for maximum immersion. It is recommended to begin with core mechanics and iterate on feedback and progression before expanding further.