Draws images into the game Passpartout: The Starving Artist.
This application has one of two main operating modes:
Image Drawing Mode: takes an input image and draws it to the easel in-game.
Shape Drawing Mode: takes a list of coordinates and draws that shape in-game.
git clone https://github.com/ostrosco/passpartout_printer.git
cd passpartout_printer
cargo build --release
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:
cargo run --release -- --configure
to start the configuration process.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.
``` Passpartout Printer 1.0.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
Pressing Left Control + Space will pause or resume printing.
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.
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
There are examples in the project that demonstrate the Shape Drawing Mode of the application. To run them:
cargo run --release --example draw_house
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.