A hybrid AI-PCG system that uses LLM spatial reasoning to design gated 2D levels. Automate the design-to-prefab workflow and create playable, logically sound dungeons in seconds.AI PCG Dungeon Template is a comprehensive boilerplate designed for developers to explore, improve, and imitate the future of level design. This package provides a foundational pattern for bridging the gap between LLM creativity and rigid gameplay logic.Core Technology:The heart of this package is the integration of an AI Agent's spatial reasoning. By utilizing high-reasoning models like Gemini, the system generates JSON files that represent a complete, logical level layout. These are not random tiles; they are structured designs with specific architectural intent and solvable gating logic.The custom Unity Editor Importer then parses these JSON files, validates them against strict connectivity rules (ensuring a clear path from Spawn to Key, Door, and Exit), and automatically instantiates them into Unity Tilemaps.This package is intended as a "Master Template"—a high-quality starting point that you can study, modify, and extend to build your own unique AI-assisted PCG pipelines.- JSON to Tilemap Pipeline: Automatically converts AI-generated text layouts into ready-to-play Unity levels.- Smart Level Validation: Automatically checks if a level can be finished (ensures the player can actually reach the key and the exit).- Gating Logic Support: Designed specifically to handle "Key and Locked Door" mechanics correctly.- Batch Processing: An Editor window that can scan and import hundreds of JSON files at once.- Ready-to-Play Framework: Includes a player character, camera system, and all interaction logic (collecting keys, opening doors).- Customizable ID Mapping: Easily tell the system which JSON character (like "1" or "spawn") corresponds to which Unity Tile or Prefab. This package is built with a deep integration of Generative AI throughout the entire development lifecycle. 1. AI-Driven Level Design (Core Feature): The project leverages Large Language Models (specifically Google Gemini) to perform complex spatial reasoning. The AI acts as the 'Lead Level Designer,' generating structured JSON matrices that follow specific gameplay rules, architectural archetypes, and gating logic (Keys/Doors). The provided 'Dungeon Generator Skill' is a prompt-engineered expert system that guides the AI in creating logical, solvable top-down environments. 2. AI-Assisted Development: The C# Unity plugin, Python validation scripts, and automated workflows were developed in collaboration with AI agents. This 'Vibe Coding' approach ensured that the software architecture is optimized to interact seamlessly with AI-generated data, making this package a true master template for modern AI-PCG workflows.




