  # biscuitz

Member

127

## Community Reputation

127 Neutral

• Rank
Member
1. Do I have to use fixed time step if I'm using the differential equation method?
2. Quote:Original post by JohnBoltonTo get the analytic solution, you need to solve the differential equation dv = kv2 dt (k = 0.5*C*p*A/m) I've heard about that (differential equation). I'll check that out. Quote:And this is exactly your problem. You didn't code anything. If you did, you'd have a nice window with something that moves on the screen and decrease its acceleration because of air drag.You can't make a game without math it's impossible. If you remove math from a game you'd end up with a blank window or maybe nothing (which any mediocre programmer can do). I'm not going to learn any more math by trying to program drag into a program if I don't even get the maths of it. Quote:Have you answered the question why do you need precise information about maximum of function you described?I see no advantage in approximating. You won't get much more speed out of approximating with those techniques (as far as I can tell). As far as I can tell approximation techniques are just the lazy way of doing it. The main reason I want to know this information is so I know the difference between it and approximating. Basically I see this as someone trying to convince me to just use a library like SDL rather than use the Win32 library. Quote:five minutes typing, and few hours testing.)Or I can *not waste time* trying to *approximate* the values and just use whatever the equation is supposed to be. Quote:And if you dont use fixed timestep, you are insane. The gameplay will be really different on different computers. And it is a lot harder to code.I'm going to just multiply by the amount of time that has passed. Using fixed timestep requires finding the amount of time passed anyway so I mine as well just multiply by the time difference.
3. atm I haven't coded anything yet because I'm stuck at the mathematics behind this. I don't see an advantage to using a constant for time interval. It won't make it any faster. Actually it sounds like it will add a divide into the mix. I'd rather use a time-difference technique so it looks better because you'll see what it is supposed to look like at that point in time. Are you talking about calculating the acceleration during that time frame? Is there any way that's not based off of acceleration because it's non-uniform. Quote:You sure that wasnt what your game needed?I won't know unless I understand the extent of what this stuff is doing. As far as I can tell all these methods sound incorrect and I have no idea how far off they could be because I don't even know what the correct answer is.
4. Quote:you need to compute the velocity through acceleration. To simulate this drag equation with more precision, try using Runge-Kutta4 Integration.I don't think I should be using the acceleration since it can't be used to predict future velocities because after that point in time the acceleration changes. What type of graph is RK4? y = x^2? y = 1/x? Quote://gameloop //your physics here velocity*=0.9f; //render //end of loop and if your timestep is not fixed, well, fix it heh, bad pun..."your physics here" is what I'm trying to figure out. By timestep I'm guessing you mean the time difference between each loop of the program. Technically there's no way to make it "fixed", or either I haven't learned to make a program execute in exact loops/second. Is that what you mean by timestep? edit: I see that RK4 might be helpful but I was hoping there was a precise way of doing it. I thought there would be an equation for this?
5. Quote:Like cloth? Leaves or some other objects that float?No, a flying robot. Quote:F = 0.5*C*p*A*v²Yes that is the problem I'm having ATM. If I use different time intervals to calculate the acceleration changes. It has a non-uniform acceleration (changes at every instant in time) which affects final velocity. So I'm trying to find an equation to calculate the velocity at a specified time since acceleration can't be used.
6. How do I simulate the movement of an object with air resistance/drag?
7. I'm trying to simulate the velocity of an object with respect to time t (calculate velocity at any point in time, which I can't figure out with drag effecting it). In other words I'm trying to simulate the movement of an object including air resistance/drag.
8. What are you trying to do? It looks like something I'm trying to do except you're working with gravity. It looks like you're trying to calculate velocity... Quote:m*a=G*m*M/(r^2) a(t)=G*M/(r(t)^2) Where did the t come from?
9. Well if you run out of memory then you've "reached a limit."
10. Idea: Check out cell-shading. Perhaps you can use some ideas from that. I know it's for 3d but you might be able to use some of it.
11. Thank you Sneftel. I hope people will attempt to answer the question rather than attempt to have a physics debate on this thread.
12. i'm surprised more people replied. Quote:And why should he care? If he is doing this for learning purpose, he should do it in a way he want. Ye i am doing this to learn but also cuz i want to know how accurate/inaccurate it will be. i'm thinkin bout scrapping the "g-force" idea. I understand that there is no maximum limit of velocity in space (except for speed of light?) but then I don't want the players running around extremely fast. Idk maybe players running around extremely fast won't be a problem... Quote:Don't forget on heat, as heat is the most limiting factor in current ramjets. umm by ramjet are u refering to a rocket (like nasa)? ok in the beggining the mechs will be using rocket-propulsion but later on they will be using more advanced technology (which i wont mention or people will start posting how crazy and "physics defying" it is) I'm not exactly sure what you mean by heat (from booster, from atmosphere...) Also can anyone tell me how to calculate the velocity after a certain time of accelerating, this is complicated due to resistance. The resistance formula gives a non-linear acceleration which means I can't use acceleration. For example Force = 100 (i'm ommitting units) mass = 10, acceleration = 10. Well that might give me the acceleration at *that point in time* but the acceleration changes with every point in time while accelerating to the maximum velocity so I cant use F/M*t to calculate the velocity at which the object should be moving at (if I use F/M*t I'll get different answers if/since time intervals may be different due to the computer, like it may lag out for 3 seconds and basically won't be accelerating the same at more frequent time intervals) So far I created an y=x^2 equation where it levels off (in seconds) at the square root of the maximum velocity but it's not really "physics" proven; it curves up to the maximum tho, it's probably wrong since I'm using what I learned from wikipedia. [Edited by - biscuitz on February 24, 2007 5:43:02 PM]
13. The mechs will most definately go beyond mach 0.3 lol (it's based in the future so they have to go pretty fast). What would I use if it's more than mach 0.3? Hmm... what if I added a G-force factor? So in outerspace you're mech can't go faster than a certain G-force (or pilot will die)
14. 1, 2, 7: lol ok. 4: Then why does it take so long to reach other planets? :/ Unless object stops accelerating so that it has enough fuel to get back... or the gravity of other objects (planets/moon) in space... 5: I'm not sure how/what to do about this. What if I used a parabolic equation to get the velocity at that time? I have a graphing calculator, the acceleration is supposed to slow down as it approaches terminal velocity, should I use a y=x^2 function or a y=1/x function? 6: Thanks for the link.