TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Tue Oct 16, 2018 5:42 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Hang_Anne
PostPosted: Tue Feb 20, 2007 2:16 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
T'was bored, so here's a jp/tres related hangman game. Text-
based, source files included....

http://www.geocities.com/lastrebel41/Hang_Anne.zip


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:02 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10880
Location: Lima, Peru
Hmmm... I still have my two-player BASIC Hangman lying around on my HDD:

Code:
10 PLAY "mb": INPUT P$: P$ = LCASE$(P$)
20 L = LEN(P$): X$ = ""
25 FOR N = 1 TO L: X$ = X$ + "-": NEXT
27 CLS : LOCATE 10, 20: PRINT X$: L$ = STRING$(26, " "): X = 0
30 a$ = INKEY$: a$ = LCASE$(a$)
40 IF a$ < "a" OR a$ > "z" THEN 30
45 LOCATE 20, 10: PRINT SPC(25);
50 C = ASC(a$) - 96: IF INSTR(L$, a$) THEN LOCATE 20, 10: PRINT "Esa letra ya la usaste...": GOTO 30
55 MID$(L$, C, 1) = a$: LOCATE 5, 32: PRINT L$: a = 1
60 K = INSTR(a, P$, a$): IF a = 1 AND K = 0 THEN X = X + 1: ON X GOSUB 200, 210, 220, 230, 240, 250, 260, 270, 280, 290: LOCATE 7, 64: PRINT X; "fallas": IF X = 10 THEN GOTO 100 ELSE GOTO 30
70 IF K THEN MID$(X$, K, 1) = a$: IF K < L THEN a = K + 1: GOTO 60
75 LOCATE 10, 20: PRINT X$: IF X$ = P$ THEN PLAY "o3c2g2fed>c2<g4.p8fed>c2<g4.p8fefd": LOCATE 20, 10: PRINT "­Felicidades, desgraciado! ­Adivinaste!": END
80 GOTO 30
100 PLAY "o1c4.p8c4.p16ccp16d4c+c+cc<b>c": LOCATE 20, 20: PRINT "­Est s muerto!"
110 LOCATE 21, 20: PRINT "La palabra era: "; P$: END
200 LOCATE 13, 5: PRINT "ÉÍÍ": FOR V = 14 TO 17: LOCATE V, 5: PRINT "º": NEXT: LOCATE 18, 5: PRINT "Ð": RETURN
210 LOCATE 13, 8: PRINT "Ñ": RETURN
220 LOCATE 14, 8: PRINT CHR$(2): RETURN
230 LOCATE 15, 8: PRINT "Ã…": RETURN
240 LOCATE 15, 7: PRINT "Ú": RETURN
250 LOCATE 15, 9: PRINT "¿": RETURN
260 LOCATE 16, 8: PRINT "Á": RETURN
270 LOCATE 16, 7: PRINT "Ú": LOCATE 17, 7: PRINT "Ù": RETURN
280 LOCATE 16, 9: PRINT "¿": LOCATE 17, 9: PRINT "À": RETURN
290 LOCATE 14, 8: PRINT CHR$(1): RETURN


_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:13 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
If I used goto in c++ code, I'd be hung! :o

Is that the entire program?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:38 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10880
Location: Lima, Peru
Yep, it's short and simple.

Well, those GOTO 30 statements are simply the main loop; the GOTO 60 is checking for more than one ccurrence of a single letter within the word, and the GOTO 100 is the "you lose" case...

_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:48 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Basic reminds me of Dos. It's been so long since I've screwed with
it, but there's a definite structural similarity there.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:56 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10880
Location: Lima, Peru
This isn't even QuickBASIC, it's GW-BASIC... wow, this program is really old! I remember writing it in AtariBASIC on my 800XL first, later porting it to the PC.

_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 4:15 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Going way back, early eighties, I wrote a few copycat games based
on early arcades. Tank battle, asteriods - they were pretty horrible
copies though. That was all Dos stuff, I didn't even use Windows3.
1 back then even though I think it was available.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 4:43 am 
Offline
Velociraptor
Velociraptor

Joined: Mon Nov 11, 2002 1:07 pm
Posts: 1325
Location: Canberra, Australia
Nice little game Rebel :)

But I ran into a bit of a bug...

[Spoilers for those who don't want one of the answers revealed]

The game didn't seem to recognise one letter being in several locations. For the answer "John Hammond" I had to enter 'h' twice, 'o' twice, 'n' twice and 'm' twice. I don't know if you intended this or not.

Still a fun little program :)

_________________
Ah, there's nothing more exciting than science. You get all the fun of sitting still, being quiet, writing down numbers, paying attention... Science has it all." - Principal Skinner.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 4:47 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Quote:
The game didn't seem to recognise one letter being in several locations. For the answer "John Hammond" I had to enter 'h' twice, 'o' twice, 'n' twice and 'm' twice. I don't know if you intended this or not.


Yea, that's the way I coded it, Chris. If it revealed all the letters, it'd be too much like wheel of fortune (or whatever that game is called). 1 guess, 1 letter. ;)

.... and thanks. It's not much, just a little something to goof around with.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group