Author Topic: A Dilemma on Interception Mechanics  (Read 14742 times)

0 Members and 1 Guest are viewing this topic.

Offline GeaXle

  • Chief Petty Officer
  • ***
  • G
  • Posts: 44
  • Thanked: 3 times
Re: A Dilemma on Interception Mechanics
« Reply #15 on: December 10, 2011, 04:43:58 AM »
Quote
Hmm! Although another complication just occured to me. What if the nuclear detonation takes out another missile that exploded slightly later in the increment. I guess I will have to save all possible nuclear detonations until after all movement then check them all in exact order of detonation and see if any were destroyed before they exploded. With that level of detail I probably need to also track how long it would take the blast wave to arrive.

Quote
So, in that case, wouldn't a sentient race have all their nukes set so they communicate and detonate at once?
It might not do much, but it's better than to just disappear.

This made me think. Will it be possible to chose to spread a group of missile separated by their extact detonation range and to all detonate at the same time? Maybe aiming for a group of ships instead of a single one. A kind of huge area of damage.
 

Offline Mel Vixen

  • Commander
  • *********
  • Posts: 315
  • Thanked: 1 times
Re: A Dilemma on Interception Mechanics
« Reply #16 on: December 10, 2011, 04:59:47 AM »
Wouldt it be sufficient to let ship and missile move on the same turn/in the same phase once they are in interception-distance? Sure its some more linesof code but it could work.
"Share and enjoy, journey to life with a plastic boy, or girl by your side, let your pal be your guide.  And when it brakes down or starts to annoy or grinds as it moves and gives you no joy cause its has eaten your hat and or had . . . "

- Damaged robot found on Sirius singing a flat 5th out of t
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #17 on: December 10, 2011, 08:54:55 AM »
This made me think. Will it be possible to chose to spread a group of missile separated by their extact detonation range and to all detonate at the same time? Maybe aiming for a group of ships instead of a single one. A kind of huge area of damage.

I think it would be possible to link several salvos together so they all detonate at the same time. Or maybe a MW missile that sends its sub-munitions in diverging directions with the same end result. I think the days of large salvos are over anyway as one nuclear AAM will destroy the whole incoming salvo. Anti-ship missiles will have to be spread out to avoid that fate. I haven't decided how to do that yet but staggered launch would be one option and a second would be divergent courses for a set period before they all lock on to a target and begin homing.

Steve
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #18 on: December 10, 2011, 08:56:25 AM »
Wouldt it be sufficient to let ship and missile move on the same turn/in the same phase once they are in interception-distance? Sure its some more linesof code but it could work.

Its a little more than a few lines of code :). It wouldn't solve the underlying problem though because whatever order they moved in, if the interception point is 2.5 seconds into an increment, they would still miss each other.

Steve
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #19 on: December 10, 2011, 08:56:53 AM »
Maybe create a second thread (aka a mini-program) that does nothing else but micropulses? ;)

This is VB6 :). There is no multi-threading.

Steve
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #20 on: December 10, 2011, 08:58:52 AM »
Wouldn't the proposed combination of 2 and 3 almost take care of this already? Just run the micro-pulse reruns in parallel, instead of one at a time. Then, when the first blows, you can easily examine the current location of other nearby missiles and take them off the list as appropriate. I suppose once in a blue moon you'd see two missiles go off in the same micro-pulse, but not often enough to worry about, I think.

Running everything in micro-pulses would be really hard on performance, that's why I was considered re-running after the event for just the affected objects. Unless I have misintepreted what you meant.

Steve
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #21 on: December 10, 2011, 09:02:45 AM »
I tried 1) last night. A ship moving at 350 km/s launched at a second ship moving across its path at 700 km/s and under constant acceleration. The missile reached 1200 km/s, which was its set max speed, and homed in. It actually hit the target ship and detonated its 250 KT laser warhead. As you can imagine, the target didn't survive.

Steve
 

Offline Mormota

  • Warrant Officer, Class 2
  • ****
  • M
  • Posts: 62
Re: A Dilemma on Interception Mechanics
« Reply #22 on: December 10, 2011, 09:38:43 AM »
Wouldn't it be better to make missiles move before ships? At longer ranges, this would hardly make a difference, and it would solve the whole interception problem, I think.
 

Offline UnLimiTeD

  • Vice Admiral
  • **********
  • U
  • Posts: 1108
  • Thanked: 1 times
Re: A Dilemma on Interception Mechanics
« Reply #23 on: December 10, 2011, 10:18:21 AM »
Crap, I always forget how old the code is..
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #24 on: December 10, 2011, 11:17:16 AM »
Wouldn't it be better to make missiles move before ships? At longer ranges, this would hardly make a difference, and it would solve the whole interception problem, I think.

The problem isn't that ships move before missiles or vice versa. It's the length of the increments. Imagine a ship and a missile on are an intercept course and both are moving at 100 km/s. The ship has a heading of 90 degrees and the missile has a heading of 180 degrees. They are both 200 km/s from the intercept point at the start of a five second increment. Which ever moves first will move 300 km/s past the intercept point and then the other will move behind it and also end up 300 km/s past the intercept point.

Steve
 

Offline Mormota

  • Warrant Officer, Class 2
  • ****
  • M
  • Posts: 62
Re: A Dilemma on Interception Mechanics
« Reply #25 on: December 10, 2011, 11:53:56 AM »
Is it not possible to make missiles move at the same time their target does, then?
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: A Dilemma on Interception Mechanics
« Reply #26 on: December 10, 2011, 12:06:08 PM »
Is it not possible to make missiles move at the same time their target does, then?

Well, possible if I rewrite the entire movement engine of the game :). Also, some missiles have an area effect warhead so you would also need to know where everything else is at that exact moment as well. Moving everything in the game simultaneously would be challenging, which is why I used the pulse system. You can get more accurate by using much smaller pulses but then you run into performance issues. The point of this thread is to look at way of getting around the issue without a major code rewrite. I think I am going to use the first of the four options for missiles because it is only a slight fudge, it only required a couple of lines of code and the first test actually physically hit a fast-moving target with a flight path perpendicular to that of the missile. For railgun shots I think I will use a combination of 2) and 3).

Steve
 

Offline Vanigo

  • Lt. Commander
  • ********
  • V
  • Posts: 295
Re: A Dilemma on Interception Mechanics
« Reply #27 on: December 10, 2011, 01:35:30 PM »
Running everything in micro-pulses would be really hard on performance, that's why I was considered re-running after the event for just the affected objects. Unless I have misintepreted what you meant.

Steve
Well, what I meant was, you're talking about taking one missile and one target and running them on micro-pulses, then taking another missile and its target and running them on micro-pulses, and so on until you've done every potentially-intercepting missile. Instead, take every such missile and every target and run all of them on micro-pulses at once. It's no harder on the CPU - in fact, it's easier if there are multiple missiles going after the same ship.
That said, on further reflection I'm not sure what the micro-pulses do for you. Option 3 already gets you, with a little math, the time and location of the explosion. Just make an ordered list of possible explosions, march down, and take out destroyed missiles as necessary.
You might even consider doing the same with potential fleet interceptions, come to think of it. Just use detection distance instead of detonation distance, and all the math is the same. Check to see if someone is going to see someone else as the first thing in the pulse, and if the answer is yes, break down into smaller sub-pulses (but no smaller than 5 seconds, of course). That solves the bug where fleet detection can be late, especially if the game's moving in 30-day increments. Probably isn't really necessary, but since you're writing the code anyway, you could see how much overhead it adds. (Although, figuring out which pairs of fleets need to be checked is non-trivial. That... yeah, that might kill this notion.)
 

Offline chrislocke2000

  • Captain
  • **********
  • c
  • Posts: 544
  • Thanked: 39 times
Re: A Dilemma on Interception Mechanics
« Reply #28 on: December 12, 2011, 08:13:33 AM »
Quote
I tried 1) last night. A ship moving at 350 km/s launched at a second ship moving across its path at 700 km/s and under constant acceleration. The missile reached 1200 km/s, which was its set max speed, and homed in. It actually hit the target ship

Quick question on the mechanics of the above, does the missile calculate expected location before or after actions of the ship? Ie if I change my ships velocity in the tick before the last 5 seconds will this force a miss as my ship will no longer be where the missle projected it to be at that stage?
 

Offline Elouda

  • Gold Supporter
  • Lieutenant
  • *****
  • Posts: 194
  • Thanked: 21 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
Re: A Dilemma on Interception Mechanics
« Reply #29 on: December 12, 2011, 08:35:47 AM »
I would imagine the missile would attempt to accelerate to compensate for any changes, so afterwards?

This would offer an interesting balance between high-efficiency missiles built for long range high velocity strikes, and high-acceleration missiles capable of handling even very maneuverable targets...

Of course, the optimal designs then becomes a 2 stage with a high-efficiency booster and high-acceleration warhead.