HANGMAN thread continues in GAMES.
Posted: Thu May 18, 2023 11:28 pm
I'm no longer posting on this thread as of 01 Nov 2023. Some work continues in DOWNLOAD/GAMES.
all posts will remain here for historical value.
NEW THREAD IS viewtopic.php?t=6887
Title Change again 10/22/2023
Thought I would finally change this title. Its no longer early days for this program .
FROM HERE DOWN IS THE ORIGINAL POST
Ok... I'm going to let you guys watch me struggle through this.
I don't think the game algorithm is going to be super difficult. I want to
do some file IO so basically unlimited word choices. Plus
a 2 player option with the option to file away the words on disk
for the one player option.
There is nothing resembling game logic yet. I'm doing the graphics first.
So far a start at a background and the outline of the gallows.
all posts will remain here for historical value.
NEW THREAD IS viewtopic.php?t=6887
Title Change again 10/22/2023
Thought I would finally change this title. Its no longer early days for this program .
FROM HERE DOWN IS THE ORIGINAL POST
Ok... I'm going to let you guys watch me struggle through this.
I don't think the game algorithm is going to be super difficult. I want to
do some file IO so basically unlimited word choices. Plus
a 2 player option with the option to file away the words on disk
for the one player option.
There is nothing resembling game logic yet. I'm doing the graphics first.
So far a start at a background and the outline of the gallows.
Code: Select all
10 CLS:PRINT:XLIMIT = 319:YLIMIT=239
20 PRINT "WELCOME TO HANGMAN"
30 PRINT " ONE PLAYER AGAINST THE COMPUTER ?
40 PRINT " OR HEAD TO HEAD ?"
50 SCREEN 128
60 GOSUB 5000:GOSUB 7000
70 INPUT X$
100 SCREEN 0:END
5000 RECT 0,0, XLIMIT, YLIMIT, 14
5010 RECT 0, 180, XLIMIT, YLIMIT, 5
5020 FOR Y = 161 TO 179
5030 LINE 0, Y, 40, 179, 105
5040 NEXT Y
5050 FOR Y = 180 TO 150 STEP -1
5060 LINE 288,179, XLIMIT, Y, 105
5070 NEXT Y
5080 TC = 104:GOSUB 6000:REM DRAW GRASS STUFF
5090 TC = 106:GOSUB 6000
5100 TC = 133:GOSUB 6000
5110 RETURN
6000 FOR I = 1 TO 14:REM RANDOM GRASS
6010 X1 = INT(RND(1)*XLIMIT)
6020 Y1 = INT(RND(1)*YLIMIT) + 180:IF Y1 > YLIMIT THEN GOTO 6020
6030 X2 = INT(RND(1)*XLIMIT) + 15:IF X2 = X1 OR X2 > XLIMIT THEN GOTO 6030
6040 Y2 = INT(RND(1)*YLIMIT) + 180:IF Y2 = Y1 OR Y2 > YLIMIT THEN GOTO 6040
6045 IF X2 - X1 > 105 OR X1 - X2 > 105 THEN GOTO 6010
6046 IF Y2 - Y1 > 12 OR Y1 - Y2 > 12 THEN GOTO 6010
6050 LINE X1,Y1,X2,Y2, TC
6055 PSET X1, Y1 - 1, 133:PSET X1 , Y1-1, 104:PSET X2, Y1 - 3,107
6080 NEXT I
6090 RETURN
7000 REM THE GALLOWS
7010 FRAME 189,202,285,212,16
7020 FRAME 190,203,284,211,16
7030 FRAME 275,27,285,212,16
7040 FRAME 276,28,284,211,16
7050 FRAME 67,26,285,36,16
7060 FRAME 68,27,284,35,16
7070 RECT 72,36,78,39,16
8200 RETURN