Re: Re: A85: LaserSquad-Z
[Prev][Next][Index][Thread]
Re: Re: A85: LaserSquad-Z
Hello...
--- John Hortenstine <jmh@zdnetmail.com> wrote:
>
> How were you going to use the three bits in more
> detail? Then maybe I can think about answering your
> question.
Well here's a sample map:
.............
........T....
...xxx.......
.....x.......
.....xxxxxx..
.S...........
.............
S-start
T-target
x-any NOT walkable tile
well, first I scan through the first 8 tiles
surrounding 'S'. If all of their tile#number is <
10(or something) the I put first of those 3 bits on...
So, When I'm checking those three bits I probably mask
the rest away and rotate so that I'll get numbers from
0-7.
.............
........T....
...xxx.......
.....x.......
111..xxxxxx..
1S1..........
111..........
#numbers are the three bits...
and then I just continue checking each tile(on the
route) and give them values from 0-7. Where 0 means
it's not walkable(or it's not checked yet).So a longer
path would look something like this
.....666712345671.....
....5556712345671T....
..444456712300071.....
.33334567123..x.......
22223456712...xxxxxx..
11123456712...........
1S12345671............
actually every '.' and 'x'-tile would have the "3-bit"
value of 0.
Hmm, did that make any sense?
/Johannes
--
e-Mail:
carrot@sgic.fi
Personal WWW: (not related to calcs... too much)
http://carrot.findhere.com/
IP homepage:
http://icarus.ticalc.org/
--
_____________________________________________________________
Do You Yahoo!?
Free instant messaging and more at http://messenger.yahoo.com