Join us on Discord!
You can help CodeWalrus stay online by donating here.

c4ooo's Useless but cool programs. [ti-basic][axe]

Started by c4ooo, October 01, 2015, 07:52:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

c4ooo

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.

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

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".

"                "->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

randInt(1,15)
sub(sub(Str2,1,Ans)+"*"+Sub(Str2,1,16-Ans)+Str1,1,128)->Str1

with

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)

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!!!

.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

Dream of Omnimaga

Some of those are good ways to learn programming. Starting with large projects is often not a good idea. As for Tron with mines, I think I made such game before but it used Lbl/Goto for loops.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

#2
Quote from: DJ Omnimaga on October 03, 2015, 04:49:17 AM
Some of those are good ways to learn programming. Starting with large projects is often not a good idea. As for Tron with mines, I think I made such game before but it used Lbl/Goto for loops.
Thanks DJ!  ;D

I added two more, now in axe. : P :D

Edit: that smily ninja'd me! :P

Dream of Omnimaga

By the way, I once made a sandstorm or snow program that copied a specific RAM area on the screen as I scanned through it. In grayscale it looked like some sort of mild sandstorm, while in monochrome it looked like a big one. I should check if it's still somewhere at some point.


Do you have plans for future games by the way?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo


Powered by EzPortal