
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ |
Years, ago during the programming of fort/ship return fire an
interesting problem arose. Cascade return fire that basically caused a
collection of forts/ships between an enemy and you to continue firing
until ALL shells were spent or eff. dropped so low that it couldn't
continue.
Because of this the decision was made to allow only SINGLE units and
ships to fire at things BUT return fire could come from multiple
sources AND no return of return fire. (Ludicrous in my mind)
Hence, I can bring a fleet of 15 bb's next to a fort and a single hat.
could decimate them while I search for which sector that hat is in to
nail it. Since when I fire at the fort the fort returns fire AND the
HAT so the bb basically gets ONE shot, I would suspect that at least
7 of the bbs would be non-functional in this scenario but I need to
check this on a blitz that has fort fire....
I mean if 15 bbs fired twice at a fort it should toast. BUT we DON"T
get to do that. AND the hat should get to fire but be WASTED...
So... That if a fleet of battleships fires on a fort AND I mean a
fleet. that if a single hat fires back that the ships should (based on
ability to see the origin of the return fire.) either guess at the
sector and return fire. Each in its turn (or some function of the
number firing and the number returning fire.) BUT that is just what
caused the cascade firing dilemma.
One solution.
The Scenario: Firing is allowed from MULTPLE ships/units/sectors
targeting a single OR multiple targets in sector.
Method. {refer to everything land/sector/ship as a Unit}
Designate firing Units
Initiate Fake firing routine, ie run the present firing procedure
BUT..
use no shells, use no mobility, assess no damages, AND as each unit on
either side fires (in return or not, and in return of return fire.
etc..)
Make a 2 dimensional array of units firing and enter a -1,0,1, or 2
in the array.
if row i col j has a 0 it means unit i AND unit j can't actually fire
at each other.
if row i col j has a -1 it mean that unit j fires at unit i but NOT
vice versa.
if row i col j has a 1 it means unit i fires at unit j but NOT vice
versa.
lastly the 2 means an exchange.
Now as the procedure runs it simulates the firing but doesn't allow
any unit to fire a second time at the same target. This info is
present in the array if ever a non-zero value is present.
The procedure finishes when nothing is left to fire.
You may end up with a table with 10 rows and 5 columns meaning you may
have initated a firing with only ONE hat and ONE fort
(simultaneously), but 8 of your ships and forts returned fire on the
return fire of the enemy.
And the enemy returned fire with 5 forts/ships/units.
NOW run the procedure a SECOND time, this time everything fires at
everything
it can in the table, at the END of that firing all damage and mobility
is assessed. (one could add also the retreat) Example follows.
Bottom most left fort is cordinate 0,0
The top B consist of bb 0 and 1
. . . . . . . ( range 3 and 4 as bb0 is old.)
. . . . . f The low B consist of a single bb 3 (range 4)
f . . . . H The H is a pair of hat's 4/5 (range 3)
h . . . c g l All forts have range 5
l f . . . . % f t Left is Me right is UnMe
. . . B . . .
. . . B . . .
fire s0/s1/s3/(0,0) 12,0 (firing 3 ships and a fort at UnMe's lower
fort)
Pass one.
(7,-3) hat4 hat5 (12,0)
(-2,-2) 0 1 1 0
(0,0) 0 1 1 0
bb 0 -1 2 2 -1
bb 1 2 2 2 2
bb 3 -1 1 1 2
Pass two all the firing happens. and damaged assessed.
One last comment why I like this and also why it is a bit bothersome.
If this is done.
a cascade still happens but is limited.
IF the lower bb3 all alone fires at the lower fort.
then recursively you get
fort returns fire, the better bb1 fires on the fort. (not the bb0
yet.)
the fort returns fire to the bb1 AND the hats return on bb1.
NOW the bb0 can return to the hats as well as all the bbs AND the two
forts
of ME. And lastly the forts of UNME return fire on the bb's
and the SAME table results....
So cascade happens but not infinite.
BUT it would allow multiple firings which I like...
LASTLY if you take the SAME map above and replace the c with fort
one standard strategy becomes DIFFERENT.
. . . . . .
. . . . . f
f . . . . H
h . . . f g l
l f . . . . % f t
. . . B . . .
. . . B . . .
Here ME's 2 forts can take out the westerly UNME fort.
via fire (-2,-2) at (7,-1) until (-2,-2) exhausted.
Now (0,0) finishes off (7,-1).
With the above scenario you would instead get two hits
on the UNME's fort and one hit on the ME forts for each exchange.
AGAIN ME's forts should win out but the effeciency differences would
exist....
So one might add a unit attribute....(never, sometimes, always) return
fire.
BUT mistakes also are somehow lessened.
If UNME mistakenly fires on fort (0,0) pass one establishes that
UNME gets to fire at both forts and ME gets to fires at UNME's fort.
the EXACT firing solution as when ME instigates the firing...
which also seems reasonable to me.
My 22 cents worth.
Timothy
ps, since return fire and return of return fire is recursive it simple
adds
passing the table from call to call, modify a decision to return fire
not just based on range but the table entry. And finally, including a
paramenter to
in the end to call and "assess damages routine".
| <-- __Chronological__ --> | <-- __Thread__ |