Well. This is Aeromax (formerly known as Flameviper). I've been wandering the Internet for a while now. Anyway, I'm a TI-BASIC programmer and I've made several games for the TI-8X. I don't have access to all of them (laptop broken) currently, so this is what I have right now. (Files hosted on United-TI )

GRAFPRIX - Graph Prix '08, a driving game for the graph. Approx. 10,500 bytes; the biggest game I've ever made. It has 4 levels, 50 high scores for individual legs, 200 scores for the whole track, archived (by the program) in LL400 - LL408. You might have to reset them in DEBUG before the program works right.

ROTATOR - Rotorswat, which I programmed yesterday. Uses LL411 to store its high scores. Essentially, pixels fly across the screen and you have to hit them by spinning a stick. About 2,500 bytes. Again, if it doesn't work right the first time, might have to do 20->Dim(LL411) and then Fill(0,LL411) to get it working right.

DODGER - Spikerunner '06, the first game I ever made. It took me about a month to do it; now I can make a game twice the quality in a day. But it's a pretty solid game in its own right. It uses ASCII elements, and you're an X at the bottom of the screen who has to dodge the V's that come flying down (the closer you get to them the more points you get, but if they hit you, you die). About 6,600 bytes. Uses L300 for storage.[url][/url]
As the people on UTI said, interesting concepts, but the coding optimization needs some major overhauling.
Yo shit! It's FlameViper!
Give me those links, fool!
yoman82 wrote:
Yo censored! It's FlameViper!
Give me those links, fool!
He already did - just click the UnitedTI link in the first post, where he linked to downloads for all three of these programs.
I've made, ZIPPED, and uploaded to the archive a new program, Frontrunner (download here). Here's the code.


Code:
// Aeromax's Frontrunner 0.9
// August 2, 2008
// Aeromax / Flameviper, Cemetech
// INFORMATION
// In this game you control a three-pixel-high line who can jump and run. The arrow keys control momentum, top speed is 15 pps (pixels per second).
// [2nd] pauses the game, [mode] aborts a game and [del] saves a game to be played later.
// From the main screen, the five keys below the LCD choose an option. Press [2nd] to resume a game saved with [del].
// It stores 20 high scores to ∟L413. If it gives ERR: UNDEFINED, enter the following commands from the homescreen (∟ and dim( are [2nd], [stat] and Archive is [2nd], [0])
// :20→dim(∟L413
// :Archive ∟L413
// You are free to use and distribute this program, provided you do so as the original .ZIP (including credit, documentation, source etc).
// If you modify this program, it doesn't nullify the hours I spent coding it and you aren't exempt from this requirement.
// Comments / questions / concerns / Viagra spam = theflameysnake@yahoo.com

::"AEROMAX'S FRONTRUNNER 0.9"
:Lbl AA
:ClrHome:ClrDraw:AxesOff:GridOff:0→Ymin:0→Xmin:62→YMax:94→Xmax:0→X:0→Y:0→T:0→J:Line(0,55,94,55:Line(0,0,0,62:Text(0,3,"FRONTRUNNER":Line(49,55,49,62:Text(0,54,("HIGH: -----"):Line(94,0,94,62:Text(54,5,"START":Text(54,38,"ABOUT":Text(54,71,"SCORE":For(θ,25,91,33:Line(θ,9,θ,1:Line(θ,1,(θ-22),1:Line((θ-22),1,(θ-22),9:Line((θ-22),9,θ,9:Line((θ-11),1,(θ-11),0:End
:Unarchive∟L413
:Text(0,73,∟L413(1)
:Archive∟L413
:Lbl YA
:0→θ:Repeat θ≠0:getKey→θ:End
:0→K
:If θ=21
:Then
:1→K
:∟LFRT→L4
:Goto AD
:End
:If θ=11 or θ=12
:Goto AD
:If θ=13
:Goto AE
:If θ=14 or θ=15
:Goto AF
:Goto YA
:Lbl AF
:For(θ,50,93,1
:Line(θ,56,θ,62,0
:End
:Text(0,52,"HIGH SCORES"
:For(θ,0,54,1
:Line(1,θ,93,θ,0
:End
:Line(0,0,94,0
:1→M
:Unarchive∟L413
:For(Z,52,12,‾10
:For(θ,4,70,22
:Line(θ,Z,(θ+20),Z
:Line(θ,Z,θ,(Z-8)
:Line((θ+20),Z,(θ+20),(Z-8)
:Line(θ,(Z-8),(θ+20),(Z-8)
:Line(θ,(Z-8),(θ+20),(Z-8)
:Text((63-Z),(θ+2),(∟L413(M))
:M+1→M
:End
:End
:0→θ:Repeat θ≠0:getKey→θ:End
:Archive∟L413
:For(θ,60,94,1
:Line(θ,56,θ,62,0
:End
:Goto AA
:Lbl AE
:For(θ,0,54,1
:Line(0,θ,94,θ,0
:End
:For(θ,50,93,1
:Line(θ,56,θ,62,0
:End
:Text(0,55,"HOW-ABOUT":Text(8,0,"FURTHER INSTRUCTIONS ARE":Text(14,0,"IN THE ATTACHED TEXT FILE,":Text(20,0,"AS WELL AS SOURCE. [MODE]":Text(26,0,"EXITS AND [2ND] SAVES.":Text(32,0,"V0.9 CODED AUGUST 1, 2008":Text(38,0,"BY AEROMAX (UNDER GDFL).":Text(44,0,"SHOUTS TO CEMETECH AND UTI.":Text(56,0,"[PRESS ANY KEY]"
:0→θ:Repeat θ≠0:getKey→θ:End
:Goto AA
:Lbl AD
:ClrDraw
:ClrHome
:0→U
:1→X
:31→Y
:0→V
:0→W
:Line(0,55,94,55
:{1,2,3,4,1,5,1,8,1,7,6,7,1,9,1,1}→L1
:If K=0
:{3,‾1,0,1500}→L4
:Goto BB
:Lbl BA
:If L4(4)=0 or L4(1)=0
:Goto ZA
:Text(0,6,L4(1)
:Text(0,25,L4(2)
:Text(0,52,L4(3)
:Text(0,79,iPart(L4(4))
:L4(4)-1→L4(4)
:getKey→Z
:X→P
:Y→Q
:V*.8→V
:W-2→W
:If G=7 and Y<32
:W+2→W
:If Z=21
:Then:0→θ:Repeat θ≠0:getKey→θ:End:End
:If Z=22
:Menu("ARE YOU SURE?","ABORT GAME",ZY,"CONTINUE",BA
:If Z=23
:Goto ZX
:If Z=24 and V>‾15
:V-1→V
:If Z=25
:Then
:If Y=21 or Y=26 or Y=31
:7→W
:End
:If Z=26 and V<115
:V+1→V
:Y+W→Y
:If X<1
:1→X
:If X>94
:Goto BB
:If V>15
:15→V
:If V<‾15
:‾15→V
:X+V→X
:iPart((X/6))→F
:If F=0
:1→F
:L2(F)→G
:If Y<21 and G≠2 and G≠3 and G≠7
:Then:21→Y:End
:If Y<26 and G=2
:26→Y
:If Y<31 and Y≥22 and G=3
:31→Y
:If Y<22 and G=3
:Then
:0→V
:P→X
:21→Y
:End
:If Y<22 and G=4
:Then
:L4(3)+5→L4(3)
:1→L2(F)
:End
:If Y<22 and G=5
:L4(3)-1→L4(3)
:If Y<22 and G=7
:21→Y
:If Y<31 and Y≥22 and G=7
:Then
:31→Y
:0→W
:End
:If Y<22 and G=8
:Then
:7→W
:Y+W→Y
:End
:If G=9 and Y<22
:0→V
:If G=6 and Y<22
:Then:(L4(1)-1)→L4(1):0→X
:End
:Line(P,Q,P,(Q+2),0
:Line(X,Y,X,(Y+2)
:Goto BA
:Lbl BB
:L4(2)+1→L4(2)
:Text(0,0,"X  -  LVL ---  PTS ---  TIM ----"
:Line(10,55,10,62
:Line(37,55,37,62
:Line(65,55,65,62
:Text(0,0,"*"
:For(θ,0,94,1)
:Line(θ,0,θ,31,0
:End
:For(θ,0,90,6
:Line(θ,0,θ,5
:Line(θ,15,θ,20
:End
:Line(0,0,94,0
:Line(0,5,94,5
:Line(0,15,94,15
:Line(0,20,94,20
:L1→L2
:21→Y
:0→X
:1→L1(1)
:For(θ,2,16,1)
:randInt(10,45)→Z
:If Z≤15
:1→L1(θ)
:If Z>15 and Z≤20
:2→L1(θ)
:If Z>20 and Z≤25
:3→L1(θ)
:If Z>25 and Z≤27
:4→L1(θ)
:If Z>27 and Z≤31
:5→L1(θ)
:If Z>31 and Z≤34
:6→L1(θ)
:If Z>34 and Z≤39
:7→L1(θ)
:If Z>39 and Z≤41
:8→L1(θ)
:If Z>41 and Z≤45
:9→L1(θ)
:End
:L2→L3
:15→A
:0→B
:Lbl BC
:For(θ,1,16,1)
:(θ*6)→Z
:If L3(θ)=1
:Then
:Line(0,0,0,0,0
:Else
:If L3(θ)=2
:Then
:Line(Z,A,Z,(A+10)
:Line(Z,(A+10),(Z+6),(A+10)
:Line((Z+6),(A+10),(Z+6),A
:Line((Z+1),(A+5),(Z+5),(A+5),0
:End
:If L3(θ)=3
:Then
:Line(Z,A,Z,(A+15)
:Line(Z,(A+15),(Z+6),(A+15)
:Line((Z+6),(A+15),(Z+6),A
:Line((Z+1),(A+5),(Z+5),(A+5),0
:End
:If L3(θ)=4
:Then
:Line((Z+2),(A+2),(Z+4),(A+2)
:Line((Z+2),(A+3),(Z+4),(A+3)
:End
:If L3(θ)=5
:Then
:Line((Z+1),(A+1),(Z+1),(A+4)
:Line((Z+1),(A+4),(Z+5),(A+4)
:Line((Z+5),(A+4),(Z+5),(A+1)
:Line((Z+5),(A+1),(Z+1),(A+1)
:End
:If L3(θ)=6
:Line((Z+1),(A+5),(Z+5),(A+5),0
:If L3(θ)=7
:Then
:Line(Z,(A+10),Z,(A+15)
:Line(Z,(A+15),(Z+6),(A+15)
:Line((Z+6),(A+15),(Z+6),(A+10)
:Line((Z+6),(A+10),Z,(A+10)
:End
:If L3(θ)=8
:Then
:Line((Z+2),A,(Z+2),(A+5)
:Line((Z+3),A,(Z+3),(A+5)
:Line((Z+4),A,(Z+4),(A+5)
:End
:If L3(θ)=9
:Then
:Line(Z,(A+2),(Z+6),(A+2)
:Line(Z,(A+3),(Z+6),(A+3)
:End
:End
:End
:If B=0
:Then
:L1→L3
:0→A
:1→B
:Goto BC
:End
:Goto BA
:Lbl ZY
:0→L4(1)
:Lbl ZA
:ClrDraw
:ClrHome
:Output(1,1,"    THE GAME"
:Output(2,3,"LIVES: -----"
:Output(3,3,"SCORE: -----"
:Output(4,3,"FLATS: -----"
:Output(5,3,"TIME : -----"
:Output(6,3,"TOTAL: -----"
:Output(2,10,(L4(1)*100)
:(L4(1)*100)→H
:Output(3,10,(L4(3)*10)
:H+(L4(3)*10)→H
:Output(4,10,L4(2)
:H+(L4(2))→H
:Output(5,10,L4(4)
:Output(6,10,H
:Unarchive∟L413
:SortD ∟L413
:If H>(∟L413(20))
:Then
:H→∟L413(20)
:SortD ∟L413
:Output(8,1,"   HIGH SCORE   "
:End
:Archive∟L413
:0→θ
:Repeat θ≠0
:getKey→θ
:End
:0→θ
:Repeat θ≠0
:getKey→θ
:End
:ClrHome
:ClrDraw
:Goto AA
:Lbl ZX
:ClrDraw
:ClrHome
:L4→∟LFRT
The first thing that I noticed was your use of labels and goto statements. Never use goto statements inside a loop or if / then statement because it will cause memory leakage (the program never detects the end statement).

Also, ending " s and ) s are never required; leave those off because it saves a lot of memory. They are also unnecessary before storing something (i.e. "blah-> str1, etc)

You have the following codes several times (presumably in place of Pause)::

Code:
:0->theta
:Repeat theta!=0
:getKey->theta
:End


Repeat doesn't check the condition until the end of the loop, so setting theta to 0 is unnecessary at the beginning.

not(F is equivalent to F=0, and is smaller (and possibly faster? I'm not sure on this one)

Use 3 = L1(theta not L1(theta) = 3 (you get to leave off the second parenthesis in the former).

Also, a better pause command, if you don't need the actual key that was pressed is:

Repeat getKey :End

Hopefully, that helped you some.

Finally, in place of using powers of 10, use E blah, where E is the small capital E thing and blah is the desired power (i.e. 10000 = E4)
On a similar note,
Code:
:(L4(1)*100)→H
:Output(3,10,(L4(3)*10)
:H+(L4(3)*10)→H

Should become:

Code:
:(E2L4(1→H
:Output(3,10,10L4(3
H+10L4(3→H
b-flat wrote:
The first thing that I noticed was your use of labels and goto statements. Never use goto statements inside a loop or if / then statement because it will cause memory leakage (the program never detects the end statement).

Also, ending " s and ) s are never required; leave those off because it saves a lot of memory. They are also unnecessary before storing something (i.e. "blah-> str1, etc)

You have the following codes several times (presumably in place of Pause)::

Code:
:0->theta
:Repeat theta!=0
:getKey->theta
:End


Repeat doesn't check the condition until the end of the loop, so setting theta to 0 is unnecessary at the beginning.

not(F is equivalent to F=0, and is smaller (and possibly faster? I'm not sure on this one)

Use 3 = L1(theta not L1(theta) = 3 (you get to leave off the second parenthesis in the former).

Also, a better pause command, if you don't need the actual key that was pressed is:

Repeat getKey :End

Hopefully, that helped you some.

Finally, in place of using powers of 10, use E blah, where E is the small capital E thing and blah is the desired power (i.e. 10000 = E4)


"Repeat getKey :End"?

Holy crap, that's gonna save a lot of time.
@Aeromax: Make note of this:
b-flat wrote:
if you don't need the actual key that was pressed


To teh others: Thanks a lot for posting these tips up because they've helped more then just Aeromax, lol.

I am personally a terrible Basic programmer, just cause I haven't really put any effort in to learning good techniques or even learning some of the different easy commands.

I'm terrible at constantly using labels and things like that to do a lot of the work (I know, terrible, or at least so I've heard).

Keep up the good work Aeromax Razz
Swivel: Then post up some code so we can take a shot at optimizing it!

Aeromax: Take a look at http://www.ticalc.org/archives/files/fileinfo/369/36993.html.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement