Forum moved here!

# Home / Undying Dusk: a video game designed to be played with Sumatra PDF

Lucas-C

Hi!

After one year in development, I have just released a video game designed to be played with Sumatra PDF Reader…

The game is a 200 000 pages PDF file, with a gameplay based on exploration and logic puzzles,
in the tradition of dungeon crawlers.

The game is set in a fantasy realm where a curse set by the Empress keeps the world in an eternal dusk.
You play a woman who recently found shelter in an eerie monastery.

If you want to know more about it: https://lucas-c.itch.io/undying-dusk

GitHubRulesOK

Note to others
Before you complain that OTHER interactive retro games such as Pong Tetris or Breakout or Activity Books don’t “Play Ball” etc. in SumatraPDF

Those require the insecure use of Adobe (Macromedia) JavaScript or (SWFlash) both favourite targets for malware.

Undying Dusk is a good example of how linear games such as TicTacToe can be well implemented by navigating through FlipFlop (This or That) choices

TicTacToe could potentially require hundreds of thousands of pages. Whilst the logic can be reduced to 18 start pages ending in 126 outcomes (either a draw or win for the computer opponent), the permutations required still need 304 MENACE AI response’s. Due to programming in reflection and rotation, It is not so well suited to this approach, since the “Book” would likely be 10’s of thousands of images. It would of course be trivial using script imbedded in an Adobe PDF.
The simplest of all multistep “Game Books” using just linked images would likely be based on Tower of Hanoi where the starting number can be small with 2 win win outcomes, but made more challenging by adding more levels, just don’t start with the legendary 64 disks or the world will come to an end first (roughly 18.5 Quintillion pages and that’s without the steps inbetween).
in Adobe ActionScript is something like these two published snippets.

public function move(n:int, from:int, to:int, via:int):void
{
if (n > 0)
{
move(n - 1, from, via, to);
trace("Move disk from pole " + from + " to pole " + to);
move(n - 1, via, to, from);
}
}
var textField:TextField = new TextField();
textField.text =  "Goodbye, World!"


As there are two potential starts and optimal 8 moves for 3 disks the number of interactive pages would be about 15/16 with only two “you win” pages. Bump discs to 4 and it exponentially needs more pages (without showing intermediate steps would also be about 16 moves i.e. power of 2) but the result can only be one of 2 pages no mater which disk number is started with. In the child’s toy version the pegs are often tapered to reinforce the “blocked” moves.

The only naturally programable inputs that can run in SumatraPDF are CHM or PS files so IF you wanted to develop “leaner” interactive games for SumatraPDF you would need to use one of those less secured formats.

I realised whilst “playing” with the above, that SumatraPDF can itself build the HanoiTower by saving the PS as a “Safe” PDF so here is the 12 ring demo in a blindingly fast 4096 pages Download and in SumatraPDF ensure it is set to single pages then hold down the space bar. Mine is no challenge just a Proof of concept that SumatraPDF can be used for Educational Fun. Enjoy

Lucas-C

Nice POC @GitHubRulesOK! Well done!

GitHubRulesOK

I had previously used a nice 40 page Gif by André Karwath

Again switch to whole pages and press space for each step.

However I am having to raise an odd page “Issue” with the current build