If I were to choose between speed and size, I would go for speed first. Make sure it's playable and stuff. Thanks for taking the time to help me I appreciates.
EDIT: I hope to keep it well under 8000 bytes though.
I need a LOT of help optimizing this code. This code I am now releasing is as optimized as the Calvin cycle. Anyways, if you think you can make any improvements up them here. I need to cut down a lot of space because I am getting dangerously close to the 8000 byte limit.
I'm trusting you guys with the source code because it is hilariously unoptimized and you probably can't get anything off it anyways. And it only has 5 levels (I'm still working on the engine, but now I can make a level in about two hours.
EDIT: I've converted the programs to text you can view here.
The conversion is slightly off, so ¾List( = Data( ü = -->
.GRAVITER ClrDraw ClrDrawõ prgmGRAVTILE Full Diagnos Fix 5 Fix 3 0üL prgmGRAVLEV 0üTüUüW 1üDüGüF 6üS For(I,2,S) ref(S-I/2+X,S-I/2+Y,I,I) rref(S-I/2+X+1,S-I/2+Y+1,I-2,I-2) sub(GO) DispGra Pause 300 sub(GF) End Repeat getKey(15) If (W=1) ClrDraw ClrDrawõ 0üW L+1üL Goto NEW End sub(GO) ref(X,Y,S,S) rref(X,Y,S,S) If getKey(54) and (G=0) If (F=1) 4üF ElseIf F=4 1üF ElseIf F=2 3üF ElseIf F=3 2üF End 1üG 0üT End If (F=1) or (F=4) X-getKey(2)+getKey(3)üX Else Y-getKey(4)+getKey(1)üY End sub(OFF) sub(SID) !If E !If G 1üG 0üT End End If G T+1üT T/4üV sub(GRV) End ref(X,Y,S,S) rref(X+1,Y+1,S-2,S-2) DispGra sub(SPK) sub(BTN) sub(END) sub(GF) Pause 20 End Fix 2 ClrDraw ClrHome Return
.SUBROUTINES .GOALON Lbl GO U+1üU If (N=1) or (N=4) Pt-On(Z,Á,8*((U/6)^4)+Pic10) Else Pt-On(Z,Á,8*((U/6)^4)+Pic15) End Return
.GOALOFF Lbl GF If (N=1) or (N=4) Pt-ChanZ,Á,8*((U/6)^4)+Pic10) Else Pt-ChanZ,Á,8*((U/6)^4)+Pic15) End Return
.MAPGEN Lbl MAP For(I,0,11) For(J,0,8) {I*9+J+D}üA Pt-On(J*10+3,I*5+2,A/16*8+Pic2) Pt-On(J*10+8,I*5+2,A^16*8+Pic2) If A/16=4 Pxl-On(J*10+5,I*5+3)õ ElseIf A/16=3 Pxl-On(J*10+5,I*5+5)õ ElseIf A/16=5 Pxl-On(J*10+4,I*5+5)õ ElseIf A/16=6 Pxl-On(J*10+6,I*5+4)õ End If A^16=4 Pxl-On(J*10+10,I*5+3)õ ElseIf A^16=3 Pxl-On(J*10+10,I*5+5)õ ElseIf A^16=5 Pxl-On(J*10+7,I*5+5)õ ElseIf A^16=6 Pxl-On(J*10+13,I*5+4)õ End End End For(I,1,{R}) I-1*5+1üJ 1ü{R+J+4} If ({R+J+2}=1) or ({R+J+2}=4) ref({R+J},{R+J+1},5,3) rref({R+J},{R+J+1},5,3) Else ref({R+J},{R+J+1},3,5) rref({R+J},{R+J+1},3,5) End Pt-On({R+J},{R+J+1},{R+J+2}-1*16+Pic4) End
If (N=1) or (N=4) ref(Z,Á,8,2) rref(Z,Á,8,2) Else ref(Z,Á,2,8) rref(Z,Á,2,8) End DispGra Return
.BUTTONPRESS Lbl BTN For(I,1,{R}) I-1*5+1üJ If (({R+J+2}=1) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}+3=Y)) or (({R+J+2}=4) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}-S=Y)) or (({R+J+2}=2) and ({R+J}-S=X) and ({R+J+1}-S+1÷Y) and ({R+J+1}+5ùY)) or (({R+J+2}=3) and ({R+J}+3=X) and ({R+J+1}-S+1÷Y) and ({R+J+1}+5ùY)) and {R+J+4} 0ü{R+(J+4)} {R+J+3}üF 1üG Pt-Chan{R+J},{R+J+1},{R+J+2}-1*16+Pic4) Pt-On({R+J},{R+J+1},{R+J+2}-1*2+1*8+Pic4) End End Return
.SPIKETEST Lbl SPK For(I,0,S-1) If ((F=1) and pxl-TesX+I,Y+S)õ) or ((F=2) and pxl-TesX-1,Y+I)õ) or ((F=3) and pxl-TesX+S,Y+I)õ) or ((F=4) and pxl-TesX+I,Y-1)õ) Goto DTH End End Return
.ENDGAME Lbl END If ((N=1) and (X+1ùZ) and (X+S-9÷Z) and (Y-2=Á)) or ((N=2) and (X+S=Z) and (Y+1ùÁ) and (Y+S-9÷Á)) or ((N=3) and (X-2=Z) and (Y+1ùÁ) and (Y+S-9÷Á)) or ((N=4) and (X+1ùZ) and (X+S-9÷Z) and (Y+S=Á)) For(I,0,S-2) sub(GO) If (N=1) ref(X,Y,S,S-I) rref(X+1,Y,S-2,S-I-1) DispGra ref(X,Y,S,S-I) rref(X,Y,S,S-I) ElseIf (N=2) ref(X+I,Y,S-I,S) rref(X+I+1,Y+1,S-I-2,S-2) DispGra ref(X+I,Y,S-I,S) rref(X+I,Y,S-I,S) ElseIf (N=3) ref(X,Y-I,S,S-I) rref(X,Y+1,S-1,S-I-2) DispGra ref(X,Y-I,S,S-I) rref(X,Y+1,S-1,S-I-2) ElseIf (N=4) ref(X,Y+I,S,S-I) rref(X+1,Y+I+1,S-2,S-I-1) DispGra ref(X,Y+I,S,S-I) rref(X,Y+I,S,S-I) End Pause 300 sub(GF) End 1üW End Return
.OFFEDGE Lbl OFF 0üE For(I,0,S-1) If F=1 pxl-TesX+I,Y+S)+EüE ElseIf F=2 pxl-TesX-1,Y+I)+EüE ElseIf F=3 pxl-TesX+S,Y+I)+EüE ElseIf F=4 pxl-TesX+I,Y-1)+EüE End End Return
.SIDEHIT Lbl SID For(I,0,S-1) If (F=1) or (F=4) If pxl-TesX+S-1,Y+I) X-1üX End If pxl-TesX,Y+I) X+1üX End Else If pxl-TesX+I,Y) Y+1üY End If pxl-TesX+I,Y+S-1) Y-1üY End End End Return
.GRAVTEST Lbl GRV If V For(I,1,V) For(J,0,S-1) If F=1 If pxl-TesX+J,Y+I+S-1) Y+I-1üY 0üVüG Return End End If F=2 If pxl-TesX-I-1,Y+J) X-IüX 0üVüG Return End End If F=3 If pxl-TesX+I+S-1,Y+J) X+I-1üX 0üVüG Return End End If F=4 If pxl-TesX+J,Y-I-1) Y-IüY 0üVüG Return End End End End End If F=4 Y-VüY ElseIf F=1 Y+VüY ElseIf F=2 X-VüX ElseIf F=3 X+VüX End Return
Whenever I run the program I compiled it gives me an "Invalid" error. I compiled it using the other options as shell, and they all worked. Does this happen when the size of the program reaches a certain limit?
When I try importing Nemo's pic into Tokens IDE and then exporting it as a .8xi, it crops the picture about 1/4 its actual size. Also, when I try moving the picture to the calculator it gives me an "invalid name" error. Fixes?
Darn, these look great! I didn't know so many of you would reply, and thanks to you all. I think I'll go with Nemo's but I didn't check out ScoutDavid's yet. This is probably a dumb question, but how do you convert a png to .8xi and use it in an axe program? Thanks in advance.
Okay, since my code is probably over the limit for Axe programs (not applications) since it gives me an Invalid error every time I ran it. So, I deleted all my text routines which were creating about 4000 bytes worth and tried it using a program instead. This time, when I run it the buttons depress normally and everything works except for when you die, after which the buttons stop working for some reason. I'll post my code later if you need to see it.
It's definetely triggered. I'll attach the compiled level for you to see. The button flickers since the Pt-Change keeps on occurring, but the text indicator at bottom right shows that it still stays at 1.
.BUTTONPRESS Lbl BTN For(I,1,{R}) I-1*5+1üJ Text(88,56,{R+J+4}åDec) If (({R+J+2}=1) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}+3=Y)) or (({R+J+2}=4) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}-S=Y)) and {R+J+4} 0ü{R+J+4} {R+J+3}üF 1üG Pt-Chan{R+J},{R+J+1},{R+J+2}-1*16+Pic4) Pt-On({R+J},{R+J+1},{R+J+2}-1*2+1*8+Pic4) End End Return
but 0 doesn't get stored into {R+J+4} for some reason. 'elp?