Author Topic: c4ooo's Useless but cool programs. [ti-basic] [axe]  (Read 11531 times)

0 Members and 1 Guest are viewing this topic.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
c4ooo's Useless but cool programs. [ti-basic] [axe]
« on: October 12, 2015, 07:29:56 pm »
Over the years I have made a selection of cool but useless programs. Rather then letting them rot, I decided to share the code. Some of them have evolved over time, some where lost iin ram clears before i even got a cable ect ect..

Tron (ti-basic)
This was my "hello world" program for ti-basic. I have made some improvments to it over time. Note: this is a striped down version and does not contain score keeping.
Code: [Select]
ClrDraw
Horizontal yMin
Horizontal yMax
Vertical xMin
Vertical xMax
5->X
5->Y
26->Z
Repeat pxl-Test(Y,X
pxl-on(Y,X
getKey
If ans
ans->Z
X+(Z=26)-(Z=24)->X
Y+(Z=34)-(Z=25)->Y
End
If you want "Minefield tron, add this line after "pxl-on(Y,X
Code: [Select]
pxl-on(randInt(1,62),randInt(1,92))

Christmas Card (ti-basic)
This program will display a snowflake animation with the words "Happy New Year".
Code: [Select]
"                "->Str2 "This is 16 spaces
Str2+Str2->Str1
Str1+Str1+Str1+Str1->Str1
While 1
randInt(1,15)
sub(sub(Str2,1,Ans)+"*"+Sub(Str2,1,16-Ans)+Str1,1,128)->Str1
Output(1,1,Str1
Output(8,1,"Happy New Year!!"
End
If you want the snowflakes to fall straight down, replace
Code: [Select]
randInt(1,15)
sub(sub(Str2,1,Ans)+"*"+Sub(Str2,1,16-Ans)+Str1,1,128)->Str1
with
Code: [Select]
randInt(1,16)
sub(sub(sub(Str2,1,Ans)+"*"+sub(Str2,17-Ans),2,16)+Str1,1,128)->Str1
,as well as add two spaces to the string in the first line. In total it should have 18 spaces.
Go make an obstacle avoidence game with that!  ;D

Static screen program (axe)
This makes static... (Good axe coding style)
Code: [Select]
Repeate getKey(41)
L6
While ->X
rand->{X}^r
X+2
End
DispGraph
End

Cursed circle drawing program (axe)
This program draws cool circles using sin() and cos(). Use the arrow keys to operate. Also in axe 1.3.0 it compiles to exact 666 bytes, so yea... :P NB: THIS IS A POOR EXAMPLE OF OPTIMIZED AXE!!! I MADE THIS A LONG TIME AGO!!!
Code: [Select]
.A
Fix 5
4->D
1->E
TEXT() .NOT THE Text() COMMAND!!!
5->F
Reapear getKey(41)
If getKey(2)
D--
TEXT()
ElseIf getKey(3)
D++
TEXT()
ElseIf getKey(1)
E--
TEXT()
ElseIf getKey(4)
E++
TEXT()
End
0->X
30->Y
Rot(A++//D)
N->Y
o->Y
ROT(B++//E)
Pxl-On(X+N+28,Y+O+32
DS<(F,100
DispGraph
End
End
Return
lbl ROT
cos(r1)->
sin(r1->S
X*C-(Y*S)//256->N
X*S+(Y*C)//256->O
Return
Lbl TEXT
Text(0,0,D>Dec
Text(0,10,E>Dec
Pause 100
Return

As time goes on i will post more. Feal free to ask if you have any question or comments! :D

Ps: gona add some tags so that beginner programers  will have an easier time finding this :) (Idk if this will affect google search results but its a try anyway)
Tags: ti-basic ti basic ti-84 plus ti-83 84 83 arcade source code demo pong Tetris snake tutorial packman graphing calculator games programs send
« Last Edit: October 12, 2015, 07:49:14 pm by c4ooo »
-German Kuznetsov
The impossible chemical compound.