dmi_read 0.1.0 copy "dmi_read: ^0.1.0" to clipboard
dmi_read: ^0.1.0 copied to clipboard

Dart 1 only

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

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.

0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

ISC (LICENSE)

Dependencies

archive, image, string_scanner

More

Packages that depend on dmi_read