Hey guys, I'm back! (Finally), so over the weekend, I worked on a program called prgmGESCOORD. What you have to do is guess the coordinates of where the COM is, and it takes a lot of thinking. I will post the program as soon as possible. I am improving my TI-Basic skills a lot more. There are still a bunch of things I don't know about using BASIC. So, if any of you guys have any questions, please contact me on this thread. I made my own menu instead of using the BASIC built-in menus, so this game should be fun and addicting. I spent a few hours trying to improve my scores! So, yeah. If you just want the menu code instead, I will post the code. The code is 535 kilobytes long unless you change the code or optimize it, so there. Thanks fellow TI-Basic dudes!
Want the menu code? Here it is:
PROGRAM:MENU
{1,1→dim([H]
Clear Entries
ClrHome
ClrDraw
2→O
Lbl M
Repeat K
getKey→K
Output(7,1,getTmStr(getTmFmt
Output(1,1," //Program Title
Output(2,2,"Option 1
Output(3,2,"Option 2
Output(4,2,"Option 3
Output(5,2,"Quit
Output(6,1,"---------------- //There should be 16 of the "-".
Output(8,1,"m:"
Output(8,3,[H](1,1
Output(O,1,">
If K=25:Then
[H](1,1)+1→[H](1,1)
O-1→O
If O<2:Then
5→O
End
Output(O,1,">
End
If K=34:Then
[H](1,1)+1→[H](1,1)
O+1→O
If O>5:Then
2→O
End
Output(O,1,">
End
If O=2:Then
Output(3,1," "
Output(4,1," "
Output(5,1," "
End
If O=3:Then
Output(2,1," "
Output(4,1," "
Output(5,1," "
End
If O=4:Then
Output(2,1," "
Output(5,1," "
Output(3,1," "
End
If O=5:Then
Output(2,1," "
Output(3,1," "
Output(4,1," "
End
If K=105 and O=2:Then
ClrHome
Goto 1
End
If K=105 and O=3:Then
ClrHome
Goto 2
End
If K=105 and O=4:Then
ClrHome
Goto 3
End
If K=105 and O=5:Then
ClrHome
Stop
End
End
Goto M
Info:
535 bytes of RAM/Archive
Optimizations are needed (If possible)
There is a Goto M and Lbl M in order for the prgm to work better.
Available for any BASIC model
Im pretty sure this won't work on the 83+ because of the getTmStr(getTmFmt; although it looks like that line doesn't really do much anyways since its just an output
The if commands could be optimized. Also you could put
Repeat k=105
Stuff…
End
If…
If…
If…
You would have to move stuff around and it might be a pain to do that. But space would be saved because you could get rid of the K=105 and… Part.
I don't know if my calculator has enough space left on it to put this in to it to try it.
It may be time for the dreaded memory purge….
JOIN THE SEUSCPC TODAY
South Eastern United States Calculator Programming Club
A Proud Supporter of The Ti BASIC Community
Two things Professor Pat:
[1] If you did :
Repeat K=105
//It will only accept [ENTER], and will not except up or down keys. So it will not scroll through the menu.
[2] And, I see you are new to TI-Basic Developer! Welcome! You can ask anyone to help with the programming!
In which case you would do:
Repeat max(K={25,34,105
BUT using "If K" is truly better. Nice!
:)
Thank you. This wiki has a lot of good information on it.
3->B
ClrHome
Repeat K=105
Getkey->K
Output(1,7,"MENU
Output(2,1,"----------------
Output(3,4,"OPTION ONE
Output(4,4,"OPTION TWO
Output(5,4,"OPTION THREE
Output(6,4,"QUIT
If Ans
Output(B,1," "
If K=25
B-1->B
If K=34
B+1->B
If B=2
6->B
If B=7
3->B
Output(B,1,">"
End
B-2>B
If B=4
Stop
If B=1
Goto 1
If B=2
Goto 2
If B=3
Goto 3
I tried to make a menu. It's OK-ish
I didn't spend very long on it. Any criticism or tips related to this?
JOIN THE SEUSCPC TODAY
South Eastern United States Calculator Programming Club
A Proud Supporter of The Ti BASIC Community
If K=25
B-1->B
If K=34
B+1->B
could be
B-(K=25)+(K=34->B
Output(B,1," "
This doesn't need the closing parenthesis since there is nothing after it (e.g. a semicolon). So it would be:
Output(B,1,"
(You still put the one space in there)
And then maybe this is just me, but it is easier if you combine If commands with their actions using a semicolon. What I mean by this:
If B=7
3->B
could be
If B=7:3->B
You also want to leave your homescreen setup out of the Repeat loop. This is because the program keeps on redrawing your homescreen, but by initializing the homescreen before the loop, you dramatically increase your program speed.
This is the end result:
3->B
ClrHome
Output(1,7,"MENU
Output(2,1,"----------------
Output(3,4,"OPTION ONE
Output(4,4,"OPTION TWO
Output(5,4,"OPTION THREE
Output(6,4,"QUIT
Repeat K=105
getKey->K
If Ans:Output(B,1," "
B-(K=25)+(K=34->B
If B=2:6->B
If B=7:3->B
Output(B,1,">"
End
B-2->B
If B=4:Stop
If B=1:Goto 1
If B=2:Goto 2
If B=3:Goto 3
Well at LEAST i tried… :/
Failure usually comes before success. If you fail, don't take it as a sign you should quit; rather, take it as a sign you should work harder since you now know what not to do.
Here is my schedule just in case if you want to know when I am availible to chat.
Mon=
12:00-12:30
Tue-Thu=
11:55-12:25
Wed-Fri
11:55-12:25
NOT AVAILABLE ON WEEKENDS!
Also availible 7:50 A.M.-8:10 A.M.
You do realize that we're all (probably) in different time zones, right?
Well, its 12:00 somewhere, so he must be available to chat
Ah, Battlesquid is correct. I do live in Utah, and the time info is -7 hours. I am in middle school too. (8th grade)