$ show inkle/ink
Ink is a C#-based scripting language and engine for creating interactive narratives in games. It compiles ink script to a JSON-format runtime story that executes text output, choices, variables, and control flow (diverts, tunnels, function calls). The architecture cleanly separates compiler, runtime, and tooling layers, enabling integration with game engines like Unity and web platforms via a command-line compiler (inklecate) and runtime story class. The codebase demonstrates strong engineering practices with reusable components: a parser combinator library (StringParser), lightweight JSON serializer (SimpleJson), and shared INamedContent interface for hierarchical story elements. While parser and state management exhibit some complexity, the design is modular and maintainable, evidenced by recent activity and real-world adoption in games. Maintenance is active with very recent commits, and technical drift is low due to up-to-date .NET 6.0 usage and careful backward compatibility handling.
The LLM identified 3 files worth highlighting for reuse:
A reusable parser combinator library implementing OneOf, Interleave, and other primitives for building recursive descent parsers. Isolated from Ink-specific logic, depends only on System and Collections.Generic, demonstrating non-obvious skill in functional parsing patterns.
A self-contained JSON serializer/deserializer with minimal dependencies (System, Text.RegularExpressions). Used for Ink's story state persistence, it showcases craftsmanship in handling complex types (lists, dictionaries) while remaining easily extractable for other projects needing lightweight JSON support.
A simple interface defining a 'name' property for story elements (knots, stitches, functions). Shared between compiler and runtime layers, it enables polymorphic treatment of named content with zero dependencies beyond System, exemplifying a clean, reusable contract for hierarchical naming systems.