[comp.sys.handhelds] H. Piper! ver 1.2

vapsppr@prism.gatech.EDU (Paul Raines) (05/23/91)

Version 1.2 of H. Piper! for SUPER-CHIP follows below.
The following changes were made.

	-- The [ENTER] key will now work to restart
           the game as if it was just run for the first time.
	-- I have worked out a way to show the total
           score in its full decimal glory.  It is tricky
           and gobbles up two registers, but seems to work.
        -- The bonus for using the whole grid is now 100
	   points on top of what was earned normally.
	-- The movement keys can now be held down to
	   move the crosshair long distances.
        -- Corner pieces are guaranteed for the first four
	   pipes to get out of sticky situations with
	   the starting pipe placement.

Checksum for the unASCed program is
	# 493Eh
	 1677.5

DISCLAIMER: Since CHIP makes use of undocumented features
of the HP48SX, anything happen: loss of data, meltdown,
etc. Therefore, I take no responsibility for any damage
whatsoever that occurs.

****************  H. Piper!  **********************

OBJECT:
-------
You are presented with a 6 row, 10 column grid and
a preview panel of 5 pipes. A starting pipe will be
placed on the grid and will in a few seconds start
leaking.  The object is to lay pipes on the grid to
contain the leak as long as you can.  If the water
flows onto an empty grid site, onto the side of another
pipe or border, that plumbing job is finished.  If you
did well enough, you may get another job.  Otherwise
the game is over.

HOW TO PLAY:
------------
On the bottom and right borders of the grid are grid
pointers.  The bottom pointer can be moved left with
the (1) key and right with the (2) key.  The side
pointer can be moved up with the (9) key and down with
the (6) key. (Note: this is identical to the movement
keys for Syzygy by Roy Trevino)  A crosshair is present
on the grid sites the two paddles point to.

Using the pointers, chose a grid site to place a pipe.
The pipe to be placed is the one at the bottom of
the preview column. Once a site is chosen, press the
(7) key to place the pipe there.  You can replace
a pipe already at the grid site with a penalty of one
point.  You cannot replace a pipe that the water has
already flown through.  Trying to do this will make
you lose the pipe you were trying to place and also
penalize you one point.

When you have placed all the pipe you wish to for
a particular job, you can press the (+) key to make
the water flow *FAST*.  You can still lay pipe if
you realize you made a mistake, but hurry!

   KEY SUMMARY:     Left     (1)
                    Right    (2)
                    Up       (9)
                    Down     (6)
                    Place    (7)
                    Fast     (+)

Once a job is over, press (SPACE) to continue.

There are ten levels with increasing water flow speed.
Level 10's speed is the same as that for *FAST*. If
you manage to get through level 10, it repeats at
that level till you fail.  The starting speed with
which the flow comes out of the initial pipe is slower
than the usual flow, however this speed increases in
level also. 

SCORING:
--------
You receive 3 points for every pipe the water flows
through.  For the crossed pipes, flowing through
them in both directions gives you 6 points. (Note:
some adventuresome combinatorist might want to
figure out what the maximum possible score is. If
it is over 255, there could be a problem, but I
doubt it.) You are penalized 1 point for replacing
or trying to replace a pipe already on the grid.

The current job score is shown in upper right corner.
The score can not go negative, so if the score is
zero, you can replace pipes without penalty.

Once a job is over, the program checks to see if
every grid site was flown through. If so you
earn a 100 point bonus. The score earned is added to
the grand total and displayed on the screen shown
after (SPACE) is pressed. 

If the game is over, the word OVER will be displayed
above the score and the (SPACE) key can be pressed
to exit. The total score will be written to user 
flags so that the user lang program SCORE can
put the score on the stack. If over does not appear,
press (SPACE) to go on to the next job.
The points needed to go to the next job are
obtained by the following formula:

    Points needed = 100 - (41 - 4 * level)

therefore, you need 63 points to go to job 2
                    67 points to go to job 3
                    ...
                    99 points to go to job 11,12,....

The points needed for a level are shown below the
bottom right corner of a grid.  Note that this
does not mean that play ends once that score
is achieved.  That score is only a minimum needed
to have the opportunity to continue on another job.

DEVELOPMENT NOTES:
-----------------
Pipe Graphics --  As you will probably notice, a lack of
                  color is a big problem in trying to sort
                  out what you have laid out.  Having 8x8
                  pipe bitmaps was a cornerstone of my
                  design so enlarging them for better
                  resolution would be difficult and probably
                  restrict the grid size unduly.

Randomness    --  Just how random is S-CHIP's random generator?
                  You will probably notice that the cross pipe
                  comes up more often than the others. True. It
                  is twice as likely to be chosen than any of
                  the others.  Another design fluke. However,
                  being the one true symmetrical piece, it
                  will be the most useful to get often.

H. Piper! was written using the excellent compiler Chipper.
I will make the source available if there is any interest.
Be forewarned.  I am a pretty sloppy coder.  There is
much room for improvement in efficiency.


ACKNOWLEDGEMENTS:
----------------
        CHIP-48 is (C) Copyright 1990 Andreas Gustafsson.
                 - Many, many thanks to the one who started it all.

        Chipper is (C) Copyright 1990 Christian Egeberg.
                 - It is amazing that with such a great compiler
                   as this, there are so few CHIP games out there.

        SUPER-CHIP is (C) Copyright 1991 Erik Bryntse
                 - Never be satisfied with limitation.

        ASC-> is written by William C Wickes.

Happy plumbing!



-----( cut here - beginnning of ASC )----------------------------
%%HP: T(3)A(D)F(.);
"C2A2050D0021616713E22302251696E6563702823692021393931300FFE6A406
0016007AAC1F55000E06B0160026008A802FE11F552720238721A2060026007A
0C2FE11F552720236021A37AEC0662169336003FE10D5136500780036421E47A
2E068616200D51078026502FE10D517ACE068616A20D51078026502FE10D5118
0E1865064608517A280F332F5636A546931F923D5437502F923D54080E7A020F
557A23060016000D2107800306212A46207A8006000DC47A4106800DC447C043
E321CA66000806622867106350210C162306017A240D6107800306210D160006
067A600D211720138321EDD64332AD326E324F16207AA706010D810780030621
4F17801323212F3C703710CC03C701C8433C3038E57A8B3FE11F56B800280198
02080C52ED6283A62076008600620C622E06FF0F5106700E1A322706800E1A32
C806300E1A326A06600E1A320C06100E1A32C506F00E1AE6200F700400426031
0306F06228080D52ED00EE080D16F00821180D185000EE32AD324F326607FF04
FF0600D801D84032AD324F06A532EF00EE32AD324F3266071004A00690D801D8
4032AD324F06A532EF00EE326E324F3266170F140F1600D801D840326E324F06
A532EF00EE326E324F3266170114061605D801D840326E324F06A532EF00EE32
66070652697AAA0D4100EE3266080107A052697A2A0D8100EE080D52697AA90D
8100EE07FF030031EF00EE0809160F0821040041A1A35041A1B8390670B820A7
10280AB30041622680285A080B0865086503004184B30027FF080C526918427A
EA0D11F4004188A410416C4188B35041853608248041463865271041E4361024
80414638E5271041A5180308037A281F557A28080C52691730933041E7A44041
08A3500D21F4004188A410416CA38041CA620C06007710734641A98710760007
1003304109620CA60062C4628394B0416C080E180818471400074B0F5100EE06
B00EE941CB0E1A410C00EE06300F8142AB000E260036008A802FE11F56272038
412387412D34C387107AAC1F56084736460853480F430017104310074618487A
AC1F555800368246827A6C1F332F560F033DA437B01F033DA437B02F033DA47A
6C5F332F5637B01F033DA437B02F033DA4620C7A020F56E800E420E780E78F83
0051A40865164618507851F40051E4528621227A6F06A216810D51078026502F
E10D5152867AAC1F561F5700DF7A23362046803D847AA436A03D848A0036E046
013D74065232EF06B00E1A51493D744720448351873D7451E700EE1800F60F18
2F1865F6F0082F08E508E508E50701172000EE070F17EF08650865086518E508
4100EE8A801800F6F0182F18E51FE1F60F082F0865180018651865084108E50F
E100EE380052EB1F56560003B056FF1400514F16301F8161016282080352690D
81080352EB160008021F5508026282080352690D81620C784573FF6142840061
2287FF763661427600620C00EE16F0082108E508E508E57A220FE100EE080C52
EB1F569800080C52EB080916101F5500EE0600B4600610B4300601B400060FB4
5006FF180C1840F60F182F140F416C1406416C180C1840F6F0182F14F0416C14
A0416CC84000EE1C7008650865040018657A0B1FE10F565800463036007A0C3F
E10F562800628206400D847A0C3FE108050F55628206400D8447C05802371033
50618900EE369646907A6C8F332F562F923D5437607A6C7F332F561F923D5437
602F923D5400EE080E07EF08650865086516A018507A6C1F332F561F03368646
233DA437B02F033DA400EE8F8F0C0C0C0C0C0C0C0C0C0C0CFF30303030303030
30303030FF000000000000000000003C3C3C3C3C3C3C3CFFFF00000000FFFF3C
3C000000003C3CFFFFFFFFFFFFFFFFFFFF303030303C3CFFFF0C0C0C0C3C3CFF
FF0C0C0C0CFFFFFFFF30303030FFFF3C3C3C3C3C3CFFFFFFFF3C3C3C3C3C3C00
E724242424E70000000000000000003C3C0C0C0C0CFFFF3C3C30303030FFFF00
0081C3C38100000001010707010100008181E78100D15161E110203030607050
80009030A000000000000000000000000000003A2A3E2AAABB293921A3BB2A3B
22A388888804849D292D259DB3AA3BAAB2A929A9199D4B4A4B4263AEAAEA4A4E
EEA8EC989E0202078F8F8F0700B000B000B000B000B000B000B000B000B000B0
00B000B000B000B000B000B000B000B000B000B000B000B000B000B000B000B0
00B000B000B000B000B000B000B000B000B000B000B000B000B000B000B000B0
00B000B000B000B000B000B000B000B000B000B000B000B000B000B000B000B0
00B000B000E394"
------( cut here - end of ASC )---------------------------------

SCORE program to get score from user flags set after exiting
      the H. Piper! program with the [SPC] key.

\<< RCLF 2 GET DUP # FFh
    AND SWAP # 100h /
    # 64h * + B\->R
    RCLF 2 # 0h PUT
    STOF \>>

Thats it. Enjoy!

Paul
-- 
Paul Raines
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!vapsppr
Internet: vapsppr@prism.gatech.edu