Skip to content

About Scanline Engine

Michael Voitovich edited this page Jun 16, 2026 · 8 revisions

Scanline is a flexible 2.5D game engine with a retro vibe on the facade and a powerful AI at its core. While it was initially inspired by classic 80s third-person adventure games (like early Sierra and LucasArts titles), its modern architecture allows developers to create a wide variety of experiences.

Whether you want to build a traditional text-parser adventure, a pure Point-and-Click quest, or just a general 2D game with (or without) a retro aesthetic, Scanline provides the underlying tools and API to make it happen.

Flexible Interface: Point-n-Click, Text Parser, or Both The engine is built around a hybrid control scheme, but developers have the freedom to choose how players interact with the world:

  • Pure Text Parser: You can create games entirely driven by text commands. Routine actions, complex puzzles, and movement can all be handled via the console, relying on the engine's robust parser and AI Game Master.
  • Pure Point-and-Click: Because the engine uses a shared GameSemanticAPI, you can extend the UI's authority over the game world to build games that rely entirely on mouse interactions, eliminating the need for text input altogether.
  • Hybrid Approach: Combine both to eliminate "pixel-hunting" while retaining creative natural language input. Routine actions (moving, examining) can be done with the mouse, while creative problem-solving is handled via text.
scanline

Visually, the game world is built on a 2.5D perspective displacement model. Objects share standard world coordinates (X, Y), but their final screen position is dynamically calculated based on a Parallax factor and the camera's position (VisualPos = RawPos - Camera * (P - 1)). This creates a deep, multi-layered parallax effect where background objects move slower than foreground elements, bringing 2D scenes to life.

Retro Aesthetics and CRT Filters The visual style of the engine is strictly tailored for pixel-art aesthetics with CRT shaders. To achieve both an authentic retro look and high performance, the rendering pipeline is split:

The game world and the command line are rendered on a low-resolution HTML5 Canvas (2D buffer). A custom WebGL CRT post-processing filter is applied over this image, adding classic distortions, scanlines, gray backgrounds, and chromatic aberrations to simulate a vintage CRT monitor. For comfortable reading of large text volumes, an "open" console mode renders over the game screen in high resolution without any CRT distortions.

The AI-Driven Game Master A major innovation in Scanline is moving beyond the rigid constraints of old text quests by integrating Large Language Models (LLMs). The parser doesn't just check syntax; it acts as a creative Game Master.

Cascade Architecture: Player input is first processed by fast regular expressions (Stage 1.1) and a local NLP.js neural network (Stage 1.2). If a command is complex, unusual, or outside hardcoded mechanics, the LLM cascade (Stage 2) takes over.

Freedom and Atmosphere: If a player attempts a plausible but mechanically unsupported action, the AI doesn't throw a dry syntax error. Instead, it generates an atmospheric, RPG-style narrative response—such as roleplaying the protagonist's reluctance, caution, or fatigue before blaming the game's props.

Puppet Master (NPC AI): The engine supports autonomous non-player characters managed by a dedicated AI. Using scene context, memory, and hidden lore, NPCs can hold dynamic conversations (SAY) and execute structured world actions (MOVE_TO, TAKE, COMMAND) on equal footing with the player.

Importantly, the AI has no direct access to the engine's code and cannot break game logic. Every LLM or Puppet Master decision is converted into a strict, validated Unified Parser DSL plan. This ensures the AI interacts with the world only through permitted system tools (GameSemanticAPI), guaranteeing a safe, secure, and predictable gameplay loop

Flexible deployment options: The Scanline Engine can run as a local development server, be hosted as a static web application, or be compiled into a standalone native desktop executable.

alt

Clone this wiki locally