# Craft++ and BYOND DM compatibility

Craft++ aims to implement documented BYOND Dream Maker semantics in its own
DM-inspired language. It supports indentation-based blocks and selected braced
forms, but its parser is not a complete Dream Maker compiler. Programs using
unsupported DM syntax or compiler features need adaptation.

This document is a working gap map, not a claim of complete compatibility. The
official [DM Reference](https://www.byond.com/docs/ref/contents.html) and
[Dream Maker guide](https://www.byond.com/docs/guide/contents.html) cover a much
larger surface than parser acceptance alone: they specify runtime behavior for
types, lists, built-in objects, clients, files, scheduling, maps, UI controls,
and system procedures.

## Current implementation shape

| Area | Craft++ status |
|---|---|
| Source syntax | Lexer and recursive-descent parser support an indentation-based DM-like subset plus selected braced blocks. Full Dream Maker syntax conformance is not established. |
| Preprocessor | `Preprocessor.cs` implements includes, macros, conditionals, and related directives; exact DM edge cases still need reference-by-reference conformance work. |
| Types and objects | Interpreter has a DM-like type tree, inheritance, object instances, built-in world types, and proc dispatch. DM-specific coercion, initialization, and dispatch edge cases remain. |
| Expressions | Many arithmetic, comparison, logical, path, assignment, list, null-conditional, and interpolation forms exist. Exact operator precedence and DM coercion behavior require systematic comparison. |
| Built-ins | `BuiltinProcs.cs` and interpreter/runtime services implement a broad set, but the official reference enumerates substantially more procedures and object members. Coverage and behavior are not yet complete. |
| Timing and events | Scheduler, sleep/spawn, movement, and several atom callbacks exist. They are not a drop-in implementation of Dream Daemon's tick and event model. |
| Lists, text, files | Core list and text operations plus selected file/savefile APIs exist. Ordering, associative-list, path, encoding, and failure semantics have not been exhaustively matched. |
| Maps, icons, skins | Craft++ reads and edits common project formats and renders supported assets. Native BYOND parsing, rendering, and round-trip compatibility are incomplete. |
| Client and networking | Craft++ has an embedded client and its own networking implementation. It does not implement BYOND's native client/server protocol or native `.dmb` bytecode. |
| Build artifacts | Craft++ `.dmb`/`.rsc` are Craft++ archives. They cannot be used as native BYOND binaries. |

## Major documented DM feature families to close

The official guide is organized around the code tree and objects; verbs,
variables, and procs; predefined datum/client/world behavior; lists; user I/O;
savefiles; realtime events; maps; text and mathematics; server/system control;
user-defined types; and large-project organization. The DM Reference adds
extensive operators, built-in procs and vars, map/icon/sound/image APIs, UI skin
controls, client scripts, appearance effects, and newer language features.

The next compatibility work is to build an explicit reference inventory and
conformance cases, then implement each missing feature in dependency order:

1. Language grammar and expression semantics, retaining indentation blocks.
2. Type construction, initialization, dispatch, coercion, and list semantics.
3. Built-in procedures and built-in object variables/procs.
4. Scheduling, input/output, files, savefiles, and world/client behavior.
5. Map, icon, sound, appearance, and UI behavior.
6. Project/compiler workflow and compatibility diagnostics.

Full parity cannot be inferred from a successful Craft++ build. Each row needs
behavioral comparison against the official reference; BYOND-native binary and
wire-protocol interoperability are separate compatibility targets and are not
provided by the current archive/runtime architecture.

For a code-level, prioritized list of the remaining gaps—including scheduler,
movement, typed input, extension loading, database, regex, savefile, UI, and
interpreter/IR work—see [BYOND_DM_PARITY_MATRIX.md](BYOND_DM_PARITY_MATRIX.md),
“Specific remaining gaps confirmed by source and reference review.”
