The graphics and layout of this game look very slick, nice work this far Smile.
Text sprites are your friend! Razz
I see you have text sprites elsewhere in the program, but at the very beginning, when you write out the word ndless with the cool font, I noticed it was 5 pixels tall, which makes it perfect for horizontal text sprites, so I took the liberty of converting it for you, which saves about 200 bytes and doesn't really change the speed.

Code:
Line(30,29,30,33
Line(30,33,34,33
Line(34,33,34,29
Line(36,29,36,33
Line(36,33,39,33
Line(40,30,40,32
Line(36,29,39,29
Line(42,29,46,29
Line(42,29,42,33
Line(48,33,52,33
Line(48,33,48,29
Line(48,29,52,29
Line(48,31,51,31
Line(58,33,54,33
Pt-On(54,32
Line(54,31,58,31
Pt-On(58,30
Line(58,29,54,29
Line(60,29,64,29
Pt-On(64,30
Line(64,31,60,31
Pt-On(60,32
Line(60,33,64,33

could be

Code:
For(A,1,37:Text(28,A+29,sub("[???[ []]]( [.... [[xhat][xhat][xhat]] ![xhat][xhat][xhat][i] ![xhat][xhat][xhat][i]  ",A,1:End

Also, I noticed this kind of thing repeated a bunch of times:

Code:
4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000)
which could be simply replaced by
Code:
|LNP(4
4int(log(Ans+not(Ans

but we can do better by using a sequential variable, so that this:

Code:
Text(48,42-4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000),|LNP(4
Text(54,42-4(|LNP(10)>=10)-4(|LNP(10)>=100),|LNP(10
Text(51,85-4(|LNP(7)>=10)-4(|LNP(7)>=100)-4(|LNP(7)>=1000),|LNP(7
Text(48,58-4(|LNP(5)>=10),|LNP(5
Text(~1,54,13-6(|LNP(8)>=10),|LNP(8
For(X,46,52
   Text(54,X,sub("xo:[xhat]Y  ",X-45,1
End
0->W
For(Z,9,27,6
   For(theta,1,7
      Text(Z,theta,sub("xo:[xhat]Y  ([i2(  {y!y{  +:I:+  ",W+theta,1
   End
   W+7->W
End
Line(7,29,7,53
Line(2,49,1,48
Text(0,11-4(|LNP(1)>=10)-4(|LNP(1)>=100),|LNP(1
Text(0,15,"/
Text(0,27-4(|LNP(2)>=10)-4(|LNP(2)>=100),|LNP(2
Text(0,74-4(|LNE(1)>=10)-4(|LNE(1)>=100),|LNE(1
Text(0,78,"/
Text(0,90-4(|LNE(2)>=10)-4(|LNE(2)>=100),|LNE(2
Text(48,52,":
Text(54,52,":
Text(51,63,"XP:
For(C,3,92,2
   Pt-On(C,19
   Pt-On(C-1,18
End
Disp
rand(2
DispGraph
Lbl WI
Text(36,26,Str4
randInt(|LNCLS(1),|LNCLS(1)+3
sub("x[xhat]y[yhat]FgHdVWSQmklLXYZtheta",Ans,1->Str1
9->A
Lbl TR
Text(36,76,Str1
Repeat K=21
   getKey->K
   If Ans
   Text(A,9,"   
   If K=45:Then
      Archive |LNCLS
      Archive |LNDTA
      Archive |LNE
      Archive |LNP
      Archive |LNSC
      Archive |LNSHP
      Goto Q
   End
   If K=22:Goto ML
   A+6(K=34)-6(K=25->A
   If A>27:9->A
   If A<9:27->A
   Text(A,9,"<
End
If A=9:Goto AK
If A=21:Goto IY
If A=15:Goto HL
If A=27:Goto DM
Lbl AK
randInt(~|LNE(4),|LNE(4),2
If Ans(1)=Ans(2:Then
   Text(29,66,"DODGED
   rand(40
   Text(~1,29,66,"           
   Goto ET
End
randInt(|LNP(3)-3,|LNP(3->D
|LNE(1)-D->|LNE(1
Asm(prgmASMR1
Asm(prgmASMS1
Text(0,70,"       
If |LNE(1)<0
0->|LNE(1
Text(0,74-4(|LNE(1)>=10)-4(|LNE(1)>=100),|LNE(1
If |LNE(1)=0:Then
   For(C,1,2
      Asm(prgmASMS1
      Asm(prgmASMR1
   End
   |LNP(8)+1->|LNP(8
   If Ans=20:Then
      Text(9,22,"WORLD COMPLETE!
      Pause
      Text(16,33,"Continue?
      Text(24,22,"1) YES
      Text(24,61,"2) NO
      Repeat max(K={92,93
         getKey->K
      End
      If K=92:Then
         For(J,1,29
            Line(20+J,33,20+J,52,0
            Line(76-J,33,76-J,52,0
         End
         Else
         0->|LNP(8
         Goto NP
      End
   End
   Text(11,29,"Enemy Defeated!
   |LNDTA(1)+1->|LNDTA(1
   randInt(100,150->Y
   Y+|LNDTA(3->|LNDTA(3
   Y+|LNP(4->|LNP(4
   Text(48,42-4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000),|LNP(4
   randInt(50,100->I
   I+|LNDTA(5->|LNDTA(5
   I+|LNP(7->|LNP(7
   Text(51,85-4(|LNP(7)>=10)-4(|LNP(7)>=100)-4(|LNP(7)>=1000),|LNP(7
   Text(48,58-4(|LNP(5)>=10),|LNP(5
   1+|LNP(6->|LNP(6
   Text(~1,54,13-6(|LNP(8)>=10),|LNP(8
   1+|LNDTA(2->|LNDTA(1
   1+|LNE(3->|LNE(3
   1+|LNE(2->|LNE(2
   Ans->|LNE(1
   Text(0,74-4(|LNE(1)>=10)-4(|LNE(1)>=100),|LNE(1
   Text(0,90-4(|LNE(2)>=10)-4(|LNE(2)>=100),|LNE(2
   Text(54,58-4(|LNP(6)>=10)-4(|LNP(6)>=100),|LNP(6
   randInt(10,20->J
   J+|LNP(10->|LNP(10
   Text(54,42-4(|LNP(10)>=10)-4(|LNP(10)>=100)-4(|LNP(10)>=1000),|LNP(10
   Text(17,30,"+",Y," G
   Text(23,30,"+",I," XP
   Text(29,30,"+",D," D
   rand(50
   For(J,29,85
      Line(J,51,J,28,0
   End
   Goto WI
   Else
   Goto ET
End:End
Lbl HL
If 0<|LNP(5:Then
   |LNP(5)-1->|LNP(5
   |LNP(2->|LNP(1
   Text(48,58-4(|LNP(5)>=10),|LNP(5
   Text(0,11-4(|LNP(1)>=10)-4(|LNP(1)>=100),|LNP(1
End
Goto ET
Lbl IY
ClrDraw
Text(~1,0,0,"UPGRADES
Horizontal 54
Text(55,4,"Cost:
Text(11,4,"Attack(+2)
Text(22,4,"Defense(+0.01)
Text(33,4,"Max HP(+1)
For(C,44,22,~11
   Line(4,C,54,C
   Line(55,C-1,55,C-2
   Line(4,C-3,54,C-3
   Line(3,C-1,3,C-2
End
Text(49,60,"Gold:
Text(49,89-4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000),|LNP(4
42->B
For(C,5,7
   For(A,1,|LNSHP(C
      Line(A+3,B,A+3,B+1
   End
   B-11->B
End
41->L
While 1
   Repeat K=21
      getKey->K
      If Ans:Then
         Text(~1,48,77,"   
         Line(0,L,0,L+9,0
      End
      If K=45:Goto AP
      L+11(K=25)(L<41)-11(K=34)(L>19->L
      Line(0,L,0,L+9
      Text(55,20,|LNSHP((L+3)/11
      Text(49,89-4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000),|LNP(4
   End
   If |LNP(4)>=|LNSHP((L+3)/11:Then
      |LNP(4)-|LNSHP(int(L/9->|LNP(4
      If L=41:Then
         |LNP(3)+2->|LNP(3
         |LNSHP(5)+1->|LNSHP(5
         Line(|LNSHP(5)+3,42,|LNSHP(5)+3,43
      End
      If L=30:Then
         Q-.01->Q
         |LNSHP(6)+1->|LNSHP(6
         Line(|LNSHP(6)+3,31,|LNSHP(6)+3,32
      End
      If L=19:Then
         |LNP(2)+2->|LNP(2
         Ans->|LNP(1
         |LNSHP(7)+1->|LNSHP(7
         Line(|LNSHP(7)+3,21,|LNSHP(7)+3,20
      End
   End
   Text(49,89-4(|LNP(4)>=10)-4(|LNP(4)>=100)-4(|LNP(4)>=1000),|LNP(4
End
Lbl ET
randInt(~1,1,2
If Ans(1)=Ans(2:Then
   Text(29,17,"DODGED
   rand(40
   Text(~1,29,17,"       
   Goto TR
End
randInt(|LNE(3)-3,|LNE(3->D
int(DQ->D
Asm(prgmASMS1
Asm(prgmASMR1
|LNP(1)-D->|LNP(1
Text(0,3,"           
Text(0,11-4(|LNP(1)>10)-4(|LNP(1)>100),|LNP(1
If |LNP(1)<=0:Then
   If M=1:Then
      |LNP(2->|LNP(1
      0->M
      Text(0,11-4(|LNP(1)>=10)-4(|LNP(1)>=100),|LNP(1

could be

Code:
"4int(log(Ans+not(Ans->|u
|LNP(4
Text(48,42-|u,Ans
|LNP(10
Text(54,42-|u,Ans
|LNP(7
Text(51,85-|u,Ans
Text(48,58-|u,Ans
Text(~1,54,13-6(|LNP(8)>=10),|LNP(8
For(X,46,52
   Text(54,X,sub("xo:[xhat]Y  ",X-45,1
End
0->W
For(Z,9,27,6
   For(theta,1,7
      Text(Z,theta,sub("xo:[xhat]Y  ([i2(  {y!y{  +:I:+  ",W+theta,1
   End
   W+7->W
End
Line(7,29,7,53
Line(2,49,1,48
|LNP(1
Text(0,11-|u,Ans
Text(0,15,"/
|LNP(2
Text(0,27-|u,Ans
|LNE(1
Text(0,74-|u,Ans
Text(0,78,"/
|LNE(2
Text(0,90-|u,Ans
Text(48,52,":
Text(54,52,":
Text(51,63,"XP:
For(C,3,92,2
   Pt-On(C,19
   Pt-On(C-1,18
End
Disp
rand(2
DispGraph
Lbl WI
Text(36,26,Str4
randInt(|LNCLS(1),|LNCLS(1)+3
sub("x[xhat]y[yhat]FgHdVWSQmklLXYZtheta",Ans,1->Str1
9->A
Lbl TR
Text(36,76,Str1
Repeat K=21
   getKey->K
   If Ans
   Text(A,9,"   
   If K=45:Then
      Archive |LNCLS
      Archive |LNDTA
      Archive |LNE
      Archive |LNP
      Archive |LNSC
      Archive |LNSHP
      Goto Q
   End
   If K=22:Goto ML
   A+6(K=34)-6(K=25->A
   If A>27:9->A
   If A<9:27->A
   Text(A,9,"<
End
If A=9:Goto AK
If A=21:Goto IY
If A=15:Goto HL
If A=27:Goto DM
Lbl AK
randInt(~|LNE(4),|LNE(4),2
If Ans(1)=Ans(2:Then
   Text(29,66,"DODGED
   rand(40
   Text(~1,29,66,"           
   Goto ET
End
randInt(|LNP(3)-3,|LNP(3->D
|LNE(1)-D->|LNE(1
Asm(prgmASMR1
Asm(prgmASMS1
Text(0,70,"       
If |LNE(1)<0
0->|LNE(1
|LNE(1
Text(0,74-|u,Ans
If |LNE(1)=0:Then
   For(C,1,2
      Asm(prgmASMS1
      Asm(prgmASMR1
   End
   |LNP(8)+1->|LNP(8
   If Ans=20:Then
      Text(9,22,"WORLD COMPLETE!
      Pause
      Text(16,33,"Continue?
      Text(24,22,"1) YES
      Text(24,61,"2) NO
      Repeat max(K={92,93
         getKey->K
      End
      If K=92:Then
         For(J,1,29
            Line(20+J,33,20+J,52,0
            Line(76-J,33,76-J,52,0
         End
         Else
         0->|LNP(8
         Goto NP
      End
   End
   Text(11,29,"Enemy Defeated!
   |LNDTA(1)+1->|LNDTA(1
   randInt(100,150->Y
   Y+|LNDTA(3->|LNDTA(3
   Y+|LNP(4->|LNP(4
   |LNP(4
   Text(48,42-|u,Ans
   randInt(50,100->I
   I+|LNDTA(5->|LNDTA(5
   I+|LNP(7->|LNP(7
   |LNP(7
   Text(51,85-|u,Ans
   Text(48,58-4(|LNP(5)>=10),|LNP(5
   1+|LNP(6->|LNP(6
   Text(~1,54,13-6(|LNP(8)>=10),|LNP(8
   1+|LNDTA(2->|LNDTA(1
   1+|LNE(3->|LNE(3
   1+|LNE(2->|LNE(2
   Ans->|LNE(1
   |LNE(1
   Text(0,74-|u,Ans
   |LNE(2
   Text(0,90-|u,Ans
   |LNP(6
   Text(54,58-|u,Ans
   randInt(10,20->J
   J+|LNP(10->|LNP(10
   |LNP(10
   Text(54,42-|u,Ans
   Text(17,30,"+",Y," G
   Text(23,30,"+",I," XP
   Text(29,30,"+",D," D
   rand(50
   For(J,29,85
      Line(J,51,J,28,0
   End
   Goto WI
   Else
   Goto ET
End:End
Lbl HL
If 0<|LNP(5:Then
   |LNP(5)-1->|LNP(5
   |LNP(2->|LNP(1
   Text(48,58-4(|LNP(5)>=10),|LNP(5
   |LNP(1
   Text(0,11-|u,Ans
End
Goto ET
Lbl IY
ClrDraw
Text(~1,0,0,"UPGRADES
Horizontal 54
Text(55,4,"Cost:
Text(11,4,"Attack(+2)
Text(22,4,"Defense(+0.01)
Text(33,4,"Max HP(+1)
For(C,44,22,~11
   Line(4,C,54,C
   Line(55,C-1,55,C-2
   Line(4,C-3,54,C-3
   Line(3,C-1,3,C-2
End
Text(49,60,"Gold:
|LNP(4
Text(49,89-|u,Ans
42->B
For(C,5,7
   For(A,1,|LNSHP(C
      Line(A+3,B,A+3,B+1
   End
   B-11->B
End
41->L
While 1
   Repeat K=21
      getKey->K
      If Ans:Then
         Text(~1,48,77,"   
         Line(0,L,0,L+9,0
      End
      If K=45:Goto AP
      L+11(K=25)(L<41)-11(K=34)(L>19->L
      Line(0,L,0,L+9
      Text(55,20,|LNSHP((L+3)/11
      |LNP(4
      Text(49,89-|u,Ans
   End
   If |LNP(4)>=|LNSHP((L+3)/11:Then
      |LNP(4)-|LNSHP(int(L/9->|LNP(4
      If L=41:Then
         |LNP(3)+2->|LNP(3
         |LNSHP(5)+1->|LNSHP(5
         Line(Ans+3,42,Ans+3,43
      End
      If L=30:Then
         Q-.01->Q
         |LNSHP(6)+1->|LNSHP(6
         Line(Ans+3,31,Ans+3,32
      End
      If L=19:Then
         |LNP(2)+2->|LNP(2
         Ans->|LNP(1
         |LNSHP(7)+1->|LNSHP(7
         Line(Ans+3,21,Ans+3,20
      End
   End
   |LNP(4
   Text(49,89-|u,Ans
End
Lbl ET
randInt(~1,1,2
If Ans(1)=Ans(2:Then
   Text(29,17,"DODGED
   rand(40
   Text(~1,29,17,"       
   Goto TR
End
randInt(|LNE(3)-3,|LNE(3->D
int(DQ->D
Asm(prgmASMS1
Asm(prgmASMR1
|LNP(1)-D->|LNP(1
Text(0,3,"           
|LNP(1
Text(0,11-|u,Ans
If |LNP(1)<=0:Then
   If M=1:Then
      |LNP(2->|LNP(1
      0->M
      |LNP(1
      Text(0,11-|u,Ans

It doesn't look like much, but I think it saves somewhere around 700 bytes! Evil or Very Mad
prgmACHIEVE could just be

Code:
SetUpEditor |LNDTA,|LNSC
5->dim(|LNDTA
22->dim(|LNSC
0->C
For(A,25,100,25
   C+1->C
   If |LNDTA(1)>=A
   1->|LNSC(C
   If |LNDTA(2)>=A/2.5
   1->|LNSC(C+4
   If |LNDTA(3)>=240A
   1->|LNSC(C+8
   If |LNDTA(4)>=A/5
   1->|LNSC(C+12
   If |LNDTA(5)>=40A
   1->|LNSC(C+16
End

And since you only call it once in your program, I'd recommend removing the subprogram all together and putting the code directly into the main program.
Released a beta program of NDLESS to the archives, now named inFINITE (I had to rename it because of the Nspire shell Ndless and to avoid confusion.) Added some new graphics, put in all the optimizations, and closed off unplayable sections.
TO-DO
-Stats
-Story
-Diamonds
-More easter eggs
-Other stuff
Once it's summer, this will definitely be finished (although I may finish it earlier Wink)
Hhhhhh, I am slow.....

TO-DO
-Revise all da code. GG guys, I made it Razz
-Bring infinite to PC (dundundun!!!)

Hopefully, my Math class won't kill me, and it that case, expect to see it come out between this/next week. Thanks to all who helped, I really appreciate it!
Wait,
Battlesquid wrote:

TO-DO
-Bring infinite to PC (dundundun!!!)

PC?!
why not CE? Razz

Congrats on getting this finished though! Very Happy
TheLastMillennial wrote:
Wait,
Battlesquid wrote:

TO-DO
-Bring infinite to PC (dundundun!!!)

PC?!
why not CE? Razz

Congrats on getting this finished though! Very Happy


Haha, lol Very Happy

_iPhoenix_ might be doing that, if I recall correctly. I might do it myself though, if I have the time. I'm attempting to port it to PC because I just learned Processing (pretty much like Java). Hopefully, I'll be able to do this more quickly (which I should).
Uhh yeah. I was supposed to do that wasn't I?

I just need the source and a color palette.... Ok, there's no real excuse anymore...

After I am done with my CC20 entry, it will be first priority. (Which will be soon, I promise)

(Speaking of porting things to CE, I ported this when I was bored out of my mind last night, as making my air entry is very monotonous. PT_ said I could back in May, IIRC, so why not!)


EDIT: Processing ftw!!
Thanks, I appreciate it! Don't stress yourself though, it's not that big of a deal Very Happy
  
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 3 of 3
» 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