Hiya everyone!
Just made myself a super basic die rolling game today, and need a bit of help optimizing it. I would try a bit harder to do it myself, but I'm a tad busy at the moment, so I thought I might put this out for ya guys. ^.^
Instructions:
Tap Enter until either you roll the die number (the highest number you could roll on the die), or a 1. Press minus on 1 to shift down one die, and press plus on the max to shift up a die. If you fail to shift down on a 1, you are shifted down two levels instead. Continue climbing up until you beat the d100. Your score is the amount of time you take to finish.
Requests:
- Optimize as much as possible.
- Add a message when player shifts up ("SHIFT UP!"), shifts down ("SHIFT DOWN!"), and is penalized for pressing the wrong key at 1. ("PENALTY!")
- End game screen displaying time.
If you guys could do any or all of those, that would be awesome. ^.^ I'll include some comments in later, hopefully you guys can figure it out until then though. xD Yes, I also need to rename it from SCALE to SHIFT.
Thanks!
ClrHome
Output(1,1,"TAP ENTER UNTIL A 1 OR THE DIE NUMBER APPEARS. PRESS - ON A 1 AND + ON THE DIENUMBER. PASS D100 TO WIN.
Pause
ClrHome
DelVar ADelVar BDelVar CDelVar DDelVar EDelVar FDelVar L1DelVar L2DelVar L3
1->A
{2,4,6,8,10,12,20,100->L1
startTmr->D
Repeat A=9
randInt(1,L1(A->B
Disp " D"+sub(" 2: 4: 6: 8: 10: 12: 20: 100:",1+4A,4
Disp Ans
Repeat max(Ans={25,34,85,95,105
getKey->K
End
A+3(Ans=95)(B=L1(A))-2(Ans=95)-2(Ans=105)(B=1)-(Ans=85->A
If A<=0
1->A
End
Lbl A
checkTmr(D)/60
Disp "MIN:",int(Ans),"SEC:",int(60fPart(Ans
"