If any of you know TI-Basic, come here.

Status
Not open for further replies.

Kaysakado

Member
'K, I need help with getting a guy in my game to jump. Here's my code so far, details later.
Code:
:6->A
:14->B
:0->C
:8->D
:1->E
:0->F
:0->G
:0->H
:While F=0
:ClrHome
:Output(A,B,"()
:Output(7,1,"------      ----
:Output(E,3,"::::
:Output(D,7,"^^^^^^
:Getkey->G
:B+(G=26)-(G=24)->B
:If G=25 and H=0
:5->H
:If B≥16 or B≤0
:1->F
:If A=6
:Then
:If B≥1 and ≤6
:0->H
:If B≥12 and B≤16
:0->H
:End
:If B≥7 and B≤11 and H=0
:A+1->A
:If B≥6 and B≤12 and A=D-1
:1->F
:If H=/=0
:Then
:A-1->A
:H-1->H
:End
:End
:Clrhome
:Output(1,1,"
Details: This is on a TI-84 SE, if it matters, I want C to become the "timer" for jumping if there needs to be one, and A is the hieght of the person.
 
First off, I honestly don't think you should be using TI-BASIC to develop a game, as it's very inefficient and runs incredibly slow (ASM seems to be more practical, but is more difficult to learn).

Second, I cannot immediately tell what the code in your game does, as it is not commented at all (and the TI operating system uses only single letters to designate variables - not a good thing). I could put the code into my calculator and see how it runs, but I still wouldn't know how it actually worked.

Third, if I'm reading you correctly, you're using a timer for jumping. This is the argh, this way is so stupid and unrealistic and ugly and hard to tell when you reach the arc of your jump because you don't decelerate when you're reaching the height of said jump and it looks lazy and should never ever ever be used way to do jumping. Instead, have a Y velocity that is always added to, and when hitting the jump key, set it to a negative value. This Y momentum value will add itself to the Y position each tic of your gameloop (which will be a long time because, like I said, TI-BASIC is incredibly inefficient).
 
First: I'm just doing this as a learning experience.

Second, how can you comment stuff? In any case, I'll add some.

Third, how can you do that if TI-Basic works on a very, very, very unspecific grid system?
 
TI-BASIC does not work on a grid-based system. The only thing that does is the character output, which uses a monospace grid. If you wanted, you could try for a sprite library (they do exist for TI-BASIC, I think), but that might slow it down more (though I haven't tried them at all). All your letter variables are real numbers - they can have decimals. You will, however, need to convert to integers when using output(). You also must be careful not to have it return a position that is outside the screen, or else output() will complain about the coordinates being out of range.
 
Well, if you want to do anything remotely complex with TI-Basic, you might want to mess with the draw screen. I did a bunch of stuff with it back in high school, and programmed tons of generic text grindfest RPGs (some of which were actually kinda fun)

If you want it to run WELL, though, I'd highly suggest against TI-Basic. It works for menu-based stuff, but not particularly for anything action-based.
 
FoxBlitzz said:
TI-BASIC does not work on a grid-based system. The only thing that does is the character output, which uses a monospace grid.
...and I'm using charector output.
FoxBlitzz said:
If you wanted, you could try for a sprite library (they do exist for TI-BASIC, I think), but that might slow it down more (though I haven't tried them at all).
You mean with Xlib, or something?
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top