I'm working on a way to use the keypad as a rudimentary track-pad to move an object on-screen.
So far it's been working decently.
Code:
(I've been doing on-calc programming, I haven't gotten to the point where I need SC yet)
Next I'd like to add a projectile, that uses realistic physics, and will jump from a random point of the bottom of the screen, fly up a random height, then lands on the bottom of the screen at a random point. I know I need to use a quadratic formula, but I'm not sure how to add the realistic physics. How would I do this?
So far it's been working decently.
Code:
DAARSE
det(0
//sets colors to black
det(2,000
//draws boarders
det(36,290,0,320,240
det(36,0,0,50,240
det(36,50,0,290,50
//repeats untill [del] is pressed
Repeat getKey(56)
getKey→KEY
//checks if user pressed a key
If KEY
//sets color to white
det(2,255
//clears the section of the screen that the cursor can move. (I'll be replacing this with a better way later)
det(36,50,50,240,240
//sets color to some green color
det(2,102
End
//checks that the keys are within the 'track pad' boundries
If KEY≤46 and KEY≥10 and KEY≠39 and KEY≠31 and KEY≠23 and KEY≠15
//displays a circle at the coordinates
det(33,320-((KEY/8)*50),300-remainder(KEY,8)*40,5
End
End
det(1
(I've been doing on-calc programming, I haven't gotten to the point where I need SC yet)
Next I'd like to add a projectile, that uses realistic physics, and will jump from a random point of the bottom of the screen, fly up a random height, then lands on the bottom of the screen at a random point. I know I need to use a quadratic formula, but I'm not sure how to add the realistic physics. How would I do this?