Author Topic: Prerelease 1.005E now available.  (Read 5948 times)

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Prerelease 1.005E now available.
« on: June 06, 2009, 04:35:35 PM »
Here's the latest prerelease:  http://www.arcengames.com/share/AIWar1005E.zip

That version is an upgrade from version 1.004, so you have to already have 1.004 installed. Just unzip it into your game folder (usually C:\Program Files\Arcen Games\AI War\ unless you specified something else). Please make sure that your unzip process keeps the folder structure from the zip file, rather than just unpacking all of the files into the base target directory.

What's new since 1.005D:

-------------------

-Ships now take into consideration the shots that are incoming against a target when they fire at it, so that they stop firing at a target that is already on its way to death (this prevents the issue of overkill that could previously occur, especially with cruisers.

-AI ships at guard posts will now retreat when they have been drawn out, but can't find a target.

-Cruisers now have a 50% penalty against themselves, which means that cruisers quickly killing off all the opposing cruisers in a battle will be less of a common occurrence.

-In recent releases, neither vampires nor cutlasses have been dealing any damage to enemies, making them utterly worthless.  This was a bug introduced late in beta, apparently, and it wasn't caught until a player noticed it this week.  Fixed.

-The dark gray is no longer a default color for AI players, since it is harder to see.

-A time-left-to-build count is now shown on the current item being built in every queue, in addition to the little progress bar.  This is particularly useful with Starship Constructors and Missile Silos.

-When the energy balance for the local player was low or negative, the message was overlapping the knowelege income rate text. Fixed.

-Attack ranges are now drawn as un-filled circles unless your mouse cursor is over the ship.  This makes it much easier to see the ranges in effect when there are large numbers of selected ships.

-Holding Z+X now shows all the enemy ranges in addition to the local player's ranges.

-Sniper ranges are never shown any more since they cause slowdown on older graphics cards and they always just hit everything, anyway.

-Metal and Crystal overflows now automatically go to the other players on a team, rather than just having them be wasted.

-There is now an option in the game settings that allows the music to keep playing while the game is paused.

-Flares now have a border on the minimap, and so are much easier to see when in the middle of a bunch of other like-colored minimap blips.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #1 on: June 06, 2009, 04:38:58 PM »
*bump*
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Janster

  • Newbie
  • *
  • Posts: 8
Re: Prerelease 1.005E now available.
« Reply #2 on: June 06, 2009, 04:57:45 PM »
Sweet, thanks for the input, hopefully its compatible with my current save, and I will see immediately what changes has happened ;)
No time tonight tho, I'm beat, but tomrorow there will be galactic bloodshed.

Btw, I did see the AI withdraw his units from time to time, but it was not consistent.  Also now i have to make new strategies again hehe.

I saw the EMP thing, however, 30 seconds will only be enough if the wormhole is close to the shield, in most cases , it will take me a lot longer than 30 secs to get closee, however I think the 'build your own shield' thing, may work for me :)

I had about 300 cruisers chewing down the shields, and it still took 20 mins in some cases, for mark II  or mark III shield.

Regards
Janster

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: Prerelease 1.005E now available.
« Reply #3 on: June 06, 2009, 06:14:44 PM »
Wow, now that's service ;)

Just gave it a shot to test some things...

-Ships now take into consideration the shots that are incoming against a target when they fire at it, so that they stop firing at a target that is already on its way to death (this prevents the issue of overkill that could previously occur, especially with cruisers.
It does seem to be doing differently though my 100 cruisers tend to still spread out their shots versus a small cluster of cruisers when I think they could probably have taken at least one down each salvo by focus firing.  Of course, the real solution was for me to send in my 80 fighters and they shredded the cruisers without a second thought (let alone salvo).

Quote
-A time-left-to-build count is now shown on the current item being built in every queue, in addition to the little progress bar.  This is particularly useful with Starship Constructors and Missile Silos.
Yep, this works well, thanks ;)

Quote
-Attack ranges are now drawn as un-filled circles unless your mouse cursor is over the ship.  This makes it much easier to see the ranges in effect when there are large numbers of selected ships.
I hadn't thought of that solution, but I had noticed the problem, works very nicely :)

Quote
-Holding Z+X now shows all the enemy ranges in addition to the local player's ranges.
Hadn't thought of that, but it's very helpful.

Quote
-Sniper ranges are never shown any more since they cause slowdown on older graphics cards and they always just hit everything, anyway.
Good idea.

Quote
-There is now an option in the game settings that allows the music to keep playing while the game is paused.
Works like a charm, thanks.

Quote
-Flares now have a border on the minimap, and so are much easier to see when in the middle of a bunch of other like-colored minimap blips.
Yep, works.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #4 on: June 06, 2009, 06:18:17 PM »
Sweet, thanks for the input, hopefully its compatible with my current save, and I will see immediately what changes has happened ;)
No time tonight tho, I'm beat, but tomrorow there will be galactic bloodshed.

Yep, updates always work with prior savegames. :)

I saw the EMP thing, however, 30 seconds will only be enough if the wormhole is close to the shield, in most cases , it will take me a lot longer than 30 secs to get closee, however I think the 'build your own shield' thing, may work for me :)

If you bring starships, they aren't affected by the EMP, so that can make it work for you.

I had about 300 cruisers chewing down the shields, and it still took 20 mins in some cases, for mark II  or mark III shield.

Yep, it takes forever if you are playing with Normal combat style instead of Fast & Dangerous.  Using one of the alternate routes is definitely the way to go -- or you can just ignore the Force Field and come back to it later, when you have Mark II bombers.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #5 on: June 06, 2009, 06:20:00 PM »
Wow, now that's service ;)

Haha, glad to be of service. :)

-Ships now take into consideration the shots that are incoming against a target when they fire at it, so that they stop firing at a target that is already on its way to death (this prevents the issue of overkill that could previously occur, especially with cruisers.
It does seem to be doing differently though my 100 cruisers tend to still spread out their shots versus a small cluster of cruisers when I think they could probably have taken at least one down each salvo by focus firing.  Of course, the real solution was for me to send in my 80 fighters and they shredded the cruisers without a second thought (let alone salvo).

Given the reload speed of cruisers, I don't think that spreading out the fire would have any detrimental effect, and with the smaller ships (laser gatlings, etc), I think it's beneficial.

Glad everything else is looking good to you!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: Prerelease 1.005E now available.
« Reply #6 on: June 06, 2009, 06:25:50 PM »
Yea, I think the autotargetting is working well on average.

What do you think of having some way curious folks like me could see a debug dump of targetting decisions?  I don't mind it being really slow and generating some awfully huge txt file.  Basically if you think it'd be helpful to get more specific feedback on what targetting decisions I'm puzzled by, it could help.

Thanks,
Keith
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Quitch

  • Full Member Mark II
  • ***
  • Posts: 154
Re: Prerelease 1.005E now available.
« Reply #7 on: June 06, 2009, 06:37:49 PM »
Issues noticed/suggestions to build upon this:

1. Using shortcut keys on galaxy map doesn't change the "Current mode" tooltip, it still displays whichever mode you last clicked, even though the mode switch worked.

2. Last Scouted mode doesn't seem to work.

3. Why do I only see a used resource count for my planets? As I can already see ownership why not show me a count based on last scouted for every territory?

4. I don't understand attack move, ships often move straight past the enemy in this mode only stopping once they get shot. If I reissue an attack move they go from stopping and fighting to moving again, yet surely they should remain where they are if already fighting?

5. I have a widescreen and I'd like the score screen to use it.

6. Option to show the Selected Units tooltip permanently.

7. The % and x numbers don't fit well into the Select Units button, there needs to be a tidier way.

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #8 on: June 06, 2009, 06:43:18 PM »
Yea, I think the autotargetting is working well on average.

What do you think of having some way curious folks like me could see a debug dump of targetting decisions?  I don't mind it being really slow and generating some awfully huge txt file.  Basically if you think it'd be helpful to get more specific feedback on what targetting decisions I'm puzzled by, it could help.

Thanks,
Keith

Hmm, that's an interesting idea, but it would be really hard to do.  Since I'm using basically a sort algorithm here, an individual ship's debug info for one cycle would be around 50 lines of output x the number of enemy ships in the system.  So in one second, you could generate a file that is 10MB or more, and basically impossible to parse.  Aside from the overkilling issue, we had beat the heck out of this in beta (the overkill came later -- it's a long story).  So the targeting does not register as a really high issue to me at the moment, unless there's something else that is concerning you.

There is more complex logic that could be added to the autotargeting that your ships do, such as how much damage your ships do, etc, but I'd be wary of making things too complex.  If you want to take a peek at the algorithm your ships use, to see what you think, here's the main part of the sort that you would probably be interested in.


                        int myRange = this.UnitData.AttackRange;
                        int myCenterX = this.LocationCenter.X;
                        int myCenterY = this.LocationCenter.Y;

                        //precision targeting when there aren't too many enemy units
                        bool areWeAIPlayer = this.Player.Type == PlayerType.AI;
                        this.SetObjectToKill( null, false, false, true );
                        thereAreSomeViableTargets = false;
                        foreach ( ForegroundObject enemyUnit in enemyUnits )
                        {
                            //enemyUnit.IsViableTarget = false;
                            if ( enemyUnit.Health <= 0 || enemyUnit.ToBeRemoved ||
                                enemyUnit.HealthAfterShots <= 0 ||
                                enemyUnit.UnitData.IsInvincible ||
                                ( enemyUnit.CloakingLevel == CloakingLevel.Full &&
                                !this.UnitData.InstaKillsCloakedShips ) )
                                continue; //skip targets that are already dead or cloaked
                            if ( enemyUnit.UnitData.AbsorbsLazers && this.UnitData.ShotIsLazer )
                                continue; //don't fire lazers at enemies that absorb it
                            if ( enemyUnit.UnitData.Bulletproof && this.UnitData.ShotIsShell )
                                continue; //don't fire shells at enemies that repel it
                            if ( enemyUnit.UnitData.AbsorbsNegativeEnergy && this.UnitData.ShotIsNegativeEnergy )
                                continue; //don't fire negative energy at enemies that absorb it
                            if ( enemyUnit.UnitData.IsImmuneToMissiles && this.UnitData.ShotIsMissile )
                                continue; //don't fire missiles at enemies that are missile-proof
                            if ( enemyUnit.UnitData.IsImmuneToSnipers && this.UnitData.ShotIsSniper )
                                continue; //don't fire sniper shots at enemies that are sniper-proof
                            if ( this.UnitData.InstaKillsLowerShips )
                            {
                                if ( enemyUnit.UnitData.ShipLevel >= this.UnitData.ShipLevel ||
                                    enemyUnit.UnitData.ImmuneToBeingInstaKilled ||
                                    enemyUnit.IsInstaKillComing )
                                    continue;
                            }
                            if ( this.UnitData.InstaKillsCloakedShips )
                            {
                                if ( !enemyUnit.UnitData.HasCloaking ||
                                    enemyUnit.UnitData.ImmuneToBeingInstaKilled ||
                                    enemyUnit.IsInstaKillComing )
                                    continue;
                            }

                            enemyUnit.WorkingRange = Mat.ApproxDistanceBetweenPoints(
                                enemyUnit.LocationCenter, this.LocationCenter );
                            if ( enemyUnit.WorkingRange > this.UnitData.AttackRangeOuter &&
                                !this.IsFreeRoaming )
                                continue;

                            //enemyUnit.IsViableTarget = true;
                            thereAreSomeViableTargets = true;
                            if ( !isExportingRelative )
                            {
                                if ( !this.UnitData.AutoTargetsClosest && !this.IsFreeRoaming )
                                {
                                    if ( Math.Abs( enemyUnit.LocationCenter.X - myCenterX ) > myRange )
                                        continue;
                                    if ( Math.Abs( enemyUnit.LocationCenter.Y - myCenterY ) > myRange )
                                        continue;
                                }

                                if ( !areWeAIPlayer && enemyUnit.UnitData.PlayerAutoTargetLevel != PlayerAutoTargetLevel.Normal )
                                    continue;
                                if ( enemyUnit.UnitData.VeryLowPriorityTarget ) //no one auto-targets these
                                    continue;
                            }
                            else
                            {
                                if ( this.ObjectToKill == null )
                                    this.SetObjectToKill( enemyUnit, false, false, true );
                            }

                            if ( this.UnitData.AutoTargetsClosest )
                            {
                                enemyUnit.WorkingHitPercent = -enemyUnit.WorkingRange;
                                if ( !isExportingRelative )
                                {
                                    //if out of target seek range, and not an AI player
                                    if ( !areWeAIPlayer && !this.IsFreeRoaming &&
                                        this.UnitData.TargetSeekRange > 0 && this.UnitData.TargetSeekRange <
                                        -enemyUnit.WorkingHitPercent )
                                        continue;
                                }
                            }
                            else
                            {
                                if ( this.IsAttackMoving || this.IsFreeRoaming )
                                    enemyUnit.WorkingHitPercent = 100;
                                else
                                {
                                    enemyUnit.WorkingHitPercent = enemyUnit.GetHitPercent( this );
                                    if ( enemyUnit.WorkingHitPercent == 0 )
                                        continue;
                                }
                            }

                            enemyUnit.WorkingDamage = enemyUnit.UnitData.GetAttackPowerAgainstThis( this.UnitData );

                            //skip shooting at ships that we can't hurt
                            if ( enemyUnit.WorkingDamage == 0 )
                                continue;

                            if ( this.ObjectToKill == null )
                                this.SetObjectToKill( enemyUnit, false, false, true );
                            else
                            {
                                if ( enemyUnit.WorkingDamage > this.ObjectToKill.WorkingDamage &&
                                    ( enemyUnit.WorkingHitPercent >= this.ObjectToKill.WorkingHitPercent - 10 ||
                                    enemyUnit.WorkingDamage > this.ObjectToKill.WorkingDamage * 2 ) )
                                    this.SetObjectToKill( enemyUnit, false, false, true );
                                else if ( enemyUnit.WorkingHitPercent > this.ObjectToKill.WorkingHitPercent )
                                    this.SetObjectToKill( enemyUnit, false, false, true );
                                else if ( enemyUnit.WorkingHitPercent == this.ObjectToKill.WorkingHitPercent &&
                                   enemyUnit.TargetedBy < this.ObjectToKill.TargetedBy )
                                    this.SetObjectToKill( enemyUnit, false, false, true );
                            }
                        }

                        if ( isExportingRelative )
                            this.ObjectToKillSetByPlayer = true;
                    }


There's also a lot of other logic for multi-targeting, choosing when to switch from the current target to a new one, choosing a target to shoot at while on the way to the current player/AI-chosen target, etc, etc, etc, but this is the meat of the vanilla targeting, with most of the sort logic in there.  I think this is going to be more helpful to you thinking about what's going on than a debug dump would be (but I bet you didn't expect me to post code).  Anyway, let me know if you have any questions about it.  I'm in and out this evening, and I've got a session with my alpha testers scheduled for later, so I may be slow posting back to you.  Have at it! :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Quitch

  • Full Member Mark II
  • ***
  • Posts: 154
Re: Prerelease 1.005E now available.
« Reply #9 on: June 06, 2009, 06:47:27 PM »
Two more.

1. Consider allowing free-roaming to target mine remains once all other targets destroyed.

2. Same for attack move.

3. If a unit is heading for a free-roaming rally point and an enemy enters and is destroyed the unit stops moving. This can leave them stuck a mile away by the factory.

4. Key to "build this unit immediately" as a means to put something at the start of a build queue and to exclude it from any existing loop. This is to save the need to trash and rebuild your queue if you suddenly have a need for scouts or something.
« Last Edit: June 06, 2009, 06:52:05 PM by Quitch »

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #10 on: June 06, 2009, 06:51:49 PM »
1. Using shortcut keys on galaxy map doesn't change the "Current mode" tooltip, it still displays whichever mode you last clicked, even though the mode switch worked.

Oh, great find -- added to my list, thanks.

2. Last Scouted mode doesn't seem to work.

Really?  Can you be more specific, it's working fine for me...

3. Why do I only see a used resource count for my planets? As I can already see ownership why not show me a count based on last scouted for every territory?

Well, the primary purpose of that count is to help you quickly find resources that belong to your team, but which are unused.  So showing extraneous counts would damper that visibility.  BUT, I see your point, so here's what I'm thinking:  I'll add it so that for enemy/unclaimed planets that you have scouted, it will show a single count (since you can't possibly have claimed them) in a reddish color instead of red.  Best of both worlds, hopefully.

4. I don't understand attack move, ships often move straight past the enemy in this mode only stopping once they get shot. If I reissue an attack move they go from stopping and fighting to moving again, yet surely they should remain where they are if already fighting?

It depends on the range of your ships.  If your ships have very low range, they may not be killing the enemies because they never came close enough.  That's usually the cause of stuff like that, but let me know if that doesn't seem to be the issue.

5. I have a widescreen and I'd like the score screen to use it.

Oh, another great idea -- I've added that to my list.

6. Option to show the Selected Units tooltip permanently.

Well, I can make it so that it shows up whenever no other tooltip is shown, but when you are hovering over something else the overlap would get ugly.  I'm thinking of making this an option that you would enable in settings, not something to quick toggle.  Sound good, or need a quick toggle (as you can do for the score)?

7. The % and x numbers don't fit well into the Select Units button, there needs to be a tidier way.

For the x number, it's meant to be a little thing up in the upper left of the button.  For the %, I'm curious as to what you mean, it seems to be fine for me.  Maybe an artifact of your resolution or something, or maybe just something I have not noticed.  I'll look at it, but if you have a screenshot or something of what you are seeing that looks off, that would be awesome.

Thanks for another great batch! :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #11 on: June 06, 2009, 06:55:31 PM »
1. Consider allowing free-roaming to target mine remains once all other targets destroyed.

2. Same for attack move.

This is currently a job for your engineers.  Put them into attack-move mode and they'll clean them up.  I figured the military units would be best for standing guard, etc.  But let me know what you think.

3. If a unit is heading for a free-roaming rally point and an enemy enters and is destroyed the unit stops moving. This can leave them stuck a mile away by the factory.

Yeah, that's a good point.  I'll make their rally points work like they do in attack-move mode (they go to that point if there's no target).

4. Key to "build this unit immediately" as a means to put something at the start of a build queue and to exclude it from any existing loop. This is to save the need to trash and rebuild your queue if you suddenly have a need for scouts or something.

How about if I make it so that by Alt-clicking queue items, it sends whatever you click to the front of the line?  Would make it nice and flexible, I imagine.

Yet another great batch, you guys know how to keep me busy. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Quitch

  • Full Member Mark II
  • ***
  • Posts: 154
Re: Prerelease 1.005E now available.
« Reply #12 on: June 06, 2009, 07:09:15 PM »
Last Scouted:

Tutorial campaign, I choose Last Scouted mode and nothing happens.


Currently Selected Tooltip:

Setting in options is good.


Currently Selected Cramped:

x# doesn't fit inside the hex, this was all.


Possible bug:

Shift adds a location to waypoints, but (and this may be intentional) enemy ships are treated as waypoints not targets, so you cannot queue attacks and movement this way as your ships move to the target and then continue on to the next point even if the target is still alive.


Feature suggestion:

Ability to queue orders for units under construction e.g. Build an engineer and tell it to assist factory X upon completion.
« Last Edit: June 06, 2009, 07:13:42 PM by Quitch »

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,162
Re: Prerelease 1.005E now available.
« Reply #13 on: June 06, 2009, 07:15:44 PM »
Last Scouted:

Tutorial campaign, I choose Last Scouted mode and nothing happens.

It only shows something for planets that you have actually scouted, to save on clutter.  However, I just tested it out in the tutorial and you are right, that doesn't seem to work there at all. It works in the real campaigns.  Thanks for letting me know, I'll have that fixed for the next prerelease.


Currently Selected Tooltip:

Setting in options is good.

Awesome.

Currently Selected Cramped:

x# doesn't fit inside the hex, this was all.

Oh -- it's meant to show at the corner there, there are a lot of buttons (most of the ones at the bottom of the screen) that show them at the corner.  That way when you have four digits selected it all fits, plus just showing it in the corner like that just pleases the graphic designer in me.  If it bugs a lot of people I'll change it, though.

Possible bug:

Shift adds a location to waypoints, but (and this may be intentional) enemy ships are treated as waypoints not targets, so you cannot queue attacks and movement this way as your ships move to the target and then continue on to the next point even if the target is still alive.

This is by design.  You can queue movement on a planet, attack targets on a planet, or movement between planets, but you can't mix any of the three.  Mainly it is technical reasons for this, I'd have to rewrite a lot of stuff to change that, but also it was originally viewed as just three different activities.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: Prerelease 1.005E now available.
« Reply #14 on: June 06, 2009, 07:45:02 PM »
Thanks for posting part of the code, that is actually much more helpful than debug output (generally only needing debug output when behavior doesn't seem to match the code, after all).  I don't see this as a terribly pressing issue, but I am curious about one thing:

Quote
if ( enemyUnit.Health <= 0 || enemyUnit.ToBeRemoved ||
    enemyUnit.HealthAfterShots <= 0
||
    enemyUnit.UnitData.IsInvincible ||
    ( enemyUnit.CloakingLevel == CloakingLevel.Full &&
    !this.UnitData.InstaKillsCloakedShips ) )
    continue; //skip targets that are already dead or cloaked
Prevents overkill

And

Quote
   if ( enemyUnit.WorkingDamage > this.ObjectToKill.WorkingDamage &&
   ( enemyUnit.WorkingHitPercent >= this.ObjectToKill.WorkingHitPercent - 10 ||
   enemyUnit.WorkingDamage > this.ObjectToKill.WorkingDamage * 2 ) )
   this.SetObjectToKill( enemyUnit, false, false, true );
    else if ( enemyUnit.WorkingHitPercent > this.ObjectToKill.WorkingHitPercent )
   this.SetObjectToKill( enemyUnit, false, false, true );
    else if ( enemyUnit.WorkingHitPercent == this.ObjectToKill.WorkingHitPercent &&
       enemyUnit.TargetedBy < this.ObjectToKill.TargetedBy )
   this.SetObjectToKill( enemyUnit, false, false, true );
Picks one from the group of viable targets where this ship will do the most damage (not necessarily max damage, but pretty good) and spreads the shots out among that group.

Let me ask you this: what happens if you comment out the last else-if branch in that last bit there?  Overkill should already be stopped by the first bit, and it would focus fire on the first viable-and-reasonable-damage ship in the enemyUnits list until that ship's HealthAfterShots drops to 0 or less, then focus fire on the second such ship, etc... it's a more complicated when all ships in that "damage tier" are marked for death and it jumps down to the next tier, but I don't think it would cause problems.

After you remove your palm from hitting your face at my ignorance, please enlighten me ;)

Thanks,
Keith
« Last Edit: June 06, 2009, 07:47:13 PM by keith.lamothe »
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!