Re: lots o stuff

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ok, here's what I have:

square, tile-based system, with an "army" at location (x,y).  the army
has a "range" of r.  each tile has a "land type" which has a "resistance
value" which is v.  armies may move to adjacent and diagonal tiles
(lands, with variable land types).  in order to move to the next tile,
the army must "pay" an amount from its' range (r), equal to the
resistance value of the land (v), such that (r - v >= 0).  most of the
lands have a resistance value of 1, and others have values of 2 or 3.
resistance values may be fractions (.5, or 2.5 v).  most armies have a
range of 6.  i am trying to write an optimized algorithm which
determines all the tiles (based on range and resistance values of the
land type) which determines all legal movement for an army in one turn
(that is: given full range and current location, where can the army
move).  I currently have one that does this, but it is sloooooooooow.
(several seconds at range = 6)

i hopes thats clear.

thx,

snortboy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu