Unity 6  ·  URP 17.3  ·  v1.0

Documentation

Build puzzle-adventure games where gameplay is programming.

Drag Execute Reset Solve

Instruction-based programming gameplay — create levels where players compose actions and watch them execute in real time, then extend every system with clean, well-documented APIs.

Manual
Workflows & Guides
Step-by-step walkthroughs for the most common tasks — from first run to writing custom instructions and enemy behaviours.
Overview Create an Instruction Create an Enemy Instruction Audio Setup
Browse guides  →
Scripting
API Reference
Complete class and method reference for every public API — instruction classes, execution context, level managers, and audio systems.
Instruction ExecutionContext LevelManager +10 more
Browse API  →
Quick Start 2–3 min
1
Import the package

Window → Package Manager → Import

2
Open GameMapScene

Assets / Scenes / GameMapScene.unity

3
Press Play

Five tutorial levels are ready to run

4
Edit the Instruction Sheet

Drag instructions from the panel onto the sheet

Overview

Loop Adventure is a complete 2D puzzle-adventure game kit for Unity 6 built around one central mechanic: players program their character by composing sequences of instructions on a visual sheet, then watch the engine execute them turn by turn against enemies, traps, and puzzles. It ships as a fully playable game with five tutorial levels — and every system is cleanly interfaced and designed to be extended without touching engine code.

1
Compose

Drag instructions from the palette onto the sheet — Move, Attack, Block, Combo, and more. Order and direction matter; the sheet is your program.

2
Execute

Hit Play. Each instruction runs as an animated turn; an on-screen pointer follows the sequence in real time, looping back automatically each cycle.

3
Observe

Watch what happened. Did the enemy block? Did the trap fire first? The scene shows you exactly where the logic broke — no guessing required.

4
Adjust

Move an instruction, flip a direction, try a different order. Reset rewinds everything instantly — no penalty, just iteration until the solution clicks.

🎯
Who it's for

Developers building programming-puzzle, logic, or turn-based adventure games. Use the kit as-is — swap art and levels — or extend every system through its public C# APIs.

🧱
Unified architecture

Everything is an Instruction subclass. The same pattern that drives the player's Move and Attack also drives custom enemy behaviours, tile traps, and scripted cutscene events.

🔌
Interface-driven extensibility

All major systems expose interfaces: IInteractable, ITaskReceiver, IPushable, IObstacle. Add a class and a prefab — no engine modifications required.

What's Included

Everything you need to ship a fully playable game — or the foundation to build your own. Every system is self-contained, documented, and designed to be extended with minimal friction.

🧩 19 Built-in Player Instructions

A rich library of ready-to-use actions players can drag onto the instruction sheet and execute immediately.

  • Movement: Move, Jump, Evade, Push
  • Combat: Attack, Heavy Attack, Block
  • Items: Carry, Drop, Throw, Use, Interact
  • Flow control: Combo, Ping Pong, Rotate, Invert, Wait
  • Every instruction supports directional modifiers (Up / Down / Left / Right)
📋 Drag-and-Drop Instruction Sheet

The player's coding interface — intuitive, responsive, and fully animated.

  • Drag, drop, and reorder instructions visually
  • Undo / Redo with 20-step history (Ctrl+Z / Ctrl+Y)
  • Animated pointer that follows execution in real time
  • Speed toggle: 1× and 2×
  • Context-aware Play, Stop, and Clear buttons
⚙️ Turn-Based Execution Engine

A robust runner that keeps player and enemy actions perfectly in sync, turn by turn.

  • Three execution modes: Play, Observe, and Stopped
  • Configurable turn interval — slow down for drama, speed up for arcade feel
  • Parallel task scheduling for simultaneous enemy actions
  • Non-destructive execution via ExecutionContext — the scene state is restored on Reset
  • Per-turn validation with automatic failure detection
👹 Enemy AI System

Enemies that think and act every turn, with the same extensible instruction pattern as the player.

  • 5 built-in enemy behaviours: Move, Attack, Block, Shoot, Wait
  • Shoot fires a live projectile that travels across the grid and deals damage on impact
  • Enemy health bar and action-indicator HUD out of the box
  • Enemies run their sequences in parallel with the player's turn
  • Add new behaviours by extending EnemyInstruction — one class, one prefab
📦 Interactive World Objects

Five ready-made prefabs the player can discover, collect, carry, and manipulate to build environmental puzzles.

  • Pickup: automatically collected when the player steps on it
  • Chest: manually activated to collect its item reward
  • Carry object: pick up a crate, carry it, and throw it to reach new positions
  • Pushable block: shove heavy objects onto pressure plates or into gaps
  • Door: togglable obstacle with optional key requirement
⚠️ Tile Traps

Grid-embedded hazards that activate every turn as parallel tasks, in perfect sync with the player and enemies.

  • Pressure Plate: detects the player or any obstacle on its tile; fires OnActivated / OnDeactivated events
  • Appearing Spikes: cycles through a configurable array of safe and lethal stages each turn
  • Both register automatically — no manual wiring to the task scheduler
  • Connect plates to doors, bridges, or any UnityEvent receiver in the Inspector
🎒 Inventory & Equipment

A complete item system with stackable slots, gear stats, and visual feedback.

  • Fixed-slot inventory with item stacking
  • 5 equipment slots: Weapon, Armor, Helmet, Shield, Boots
  • Stat modifier system — attack, defense, speed
  • Active effects controller with on-screen visual notifications
  • Fully serialized for automatic save and restore
🗺️ World Map & 5 Tutorial Levels

A ready-to-play game flow — from the hub map through five hand-crafted teaching levels.

  • GameMapScene hub with level markers and unlock states
  • 5 tutorial levels covering movement, combat, items, and sequences
  • Level entry and exit managed by WorldMapManager
  • LevelInfo ScriptableObjects make adding new levels straightforward
🏆 Level Goals & Challenges

Per-level constraints that add depth and replayability beyond simply reaching the exit.

  • Instruction Count goal: complete the level using no more than N instructions on the sheet
  • Loop Count goal: limit how many times the sheet can loop before the run fails
  • Each goal has its own HUD indicator and pass/fail state
  • Goals are ScriptableObject assets assigned per level — no code needed to configure them
  • Extend the base LevelGoal class to add custom win/fail conditions
💾 Save / Load System

Persistent progress that survives game restarts — zero setup required.

  • JSON-based save file written to the platform's persistent data path
  • Saves level progress, inventory, discovered equipment, and audio settings
  • Data is written automatically on level completion and on game close
  • SoundSettings records each AudioMixer parameter the first time it is changed
🔊 Audio System

Persistent volume settings and smooth music transitions — wired up and ready to go.

  • SoundManager singleton restores all AudioMixer settings from the save file on startup
  • MusicManager crossfades between tracks across scene loads
  • GameOptionsMenu_SoundSlider: drop-in volume slider — reads the mixer on Start, delegates changes to SoundManager
  • Volume preferences survive game restarts; new parameters are recorded automatically
🛠️ Developer-Ready Codebase

147 C# scripts written to professional standards — easy to read, extend, and maintain.

  • Consistent LoopAdventure namespace across every script
  • Full XML documentation on every public class and method
  • Interface-driven design: IInteractable, ICarryObject, IPushable, ITaskReceiver
  • Custom inspector attributes: [ReadOnly], [ShowIf], [TypeName]
  • Zero TODO / FIXME markers — production-quality, not a demo
Package Contents
Assets/Prefabs/
70+ ready-to-use prefabs — enemies, interactables, player instructions, and all UI panels.
Assets/Scenes/
GameMapScene hub and 5 tutorial levels covering every core mechanic.
Assets/Scripts/
147 C# scripts organized by system: Instructions, Managers, Player, Enemies, UI, and more.
Assets/Scriptable Objects/
Item, equipment, and level databases as ScriptableObject assets — no code needed to add entries.
Assets/Sounds/
Kenney RPG and UI audio packs (CC0 license) — free to use in commercial projects.
Assets/Sprites/
Character, tile, and UI art — everything visible in the tutorial levels.
Assets/Animations/
Animation controllers for the player character, enemies, and UI elements.
Assets/Documentation/
This documentation site — manual, scripting API reference, and how-to guides.

Questions or feedback?

Bug reports, feature requests, and integration questions are all welcome.

delambert1993@gmail.com