robots - fight off villainous robots
robots -hjstv [-a [level]] [-i num] [-r [secs]] [scorefile]
robots pits you against a growing hoard of evil robots bent on your destruction (much like real life). Your only weapons against the robot hoard are your wits and their stupidity. Consumed by their single-minded mission of destruction, the robots will not deviate from their pursuit even if it causes them to collide with and annihilate each other, leaving behind a pile of robot junk.
You are endowed with one piece of defensive weaponry: a teleportation device. When two robots run into each other or a junk pile, they die. If a robot runs into you, you die. When a robot dies, you get 10 points, and when all the robots die, you start on the next level. This keeps up until they finally get you (or until you meet the final boss robot, Zektor the Destroyer, and defeat the game).
Robots are represented on the screen by a `+', the junk heaps from their collisions by a `*', and you (the good guy) by a `@'.
The commands are:
h move one square left l move one square right k move one square up j move one square down y move one square up and left u move one square up and right b move one square down and left n move one square down and right . (also space) do nothing for one turn HJKLBNYU run as far as possible in the given direction > do nothing for as long as possible t teleport to a random location w wait until you die or they all do q quit ^L redraw the screen
All commands can be preceded by a count.
If you use the `w' command and survive to the next level, you will get a bonus of 1 point for each robot that died after you decided to wait. If you die, however, you get nothing (again, much like in real life). For all other commands, the program will save you from typos by stopping short of being eaten. However, with `w' you take the risk of dying by miscalculation.
Only five scores per user are allowed on the score file. If you make it into the score file, you will be shown the list at the end of the game. If an alternative score file is specified, that will be used instead of the standard file for scores.
If the score file is named "pattern_roll", then the game will be played automatically using the repeated sequence of commands: "YHBJNLUK". The game will stop on each level when there is only one robot left alive, allowing you to finish the level manually. Automatic play will resume at the start of the next level. Auto-teleport will be active.
If the score file is named "stand_still", then the game will be played automatically using a repeated sequence of the ">" command. The game will stop on each level when there is only one robot left alive, allowing you to finish the level manually. Automatic play will resume at the start of the next level. Auto-teleport will be active.
The options are:
Advance into the higher levels directly, skipping the lower, easier levels. Takes an optional level argument, and defaults to 4 with no arguments. Setting this to anything less than the default (4) takes you out of contention for a place in the score file. A bonus of 600 points is awarded after the completion of the first level played.
Display a usage message and short help screen.
Increment the number of robots on the playing field by NUM after each level is completed. Setting this to anything less than the default (10) takes you out of contention for a place in the score file.
Jump: when you run, don't show any intermediate positions. This is useful on slow terminals.
Play in real time, which means that the robots advance after a certain period of time (default: 3 seconds) whether you've moved or not. Takes an optional delay arguments (in seconds).
Don't play, just show the score file.
Teleport automatically when you have no other option. This is a little disconcerting until you get used to it, and then it is very nice.
Show the manual page via perldoc.
Show the robots version number.
John C. Siracusa (firstname.lastname@example.org)
/var/games/robots_roll - the score file
Curses.pm doesn't support the
tstp() function, so I'm trying to handle that signal myself, with varying degrees of success. This is my first program of any kind using curses, so I'm probably not doing things very efficiently. The logic is somewhat spaghetti-like, but not much worse than the original C version. Hey, at least there are no gotos...
Copyright(c) 1999 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.