Portraits of Pizza (from Chicory)
October 10, 2021
I was recently replaying through a game called Chicory. and came across a part where someone paints the main character. Based on the player's responses, the game gives you a different portrait of Pizza - the main character of the game. Depending on what answers you give to a couple of questions, you get a different portrait of your character. I really liked the variety of options so I figured I'd try to capture all of them so others can see them! (Also I was bored and had nothing better to do).
Confused (RED)
Technical Details
I didn't see the portraits while looking through the game files and I don't know how gamemaker stores it's files. Thus, I replayed the same cutscene over and over again and grabbed a screenshot of the portraits. I was able to skip through most of the dialog using a keyboard macro script so that made things go much faster.
Once I captured the portrait from the cutscene, the image was easy to crop via ffmpeg (which is faster and easier when it comes to batch processing files). Below is the first-pass ffmpeg command I used. This crops the image to be 1370x1370 (which is the portrait resolution in my screenshots).
ffmpeg -y -i {in_file} -vf "crop=1370:1370:596:36" {out_file}
Then with a bit of bash magic (and another ffmpeg filter), I was able to create previews of all the portraits and scale them down to reduce server bandwidth usage. Afterwards, I used Google's cwebp utility to convert the jpegs to webp images which reduces file sizes even more. Browsers that support showing webp images display the webp image while those that cannot display the jpg image.
for color in *.jpg;
do
ffmpeg -y -i $color -vf "crop=1370:1370:596:36,scale=256:256" ${color%%.*}_small.jpg
cwebp ${color%%.*}_small.jpg -o ${color%%.*}_small.webp
done
Buy Chicory
Click the image below to check out Chicory. I did help fund the game via Kickstarter, but I otherwise have no involvement or affiliation with the game.