home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 35
/
q35.d81
/
t.hydra
< prev
next >
Wrap
Text File
|
2022-08-28
|
8KB
|
162 lines
H Y D R A
Program and Text by Knees Calhoon
As any pagan will tell you, Hydra was the nine-headed serpent slain by
Hercules. From that legend the tiny freshwater polyp with multiple
tentacles derived its scientific name. And now my latest mouse-supporting
puzzle game for the 80-column screen completes the triptych: LEGEND - POLYP
- PROGRAM.
HYDRA is a series of 60 puzzles, 30 of which are ready for you to try
to solve. When you boot the program, you're asked to select your input
device. If you have a mouse, choose it, although you may find that you can
actually score better with the slower joystick or keyboard. Only the chosen
device is active. Then you're shown the HELP screen, which is a short
version of these docs. Press a button or SPACE or RETURN to move on. In
this program, SPACE or RETURN acts like the left button of the mouse or the
button of the joystick.
Then you're at the Main menu. Here you can see the SCORES, go to the
EDITOR, see the HELP screen, pick a HYDRA size (from 5X5 to 10X10), toggle
the CLOCK on or off, or QUIT to LOADSTAR 128 if there's a LOADSTAR in the
active drive. Let's try to solve a simple HYDRA, a 5X5. Click on the 5 X 5
line.
Once you've selected the size, you are asked for a LEVEL, from 1 to 10.
Levels 1 through 5 are ready to solve -- I have "made" them in the EDITOR
already. Levels 6 through 10 are blank and can't be solved until you make
them. More about that later.
Once you pick a 5X5 LEVEL the 25 tiles of the HYDRA design (in memory)
will be rotated randomly and displayed on the left of the screen. There are
four types of tiles:
(1) Straights - two rotations (horizontal and vertical)
(2) Elbows - line makes a 90 degree turn - four rotations
(3) Junctions - line splits off from straight line - four rotations
(4) Ends - line ends in midtile - four rotations
There's also a blank tile but none of the 30 puzzles supplied have one in
them.
Your job is to click on the tiles to rotate them, trying to put the
HYDRA back in the exact design it started from before the rotations. You do
this by lining up the lines of the HYDRA so that there are no loose ends,
and no pieces of the HYDRA separate from the rest. Once the HYDRA is the
same, the puzzle is solved and you get a fanfare and congratulations.
NOTE: The task is to get the HYDRA back to the original design. There MAY
be other ways to rotate the tiles so that there are no loose ends, but it
still won't match the original. In that case, you have to keep rotating
till you find the design the computer is looking for.
FURTHER NOTE: In real life, hydras rarely have tentacles that grow back
together, creating a loop. In HYDRA, they often do. There can be many loops
in a HYDRA and the loops can be of any size. Just thought I'd warn you.
Your strategy is up to you, but you'll quickly notice that Straights
and Junctions on the borders, as well as Elbows in the corners, have only
one way to fit. The main struggles you'll have are Junctions in the
interior. When using the mouse, you can save time by rotating the direction
that gets you there quickest, but I've found that I can often solve a LEVEL
with the joystick or keyboard just as fast because I DON'T bother thinking
"Should I go clockwise or counterclockwise?" Just click till it's oriented
as you want.
The SCORES screen lists the fastest times (in number of seconds) for
all 60 Levels. If you don't like the pressure of the clock, you can turn it
off at the Main Menu and you won't be competing. However, the fanfare and
congrats message are the same as if the clock were on. You can zero out the
best scores at the SCORES screen by clicking on the CLEAR SCORES box.
THE EDITOR
----------
I made the first five Levels of each size by using the EDITOR and you
can use it to make and save Levels of your own. You may want to experiment
by ignoring the rules and restrictions I placed on the HYDRAs, namely,
loops are okay, but no blank tiles, no loose ends and no parts of the HYDRA
separate from the rest. You can even change the 30 Levels I made up, if you
want.
When you click on EDITOR you go through the usual PICK SIZE and PICK
LEVEL menus. If you select a Level larger than 5 then you'll see a grid
with all blank tiles. Simply move to a tile and click on it until the tile
you want shows up. Then move to another tile and do the same. Once you've
made a few you'll see the pattern the 14 tiles cycle through. The mouse
allows you to go forward or backward through the cycle. The joystick and
keyboard only go one direction, but it's still pretty easy to make a Level
with these two devices.
When done, if you want to save that Level, be sure to click on SAVE
LEVELS, although I just now noticed that if you click on MENU (NO SAVE) you
can come back immediately to this Level from the Main Menu (through the
EDITOR) and your work is still in place. However, if you quit the program
without saving, your work will of course be gone.
Since the program loads and saves so much to the disk, be sure to keep
the disk in the active drive at all times. The program automatically saves
"hy.levels" after every best score.
RUMINATIONS
-----------
This game was inspired by a Windows puzzle I saw that rotated a tiled
picture of a computer circuit. Your job was to rotate the tiles to connect
computers to each other and to power boxes. The program actually tracked
each "line" to determine if a computer was actually ON or not. Then I saw a
spinoff program that used a tree metaphor. When you got all of the twigs of
a branch connected and the branch connected to the ground, the flowers on
that branch bloomed.
I suppose I could have taken the same tack with HYDRA and not allowed
loops, but then I would have had to write a tree algorithm, something I've
never done. Instead, I asked Jeff Jones to write me a little ML routine
that checks to see if two areas of memory are exactly the same. If so, it
sends a flag back to BASIC. So my program only gives you a fanfare if you
find the exact same HYDRA I've entered into memory via the EDITOR.
"Foul!" you may howl, and in a sense you are right. If the task is to
tie up loose ends, then why isn't YOUR solution just as good as MY
solution? Well, when I first got the game working with Jeff's routine I
wondered if it were even possible for there to be two or more solutions to
the same HYDRA. It turned out it is quite possible, especially on some of
the larger sizes. So I considered a more rigorous check of each tile,
seeing if it's connected to a piece it logically should conect to, then
having Jeff turn that huge FOR-NEXT loop into ML.
But I was pleasantly surprised to find that when I did encounter a
situation where I had tied up all loose ends yet it wasn't THE solution, I
was able to frantically rearrange a few tiles and somehow find THE
solution. I can't explain my reasoning but it was fun to do. I think I
looked to the Junctions and loops first. But in any case, I believe the
challenge you find when you get a "false" solution will intrigue you more
than merely solving the Level. At least it intrigues me more.
All of the scores and levels data are kept in the file "hy.levels" so
if you solve all 30 in extraordinary times, or better yet, if you create 30
more levels that put my levels to shame, by all means send me that file and
I'll put it on a later LOADSTAR 128 for the rest of the LOADSTARites.
Final thought: I wrote this program haphazardly, actually doing the
editor before much of the rest, and making a lot of backtracks and kludges.
Therefore DO NOT look at the program flow too closely. It's ugly. There are
all sorts of clumsily shared routines with flags all over the place. I'm
still trying to figure out the best way to program for both mouse and
joystick/keyboard. For this one I wrote it strictly for mouse, then added
joystick and keyboard afterwards. I should probably write a generic
mouse/joystick/keyboard interface but then I'd lose the uniqueness of each
program. I like keeping you on your toes.
\\\\\ R - Run RETURN - M