View Single Post
  #7  
Old August 17th, 2007, 02:50 AM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

Nope. You have a second, identical equation for the other dimension (or more - it's extendable to as many as you like; most games will use two (X, Y), some will use three (X, Y, Z) but you can have 30 if you feel like it), and you'll have a relationship between the two based on the overall max acceleration for the pursuer (based on the pythagorean therom; max acceleration = sqrt(a(x)^2 + a(y)^2 + a(z)^2 + ... ) and the persuer is picking an acceleration in the x, y, z, ... axises (axen? axes? - what's the plural of axis?); you'll end up with a system of equations, based on how much you're simulating.

Er, yes, I'm currently using it for two axis. Three would probably result in a significantly smaller consumer base. Four would limit it to only the seriously dedicated, which does not include me, in both desire and ability.

I do know that equation. My problem is the whole 'Pursuer picking an acceleration' thing. See, the equation helps pick the pursuers' acceleration and the pursuers' acceleration is part of the equation...

Um, there must be something obvious I'm not seeing. Possibly it's in the communication.

It's simultaneous equations. If you've got four variables and three equations that relate them, you can usually solve for everything in terms of a single variable.

I get the general concept. However, my math skills are abysmal. I still carry a grudge with the school system here over that; they were near-genius level before I entered it. (I have a psychiatric assesment to prove it, too).

I am trying to raise my math skills. I have learnt a few things bashing my head against this.

Whichever you'd prefer; the exact choice is completely immaterial. Math's like that, sometimes.

Er, do you mean I can put '0' for the pursuers' acceleration or I can use either for the pursuer or both? Because I can see the second, but I'm not sure about the first.

The Quadratic formula gives two results. One will usually give you negative time, which you discard. Occasionally it will come back with an imaginary number (by way of the square root of a negative) - in which case, interception is not possible.

The negative time would explain the enemy ship accelerating south if it's headed south and sufficiently southward of the target.
If the result is not a number or infinity, it is discarded.

So, uh, how do I make sure the formula is giving me a good result?

Oh, and there's a REASON most games use flat velocities, rather than accelerations.

My left brain is perfectionist, precise and thorough. I believe you are all sufficiently aquanted with my right brain...

...Besides, one of the main features of this game will be multiple FTL and STL systems.

The simple way to do it, if you're going a little bit at a time anyway, is to simply accelerate in the direction of the target. The computer will have some overshooting issues, and it won't be the most efficient course, but it'll do the job eventually.

That would be a whole lot easier. But my brain has consistantly discarded that option in favour of the better (In the end) result.

Although it is getting tempting.

Ok, my brain is seriously fried and it's rather late. I'll look at this again tomorrow.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote