Platformer Physics (Jumping)
by Matt Huston · in Torque Game Builder · 01/29/2007 (6:09 am) · 11 replies
I am using a system similar to the Ninja platformer tutorials with some minor changes for my needs.
I have one problem though, the jump is so slow, the player moves down incredibly slowly after reaching the peak of the jump, almost like a feather. How can I adjust this without effecting the jump height.
(Really, the initial jump could be quicker as well, but mainly just hanging in the air is the problem.)
I have one problem though, the jump is so slow, the player moves down incredibly slowly after reaching the peak of the jump, almost like a feather. How can I adjust this without effecting the jump height.
(Really, the initial jump could be quicker as well, but mainly just hanging in the air is the problem.)
About the author
www.atomicbanzai.com
#2
Force scale seems to work for what I needed. Forgot about that, I noticed the tabs have changed a bit since last time I used TGB. Unfortunately I need this to run on stock TGB otherwise I'd have a look a the C++.
01/29/2007 (6:56 am)
Thanks.Force scale seems to work for what I needed. Forgot about that, I noticed the tabs have changed a bit since last time I used TGB. Unfortunately I need this to run on stock TGB otherwise I'd have a look a the C++.
#3
Also, I don't mean to sound rude, but that tutorial explains in detail what every bit of related script does. There has to be a point where you take some of the responsibility to learn into your own hands and actually read the material.
The GG community has always been, in my opinion, one of the greatest assets to Torque developers, but a community member took the time to write up that great tutorial and it's up on TDN for everyone to use and learn from. I've answered a lot of questions on the forums and I like to do so. A lot of times information just isn't available anywhere else, or it's unclear where to find it. In this case, you actually have access to the tutorial and are using code from it, but you're basically asking someone else to read the text for you. I'm sorry, but I find that a little disrespectful - both to the community members you're asking and the one who took the time to actually write up the tutorial.
You're absolutely welcome on these forums and you should definitely take advantage of them. Discussion can be key to good development. Just please try to be respectful of the hard work people put into writing documentation by checking there first before posting questions.
02/01/2007 (6:16 am)
Gravity in that tutorial is applied using Constant Force. Changing the Force Scale will affect *every force* you apply to the character. Why not just increase the gravity, if that's what you want? The script file is tiny (the corrected version is only 80 lines), just look for wherever constant force is set and change the value. You'll probably want to adjust the jump force if you increase the gravity because jumping will seem weaker with higher gravity.Also, I don't mean to sound rude, but that tutorial explains in detail what every bit of related script does. There has to be a point where you take some of the responsibility to learn into your own hands and actually read the material.
The GG community has always been, in my opinion, one of the greatest assets to Torque developers, but a community member took the time to write up that great tutorial and it's up on TDN for everyone to use and learn from. I've answered a lot of questions on the forums and I like to do so. A lot of times information just isn't available anywhere else, or it's unclear where to find it. In this case, you actually have access to the tutorial and are using code from it, but you're basically asking someone else to read the text for you. I'm sorry, but I find that a little disrespectful - both to the community members you're asking and the one who took the time to actually write up the tutorial.
You're absolutely welcome on these forums and you should definitely take advantage of them. Discussion can be key to good development. Just please try to be respectful of the hard work people put into writing documentation by checking there first before posting questions.
#4
sorry about grammer( on subway ) :)
02/02/2007 (7:53 pm)
I dont think, his post is disrespectful. Dude, just had a question. Reprimanding someone in this way makes it hard to feel like its ok to ask questions on these forums, for fear of the question already being documented. There is alot of documentation and even if someone finds the documentation, it can be confusing at times and no one is perfect. sorry about grammer( on subway ) :)
#5
This may be a difference of opinion, but having spent plenty of hours of my own life writing documentation, it kinda rubs me the wrong way to see people disregard someone's hard work so flagrantly.
I didn't intend to discourage anyone from posting questions, but if my post inspired even one person to double check their research before dropping the burden of responsibility for their personal work on someone else, then it was entirely worth it.
It's a different story if you're unsure of how to do something and don't know of any documentation or are just unsure of where to look for answers, but that's not what happened here.
I don't want anyone to feel bad or remorseful or whatever, because it wasn't that big of a deal. I was just trying to point out that people put a lot of hard work into documentation and if you're going to use code from a tutorial you should probably also read it - especially before posting questions about that code.
I'm sorry if that came off a little harsh, but it hit a little close to home and I would hate to feel like my time spent on documentation is entirely wasted.
02/03/2007 (5:09 am)
Like I said, I know that sometimes it can be hard to find certain information, but in this specific case, in order to use the code that's being asked about you would have to have copied the code directly from the tutorial and actively avoided the text. The only way to get the code that applies gravity, as far as I know, is to copy it from literally two lines below the word "gravity" in the tutorial ("gravity" appears seven times and is explained in detail). This may be a difference of opinion, but having spent plenty of hours of my own life writing documentation, it kinda rubs me the wrong way to see people disregard someone's hard work so flagrantly.
I didn't intend to discourage anyone from posting questions, but if my post inspired even one person to double check their research before dropping the burden of responsibility for their personal work on someone else, then it was entirely worth it.
It's a different story if you're unsure of how to do something and don't know of any documentation or are just unsure of where to look for answers, but that's not what happened here.
I don't want anyone to feel bad or remorseful or whatever, because it wasn't that big of a deal. I was just trying to point out that people put a lot of hard work into documentation and if you're going to use code from a tutorial you should probably also read it - especially before posting questions about that code.
I'm sorry if that came off a little harsh, but it hit a little close to home and I would hate to feel like my time spent on documentation is entirely wasted.
#6
The main problem here and at other forums is that people who know what they're doing tend to forget how hard it is for someone who doesn't. Some people are naturals, some aren't. When people are told to use the search (not just here, but most places), it should be understood that some have to no avail. First, you have to know exactly what to search for if you don't want to look through 500 pages of hits. That in itself is a problem. Do a search here for "character fall slower" here and see what happens. Not much. And noticing certain helpful details that may be right in front of your eyes doesn't always happen when you're confused to begin with. Just happens that way. How many of us have ever found ourselves looking for an item in our office that ended up being right in front of us to begin with? We just overlooked it.
And as far as documentation goes, why have teachers? Just hand out the textbooks to the freshmen and tell them to come back in 4 years for their degree. Sometimes you just need to have the documentation explained a little, for whatever reason. And as for research, walk into almost any university library and say "Where can I find information about XYZ?" I'm relatively sure you won't get a "Search for it!" response. Even though they could and should know how. In fact, I've had professors actually tell me funds shouldn't be expended on a library to begin with, because they didn't need one. Again, sorry, but not everyone is a genius at a specific task.
I used to notice that kids who were told things in ways that made them seem 'less than intelligent' usually ended up retreating from the societal environment, and I guess that's why I'm so defensive of people who ask seemingly 'dumb' questions.
As I said, Thomas, I for one really appreciate the second post. Takes the edge off the first. And I know I have no right to jump in on these things when they don't pertain to me, but you know how it is sometimes. Carry on...
02/03/2007 (10:13 am)
Thomas, that last was a good post. I saw this thread yesterday and almost responded to the first one because it's one of my pet peeves. I agree with your last post completely, but as someone who has taught programming at university level I have a lot of empathy for some of the people trying to learn this stuff. I myself was new to game programming a couple of short years ago, and even with experience it was discouraging at first to say the least.The main problem here and at other forums is that people who know what they're doing tend to forget how hard it is for someone who doesn't. Some people are naturals, some aren't. When people are told to use the search (not just here, but most places), it should be understood that some have to no avail. First, you have to know exactly what to search for if you don't want to look through 500 pages of hits. That in itself is a problem. Do a search here for "character fall slower" here and see what happens. Not much. And noticing certain helpful details that may be right in front of your eyes doesn't always happen when you're confused to begin with. Just happens that way. How many of us have ever found ourselves looking for an item in our office that ended up being right in front of us to begin with? We just overlooked it.
And as far as documentation goes, why have teachers? Just hand out the textbooks to the freshmen and tell them to come back in 4 years for their degree. Sometimes you just need to have the documentation explained a little, for whatever reason. And as for research, walk into almost any university library and say "Where can I find information about XYZ?" I'm relatively sure you won't get a "Search for it!" response. Even though they could and should know how. In fact, I've had professors actually tell me funds shouldn't be expended on a library to begin with, because they didn't need one. Again, sorry, but not everyone is a genius at a specific task.
I used to notice that kids who were told things in ways that made them seem 'less than intelligent' usually ended up retreating from the societal environment, and I guess that's why I'm so defensive of people who ask seemingly 'dumb' questions.
As I said, Thomas, I for one really appreciate the second post. Takes the edge off the first. And I know I have no right to jump in on these things when they don't pertain to me, but you know how it is sometimes. Carry on...
#7
If everyone stopped and read this before they responded to a post that happened to "push a button", the world would be a better place.
02/03/2007 (12:45 pm)
Terry: You're post should be required reading for all GG employees. Actually, I think it should be required reading for everyone who uses the forums.If everyone stopped and read this before they responded to a post that happened to "push a button", the world would be a better place.
#8
@Thomas - I'm sorry, but it "pushed my button" for a reason and I stand by that. I have and will continue to answer "stupid" questions. I have a much harder time justifying answering lazy ones. People make mistakes, yes, but this is a mistake I would like to see less of, so I said something about it.
I have never in my life, as far as I can remember, given anyone a "search for it" answer. You may notice, the very first thing I did was answer his question. Everyone knows that searching this site is cumbersome and difficult and I know I've been guilty of ignoring docs and asking silly questions on many internet forums. Sure it's easier, but it's laziness that drove me to do it most of the time, not confusion. I didn't think this was a dumb question, I just thought it was a little rude, though most definitely unintentional.
02/03/2007 (4:21 pm)
@Terry - I totally understand and agree, as you can see by my post history, that people need to be helped out sometimes with certain things, but take your example and search for "fall" in that tutorial and you'll also find what you're looking for. There's a table of contents at the top with a link that says "Player Movement" that takes you to the exact section.@Thomas - I'm sorry, but it "pushed my button" for a reason and I stand by that. I have and will continue to answer "stupid" questions. I have a much harder time justifying answering lazy ones. People make mistakes, yes, but this is a mistake I would like to see less of, so I said something about it.
I have never in my life, as far as I can remember, given anyone a "search for it" answer. You may notice, the very first thing I did was answer his question. Everyone knows that searching this site is cumbersome and difficult and I know I've been guilty of ignoring docs and asking silly questions on many internet forums. Sure it's easier, but it's laziness that drove me to do it most of the time, not confusion. I didn't think this was a dumb question, I just thought it was a little rude, though most definitely unintentional.
#9
In general, though, I also stand by what I said in the post. There are people who make that "open your eyes" thing not only a stock kind of answer, but are often quite demeaning about the whole thing. That's why in two years you won't find many posts from me here asking questions. Instead I buy all the books (3D All In One first and second, Programmer's Guide to Torque, etc.), do a lot of searching, and a lot of trial and error. I'm on here daily lurking around looking for new things, benefitting from all the great contributions by employees and members, and TDN has been a great help. Still, and regretfully, I hesitate to ask questions.
Keep up the good work and again, thanks for understanding the reason for the post.
@T.S. - Thanks, and I do wish some people would take an extra second to consider their answer before they click Submit Post. I'm sure sometimes they don't mean to come across the way they do, but this is a textual world that can't convey subliminal meanings very well. We have to take things at face value. In any case, we're all here at GG for the same thing. Some of us just aren't as good at it... :)
02/03/2007 (8:19 pm)
@T.B. - Thanks for understanding the post, it wasn't aimed at you as much as the whole general concept. People tell me I have a lot of patience, but I get a little exasperated sometimes too. Just depends on how your day has gone. I always have to remind myself to look at the overall picture and not take one post out of context, and you're right about being you helpful here. Just that sometimes certain posts "push my button" before I take time to think it over.In general, though, I also stand by what I said in the post. There are people who make that "open your eyes" thing not only a stock kind of answer, but are often quite demeaning about the whole thing. That's why in two years you won't find many posts from me here asking questions. Instead I buy all the books (3D All In One first and second, Programmer's Guide to Torque, etc.), do a lot of searching, and a lot of trial and error. I'm on here daily lurking around looking for new things, benefitting from all the great contributions by employees and members, and TDN has been a great help. Still, and regretfully, I hesitate to ask questions.
Keep up the good work and again, thanks for understanding the reason for the post.
@T.S. - Thanks, and I do wish some people would take an extra second to consider their answer before they click Submit Post. I'm sure sometimes they don't mean to come across the way they do, but this is a textual world that can't convey subliminal meanings very well. We have to take things at face value. In any case, we're all here at GG for the same thing. Some of us just aren't as good at it... :)
#10
07/30/2009 (12:17 am)
Once again a guy asks a simple question and gets essays that lack answers.
#11
07/30/2009 (7:14 am)
Wow, very productive necro...
Torque Owner Matt Bates