[HLUG] My Details

Noel McG etwell at hotmail.com
Sun Jul 17 18:10:20 BST 2005


Hello Julian,

Well this is what Chris W. of  SLUG is hoping they will be doing during the
long hot summer days!

"Hi All,

A quick LUG mini challenge to help fill those long
boring holiday hours on the beach for all you coders
out there - WUMPUS revisited :)

Back in the 1970's the cutting edge game of choice for
those of a geek persuasion was "Hunt a Wumpus".

For those of you who were a) not born or b) not into
computers then - a brief summary of Wumpus history :-

--8<---
Hunt the Wumpus
<games, history> (Or "Wumpus") /wuhm'p*s/ A famous
fantasy computer game, created by Gregory Yob in about
1973.

Hunt the Wumpus appeared in Creative Computing, Vol 1,
No 5, Sep - Oct 1975, where Yob says he had come up
with the game two years previously, after seeing the
grid-based games Hurkle, Snark and Mugwump at People's
Computing Company (PCC). He later delivered Wumpus to
PCC who published it in their newsletter.

ESR says he saw a version including termites running
on the Dartmouth Time-Sharing System in 1972-3.

Magnus Olsson, in his 1992-07-07 USENET article
<9207071854.AA21847 at thep.lu.se>, posted the BASIC
source code of what he believed was pretty much the
version that was published in 1973 in David Ahl's "101
Basic Computer Games", by Digital Equipment
Corporation.

The wumpus lived somewhere in a cave with the topology
of an dodecahedron's edge/vertex graph (later versions
supported other topologies, including an icosahedron
and M"obius strip). The player started somewhere at
random in the cave with five "crooked arrows"; these
could be shot through up to three connected rooms, and
would kill the wumpus on a hit (later versions
introduced the wounded wumpus, which got very angry).
Unfortunately for players, the movement necessary to
map the maze was made hazardous not merely by the
wumpus (which would eat you if you stepped on him) but
also by bottomless pits and colonies of super bats
that would pick you up and drop you at a random
location (later versions added "anaerobic termites"
that ate arrows, bat migrations and earthquakes that
randomly changed pit locations).

This game appears to have been the first to use a
non-random graph-structured map (as opposed to a
rectangular grid like the even older Star Trek games).
In this respect, as in the dungeon-like setting and
its terse, amusing messages, it prefigured ADVENT and
Zork and was directly ancestral to both (Zork
acknowledged this heritage by including a super-bat
colony).

---->8-----(source FOLDOC
http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?wumpus )



And now for the LUG challenge bit....

I was chatting to ntoll on the #shroplug irc channel
on friday and we were discussing the loss of classic
computer history like this and I mentioned that I had
started porting WUMPUS to php and it occurred to me
that it would be interesting to see who could come up
with the most interesting port of it.

So...

SLUG "Wumpus Revisited" mini-challenge objective::
* To port the original basic version of wumpus to the
most novel platform/os/lang you can.


rules::
* mini challenge open to all SLUG members
* team entries may be considered
* you may port the code listed below to any platform
or language of your choice ie web, perl, php, pda,
gameboy, cybiko, PS2... whatever...
* working versions and source code must be made
available for judging
* closing date for project is Friday 30th september -
with results to be demonstrated and judged at the
october LUG meeting.
* all entries will be judged on their own merits in
terms of game play, faithful reproduction of the
original, tightness of code, quirkyness... and
other... err... stuff :)

Prizes:: Mystery prizes for winning entries!!!

Original source::

5 REM *** HUNT THE WUMPUS ***
10 DIM P(5)
15 PRINT "INSTRUCTIONS (Y-N)";
20 INPUT I$
25 IF I$="N" THEN 35
30 GOSUB 375
35 GOTO 80
80 REM *** SET UP CAVE (DODECAHEDRAL NODE LIST) ***
85 DIM S(20,3)
90 FOR J=1 TO 20
95 FOR K=1 TO 3
100 READ S(J,K)
105 NEXT K
110 NEXT J
115 DATA 2,5,8,1,3,10,2,4,12,3,5,14,1,4,6
120 DATA 5,7,15,6,8,17,1,7,9,8,10,18,2,9,11
125 DATA 10,12,19,3,11,13,12,14,20,4,13,15,6,14,16
130 DATA 15,17,20,7,16,18,9,17,19,11,18,20,13,16,19
135 DEF FNA(X)=INT(20*RND(1))+1
140 DEF FNB(X)=INT(3*RND(1))+1
145 DEF FNC(X)=INT(4*RND(1))+1
150 REM *** LOCATE L ARRAY ITEMS ***
155 REM *** 1-YOU, 2-WUMPUS, 3&4-PITS, 5&6-BATS ***
160 DIM L(6)
165 DIM M(6)
170 FOR J=1 TO 6
175 L(J)=FNA(0)
180 M(J)=L(J)
185 NEXT J
190 REM *** CHECK FOR CROSSOVERS (IE L(1)=L(2), ETC)
***
195 FOR J=1 TO 6
200 FOR K=1 TO 6
205 IF J=K THEN 215
210 IF L(J)=L(K) THEN 170
215 NEXT K
220 NEXT J
225 REM *** SET NO. OF ARROWS ***
230 A=5
235 L=L(1)
240 REM *** RUN THE GAME ***
245 PRINT "HUNT THE WUMPUS"
250 REM *** HAZARD WARNING AND LOCATION ***
255 GOSUB 585
260 REM *** MOVE OR SHOOT ***
265 GOSUB 670
270 ON O GOTO 280,300
275 REM *** SHOOT ***
280 GOSUB 715
285 IF F=0 THEN 255
290 GOTO 310
295 REM *** MOVE ***
300 GOSUB 975
305 IF F=0 THEN 255
310 IF F>0 THEN 335
315 REM *** LOSE ***
320 PRINT "HA HA HA - YOU LOSE!"
325 GOTO 340
330 REM *** WIN ***
335 PRINT "HEE HEE HEE - THE WUMPUS'LL GET YOU NEXT
TIME!!"
340 FOR J=1 TO 6
345 L(J)=M(J)
350 NEXT J
355 PRINT "SAME SETUP (Y-N)";
360 INPUT I$
365 IF I$<>"Y"THEN 170
370 GOTO 230
375 REM *** INSTRUCTIONS ***
380 PRINT "WELCOME TO 'HUNT THE WUMPUS'"
385 PRINT " THE WUMPUS LIVES IN A CAVE OF 20 ROOMS.
EACH ROOM"
390 PRINT "HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK
AT A"
395 PRINT "DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU
DON'T KNOW"
400 PRINT "WHAT A DODECAHEDRON IS, ASK SOMEONE)"
405 PRINT
410 PRINT " HAZARDS:"
415 PRINT " BOTTOMLESS PITS - TWO ROOMS HAVE
BOTTOMLESS PITS IN THEM "
420 PRINT " IF YOU GO THERE, YOU FALL INTO THE PIT (&
LOSE!)"
425 PRINT " SUPER BATS - TWO OTHER ROOMS HAVE SUPER
BATS. IF YOU"
430 PRINT " GO THERE, A BAT GRABS YOU AND TAKES YOU TO
SOME OTHER"
435 PRINT " ROOM AT RANDOM. (WHICH MAY BE
TROUBLESOME)"
440 INPUT "TYPE AN E THEN RETURN ";W9
445 PRINT " WUMPUS:"
450 PRINT " THE WUMPUS IS NOT BOTHERED BY HAZARDS (HE
HAS SUCKER"
455 PRINT " FEET AND IS TOO BIG FOR A BAT TO LIFT).
USUALLY"
460 PRINT " HE IS ASLEEP. TWO THINGS WAKE HIM UP: YOU
SHOOTING AN"
465 PRINT "ARROW OR YOU ENTERING HIS ROOM."
470 PRINT " IF THE WUMPUS WAKES HE MOVES (P=.75) ONE
ROOM"
475 PRINT " OR STAYS STILL (P=.25). AFTER THAT, IF HE
IS WHERE YOU"
480 PRINT " ARE, HE EATS YOU UP AND YOU LOSE!"
485 PRINT
490 PRINT " YOU:"
495 PRINT " EACH TURN YOU MAY MOVE OR SHOOT A CROOKED
ARROW"
500 PRINT " MOVING: YOU CAN MOVE ONE ROOM (THRU ONE
TUNNEL)"
505 PRINT " ARROWS: YOU HAVE 5 ARROWS. YOU LOSE WHEN
YOU RUN OUT "
510 PRINT " EACH ARROW CAN GO FROM 1 TO 5 ROOMS. YOU
AIM BY "
515 PRINT " THE COMPUTER THE ROOM#S YOU WANT THE ARROW
TO GO TO."
520 PRINT " IF THE ARROW CAN'T GO THAT WAY (IF NO
TUNNEL) IT "
525 PRINT " AT RANDOM TO THE NEXT ROOM."
530 PRINT " IF THE ARROW HITS THE WUMPUS, YOU WIN."
535 PRINT " IF THE ARROW HITS YOU, YOU LOSE."
540 INPUT "TYPE AN E THEN RETURN ";W9
545 PRINT " WARNINGS:"
550 PRINT " WHEN YOU ARE ONE ROOM AWAY FROM A WUMPUS
OR HAZARD,"
555 PRINT " THE COMPUTER SAYS:"
560 PRINT " WUMPUS: 'I SMELL A WUMPUS'"
565 PRINT " BAT : 'BATS NEARBY'"
570 PRINT " PIT : 'I FEEL A DRAFT'"
575 PRINT
580 RETURN
585 REM *** PRINT LOCATION & HAZARD WARNINGS ***
590 PRINT
595 FOR J=2 TO 6
600 FOR K=1 TO 3
605 IF S(L(1),K)<>L(J) THEN 640
610 ON J-1 GOTO 615,625,625,635,635
615 PRINT "I SMELL A WUMPUS!"
620 GOTO 640
625 PRINT "I FEEL A DRAFT"
630 GOTO 640
635 PRINT "BATS NEARBY!"
640 NEXT K
645 NEXT J
650 PRINT "YOU ARE IN ROOM ",L(1)
655 PRINT "TUNNELS LEAD TO ",S(L,1);S(L,2);S(L,3)
660 PRINT
665 RETURN
670 REM *** CHOOSE OPTION ***
675 PRINT "SHOOT OR MOVE (S-M)";
680 INPUT I$
685 IF I$<>"S" THEN 700
690 O=1
695 RETURN
700 IF I$<>"M" THEN 675
705 O=2
710 RETURN
715 REM *** ARROW ROUTINE ***
720 F=0
725 REM *** PATH OF ARROW ***
735 PRINT "NO. OF ROOMS (1-5)";
740 INPUT J9
745 IF J9<1 THEN 735
750 IF J9>5 THEN 735
755 FOR K=1 TO J9
760 PRINT "ROOM #";
765 INPUT P(K)
770 IF K<=2 THEN 790
775 IF P(K)<>P(K-2) THEN 790
780 PRINT "ARROWS AREN'T THAT CROOKED - TRY ANOTHER
ROOM"
785 GOTO 760
790 NEXT K
795 REM *** SHOOT ARROW ***
800 L=L(1)
805 FOR K=1 TO J9
810 FOR K1=1 TO 3
815 IF S(L,K1)=P(K) THEN 895
820 NEXT K1
825 REM *** NO TUNNEL FOR ARROW ***
830 L=S(L,FNB(1))
835 GOTO 900
840 NEXT K
845 PRINT "MISSED"
850 L=L(1)
855 REM *** MOVE WUMPUS ***
860 GOSUB 935
865 REM *** AMMO CHECK ***
870 A=A-1
875 IF A>0 THEN 885
880 F=-1
885 RETURN
890 REM *** SEE IF ARROW IS AT L(1) OR AT L(2)
895 L=P(K)
900 IF L<>L(2) THEN 920
905 PRINT "AHA! YOU GOT THE WUMPUS!"
910 F=1
915 RETURN
920 IF L<>L(1) THEN 840
925 PRINT "OUCH! ARROW GOT YOU!"
930 GOTO 880
935 REM *** MOVE WUMPUS ROUTINE ***
940 K=FNC(0)
945 IF K=4 THEN 955
950 L(2)=S(L(2),K)
955 IF L(2)<>L THEN 970
960 PRINT "TSK TSK TSK - WUMPUS GOT YOU!"
965 F=-1
970 RETURN
975 REM *** MOVE ROUTINE ***
980 F=0
985 PRINT "WHERE TO";
990 INPUT L
995 IF L<1 THEN 985
1000 IF L>20 THEN 985
1005 FOR K=1 TO 3
1010 REM *** CHECK IF LEGAL MOVE ***
1015 IF S(L(1),K)=L THEN 1045
1020 NEXT K
1025 IF L=L(1) THEN 1045
1030 PRINT "NOT POSSIBLE -";
1035 GOTO 985
1040 REM *** CHECK FOR HAZARDS ***
1045 L(1)=L
1050 REM *** WUMPUS ***
1055 IF L<>L(2) THEN 1090
1060 PRINT "... OOPS! BUMPED A WUMPUS!"
1065 REM *** MOVE WUMPUS ***
1070 GOSUB 940
1075 IF F=0 THEN 1090
1080 RETURN
1085 REM *** PIT ***
1090 IF L=L(3) THEN 1100
1095 IF L<>L(4) THEN 1120
1100 PRINT "YYYYIIIIEEEE . . . FELL IN PIT"
1105 F=-1
1110 RETURN
1115 REM *** BATS ***
1120 IF L=L(5) THEN 1130
1125 IF L<>L(6) THEN 1145
1130 PRINT "ZAP--SUPER BAT SNATCH! ELSEWHEREVILLE FOR
YOU!"
1135 L=FNA(1)
1140 GOTO 1045
1145 RETURN
1150 END




enjoy :)

Chris W."
--
Chritopher J Williams - LugMaster for Shropshire.
http://www.shropshire.lug.org.uk



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


_______________________________________________
Shropshire mailing list
Shropshire at mailman.lug.org.uk
http://mailman.lug.org.uk/mailman/listinfo/shropshire


Regards,

Noel.


----- Original Message ----- 
From: "Julian Robbins" <joolsr at fastmail.fm>
To: "Herefordshire Linux Users Group." <herefordshire at mailman.lug.org.uk>
Sent: Sunday, July 17, 2005 2:18 PM
Subject: Re: [HLUG] My Details


> Benjamin Weber wrote:
>
> >Greetings all,
> >
> >I have just joined, recently moved to the area, and am at home over the
> >summer. I might come along thursday if that's ok. anyways here are my
details
> >for the members page:
> >
> >Name: Benjamin Weber
> >Distro: SuSE (since 7.0)
> >Status: Intermediate
> >Location: Leominster
> >
> >Benji
> >
> >
> Hi Benji !
>
> Hope you enjoy your time with our LUG. We aim to be a helpful, &
> friendly bunch so that we can all learn from each other something useful
> as we go.
>
> I'm currently setting up a Linux 'baby monitor' ! :-)     for our soon
> to be arriving, 3.5 weeks and counting new arrival !
>
> It will consist of a simple web camera and Gnomemeeting box with a cheap
> 700MHz Celeron and wireless card down to our main PC downstairs. This
> way we can listen to him or her, and also visually check if we need to too
!
>
> It might be interesting to hear what others are doing Linux or Open
> Source wise in their spare time. Please tell us about it ...
>
> Julian
>
> PS Benji; Matt and I are too Leominster Linux users.  Might be nice to
> go for a beer sometime in town and all things Linux ..
>
>
> >Herefordshire mailing list
> >Herefordshire at mailman.lug.org.uk
> >http://mailman.lug.org.uk/mailman/listinfo/herefordshire
> >
> >
>
>
> _______________________________________________
> Herefordshire mailing list
> Herefordshire at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/herefordshire
>



More information about the Herefordshire mailing list