Computer Science Canada Trying to make a parabolic jump trail for characters mario-like game :( |
| Author: | blackheart5598 [ Mon Jan 13, 2014 6:08 pm ] | ||
| Post subject: | Trying to make a parabolic jump trail for characters mario-like game :( | ||
What is it you are trying to achieve? I am trying to make a parabolic jump trail for my characters so that they don't all jump in the same way and height which makes it look awkward. What is the problem you are having? I am unable to do what I said above Describe what you have tried to solve this problem I have tried using a parabolic formula of y=x**2 but that doesn't seem to work. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) here is my jump procedure, if it is not enough i don't ming giving more information about my game. Thanks in advance
Please specify what version of Turing you are using latest version |
|||
| Author: | keyboardwalker [ Mon Jan 13, 2014 8:59 pm ] | ||
| Post subject: | Re: Trying to make a parabolic jump trail for characters mario-like game :( | ||
This may give you the desired effect and there isn't any exponentiation.
|
|||
| Author: | evildaddy911 [ Mon Jan 13, 2014 9:00 pm ] | ||
| Post subject: | RE:Trying to make a parabolic jump trail for characters mario-like game :( | ||
youre looking at this wrong. its actually quite simple. here some psuedocode:
EDIT: it seems somebody beat me to the punch... |
|||
| Author: | Raknarg [ Mon Jan 13, 2014 9:07 pm ] |
| Post subject: | RE:Trying to make a parabolic jump trail for characters mario-like game :( |
As the others have suggested, think about how gravity works in real life. It doesn't matter what your horizontal direction is, that will stay constant. However, what happens when you jump? You move upwards at a certain initial speed, and then the earth is pulling you down at a constant rate. Try converting that into code. If the player jumps, set the y direction speed up. While the player is in the air (think about what that means in terms of x and y), constantly pull him towards the ground. @keyboardwalker & evildaddy giving a new person in programming a bunch of code to help him out is giving him a fish instead of teaching him how o fish. |
|