- #1
Narf the Mouse
- 11
- 0
Hello. A few things first: I have been trying to figure this out off and on for at least half a year and only come up with hack-jobs, most of which either worked poorly or not at all. My math skills are rusty and my memory forgets formulas easily.
Although my current problem involves programming, it is also primarily a physics problem in solution. To explain, one of my current projects is a space strategy game in the vein of Stars!, Master of Orion or Reach for the Stars. One of the features of the game is multiple drive systems; *Newtonian, **Inertialess and ***Jump-Drive are all planned.
Naturally, a game such as this would benefit from a robust interception formula. I was fortunate enough to find This, which is free for public use and works with both Newtonian and inertialess physics and can be made to work with the jump-drive. Because it is free for public use, I see no problem in asking for help improving it, so long as I post any such public improvements on the site - Which I will.
My problem is, it is missile intercept code. It's great for missiles, but not so much for ships.
To explain, say Ship A wants to match course and speed with Ship B - That is, to come to rest relative to Ship B. The intercept code doesn't allow for that.
My question: How would I modify the intercept code to allow course and speed matching? (Once those two are matched, acceleration matching should be trivial)
Thanks for any and all help.
* Newtonian: Basically, achieves FTL by throwing Einsteinian physics out the window. Acceleration may increase velocity indefinitely.
** Inertialess: Achieves FTL by throwing conventional phsyics, as well as acceleration, out the window. Ships have velocity and need not accelerate.
*** Jump-Drive: Teleportation.
Although my current problem involves programming, it is also primarily a physics problem in solution. To explain, one of my current projects is a space strategy game in the vein of Stars!, Master of Orion or Reach for the Stars. One of the features of the game is multiple drive systems; *Newtonian, **Inertialess and ***Jump-Drive are all planned.
Naturally, a game such as this would benefit from a robust interception formula. I was fortunate enough to find This, which is free for public use and works with both Newtonian and inertialess physics and can be made to work with the jump-drive. Because it is free for public use, I see no problem in asking for help improving it, so long as I post any such public improvements on the site - Which I will.
My problem is, it is missile intercept code. It's great for missiles, but not so much for ships.
To explain, say Ship A wants to match course and speed with Ship B - That is, to come to rest relative to Ship B. The intercept code doesn't allow for that.
My question: How would I modify the intercept code to allow course and speed matching? (Once those two are matched, acceleration matching should be trivial)
Thanks for any and all help.
* Newtonian: Basically, achieves FTL by throwing Einsteinian physics out the window. Acceleration may increase velocity indefinitely.
** Inertialess: Achieves FTL by throwing conventional phsyics, as well as acceleration, out the window. Ships have velocity and need not accelerate.
*** Jump-Drive: Teleportation.