Author Topic: Math Attack!  (Read 3217 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Math Attack!
« on: January 27, 2011, 11:38:47 pm »
As mentioned earlier today/yesterday in a recent article, there are fewer BASIC project releases. This isn't much, but it is at least a fun start! Well, fun if math=vitamins for Zeda's (not a Doctor Tran reference).

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Math Attack!
« Reply #1 on: January 28, 2011, 01:45:16 am »
If this is for the 84 you could add a timer. Right before the game starts use the command start->A (at least that is what I think the timer command is) and then after all the question are over, start-A->A, will yield the time in seconds in took to answer all the questions.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Math Attack!
« Reply #2 on: January 28, 2011, 01:49:47 am »
If this is for the 84 you could add a timer. Right before the game starts use the command start->A (at least that is what I think the timer command is) and then after all the question are over, start-A->A, will yield the time in seconds in took to answer all the questions.
On start:
startTmr→A
On end:
checkTmr(A

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Math Attack!
« Reply #3 on: January 28, 2011, 09:06:38 am »
:P I know :D I used to be a pro BASIC programmer back in the day, then I switched over to Assembly :)
Okay, well I wasn't that good...
Here is another proggy I am going to update soon, too... I think I made it 4 years ago (before I had a cable, computer, and internet) I don't have the program uploaded, but it is the text source...
I used the timer in this and I even used it like a pro (so that when you paused it didn't change the over all time):
Spoiler For Spoiler:
Code: [Select]
¤¤¤
¤¤¤¤¤
¤
 ¤¤¤
¤   ¤
The object of this game is to eat (move into) 100 blocks
there are random obsticals that you may have to get around.
[MODE]=sleep mode while playing.
             prgmBLOCKEAT

:Setupeditor LEAT       (LEAT IS A LIST(LITTLE L))
:if 9<dim(LEAT
:Goto 3
:lbl 7
:seq(40+5X,X,0,9->LEAT  -> is the sto command
:lbl 3
:asm(prgmA1             asmprgmEF7045C9 (run indicator off)
:clrdraw
:clrhome
:Menu("BLOCK EATER","PLAY",2,"HIGH SCORES",4,"RESET SCORES",7,"EXIT",6
:lbl 4
:delvar C
:Repeat B=22 or B=105
:For(A,1,9
:if A+9C<dim(LEAT       < in this case should be "less than or equal to"
:Text(6A,0,A+9C,":",LEAT(A+9C
:End
:Repeat B           *an alternative to this is asm(prgmGETKEY
:getkey ->B          asmprgmEF4447FE0028F6EF5641EFBA43EFC541214200227984EFD44AC9
:End                 if you do this, get rid of the 3 lines including Repeat B,Getkey->B,End
:C+(B=34->C
:C-(B=25->C
:if C<0
:ipart(dim(LEAT)/8->C
:if C=1+ipart(dim(LEAT)/8
:delvar C
:End
:Goto 3
:lbl 2
:10->C
:Full
:axesoff
:Zstandard
:ZInteger
:Horizontal -24
:Horizontal 27
:Vertical -38
:vertical 33
:asm(prgmA1
:For(A,-36,29,10
:For(B,-22,23,5
:pt-on(A,B
:pt-on(A,B+1
:pt-on(A+1,B
:pt-on(A+1,B+1
:pt-on(A+5,B
:pt-on(A+5,B+1
:pt-on(A+6,B
:pt-on(A+6,B+1
:End
:End
:randInt(4,9->I
:For(F,1,I
:5randInt(-4,4->B
:5randInt(-4,4->E
:For(H,3,7
:line(H+B,2+E,H+B,,16+E
:End
:End
:10->B
:-37->E
:21->F
:34->H
:delvar Istarttmr->J  You can do this with delvar. if you do not want to,Delvar I and the starttmr->J
:lbl 1
:Repeat A=22 or A=21 or (A=24 and 0=pxl-test(B,C-1)) or (A=25 and 0=pxl-test(B-1,C)) or (A=26 and 0=pxl-test(B,C+5)) or (A=34 and not(pxl-test(B+5,C
:getkey->A
:if A=21 or A=22
:1->M
:if A=21 or A=22 or not(A
:H->A
:End
:A->H
:if M
:Then
:delvar MJ->K
:starttmr->L
:asm(prgmA24         asmprgm3E02D310EF4447FE0028F63E03D310C9 acts as a sleep mode until a button is pressed.
:J-L+starttmr->J
:End
:H->A
:Text(6,0,checktmr(J
:I+pxl-test(B+2,C+2->I
:Text(0,0,I
:A=24->D
:if A=26
:2->D
:if A=25
:4->D
:if a=34
:3->D
:For(G,0,4
:line(E,F-G,E+4,F-G,0
:End
:if D=2
:C+5->C
:if D=1
:C-5->C
:if D=3
:B+5->B
:if D=4
:B-5->B
:C-47->E
:31-B->F
:if D<3
:then
:line(E+1,F,E+3,F
:line(E,F-1,E+4,F-1
:line(E+1,F-3,E+3,F-3
:pt-on(E,F-4
:pt-on(E+4,F-4
:End
:if D>2
:then
:line(E,F-1,E,F-3
:line(E+1,F,E+1,F-4
:line(E+3,F-1,E+3,F-3
:pt-on(E+4,F
:pt-on(E+4,F-4
:End
:pt-on(E+4(D=1),F-2
:pt-on(E+2,F-4(D=4
:if I(NOT EQUAL)100
:Goto 1
:checktmr(J->J
:J->LEAT(1+dim(LEAT
:SortA(LEAT
:delvar AOutput(1,1,"PLACED:
:Repeat J=LEAT(A
:A+1->A
:END
:Output(1,8,A
:Pause
:Clrhome
:Output(1,1,"TIME:
:Output(1,6,J
:Pause
:Goto 3
:lbl 6
:Output(1,1,"


 OOO
OOOOO
O
 OOO
O   O
 
ASSEMBLY CODES:
These codes have been,for the most part,not my own making.
I found most online, and the ones I experimented with and
learned,I used to make new ones.Have fun with these!
*All of these must start in a BASIC program with asmprgm at the front.
A1:EF7045C9                          :RUN INDICATOR OFF
A2:21028A3E50B677C9 or FDCB12E6C9    :ALPHA ON
A3:21028A3E0F1677C9                  :ALPHA OFF
A4:21028A3ED0B677C9                  :ALPHA LOCK (MODE TO QUIT)
A5:DB10CB6F20053E03D310C93E02D310C9  :turns SCREEN on/off
A6:21F8893E02AE77C9                  :ALLOWS YOU TO:UNARCHIVE PROGRAMS IN A PROGRAM,ARCHIVE THEM,AND MAKE PROGRAMS ON THE HOME SCREEN.format:asm(A6:ARCH/UNARCH PROGRAM:asm(A6
A7:3E03D310C9                        :SCREEN ON
A8:3E02D310C9                        :SCREEN OFF
A9:21F5893E08AE77C9                  :INVERSE TEXT
A10:21148A3E08AE77C9                 :TOGGLES LOWERCASE MODE ON/OFF
A11:EF4045C9                         :CLEARS SCREEN
A12:*210000115F3FEF624DC9*           :BLACK SCREEN SEE NOTES BELOW
A13:*210000115F3FEF624DC9*           :INVERSE SCREEN SEE NOTES BELOW
A14:21028A3E01AE77C9                 :TOGGLES INDICATOR ON/OFF
A15:21028A3E30B677C9                 :LIKE A2,EXCEPT IT IS LOWERCASE
A16:21028A3EB0B677C9                 :LIKE A4,EXCEPT IT IS LOWERCASE
A17:EFE542EF9247EF5641EFBA43         :GET AMOUNT OF RAM SEE NOTES BELOW
    EFC54121(*41*)00227984EFD44AC9
A18:3E01D303C9                       :CALC OFF
A19:EF4447FE0028F6EF5641EFBA43
    EFC54121(*41*)00227984EFD44AC9   :GETKEY SEE NOTES BELOW
These I found under 83Plus:BASIC:Tricks ExecAsm
A20:2140930E40060CB7CB1E2310FB0D20F5 :SHIFT SCREEN RIGHT
    EF6A48C9
A21:213F960E40060CB7CB162B10FB0D20F5 :SHIFT SCREEN LEFT
    EF6A48C9
A22:214C9311409301F402EDB0EB010C00   :SHIFT SCREEN UP
    EF304CEF6A48C9
A23:213396113F9601F402EDB823010C00   :SHIFT SCREEN DOWN
    EF304CEF6A48C9
A24:2147847EC6(04)D877C6D8CD0B00D310C9:INCREASE CONTRAST 04 CAN BE A HEX NUMBER OF YOUR CHOICE.I DO NOT RECOMMEND HIGH NUMBERS BECAUSE THIS CAN GET SCREWY.THE CODE THAT IS ON THE SITE DOES NOT WORK SO THIS IS HOW I FIXED IT.
A25:2147847ED6(04)D877C6D8CD0B00D310C9:DECREASE CONTRAST 04 CAN BE A HEX NUMBER OF YOUR CHOICE.I DO NOT RECOMMEND HIGH NUMBERS BECAUSE THIS CAN GET SCREWY.
A26:EFE04AEFEF4AC6C0CD0B00D310C9     :CHANGES CONTRAST DEPENDING ON THE X VARIABLE USE ONLY 0~63 AND MAKE SURE X IS EXISTING.
A27:FDCB3CE6C9                       :CIRCLES ARE DRAWN FASTER.YOU COULD ALSO DO Circle(X,Y,R,{i WHERE i IS THE IMAGINARY NUMER.
A28:FDCB00AE                         :GETS RID OF Done AT THE END OF THE PROGRAM. YOU COULD ALSO DO Output(1,1,"
A29:EFBF41EFB3502803EF9B41EFBF4A     :BATTERY CHECK 0=GOOD 1=BAD.I THINK THIS IS WRONG,BUT I HAVE NOT REALLY EXPLORED IT.ANSWER IS IN Ans
 
**NOTES ON THE BOTTOM**
A12&A13-
WHERE IT SAYS 210000 AND 115F3F, THE 0000 AND 5F3F CAN BE CHANGED TO 21(00~5F)(00~3F) AND 11(00~5F)(00~3F).THE 11 DUAL SETS HAVE TO BE
HIGHER THAN OR EQUAL TO THE 21'S FOR EXAMPLE,21123F 11503F THE 12 IS LESS THAN 50 AND 3F=3F.
THIS CHANGES HOW BIG THE SQUARE IS THAT IS TURNED BLACK OR INVERSE. IF YOU UNDERSTAND Text(,FIND THE DECIMAL EQUIVALENTS AND YOU WILL SEE THE PATTERN

A17&A19-
41 JUST MEANS IT IS STORED TO A.YOU CAN HAVE IT BE 42 AND IT IS STORED TO B. HERE IS A SMALL CHART.
41-A
42-B
43-C
44-D
45-E
46-F
47-G
48-H
49-I
4A-J
4B-K
4C-L
4D-M
4E-N
4F-O
50-P
51-Q
52-R
53-S
54-T
55-U
56-V
57-W
58-X
59-Y
5A-Z
5B-THETA (THE O WITH A LINE THROUGH IT)
AFTER 5B AND BEFORE 41,YOU WILL HAVE PROBLEMS.
That is the readme/source for it... again, I plan to update it (actually, I have, but not all the way).
So actually,  made this back in 2008. I learned how to do assembly about a year and a half later :D
Like those hexcodes I played with back before I knew anything?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math Attack!
« Reply #4 on: January 28, 2011, 09:43:50 am »
Interesting, it kinda reminds me of that French program by Kiligolo called Calcul Mental. Also note that if you add clock commands to your program, TI-83+/83+SE users will not be able to play it. This is a lot of people, because many still go for the 83+ due to being cheaper.
« Last Edit: January 28, 2011, 09:44:11 am by DJ Omnimaga »

Ashbad

  • Guest
Re: Math Attack!
« Reply #5 on: January 28, 2011, 11:09:24 am »
This is a lot of people, because many still go for the 83+ due to being cheaper.

Not always nessicarily true ;)

most people in my math class who dont' program (which is all but me) who have calculators bought the fanciest ones possible: ti84+ SE's in cool colors like blue or pink -- and even I don't have that!  Of course, their archive will never shoot down below 1500K, and their calcs will have been bought with specs they don't use for possibly as much as $60 more than the simple 83/83+'s (yes, the office depot near me still sells the normal 83, which costs like $50)

Though, even then, they have the hardware -- doesn't mean they'll ever think of usuing that usb cable to add programs on anytime soon :)

So xeda, I personally think you should do whatever you think is coolioest -- but my idea is you could possibly put out a 83+ version with no clock or some handmade one, and a 84+ version with a real clock.

Sorry about the rants today, I'm in that certain mood ^-^

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Math Attack!
« Reply #6 on: January 28, 2011, 11:32:53 am »
That sounds like a good idea! I just realised, too, that a lot of my programs use the clock D: I should learn how to make an interrupt in assembly so that I can make a clock for calcs that don't have a clock...

But, anywho, maybe I won't add the clock. I was looking at an old memory game where you were given a string to remember and it was displayed for a certain amount of time. The string got longer and at certain points, new characters were added to the mix and you had less and less time to remember the strings... oh, that was fun! So, maybe I can add a mode that displays the problem for a limited time... I used a For( loop in the memory game.

Also, I made plans to add in an option to change bases and to individually control how large the numbers are (so integer 1 could be 6 digits, integer 2 could be 2 digits)

I have a version that I started a year ago that I found yesterday that does the base conversions and makes the questions and has the modes I mentioned, but it doesn't have any easy to use features... yet... It also uses two assembly programs I made (very small, just to save and change some settings), so I want to remove those from the end product or include them as options.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math Attack!
« Reply #7 on: January 30, 2011, 04:05:01 am »
This is a lot of people, because many still go for the 83+ due to being cheaper.

Not always nessicarily true ;)

most people in my math class who dont' program (which is all but me) who have calculators bought the fanciest ones possible: ti84+ SE's in cool colors like blue or pink -- and even I don't have that!  Of course, their archive will never shoot down below 1500K, and their calcs will have been bought with specs they don't use for possibly as much as $60 more than the simple 83/83+'s (yes, the office depot near me still sells the normal 83, which costs like $50)

Though, even then, they have the hardware -- doesn't mean they'll ever think of usuing that usb cable to add programs on anytime soon :)

So xeda, I personally think you should do whatever you think is coolioest -- but my idea is you could possibly put out a 83+ version with no clock or some handmade one, and a 84+ version with a real clock.

Sorry about the rants today, I'm in that certain mood ^-^
Ah weird, I was sure people still went for the 83+ because I often see them around and no 84+ and a lot of people still have them it seems. I guess she could make a 84+ version and a 83+ one.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Math Attack!
« Reply #8 on: January 30, 2011, 04:07:10 am »
Hm, I think I'll go for the method that uses a For( loop that way it is the same for both models

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math Attack!
« Reply #9 on: January 30, 2011, 04:08:50 am »
Ok, it's up to you I guess.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Math Attack!
« Reply #10 on: January 30, 2011, 03:31:33 pm »
Looks cool Xeda, a timer idea sounds cool too :D

...
most people in my math class who dont' program (which is all but me) who have calculators bought the fanciest ones possible: ti84+ SE's in cool colors like blue or pink -- and even I don't have that!  Of course, their archive will never shoot down below 1500K, ...

Actually those with 84+SE's who don't use them have calcs with archive space that is often horrendously low due to all the bloatware apps that come with 84+SEs...because they will never even bother to delete those apps ;)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math Attack!
« Reply #11 on: January 31, 2011, 02:42:48 pm »
Yeah they're scared it will kill the calc so they don't delete them. :P

This is nothing compared to the TI-Nspire 84+ OS, though: It comes with about 1200 KB of TI apps.