Page 1 of 2

Attack AoE v3.1

Posted: 17 Sep 2008, 00:08
by Evil4Zerggin
Ever wish you could see how much scatter your artillery is likely to have?

Ever wanted to see whether you could catch that enemy commander at the edge of their antinuke with splash damage?

Ever wondered just how much splash radius your orbital laser has?

If so, this widget is for you!

Attack AoE

When you are giving an attack command, it draws red circles indicating the area of effect of a weapon. It even shows the edge effectiveness of the weapon through the transparency of the circles.

But wait! That's not all! If the weapon is also inaccurate, it also draws a yellow circle indicating where the weapon is likely to scatter (erring on the side of overestimation).

Plus, get a special bonus when using a ballistic weapon: It draws a line indicating the approximate length of the scatter!

Great for:

Artillery!
Image

Wobble missiles!
Image

Bombers!
Image

Nukes!
Image

Ridiculously large plasma cannons!
Image

Shoopin' da woop!
Image

Download from caspring.org at the bottom of the page here.

Version History

3.1
Better wobble estimation.

3.0
  • Markers are now dynamic with range.
  • Ballistic calculation is much more detailed now. It traces shots to give a fairly accurate prediction of where shots can land, so you can use it to see if shots will scatter over a hill, for example.
  • Bombers now get a marker for each bomb.
  • Added flame and dgun markers.
  • Drawing code changed for hopefully improved performance.
  • Added some precomputation.
  • Now released under the GNU LGPL, version 2.1 or later.
2.6
  • First forum release.
Dev Notes
As with all my widgets, several of the major config variables are at the top.

This is one of my older widgets, and as a result is somewhat clunky; for example it eats quite a bit more time than any of my other widgets. (Ironically it's also my most downloaded widget at time of writing.) I may or may not rewrite it sometime.

Re: Attack AoE

Posted: 17 Sep 2008, 00:30
by REVENGE
IMA FIRIN' MAH LAZOR WITH ACCURACY!

WIN!

Re: Attack AoE

Posted: 17 Sep 2008, 05:30
by Forboding Angel
SOme slick work there. Nice job!

Re: Attack AoE

Posted: 17 Sep 2008, 06:38
by REVENGE
Now you can visualize exactly how useless a Catapult really is! :lol:
j/k

Re: Attack AoE

Posted: 17 Sep 2008, 12:05
by Masure
This is sex

Re: Attack AoE

Posted: 17 Sep 2008, 13:18
by KDR_11k
REVENGE wrote:Now you can visualize exactly how useless a Catapult really is! :lol:
j/k
Hm, does it handle wobble?

Re: Attack AoE

Posted: 17 Sep 2008, 18:02
by manolo_
could it be possible to modify the lua this way that u hold ctrl (or some other button) and the attack-mark didnt snap in?

Re: Attack AoE

Posted: 17 Sep 2008, 19:49
by Evil4Zerggin
KDR_11k wrote:
REVENGE wrote:Now you can visualize exactly how useless a Catapult really is! :lol:
j/k
Hm, does it handle wobble?

Code: Select all

currScatter = (weaponDef.wobble - weaponDef.turnRate) * weaponDef.maxVelocity * 10 * (weaponDef.range / weaponDef.maxVelocity + 1)
Unfortunately I don't know a great deal about random walks and the like so this is probably way off the mark. I'll see if I can think up a better estimation.
manolo_ wrote:could it be possible to modify the lua this way that u hold ctrl (or some other button) and the attack-mark didnt snap in?
I'm pretty sure the attack command itself snaps onto targets, so you're just seeing what you're getting? Or do you mean hiding the marker completely?

Re: Attack AoE

Posted: 17 Sep 2008, 20:13
by Forboding Angel
Evil4Zerggin wrote: Unfortunately I don't know a great deal about random walks and the like so this is probably way off the mark. I'll see if I can think up a better estimation.
It's reeeaaallly reaaaallly close. Basically the outside line is where some of the shots will hit. I did some fairly extensive testing with this last night and have declared it, unmitigated win.

Re: Attack AoE

Posted: 18 Sep 2008, 06:10
by Warlord Zsinj
Pretty cool. How flexible are the visual features? Would it be easy to change them to suit say, the IW GUI style?

(Also, out of curiosity, how have you licensed this?)

Re: Attack AoE

Posted: 18 Sep 2008, 08:06
by Evil4Zerggin
Well, it says "GNU GPL, v2 or later" on the tin. I don't have any strong allegiance to that particular license, though, so if that's a problem I'm open to suggestions.

The visual features are basically about the simplest GL I could concoct for the purpose. I've actually not tried IW yet, so I'm not sure how difficult it would be to change them to match that style.

Re: Attack AoE

Posted: 18 Sep 2008, 17:19
by Licho
Its great.. i just dont get the scatter indicator.. is it at what distance? Or is the scattering constant no matter what distance you aim at?

Re: Attack AoE

Posted: 18 Sep 2008, 19:51
by Evil4Zerggin
The circle indicates the side-to-side spread, and the line indicates the range spread.

Currently the scatter indicator is more or less constant (it's calculated at maximum range), which isn't a very accurate estimation--for example, a ballistic weapon spreads more in range when shooting at a close target and more side-to-side when shooting at a distant target. I'm working on a more accurate ballistic marker. Maybe also more different markers for different types of weapons (flame, bombs, etc.).

Re: Attack AoE

Posted: 19 Sep 2008, 09:06
by Forboding Angel
CC:SA would be a much better license. GPL is poison in a project like spring.

Re: Attack AoE

Posted: 20 Sep 2008, 02:31
by REVENGE
I could see this being most useful for setting up efficient line bombings. 8)

Re: Attack AoE

Posted: 20 Sep 2008, 12:57
by Licho
Line bombings no longer exist in CA and it cannot predict the new turn + toss - that would be too hard to calculate, too many factors..

Re: Attack AoE

Posted: 20 Sep 2008, 13:01
by imbaczek
monte carlo method could be good, but not sure it's worth the effort.

Re: Attack AoE

Posted: 20 Sep 2008, 19:37
by Evil4Zerggin
I don't think I can simulate flight behavior in Lua, even probabilistically.

Re: Attack AoE

Posted: 21 Sep 2008, 08:42
by Evil4Zerggin
Major new version. A lot of things have changed, but the most dramatic one is the ballistic marker. I could get into the gritty details, but I think I'll let this image of aiming a Buzzsaw speak for itself.

ImageImage

The marker isn't a perfect predictor (for one thing I can't get exact muzzle positions), but it's quite close.

Re: Attack AoE

Posted: 21 Sep 2008, 13:15
by Licho
Wow, the widget is pretty amazing :)