DMI Read

A Dart library for reading .dmi spritesheet files used by the BYOND platform.

This library does not depend on dart:io, and thus can be used both in browser and the VM.

Current version has been tested against dmis generated by BYOND version 510.1347.

Background

BYOND is a proprietary game engine and platform, allowing creation of 2D tile-based multiplayer games through its Dream Maker component.

In BYOND game sources, sprites are kept in .dmi files. .dmi files are sprite sheets in a PNG file with a zTXt chunk containing metadata which describes the frames in the sprite sheet. An image viewer or editor will generally be able to open the whole sprite sheet, however, figuring out where the individual sprites are, and how they are grouped requires parsing the attached .dmi metadata.

Example

Print the names of every state in foo.dmi:

DmiSheet sheet = new DmiSheet.fromBytes(
    await new File('foo.dmi').readAsBytes());
sheet.states.forEach((state) {
  print(state.name);
});

For a slightly longer example, see dmi_read_example.dart.

Project

dmi_read is free software licensed under the ISC license. See the LICENSE file for details.

Bug reports and pull requests can be filed at github.com/DeeUnderscore/dmi_read.

Libraries

dmi_read

Library for parsing and reading dmi files used by the BYOND platform.