Any way to have heat seeker act their part?

This is the location for all mods to collaborate. Anyone making or planning their own mod should post help requests, screen shots and news here.

Moderators: Omega, tillias, Mod Contributor

Any way to have heat seeker act their part?

Postby chuck_starchaser » Thu Oct 02, 2008 8:31 am

In PU we have heat-seeker missiles, but they don't behave as such.
In the original Privateer game, the only way you could get a heatseeker
to lock on a bogie was to get *behind* the bogie.
In PU, heatseeker get a lock from any angle.
VS has heatseekers, right? Do they work like heatseekers?
If so, how do we fix ours?
TIA
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: Any way to have heat seeker act their part?

Postby Deus Siddis » Thu Oct 02, 2008 10:42 am

chuck_starchaser wrote:In PU we have heat-seeker missiles, but they don't behave as such.
In the original Privateer game, the only way you could get a heatseeker
to lock on a bogie was to get *behind* the bogie.
In PU, heatseeker get a lock from any angle.
VS has heatseekers, right? Do they work like heatseekers?
If so, how do we fix ours?
TIA


IMO, yes to all of the above. All VS ships have 'hot' thrusters on all sides (unlike modern spacecraft like the shuttle that only have simple low power 'cold' gas thusters besides the actual rockets engines on the back). And then there's the waste heat dissipation issues too (radiator surfaces).

Realism aside, as a player of VS I've never noticed heatseekers needing a backside firing solution, they seem to just need for you to be within range of the target for long enough, and I think to be facing the target within a certain angle range too.

If this is not for the realism conflicts, it is probably because while missiles in VS are currently horribly overpowered, a modern technology inspired limitation like this would make the weapons that suffered it totally useless. This comes from being able to pull off "shelton slides" in VS, where you can turn your would-be vulnerable backend away from incoming missiles at your ship's max angular acceleration while still keeping your momentum (all because drag is still 0 no matter what your silhouette from your direction of travel) and you still can maneuver out of the missile's path with your lateral thrusters.

That's my understanding of VS' story anyway, WC of course has its own direction of game play mechanics and balance.
Deus Siddis
Elite
Elite
 
Posts: 1362
Topics: 13
Joined: Sat Aug 04, 2007 8:42 am

Postby chuck_starchaser » Thu Oct 02, 2008 12:43 pm

Exactly. All realism considerations aside, PU has a canon to deal with. In the original game of Privateer, and in all WC games for that matter, heatseekers needed a backside solution, and so that is what PU needs.
So, re-framing the question: Where do I start looking to implement this?
Would I need a special "missile AI" for heatseekers only?
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Postby jackS » Thu Oct 02, 2008 2:41 pm

Locking behavior isn't missile specific at present except in terms of range and time required to lock. You'd need to recode how we do missile locking, not just the missile behavior script.
User avatar
jackS
Minister of Information
Minister of Information
 
Posts: 1895
Topics: 56
Joined: Fri Jan 31, 2003 2:40 pm
Location: The center of Centre county

Postby chuck_starchaser » Thu Oct 02, 2008 11:03 pm

Hmmm... Okay. So, where would be the locking code? Is that python or c++? (Hope it's C++...).
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Postby chuck_starchaser » Fri Oct 03, 2008 9:45 am

chuck_starchaser wrote:Hmmm... Okay. So, where would be the locking code? Is that python or c++? (Hope it's C++...).


We were just thinking about FF missiles. This might benefit VS as well.
Right now FF missiles aren't terribly useful. They do ackquire a new target while in flight, if the first is
destroyed before it gets to it; but that's not a terrible benefit for the loss of damage power.
What idea one of us came up with is to,
a) Make them work like in the original game, where you could fire them while facing away from your target; or even
fire them without a target and let them pick one; and
b) Make them smarter: Have them prioritize targets by current damage points, AND include sub-units in their
priority list, so that if there's a damaged bogey they might pick that one and finish it; and otherwise, if there's only a
capship around, they might target a turret or other sub-system.
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Postby chuck_starchaser » Fri Oct 03, 2008 6:38 pm

Code: Select all
void FF_missile_AI()
{
  static target_t *target = 0;
  while( 1 )
  {
    //if missile doesn't have a target yet; or target was destroyed
    if( target == 0 || target->segfaults() ) //:-)
    {
      //select a new target
      float lowest_hit_points = 77777777.77f;
      for( size_t i = 0; i < 777; ++i )
      {
        target_t *t = pick_any_ship();
        if( t == 0 ) break; //who says there ought to be 777 ships around?
        //if it's an enemy, and is within range given remaining fuel,
        if( faction_relation(t->faction()) < 0.0 && t->range() < current_range(fuel) )
        {
          //if it's the weakest target found yet
          if( t->hit_points_remaining() < lowest_hit_points )
          {
            //tentatively make it the new target and update max wakness
            target = t;
            lowest_hit_points = t->hit_points_remaining();
          }
          //get the target's sub-units too, for good measure:
          target_t *s;
          while( s = t->get_next_subunit() )
          {
            if( s->hit_points_remaining() < lowest_hit_points )
            {
              target = s;
              lowest_hit_points = s->hit_points_remaining();
            }
          }
        }
      }
    }
    //assuming without assuming we have a target now...
    if( target )
    {
      if( target.range() < threshold )
         boom();
      else
        fly_towards( target );
    }
  }
}
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Postby chuck_starchaser » Fri Oct 03, 2008 7:59 pm

Beta 2:

Code: Select all
void FF_missile_AI() //to be called at each physics frame, atom, whatever
{
  static target_t *target;
  //if missile doesn't have a target yet; or target was destroyed
  if( target == 0 || target->segfaults() ) //:-)
  {
    //select a new target
    float lowest_hit_points = 77777777.77f;
    for( size_t i = 0; i < 777; ++i )
    {
      target_t *t = pick_any_ship();
      if( t == 0 ) break; //who says there ought to be 777 ships around?
      //if it's an enemy, and is within range given remaining fuel,
      if( faction_relation(t->faction()) < 0.0 && t->range() < current_range(fuel) )
      {
        //if it's the weakest target found yet
        if( t->hit_points_remaining() < lowest_hit_points )
        {
          //tentatively make it the new target and update max wakness
          target = t;
          lowest_hit_points = t->hit_points_remaining();
        }
        //get the target's sub-units too, for good measure:
        target_t *s;
        while( s = t->get_next_subunit() )
        {
          if( s->hit_points_remaining() < lowest_hit_points )
          {
            target = s;
            lowest_hit_points = s->hit_points_remaining();
          }
        }
      }
    }
  }
  //assuming without assuming we have a target now...
  if( target )
  {
    if( target.range() < threshold )
       boom();
    else
      fly_towards( target );
  }
}
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal



Return to General Modding

Who is online

Users browsing this forum: No registered users and 2 guests

cron