The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Game::PlatformsOfPeril - the platforms of peril


Platforms of Peril is a terminal-based game. Assuming App::cpanminus (and possibly also local::lib) is installed and setup, in a suitable terminal (possibly one with a square font such as White Rabbit and a black background) install and run the game via:

    cpanm Game::PlatformsOfPeril

Help text should be printed when the game starts. Use the ? key in game to show the help text again.


You are the only spawn (son, daughter, etc.) of a Xorbian Ranger and as such are duty bound not to peruse pointless background material such as this. You have long hair, green eyes, and start the game with a bomb, and need to collect gems all the while avoiding the enemies. The enemies have been blessed with pretty much bog standard A* pathfinding yet do know a thing or two about gravity. Gems can be made into bombs (the details as to how are not entirely clear) and bombs in turn will explode on contact with things that move. You also have two magic boots, one on each foot. These do something when activated.

P.S. Do not drop a bomb while falling, as it will fall with you and then explode.

P.P.S. You can make bombs while falling. This is perhaps a more productive use of that time than mashing space or the . key.

Customizing the Game

pperil accepts a number of options that do not do very much:

    Usage: pperil [--err=file] [--level=N] [--prefix=path] [--seed=N]

      --err    - send STDERR to this file if not already redirected
      --level  - level integer to start on
      --prefix - path to the levels directory (containing the files
                 level0, level1, ...)
      --seed   - PRNG uses the given integer as the seed

Otherwise customizing the game will involve hacking directly at the module code or level maps, see "Known Issues".

Terminal Setup

This game may benefit from the use of a square font; ~/.Xdefaults might contain something like:

    # "White Rabbit" square font (the name is "New" in the
    # "whitrabt.ttf" file that I downloaded from who knows where)

And with that loaded by X11 an xterm could be launched via:

    xterm -class wrterm

to play the game in.


Probably lots.

Please report any bugs or feature requests to bug-game-platformsofperil at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Known Issues

The most glorious lack of tests, the unconvincing and ham-fisted attempt at documentation, etc.

Some may be desirous of non-hjkl movement keys and so forth. Fiddle with the code (our variables can be clobbered from outside the module), or abstract things to use MOVE_LEFT etc and then map keys to those symbols. At that point one might add a configuration file or in-game editor of the key commands, but that sounds like work.

Automatic level generation might be nice? Or more levels made by hand...

Need to research how gems are made into bombs.

The game is not very perilous. And probably needs much tuning.


Lode Runner, but this game evolved off in some other direction. The bombs are from Bomberman but behave more like animate-sensing landmines. One idea is that a gem plus a bomb could make a smartbomb which, being smart, tracks the player. However bombs lack limbs so have trouble with the ladders, and that idea is otherwise presently tied up in committee.

Game::Xomb - 7DRL 2020 based on this module's code.

Game::TextPatterns may help draw candidate level maps:

    use Game::TextPatterns;

    my $pat = Game::TextPatterns->new( pattern => <<'EOP' );

    print $pat->four_up->flip_four(1)->string;


thrig - Jeremy Mates (cpan:JMATES) <jmates at>


Copyright (C) 2019 by Jeremy Mates

This program is distributed under the (Revised) BSD License: