I wrote a game! In 2.5 hours, even. It’s a console (as in Linux terminal) game, and written in Perl (5). I’ll call it “The Boring Game”.
You’re the pilot of a sophisticated airplane that does not crash into mountains, but bores tunnels through them. Flying costs money (because you use up fuel). Operating the boring machine attached to your airplane is extremely energy-intensive, and costs a fortune. Boring horizontally is expensive, but wait till you see how much you have to pay to bore up. However, (completed) tunnels are very useful infrastructure, so you get a nice reward every time you make it through the mountain.
The game’s settings are global constants at the top of the source file:
my $USLEEP = 80000; my @STATE_CHANGE_PROBABILITY = (0.1, 0.4, 0.1); my $MAX_ALTITUDE = 120; # (1 == one column). Need a few more columns to display the current funds my $MOUNTAIN_CHAR = '.'; my $MOUNTAIN_OUTLINE_CHAR = '|'; my $PLAYER_CHAR = '@'; my $UP_CMD = 'k'; my $DOWN_CMD = 'j'; my $QUIT_CMD = 'q';
Here’s a YouTube video of the game in action:
You can get the source code at https://github.com/qiqitori/theboringgame.
To play the game, put boring_game.pl in any directory you want, and issue the following command: