' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Game based on FRED for the TI99/4a computer
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Limit = 30
zoom = 3
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' The object of this game is to solve math problems and try to get your
' character to the top of the wall. Can you do it?
'
' Changes from original:
' Different colors and graphics
' Climber cllimbs up the middle of the wall instead of on the side
' Added Subtraction, Multiplication, and Division
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Increase Zoom to enlarge the screen
' For people like me who are blind in one eye while not able to see out of the other
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Mag = 8 * zoom
xScreen = 128 * zoom
yScreen = 96 * zoom
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Load Colors and Graphics
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
Loader
' \/\/\/\/\/\/\/\/\/\/\/
' Introduction Text
' /\/\/\/\/\/\/\/\/\/\/\
Intro
' \/\/\/\/\/\/\/\/\/\/\/
' Main Program Loop
' /\/\/\/\/\/\/\/\/\/\/\
Main
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Game Over - Play Again?
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
GameOver -1
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Convert Decimal to Binary
' Length limits the length of the binary value returned
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Value = Value \ 2
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Load Colors and Graphics
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
' \/\/\/\/\/\/\/
' Medium Red
' /\/\/\/\/\/\/\
' \/\/\/\/\/\/\/
' Dark Blue
' /\/\/\/\/\/\/\
' \/\/\/\/
' Cyan
' /\/\/\/\
' \/\/\/\/\/
' Black
' /\/\/\/\/\
' \/\/\/\/\/
' White
' /\/\/\/\/\
' \/\/\/\/\/
' Yellow
' /\/\/\/\/\
Yellow
= _RGB32(230, 206, 128)
' \/\/\/\/\/
' Magenta
' /\/\/\/\/\
Magenta
= _RGB32(201, 91, 186)
' \/\/\/\/\/\/\/\/\/\/
' Happy/Sad Faces
' /\/\/\/\/\/\/\/\/\/\
CallChar 1, "3C7EDBFFFFDB663C", Yellow, White
CallChar 2, "3C7EDBFFFFE75A3C", Yellow, White
CallChar 3, "C3812400002499C3", Yellow, White
CallChar 4, "C38124000018A5C3", Yellow, White
' \/\/\/\/\/\/\/\/\/\/\/\/\/
' Make Faces transparent
' /\/\/\/\/\/\/\/\/\/\/\/\/\
' \/\/\/\/\/\/
' Climber
' /\/\/\/\/\/\
CallChar 5, "3838107C1038286C", Cyan, White
CallChar 6, "3838927C10382C60", Cyan, White
CallChar 7, "3838927C1038680C", Cyan, White
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Make Climber transparent
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
' \/\/\/\/\/\/\/
' Brick Wall
' /\/\/\/\/\/\/\
CallChar 8, "7FFF92FFA4FF92FF", Black, Red
CallChar 9, "FFFF49FF92FF49FF", Black, Red
CallChar 10, "FEFF25FF49FF25FF", Black, Red
CallChar 11, "A4FF92FFA4FF92FF", Black, Red
CallChar 12, "92FF49FF92FF49FF", Black, Red
CallChar 13, "49FF25FF49FF25FF", Black, Red
' \/\/\/\/\/\/\/\/\/\/\/
' Numbers ( 0 - 9 )
' /\/\/\/\/\/\/\/\/\/\/\
CallChar 14, "0038444444444438", Black, Blue
CallChar 15, "0010301010101038", Black, Blue
CallChar 16, "003844040810207C", Black, Blue
CallChar 17, "0038440418044438", Black, Blue
CallChar 18, "00081828487C0808", Black, Blue
CallChar 19, "007C407804044438", Black, Blue
CallChar 20, "0018204078444438", Black, Blue
CallChar 21, "007C040810202020", Black, Blue
CallChar 22, "0038444438444438", Black, Blue
CallChar 23, "003844443C040830", Black, Blue
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Math Symbols ( + - * / . )
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
CallChar 24, "000010107C101000", Black, Blue
CallChar 25, "000000007C000000", Black, Blue
CallChar 26, "0000221408142200", Black, Blue
CallChar 27, "1818007E7E001818", Black, Blue
CallChar 28, "0000000000003030", Black, Blue
CallChar 29, "000000000000007C", Black, Blue
' \/\/\/\/\/\/\/\/\/\/\/
' Letters ( A - Z )
' /\/\/\/\/\/\/\/\/\/\/\
CallChar 30, "003844447C444444", Black, Blue
CallChar 31, "0078242438242478", Black, Blue
CallChar 32, "0038444040404438", Black, Blue
CallChar 33, "0078242424242478", Black, Blue
CallChar 34, "007C40407840407C", Black, Blue
CallChar 35, "007C404078404040", Black, Blue
CallChar 36, "003C40405C444438", Black, Blue
CallChar 37, "004444447C444444", Black, Blue
CallChar 38, "0038101010101038", Black, Blue
CallChar 39, "0004040404044438", Black, Blue
CallChar 40, "0044485060504844", Black, Blue
CallChar 41, "004040404040407C", Black, Blue
CallChar 42, "00446C5454444444", Black, Blue
CallChar 43, "00446464544C4C44", Black, Blue
CallChar 44, "007C44444444447C", Black, Blue
CallChar 45, "0078444478404040", Black, Blue
CallChar 46, "0038444444544834", Black, Blue
CallChar 47, "0078444478504844", Black, Blue
CallChar 48, "0038444038044438", Black, Blue
CallChar 49, "007C101010101010", Black, Blue
CallChar 50, "0044444444444438", Black, Blue
CallChar 51, "0044444428281010", Black, Blue
CallChar 52, "0044444454545428", Black, Blue
CallChar 53, "0044442810284444", Black, Blue
CallChar 54, "0044442810101010", Black, Blue
CallChar 55, "007C04081020407C", Black, Blue
' \/\/\/\/\/\/\/\/\/\/\/
' Symbols ( , ' ? )
' /\/\/\/\/\/\/\/\/\/\/\
CallChar 56, "0000000000301020", Black, Blue
CallChar 57, "0008081000000000", Black, Blue
CallChar 58, "0038440408100010", Black, Blue
CallChar 64, "007C7C7C7C7C7C7C", Black, Black
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' ( Character Definition )
' CALL CHAR (char-code, "pattern-identifier")
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
temp
= BinValue
(VAL("&H" + MID$(Code
, 2 * v
+ 1, 2)), 8)
Cursor = True
x1 = Mag * Col - 1: x2 = x1 + Mag - 1
y1 = Mag * Row - 1: y2 = y1 + Mag - 1
LINE (x1
, y1
)-(x2
, y2
), Blue
, BF
Cursor = False
Cursor = True
Frames = Frames + 1
IF Frames
= Limit
THEN Frames
= 0
CharInput = touch
text = " Daring Dan likes to climb, and he has the challenge of climbing up a tall"
text
= text
+ " brick wall." + SPACE$(28) + " Can you help him?" text
= text
+ SPACE$(30) + " Every right answer to a math question will help" text = text + " him get higher on the wall and closer to his goal."
WordWrap text: touch = CharInput(11, 15)
text = " Watch out, though, one wrong answer and poor 'ole Dan will fall to the"
text
= text
+ " ground." + SPACE$(34) text = text + " Don't worry, Dan will survive the fall and you can try again."
WordWrap text: touch = CharInput(11, 15)
text
= " Do you want to?" + SPACE$(32) text
= text
+ " 1. Easy Numbers" + SPACE$(12) + "* 1, 2, 3 *" + SPACE$(34) text = text + "2. Advanced Numbers * 1.2, 2.4, 3.6 *"
WordWrap text
text = " Daring Dan likes to climb, and he has the challenge of climbing up a tall"
text
= text
+ " brick wall." + SPACE$(36) + "Can you help him?" + SPACE$(46) text = text + " Every right answer to a math question will help him get higher on"
text
= text
+ " the wall and closer to his goal." + SPACE$(52) text = text + " Watch out, though, one wrong answer and poor 'ole Dan will fall to the"
text
= text
+ " ground." + SPACE$(46) text = text + " Don't worry, Dan will survive the fall and you can try again."
WordWrap text: touch = CharInput(11, 15)
text
= " Do you want to?" + SPACE$(32) text
= text
+ " 1. Easy Numbers" + SPACE$(12) + "* 1, 2, 3 *" + SPACE$(34) text = text + "2. Advanced Numbers * 1.2, 2.4, 3.6 *"
WordWrap text
Done = False
Level = CharInput(11, 15)
IF Level
= "1" OR Level
= "2" THEN Done
= True
LINE (0, 0)-(xScreen
- 1, yScreen
- 1), Blue
, BF
GameTitle -1
IF zoom
= 2 THEN Mag
= 8: Row
= 5 IF zoom
= 3 THEN Mag
= 16: Row
= 4 IF zoom
> 3 THEN Mag
= 16: Row
= 5
length = xScreen \ Mag
t = length
CharPrint Row
, 0, LEFT$(text
, t
), 0
Row = Row + 1
CharPrint Row, 0, text, 0
Mag = 8 * zoom
Mag = 8 * zoom
text = "Math Climber"
CharPrint 0, 0, text, -1
text = "by [banned user]"
CharPrint 1, 0, text, -1
LINE (0, 0)-(xScreen
- 1, yScreen
- 1), Blue
, BF
'text = "The Wall of Math"
'CharPrint 0, 0, text, -1
text = "TRUMP'S WALL"
CharPrint 0, 0, text, -1
y1 = Mag * 2: y2 = y1 + Mag - 1
x1 = xScreen \ 2 - 21: x2 = x1 + Mag - 1
_PUTIMAGE (x1
+ 8, y1
)-(x2
+ 8, y2
), Sprite
(9) _PUTIMAGE (x1
+ 16, y1
)-(x2
+ 16, y2
), Sprite
(10)
y1 = Mag * v: y2 = y1 + Mag - 1
_PUTIMAGE (x1
+ 8, y1
)-(x2
+ 8, y2
), Sprite
(12) _PUTIMAGE (x1
+ 16, y1
)-(x2
+ 16, y2
), Sprite
(13)
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Print text to the screen
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
y1 = Mag * row: y2 = y1 + Mag - 1
temp = "0123456789+-*/._ABCDEFGHIJKLMNOPQRSTUVWXYZ,'?"
x1 = Mag * (col + c): x2 = x1 + Mag - 1
temp
= MID$("+-*/", Math.sym
, 1)
IF Math.exp1
/ Math.exp2
<> Math.exp1 \ Math.exp2
THEN
IF Math.exp1
/ Math.exp2
= Math.exp1 \ Math.exp2
THEN Safe
= -1
CASE 1: Math.ans
= Math.exp1
+ Math.exp2
CASE 2: Math.ans
= Math.exp1
- Math.exp2
CASE 3: Math.ans
= Math.exp1
* Math.exp2
CASE 4: Math.ans
= Math.exp1
/ Math.exp2
Ready = -1
Exp2
= temp
+ STR$(Math.exp2
)
ea1
= LEN(Exp1
): ea2
= LEN(Exp2
)
CharPrint 2, x - ea1, Exp1, 0
CharPrint 3, x - ea2, Exp2, 0
CharPrint
4, x
- 4, STRING$(5, "_"), 0 CharPrint
5, x
- sa
, STRING$(sa
, "?"), 0
temp = ""
touch = CharInput(11, 15)
temp
= "": sa
= LEN(Math.ans
) CharPrint
5, x
- sa
, STRING$(sa
, "?"), 0 CharPrint 5, x - sa, touch, 0
temp = temp + touch: sa = sa - 1
Background
yClimb = yClimb - Mag \ 2
_PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(6) _PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(7)
Background
yClimb = yClimb - Mag \ 2
_PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(5)
uClimb
= (uClimb
+ 1) MOD 2
Background
_PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(6) _PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(7)
Background
_PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(5)
Background
'IF y MOD 2 = 0 THEN
_PUTIMAGE (xClimb
, y
)-(xClimb
+ Mag
- 1, y
+ Mag
- 1), Sprite
(6) 'ELSE
'_PUTIMAGE (xClimb, y)-(xClimb + Mag - 1, y + Mag - 1), Sprite(7)
'END IF
_PUTIMAGE (xClimb
, y
)-(xClimb
+ Mag
- 1, y
+ Mag
- 1), Sprite
(7) text = "BOOM"
CharPrint 18, 6, text, 0
GameOver 0
yScreen = 156 * zoom
yClimb = 11 * Mag
xClimb = xScreen \ 2 - 12
Background
_PUTIMAGE (xClimb
, yClimb
)-(xClimb
+ Mag
- 1, yClimb
+ Mag
- 1), Sprite
(5)
MathProblem
HappyDance
Done = True
text = " Congratulations. You helped that daring Dan make it to the to of the Wall of Math."
text
= text
+ SPACE$(32) + " Would you like to play again?" + SPACE$(38) + " 1. Yes 2. No" text = " Awe, You tried, but failed to help daring Dan make it to the top. Don't be sad though."
text
= text
+ SPACE$(26) + " Would you like to play again?" + SPACE$(38) + " 1. Yes 2. No"
LINE (0, 0)-(xScreen
- 1, yScreen
- 1), Blue
, BF
GameTitle -1
WordWrap text
touch = CharInput(12, 15)