Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Night Draft

A survival-horror pixel-art demo. Navigate a dark house, manage limited ammunition, and eliminate enemies that have inadvertently invaded your home.

Preview

The Night Draft Preview

Quick Facts

  • Project Path: The-Night-Draft/The Night Draft/
  • Unity Version: 2021.3.8f1
  • Graphics Pipeline: Built-in Renderer
  • Target Platforms: Windows, Mac, Linux
  • Status: Playable Demo
  • Genre: Survival Horror
  • Art Style: Pixel Art

Gameplay Overview

You are an unusual house resident tasked with defending against monsters that have wandered into your home. The game emphasizes resource management, tactical combat, and exploration of a multi-floor environment in complete darkness.

Core Mechanics

Movement: Walk freely through the house using keyboard controls. Navigate between floors via stairs and doors.

Combat: Attack enemies using equipped weapons. The base melee weapon is always available. Additional weapons (gun, shotgun) can be found as drop items. Each weapon has limited ammunition; manage your supplies strategically.

Weapons System: The game implements three weapon types, each with distinct behavior:

  • Melee: Immediate, close-range damage. Unlimited use.
  • Gun: Single shots with medium range. Limited ammunition.
  • Shotgun: Spread pattern, close-to-medium range. Limited ammunition.

Weapon implementations use a Visitor-pattern approach, allowing weapons to apply their unique damage behavior to targets consistently.

Enemy AI: Enemies operate within a three-state system:

  • Patrol: Random movement searching for the player.
  • Search: Targeted movement toward the player's last known location.
  • Attack: Engage the player with melee strikes.

Enemies use line-of-sight detection to transition between states.

Item System: Health packs and weapon drops restore health or grant temporary weapons. Items are collected by interacting with them (E key).

Level Progression: The house has multiple floors. Climb stairs to reach upper floors and descend to lower levels. Height affects enemy behavior and resource availability.

Controls

Action Key
Move Forward/Back/Left/Right W / S / A / D
Attack Space
Interact (Pick up items, use doors) E
Pause Menu Esc

How to Play

  1. Start Game: Begin in a safe area with the base melee weapon.
  2. Search and Gather: Explore the house to locate weapon drops and health items scattered across floors.
  3. Combat: When you encounter an enemy, engage it using your current weapon. Keep distance to manage ammunition effectively.
  4. Manage Resources: Watch your health and ammunition. Return to areas with item pickups when supplies run low.
  5. Explore Levels: Navigate between floors to hunt enemies and gather resources.
  6. Survive: Continue eliminating enemies. The game tracks your progress and survival time.

Architecture & Design

See ARCHITECTURE.md for comprehensive documentation of game systems, design patterns, and extensibility guide.

Quick Summary:

  • Component-based architecture with interface-driven design
  • Key systems: Unit (base), Player, Zombie (with state machine AI), Weapon (Visitor pattern), Item, Level
  • Design patterns: Visitor Pattern (weapons), State Machine (enemy AI), Component Pattern, Interface-Based Architecture
  • For detailed architecture, systems breakdown, and extensibility guide, see ARCHITECTURE.md

Project Structure

Assets/
├── Scripts/
│   ├── Entities/               # Unit, Player, Zombie, AI behaviors
│   │   ├── Player.cs
│   │   ├── PlayerMove.cs
│   │   ├── PlayerAttack.cs
│   │   ├── Zombie.cs
│   │   ├── ZombieAttack.cs
│   │   ├── Searcher.cs         # Line-of-sight detection
│   │   ├── Patrol.cs           # Movement control
│   │   ├── Unit.cs             # Base class
│   │   └── UnitAnimator.cs
│   ├── Items/                  # Weapons, bonuses, pickups
│   │   ├── Weapons/            # Gun, ShotGun, Melee
│   │   ├── Bonus.cs
│   │   ├── HealBonus.cs
│   │   ├── WeaponBonus.cs
│   │   └── WeaponComponent.cs
│   ├── Interfaces/             # Contract definitions
│   │   ├── IDamageable.cs
│   │   ├── IHealable.cs
│   │   ├── IWeaponUser.cs
│   │   ├── IBonusCollector.cs
│   │   └── IInteractive.cs
│   ├── Level/                  # Floor, progression
│   │   └── [Level-specific logic]
│   ├── Menu/                   # UI, pause, start screens
│   ├── Objects/                # Interactive environment
│   │   ├── Door.cs
│   │   └── BedsideTable.cs
│   ├── Stairs/                 # Floor transition
│   ├── Tools/                  # Utilities, helpers
│   └── UI/                     # HUD, menus
├── Scenes/                     # Game scenes
├── Prefabs/                    # Reusable entities (Player, Zombie, Weapons, Items)
├── Materials/                  # Shaders, material definitions
├── Sounds/                     # Audio clips, music
└── Images/                     # Sprites, UI graphics

Installation & Setup

Prerequisites

  • Unity 2021.3.8f1 or later
  • C# 9.0 support
  • Windows, macOS, or Linux

First Run

  1. Clone or extract the repository.
  2. Open Unity Hub and add the project from The-Night-Draft/The Night Draft/ path.
  3. Load the project in Unity Editor.
  4. Open the main scene from Assets/Scenes/.
  5. Click Play to start the demo.

Building & Deployment

Windows

  1. Navigate to File → Build Settings.
  2. Select PC, Mac & Linux Standalone as the target platform.
  3. Set Target Platform to Windows.
  4. Click Build and select an output folder.
  5. Run the generated .exe file.

macOS

  1. In Build Settings, select PC, Mac & Linux Standalone.
  2. Set Target Platform to Mac OS X.
  3. Click Build and create the application bundle.
  4. Launch the .app from Applications folder.

Linux

  1. In Build Settings, select PC, Mac & Linux Standalone.
  2. Set Target Platform to Linux.
  3. Click Build and select output directory.
  4. Execute the generated binary from terminal.

Development Guide

Adding New Enemy Types

  1. Create a new script inheriting from Unit.
  2. Implement IDamageable and IHealable if needed.
  3. Add custom AI behavior using the same state machine pattern as Zombie.
  4. Create a prefab and add to spawning logic.

Adding New Weapons

  1. Create a new class inheriting from Weapon.
  2. Override OnUse() to define firing behavior.
  3. Attach a Bullet prefab or collision script for damage delivery.
  4. Create a WeaponBonus prefab referencing the new weapon.
  5. Add to item spawning pools.

Modifying Game Balance

Adjustable parameters are exposed in the Inspector:

  • Unit._hp: Entity health values
  • Zombie._walkSpeed: Enemy movement speed
  • Weapon.damage: Weapon damage per hit
  • Weapon._rechargeTime: Weapon cooldown between shots
  • Item spawn rates in level managers

Known Issues & Limitations

  • Demo Status: This is a playable prototype, not a feature-complete game. Core mechanics are functional but may lack refinement in edge cases.
  • Audio: Sound effects and music are not fully integrated in this version.
  • Performance: Optimizations for larger enemy counts and extended play sessions may be needed on lower-end systems.
  • Lighting: The game runs in darkness; visibility depends on player proximity and light sources.

Save System

The game does not implement persistent save functionality in this demo version. Progress is limited to current session.

Future Features

  • Persistent save/load system
  • Additional enemy types with varied behaviors
  • Boss encounters
  • Weapon upgrade mechanics
  • Story progression and cutscenes
  • Difficulty settings

License

See LICENSE file in the repository.

Credits

  • Concept & Design: Game Design Vision
  • Art & Animation: Pixel art assets and character animation
  • Sound Design: Audio implementation pending
  • Development: Unity 2021.3.8f1

Controls (summary)

  • Keyboard & gamepad supported — consult the in-project Input settings.

Project structure

Top-level folders relevant to documentation:

  • Assets/Scenes/ — game scenes
  • Assets/Scripts/ — organized by system (Player, Enemy, Weapons, Level)
  • Assets/Prefabs/ — reusable game objects
  • Assets/Sprites/ — pixel art assets
  • Assets/Settings/ — input, project settings

Installation & first run

  1. Open the project in a Unity Editor matching ProjectSettings/ProjectVersion.txt.
  2. Allow Unity to import assets and compile.
  3. Open Assets/Scenes/SampleScene (or specified starting scene) and press Play.

Build & deployment (summary)

  • Target platforms depend on installed build modules; verify via File → Build Settings.
  • Configure graphics pipeline and player settings before building.

Save system

  • Save files and locations are implemented inside the project; inspect Assets/Scripts/Save for format and read/write locations.

Known issues & limitations

  • Unity version compatibility must match ProjectVersion.txt.
  • Platform-specific behaviors unverified — test builds before release.

Credits

Project assets and authors are included inside the repository metadata and Credits file (if present).

About

A survival-horror pixel-art demo.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages