Passpartout Printer

Draws images into the game Passpartout: The Starving Artist.

Drawing our favorite crab. Original draw time 7 minutes.

This application has one of two main operating modes:

Dependencies

On Linux, you may need to install the libxdo development libraries.

On Ubuntu: apt install libxdo-dev

On Fedora:

dnf install libxdo-devel

Downloading and Compiling

The easiest way to get passpartout_printer installed is to use cargo install:

cargo install passpartout_printer

If you have a need to build from source, you can build it as follows:

git clone https://github.com/ostrosco/passpartout_printer.git cd passpartout_printer cargo build --release

Configuration

Before the application can draw to the easel in-game, a configuration file needs to be created with the screen coordinates of in-game elements. To do this:

A prompt will appear in the console to walk through the elements to click to configure the program. Upon completion, a "coords.json" file will be created in the top-level directory.

Configuration Tips

Usage

``` Passpartout Printer 1.1.0

USAGE: passpartout_printer [FLAGS] [OPTIONS]

FLAGS: --configure Configures the application with coordinates in-game. --enable-dither Enables dithering to reduce color banding but increase draw time -h, --help Prints help information --no-scale Disable scaling of the input image. -V, --version Prints version information

OPTIONS: -i, --image Input image to use -w, --mouse-wait Specify the time to wait between mouse actions ```

Pressing Left Control + Space will pause or resume printing.

Deciding on a Wait Time

The speed in which passpartout_printer can draw to the easel is limited by the frame rate in-game. The default wait time between mouse operations is 7ms which assumes a frame rate of around 142 FPS. To measure your in-game frame rate, ensure that the Steam overlay is enabled and that the In-Game FPS Counter is enabled. Initial observations have shown that the FPS can drop between 5% to 15% when drawing, so it's best to go a little slower than the max FPS. Wait times of 5ms or less seem to cause severe input errors regardless of FPS.

Window to enable the FPS counter

Dithering

Dithering can greatly improve the image quality at a significant performance tradeoff by reducing color banding. Expect dithering to increase the draw time by 2 to 4 times depending on the complexity of the input image.

Without Dithering | With Dithering :---------------------------------------------:|:------------------------------------------: | Draw Time: 1 hour at 7ms wait time | Draw Time: 3.5 hours at 7ms wait time

Examples

There are examples in the project that demonstrate the Shape Drawing Mode of the application. To run them:

cargo run --release --example draw_house

In-Game Screenshots

Graffiti - Artist Unknown. Dithering disabled. 1 hour draw time at 6ms wait.

Lotus Pond - Jessica T. Hamilton. Dithering enabled. 2 hour 45 minute draw time at 6ms wait.

Mona Lisa - Leonardo da Vinci. Dithering enabled. 3 hour 30 minute draw time at 7ms wait.