0.3.3 • Published 6 months ago

dmi-ts v0.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

dmi-ts

A Typescript package for reading .dmi spritesheet files used by the BYOND platform, ported from @DeeUnderscore's dart library dmi_read.

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.

Install

pnpm install dmi-ts

Example

Print the names of every state in foo.dmi:

const sheet: DmiSheet = DmiSheet.fromBytes(await readFile('foo.dmi'));
sheet.states.forEach((state) => {
  console.log(state.name);
});

Project

dmi-ts 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/asciodev/dmi-ts.

0.3.3

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.3.0

6 months ago

0.2.0

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago