Increase in trajectory in game
Author |
Message |
isaiahk9
![](http://compsci.ca/v3/uploads/user_avatars/1465120414488e669e1f83a.jpg)
|
Posted: Tue Apr 29, 2008 8:16 pm Post subject: Increase in trajectory in game |
|
|
As a final project, I must make a "game" in Turing. However, I have run into one major snag. Creating the boundaries, animating pictures, and arrays were all very simple to me, compared to this. So here is the premises for the game :
In a simpler version of the game, you input a key (up arrow, down arrow, right arrow, left arrow), and your avatar will use a pre-determined animation to move in that direction on his stage.
There are three platforms on the stage with a blue plant on one platform, a red plant on another and a green plant on the last.
If your avatar's position is greater than the plant's position by 50, then the plant will run a pre-determined animation so that it appears that the plant bites you, and if your avatar's position is less than the plant's position by 5, then the animation will be run, rotated so it bites you in the correct position.
If bit by the blue plant, your dots of life (your health bar, divided into 20 dots) decrease by one, and your avatar is thrown a bit using trajectory and gravity.
If bit by the red plant, your dots of life decrease by two, and your avatar is thrown a bit using trajectory and gravity.
If bit by the green plant, then your dots of life decrease by one, and your avatar is thrown A LOT using trajectory and gravity.
A difference in this game is that your avatar doesn't "die" when he loses all of his health. What happens is when the avatar loses a bit of health, he is thrown a bit farther by the plant's bites, so he sent flying more. The objective is not to be thrown off the stage by the plant's bites.
As well, every 10 seconds, your avatar can "shoot" the plants, so that they have more damage and are thrown more.
Here is my problem :
I already understand gravity relatively well (thanks metachief),but trajectory is still a bit unknown. I do not really understand how to take gravity and to change that into trajectory - how the bodies fly and how your avatar's "shots' (like arrows) will slowly fall to the ground.
As well, I do not fully understand how to make the lack-of-health or damage effect the throw of the trajectory. The more damage, the more throw. But different plants have different amounts of throw to start with anyway.
So I would really help it if someone could help me with this problem. Your name would be included in the credits, and anyone you reference. As well, if you leave your e-mail address in your reply, and if (that is a large if - there probably won't be any) there are any monetary profits, you would receive a 17% share of the profits. If you leave your email address I could inform you in one week whether there are going to be any profits.
Thanks. Below is the gravity simulator COMPLETELY MADE BY metachief.
P.S. How would I make it so that your avatar could only shoots every ten seconds, or other time-sensitive things in the game.
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
gravity.t |
Filesize: |
673 Bytes |
Downloaded: |
90 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
StealthArcher
![](http://compsci.ca/v3/uploads/user_avatars/18949255664b176c4f1481b.jpg)
|
Posted: Tue Apr 29, 2008 9:04 pm Post subject: RE:Increase in trajectory in game |
|
|
Trajectory will involve a vertical velocity, and a horizontal velocity. The horizontal will stop immediately upon hitting the ground, to simplify things for now. Move the man, sprite, whatever, x, and y pixels for vertical and horizontal movement. Then check for ground hit.
|
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Tue Apr 29, 2008 10:20 pm Post subject: RE:Increase in trajectory in game |
|
|
Also note that in your case it will be vastly less complex if you just assume no wind resistance, and as such your horizontal velocity will remain constant the entire flight.
|
|
|
|
|
![](images/spacer.gif) |
Tallguy
![](http://compsci.ca/v3/uploads/user_avatars/515706924539b443d32a6e.gif)
|
Posted: Wed Apr 30, 2008 7:06 am Post subject: RE:Increase in trajectory in game |
|
|
use a timer to count ur 10 seconds between each shoot, do u know how many appliocations u can make with this? this is a very good starting program (although u should make ur own)
|
|
|
|
|
![](images/spacer.gif) |
isaiahk9
![](http://compsci.ca/v3/uploads/user_avatars/1465120414488e669e1f83a.jpg)
|
Posted: Wed May 07, 2008 7:55 pm Post subject: RE:Increase in trajectory in game |
|
|
Found solution in gravity tutorial thanx anyway StealthArcher, Clayton and Tallguy
|
|
|
|
|
![](images/spacer.gif) |
|
|