### Author Topic: Platformer (NOT FOR CONTEST!) Help  (Read 1809 times)

0 Members and 1 Guest are viewing this topic.

#### cooliojazz

• Support Staff
• LV7 Elite (Next: 700)
• Posts: 619
• Rating: +66/-9
• I omnoms on your soul
##### Platformer (NOT FOR CONTEST!) Help
« on: July 18, 2009, 10:53:21 pm »
OK, so I saw the platformer contest.  I was like Yes, I have awesome skills at calculator programming! I will win by far!  Now, here I am, a month later, feeling stupid, realizing, I, so far, cannot do platformers.  The thing is though, I would love to learn.  So, I am going to post my code here and ask for you people to help me see why it is so stupid and inneffective so maybe I can learn to do these... maybe
Code: [Select]
1:real(0:If not(Ans:Then:ClrDraw:Text(-1,0,24,"Requires":Repeat Ans:AüC:BüD:randInt(0,12üA:randInt(1,7üB:Text(-1,8D,6C,"    ":Text(("B0 31" is an invalid token)1,8B,6A,"XLib":getKey:End:Output(1,1,"":Stop:EndRectGC:CoordOff:GridOff:AxesOff:LabelOff:ExprOff:Degree:Func:Normal:Float:Connected:Sequential:Real:Full[[29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,7,13,13,13,13,13,9,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,6,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,2,2,3,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,8,12,12,12,12,12,10,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]ü[A][[0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0]]ü[B]real(7,00üX:0üY:5üdim(LGUY:1üLGUY(1:1üLGUY(2:2üdim(LMAP:0üLMAP(1:0üLMAP(2:0üLGUY(5100üTReal(12,0,80,1,80,62,0:Real(12,0,95,1,95,62,0:Real(12,0,81,0,94,0,0:Real(12,0,81,63,94,63,0Lbl 1Real(2,1,0,0,10,8,0,10,0,8,100,0,8,0Real(2,0,LMAP(2),LMAP(1),10,8,0,10,0,8,100,2,8,1While 1If T÷0:Goto FNT-.2üTReal(8AnsüKdim([A])üLDIMLGUY(2üLGUY(4:LGUY(1üLGUY(3If K=3:LGUY(2)+1üLGUY(2If K=2:LGUY(2)-1üLGUY(2If LGUY(5)=1:Then:LGUY(1)-2üLGUY(1:2üLGUY(5:EndIf K=54 and LGUY(5)=0:Then:LGUY(1)-2üLGUY(1:1üLGUY(5:EndIf K=1:LGUY(1)-1üLGUY(1)If K=55:Goto FNLGUY(1)+1üLGUY(1)If LGUY(2)<1:1üLGUY(2)If LGUY(1)<1:1üLGUY(2)If [A](LGUY(1),LGUY(2))ø0:ThenIf [A](LGUY(1),LGUY(4))=0:Then:LGUY(4üLGUY(2:0üLGUY(5:EndIf [A](LGUY(2),LGUY(3))=0:LGUY(3üLGUY(1EndIf LGUY(1)>LMAP(1)+4:LMAP(1)+1üLMAP(1If LGUY(1)<LMAP(1)+4:LMAP(1)-1üLMAP(1If LGUY(2)>LMAP(2)+5:LMAP(2)+1üLMAP(2If LGUY(2)<LMAP(2)+5:LMAP(2)-1üLMAP(2If LMAP(2)<0:0üLMAP(2If LMAP(2)>LDIM(2)-10:LDIM(2)-10üLMAP(2If LMAP(1)<0:0üLMAP(1If LMAP(1)>LDIM(1)-8:LDIM(1)-8üLMAP(1If LGUY(2)øLGUY(4) or LGUY(1)øLGUY(3:Then:0ü[A](LGUY(3),LGUY(4)):29ü[A](LGUY(1),LGUY(2:LGUY(1üLGUY(3:LGUY(2üLGUY(4:Goto 1:EndEndLbl FNClrHome:Output(1,1,"":StopNOTE: Uses XLIb.  Currently I have (tried) to implement loading a map, moving a guy (back and forth with gravity and jumping), and guy tracking (I do like this part, I think it's awesome.  Maybe that's just me though...)
Oh, and pic 100:
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

#### JoeyBelgier

• LV7 Elite (Next: 700)
• Posts: 545
• Rating: +25/-21
• Joey
##### Re: Platformer (NOT FOR CONTEST!) Help
« Reply #1 on: July 18, 2009, 10:56:08 pm »
the only thing I can help with is designing stuff
Xlib = Chinese for me

EDIT: Actually, even TI-basic is like ehm, German to me :p

#### Eeems

• Mr. Dictator
• LV13 Extreme Addict (Next: 9001)
• Posts: 6211
• Rating: +318/-36
• little oof
##### Re: Platformer (NOT FOR CONTEST!) Help
« Reply #2 on: July 18, 2009, 10:58:03 pm »
could I have some comments on the code so I know what you are trying to do with each part?
/e

#### cooliojazz

• Support Staff
• LV7 Elite (Next: 700)
• Posts: 619
• Rating: +66/-9
• I omnoms on your soul
##### Re: Platformer (NOT FOR CONTEST!) Help
« Reply #3 on: July 18, 2009, 11:03:02 pm »
Sure, ecxept I realized there are some issues,, as in, IT'S MESSED UP!  Oops.  OK, can someone tell me how your'e supposed to write code?  Because copying it from my basic editor didn't work...  Once I fix that I'll comment it.
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

#### Eeems

• Mr. Dictator
• LV13 Extreme Addict (Next: 9001)
• Posts: 6211
• Rating: +318/-36
• little oof
##### Re: Platformer (NOT FOR CONTEST!) Help
« Reply #4 on: July 18, 2009, 11:04:45 pm »
/e

#### cooliojazz

• Support Staff
• LV7 Elite (Next: 700)
• Posts: 619
• Rating: +66/-9
• I omnoms on your soul
##### Re: Platformer (NOT FOR CONTEST!) Help
« Reply #5 on: July 18, 2009, 11:20:37 pm »
Code: [Select]
:1:real(0:If not(Ans:Then:ClrDraw:Text({-}1,0,24,"Requires":Repeat Ans:A→C:B→D:randInt(0,12→A:randInt(1,7→B:Text({-}1,8D,6C,"    ":Text({-}1,8B,6A,"XLib":getKey:End:Output(1,1,"":Stop:End     //XLib Test and Report:Func:CoordOff:GridOff:AxesOff:LabelOff:ExprOff:Degree:Func:Normal:Float:Connected:Sequential:Real:Full:[[29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,7,13,13,13,13,13,9,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,6,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,2,2,3,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,8,12,12,12,12,12,10,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]→[A]     //Map matrix:[[0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0]]→[B]     //Blank map for screen clearing:real(7,0:0→X:0→Y:5→dim(∟GUY:1→∟GUY(1:1→∟GUY(2:2→dim(∟MAP:0→∟MAP(1:0→∟MAP(2:0→∟GUY(5     //Initialize variables (∟Guy: 1=new y, 2= new x, 3=old y, 4=old x, 5=jump on/off):100→T::real(12,0,80,1,80,62,0:real(12,0,95,1,95,62,0:real(12,0,81,0,94,0,0:real(12,0,81,63,94,63,0     //Draw HUD:Lbl 1:real(2,1,0,0,10,8,0,10,0,8,100,0,8,0     //Clear map:real(2,0,∟MAP(2),∟MAP(1),10,8,0,10,0,8,100,2,8,1     //Draw New map:While 1:If T≤0:Goto FN:T-.2→T     //That T thing is to keep track of time that has passed so far:real(8:Ans→K:dim([A])→∟DIM:∟GUY(2→∟GUY(4:∟GUY(1→∟GUY(3     //Store new to old so I can check If theyv'e been changed and therefore update the screen:If K=3:∟GUY(2)+1→∟GUY(2     //checks for keys pressed and acts accordingly (Next 7 Lines):If K=2:∟GUY(2)-1→∟GUY(2:If ∟GUY(5)=1:Then:∟GUY(1)-2→∟GUY(1:2→∟GUY(5:End:If K=54 and ∟GUY(5)=0:Then:∟GUY(1)-2→∟GUY(1:1→∟GUY(5:End:If K=1:∟GUY(1)-1→∟GUY(1):If K=55:Goto FN:∟GUY(1)+1→∟GUY(1)     //Gravity:If ∟GUY(2)<1:1→∟GUY(2):If ∟GUY(1)<1:1→∟GUY(2)     //Check for off screen:If [A](∟GUY(1),∟GUY(2))≠0:Then      //(Block of three lines)  Checks if guy is not in open space:If [A](∟GUY(1),∟GUY(4))=0:Then:∟GUY(4→∟GUY(2:0→∟GUY(5:End:If [A](∟GUY(2),∟GUY(3))=0:∟GUY(3→∟GUY(1:End:If ∟GUY(1)>∟MAP(1)+4:∟MAP(1)+1→∟MAP(1     //(Next 8 Lines) Moves map with guy, keeping him centered, except when not possible:If ∟GUY(1)<∟MAP(1)+4:∟MAP(1)-1→∟MAP(1:If ∟GUY(2)>∟MAP(2)+5:∟MAP(2)+1→∟MAP(2:If ∟GUY(2)<∟MAP(2)+5:∟MAP(2)-1→∟MAP(2:If ∟MAP(2)<0:0→∟MAP(2:If ∟MAP(2)>∟DIM(2)-10:∟DIM(2)-10→∟MAP(2:If ∟MAP(1)<0:0→∟MAP(1:If ∟MAP(1)>∟DIM(1)-8:∟DIM(1)-8→∟MAP(1:If ∟GUY(2)≠∟GUY(4) or ∟GUY(1)≠∟GUY(3:Then:0→[A](∟GUY(3),∟GUY(4)):29→[A](∟GUY(1),∟GUY(2:∟GUY(1→∟GUY(3:∟GUY(2→∟GUY(4:Goto 1:End     //Checks if the guys position is changed, if it is, redraw the map.:End:::::Lbl FN:ClrHome:Output(1,1,"":Stop     //Game finishTell me if you need it more commented than that.  Thanks for the tool Eeems

EDIT: BTW, the biggest problem is speed
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

• Mr. Dictator