This script uses GD to stitch 100 screenshots from Montezuma's Revenge into a single PNG with a map of each level. The script is not intended for use as is (but rather for inspiration if you want to do something similar), and is therefore rather crude, especially concerning the hard-coded paths to the files, and the command line arguments.

If you are not satisfied with the listing below, you can also download

#!/usr/bin/perl -w
use GD;



$level=shift or die("Must have one argument (level-number)");

while (<perfect/l$level/*.png>) {
    if (/^.*\/([a-s])([0-9])\.png$/) {
	print("processing level$level $1$2 at ($s,$t)\n");
my $screen = GD::Image->new($fil);

open(IMAGEOUT,">$imageName") or die("Could not open file $imageName for writing");
binmode IMAGEOUT;
print IMAGEOUT $fullImage->png;
Last updated: 2007.01.24