rexpaint

This crate provides functionality for reading and writing .xp files of the Grid Sage Games REXPaint ASCII art editor


Keywords
gamedev, ansi, roguelike, ascii, art, rexpaint, rust
License
WTFPL

Documentation

REXPaint Rust crate

REXPaint logo

This crate provides functionality for reading and writing .xp files of the Grid Sage Games REXPaint ASCII art editor.

This can be used to import the images directly into a game, or to provide tools for generating or manipulating images which are not available inside the software itself.

Examples

A few example tools are provided

  • noise generates turbulence noise, puts it the background of character cells, and writes to noise.xp, which can then be read into REXPaint. The color map used to map noise values to colors is selectable.

Running noise example

  • view prints rexpaint images to the terminal (requires true-color support). This assumes that a codepage 437 font was used.

  • textwrap wraps text into a .xp file of a specified size like

cargo run --example textwrap /path/to/text test.xp 16 8

The text is converted from unicode to codepage 437, undefined characters are replaced with !

See these examples for how to use the library.