Back to .md Directory

copilot-instructions

Documents the architecture, rendering, quest system, and build command for a C#/.NET 10 ASCII console adventure game with a C++ native library.

May 2, 2026
0 downloads
0 views
ai copilot
View source

What this file does

Documents the architecture, rendering, quest system, and build command for a C#/.NET 10 ASCII console adventure game with a C++ native library.

When to use it

  • Starting a new ASCII console game in C# with flicker-free rendering
  • Designing a quest system with per-level objectives
  • Setting up a mixed C# and C++ project with native sound effects
  • Defining project conventions for a team or open-source game

Assumes this stack

C#.NET 10C++17ANSI escape sequenceskernel32 Beep

Copilot Instructions - Sariq: Thief of the Ancient Sands

Project Overview

Sariq (Arabic for Thief) is a Middle East-themed ASCII console adventure game built with C# (.NET 10) and a C++ native library. The player is a desert thief navigating 5 levels.

Architecture

  • Program.cs - Entry point
  • GameEngine.cs - Main loop, state machine, ANSI escape setup, quest integration
  • Player.cs - Player state (icon: crossed swords)
  • Enemy.cs - 7 enemy types with factory methods
  • EnemyAI.cs - Per-type AI behaviors
  • Item.cs - Collectibles: Gold, Potion, Key, Compass, Gem, Scroll
  • LevelFactory.cs - 5 hand-crafted levels
  • Renderer.cs - Buffer-based ANSI renderer (flicker-free)
  • CombatSystem.cs - Turn-based combat with crits/dodges/flee
  • NativeSoundEngine.cs - Sound effects via kernel32 Beep
  • AsciiArt.cs - All ASCII art assets
  • QuestSystem.cs - Per-level quest definitions and tracking

Rendering (Flicker-Free)

  • Uses ANSI escape sequences in a StringBuilder
  • Single Console.Write call per frame
  • EnableAnsiEscapes() enables VT processing on Windows

Quest System

Each level has 3 quests: KillAll, CollectGold, CollectItems, ReachPortal, FindKey, SurviveAboveHp

Conventions

  • .NET 10, C# 14, C++17
  • Top-level statements, file-scoped namespaces, collection expressions
  • Player icon is crossed swords - no religious symbols
  • Static factory methods for Enemies/Items

Building

dotnet run --project Nataf/Nataf.csproj

What's inside

Project overview, architecture with 12 files, rendering technique, quest system, conventions, and build command.

Change this for your project

  • Replace Nataf/Nataf.csproj with your own project path
  • Replace shankar-sachin/sariq with your repository name
  • Replace Sariq and Sariq: Thief of the Ancient Sands with your game title

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Related Documents