#### Archived

This topic is now archived and is closed to further replies.

# Projectile simualtion on a TI-83

This topic is 5881 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

On my TI-83 Plus graphing calculator, I am working on a remake of the classic game Gorrilas, in which two gorrilas stand on top of skyscrapers and you must guess the correct angle and speed to release the banana so it will fly and hit the other gorilla. This is posted in the Math & Physics section, so obviously I am stuck on getting the right trajectory. What info I have to work with is the initial angle, and the initial speed, along with the projectiles X and Y screen coordinates. I can get the projectile to release at the correct angle, but I can''t incorperate a parabola into it. How would I get the pixel to fly in a parabola, whos arc depends on speed and inital angle? Remember, I''m doing this in calcuator-basic, so I don''t think I can use vector math or stuff like that. Thanks!

##### Share on other sites
once upon a time, many years ago, you could find qbasic versions of all these games...being qbasic, you could read the source...

[so]

translating to calculator basic from qbasic is not hard/

##### Share on other sites
quote:
Original post by Anonymous Poster
once upon a time, many years ago, you could find qbasic versions of all these games...being qbasic, you could read the source...

[so]

translating to calculator basic from qbasic is not hard/

Don''t disregard this answer by Anon. Seriously, it''s true. And it''s the answer that will help you the most if you follow through on it. Search for Gorrilas.bas or something on Google. That''s a start. Read the source, go from there.

##### Share on other sites
I think its something like:

initial X-Vel = Speed * cos(angle)
initial Y-Vel = Speed * sin(angle)

Every frame, you slightly modify the value of y to simulate gravity, and modify the x value to simulate wind (if any). You then add/subtract the X-Vel and Y-Vel from the pixel's coords.

Edit: That is, slightly modify the X and Y velocity to simulate wind and gravity

[edited by - glassJAw on September 10, 2002 10:28:19 PM]

##### Share on other sites
That's a start, but you need the full formula:

y(t) = -1/2gt2 + Vy*t + S

t = time from start [0 - ???],
g = gravitational constant (9.8 m/s2 or 16 ft/s2, but we're working in pixels so you might need to tweak that)
Vy = Initial vertical speed (Speed * sin(angle))
S = Initial height off ground

The x position is simply (Vx*t + Ix), where Ix is the initial X coordinate and Vx is (Speed * cos(angle)).

This is all basic physics and trajectories, so if you Google it you'd get countless references.

Oh yes, and the formula I provided assumes the screen coordinate system is the same as a regular 2D cartesian system, but it really isn't, as -y is actually up in terms of the screen. So just invert anything that has to do with Y, i.e the 1/2 and Vy, etc.

[edited by - Zipster on September 10, 2002 10:36:59 PM]

[edited by - Zipster on September 12, 2002 2:36:02 AM]

##### Share on other sites
Ok thanks a lot everyone, now I have something to work with

##### Share on other sites
Arg, quick correction. Change - Vy*t to + Vy*t

##### Share on other sites
dude, have you any idea how slow and skippy that game would be?
first try making a two frame animation; it don''t work. You need to learn TI-83 assembly. Basic on the calc is only for graphing and for "formulae programs" not "Mega Man"!!!!!

##### Share on other sites
quote:
Original post by Anonymous Poster
dude, have you any idea how slow and skippy that game would be?
first try making a two frame animation; it don''t work. You need to learn TI-83 assembly. Basic on the calc is only for graphing and for "formulae programs" not "Mega Man"!!!!!

Except that it isn''t a realtime game, so choppiness doesn''t matter too much. It can go as slow or as fast as the max framerate.

##### Share on other sites
Yeah, I know about the speed thing... I made a pong game on there, and it flat-out sucked because it went ridiculously slow, lol. But this game can go slower/skip frames because the gameplay isn''t speed based. I made a mini-golf game using TI-basic and it rocked , but got erased.

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 13
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632960
• Total Posts
3009475
• ### Who's Online (See full list)

There are no registered users currently online

×