PUPU Level Solver
PUPU
is an incredible addictive puzzle for the Commodore 64. It features 100 levels, and some of those
levels are really challenging.
After being stuck for a few days on level 93, I decided write this simple level solver.
Building and running
The solver is written in Go and uses SDL2, so it should run on Windows, Mac, and Linux. The
following instructions are Linux-only, though
Prerequisites
Make sure you have Go (>1.18) and SDL2 dev libraries installed on your system.
sudo apt-get install golang libsdl2{,-image}-dev
Building pupusolver
go build
You can also build a statically linked verions with
CGO_ENABLED=1 go build -tags static -ldflags "-s -w"
Running pupusolver
To run pupusolver, you need to pass the level data on the command line via the --level flag.
Every tile is represented by a different character:
- 'H' -> Heart tile
- 'D' -> Diamond tile
- 'T' -> Triangle tile
- 'R' -> Ring tile
- '1' -> Cross #1 tile
- 'S' -> Sandglass tile
- '2' -> Cross #2 tile
- 'F' -> Frame tile
- '#' -> Wall
- 'P' -> Background/Pattern
- '.' -> Empty
To run it with level 95 for example, just do this:
./pupusolver --level="
PPPPPPPPPPPP
PPPPPPPPPPPP
PP#######PPP
PP#HRT.D#PPP
PP#THR.R#PPP
PP#1##.H#PPP
PP#D.D.##PPP
PP####.#PPPP
PPP##1.#PPPP
PPPP###PPPPP
PPPPPPPPPPPP
PPPPPPPPPPPP
"
Alternatively, you can also just pass a screenshot from VICE (Menu "Snapshot", "Save/Record metadata")
in PNG format using the --screenshot flag. pupusolver will then reconstruct the level data from
that screenshot.
You can control the size of the window with the --zoom flag, which controls the zoom-factor when drawing
the tiles. Valid values are integers between 1 (no zoom, 16x16 pixel per tile) and 10 (160x160 pixel per tile)
Credits
PUPU tiles were taken from PUPU with the permission of PUPU's author Omega
License
Copyright (c) 2024 Andreas Signer.
Licensed under the MIT License.