- TI-83/84 Port of "Infinite Loop"
- 29 Sep 2015 08:49:03 pm
- Last edited by NoahK on 03 Nov 2015 06:12:51 pm; edited 6 times in total
My brother introduced me to this app, and I immediately fell in love with the simplicity of the game. So, natively, I decided a port of this to the calc would be awesome. I've written some code in DCS-aided TI-BASIC, and so far I have it loading levels from an AppVar/prgm, displaying splashscreens, and doing some tilemap things. The first line of the AppVar/prgm will be used later to store what level to start loading from, and I have written a program to aid in the creation of new levels. Here is my code, please feel free to comment suggestions or questions. I have not written anything for gameplay, so pressing enter "solves" the puzzle.
Level Creation Code:
Code:
The LOOPLVLS AppVar/pgrm with 10 level, in the pattern of :scrambled1:solved1:scrambled2:solved2:..., a / indicates an x-shift of 4 pixels, * is a y-shift, and - shifts both x and y 4 pixels away from the top-left corner.
Code:
And the game part:
Code:
Pic6 looks like this:
Level Creation Code:
Code:
det(0,"LOOPLVLS",5
det(5,"LOOPLVLS",0)-1->C
Repeat 0
C+1->C
ClrDraw
[[0]]->[A]
{8,12->dim([A]
For(A,1,8
For(B,1,12
~1->[A](A,B
End
End
0->A
0->B
Repeat G=92
Pxl-Change(8A,8B
Repeat Ans
getKey
End
Pxl-Change(8A,8B
Ans->G
A-(G=25 and A>0)+(G=34 and A<7->A
B-(G=24 and B>0)+(G=26 and B<11->B
If G=21
Then
[A](A+1,B+1)+1->[A](A+1,B+1:If [A](A+1,B+1)=15
~1->[A](A+1,B+1
End
If G=22 or G=31
Then
[A](A+1,B+1)-1->[A](A+1,B+1:If [A](A+1,B+1)=~2
14->[A](A+1,B+1
End
If [A](A+1,B+1)>=0
Then
real(1,8B,8A,1,8,6,round(12fPart([A](A+1,B+1)/12),0),8iPart([A](A+1,B+1)/12),0,0,1
Else
real(1,8B,8A,1,8,6,11,8*7,0,0,1
End
End
Input Str1
Str1
For(A,1,8
For(B,1,12
Ans+sub("0123456789ABCDEF",[A](A,B)+2,1
End
End
sub(Ans,2,96
If inString("/*-",Str1
Str1+Ans
det(6,"LOOPLVLS",Ans,C
End
The LOOPLVLS AppVar/pgrm with 10 level, in the pattern of :scrambled1:solved1:scrambled2:solved2:..., a / indicates an x-shift of 4 pixels, * is a y-shift, and - shifts both x and y 4 pixels away from the top-left corner.
Code:
1
/0000000000000000000000000000000000000000AD8000000000A5800000000000000000000000000000000000000000
0000000000000000000000000000000000000000BD8000000000A5900000000000000000000000000000000000000000
0000000000000000000000000000000000000000BB8800000000AA990000000000000000000000000000000000000000
0000000000000000000000000000000000000000B8B800000000A9A90000000000000000000000000000000000000000
-0000000000000000000000000000B58000000000C1E000000000AD900000000000000000000000000000000000000000
0000000000000000000000000000BD8000000000E1C000000000A5900000000000000000000000000000000000000000
-000000000000000000000000000070600000000020200000000070600000000000000000000000000000000000000000
0000000000000000000000000000F0F00000000030300000000070700000000000000000000000000000000000000000
0000000000000000000000000000A3D800000000C5E3000000003CEE00000000BC3A0000000000000000000000000000
0000000000000000000000000000B2D800000000EDC3000000003E5C00000000A5290000000000000000000000000000
00000000000000000000000000000BB700000000811B0000000072200000000004700000000000000000000000000000
00000000000000000000000000000B8F00000000B1190000000073300000000007700000000000000000000000000000
0000000000000000000000000000823B00000000AABB00000000F32F00000000F6760000000000000000000000000000
0000000000000000000000000000B22800000000A8B900000000F33F0000000077770000000000000000000000000000
-0000000000000009333A000000046C46000000063134000000046E4600000008333B0000000000000000000000000000
000000000000000B2228000000074D670000000421260000000F456F0000000A22290000000000000000000000000000
-00000000000000085D39000000033E3D0000000ED15C0000000D3522000000083CCA0000000000000000000000000000
000000000000000BDD28000000033E2C0000000E51DC0000000E2C330000000A25590000000000000000000000000000
000000000000000000000000000099990000000999999000000999999000000099990000000000000000000000000000
0000000000000000000000000000B8B80000000B9A9A8000000A8B8B90000000A9A90000000000000000000000000000
And the game part:
Code:
[[15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15][15,15,15,15,15,15,15,15,15,15,15,15->[C]
Input "Graphics Mode:",Z
real(0,0
real(1,22,24,6,13,6,5,50,0,0,1
For(theta,1,10
det(5,"LOOPLVLS",2theta->Str1
det(5,"LOOPLVLS",2theta+1->Str2
0->V
0->W
If inString("/*-",sub(Str1,1,1
Then
sub(Str1,1,1
If Ans="/" or Ans="-
4->V
sub(Str1,1,1
If Ans="*" or Ans="-
4->W
sub(Str1,2,96->Str1
End
{8,12->dim([A]
[A]->[B]
For(A,1,8
For(B,1,12
inString("0123456789ABCDEF",sub(Str2,12(A-1)+B,1))-2
If Ans=~1
Then
81+60(Z=2->[B](A,B
Else
Ans+30Z->[B](A,B
End
End
End
real(0,1
Text(~1,27,42-3iPart(log(theta)),"#",theta
real(0,0
For(A,1,8
For(B,1,12
inString("0123456789ABCDEF",sub(Str1,12(A-1)+B,1))-2
If Ans!=~1
Then
Ans+30Z->[A](A,B
real(1,8(B-1)+V,8(A-1)+W,1,8,6,round(12fPart(Ans/12),0),8iPart(Ans/12),0,0,0
Else
81+30(Z=2->[A](A,B
End
End
End
real(6,1
Pause
[B]+[C]-4(Z=2)[C]->[B]
real(2,1,0,0,12,8,0,12,0,8,6,0,8,0
If V+W
real(4,(W=4)+3(V=4)+3(VW=16),4,0
real(6
End
Pic6 looks like this:
