[Freeciv-Dev] Re: directional system: more magic code cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I think Freciv uses this system for its general drunkard's walk :-)
But this routine is to compute the "straightest direction" which may
be useful for things other than explorer movement.
Cheers,
RossW
At 06:39 AM 01/09/26 -0400, Greg Wooledge wrote:
>Raimar Falke (hawk@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
>> On Wed, Sep 26, 2001 at 12:36:19AM -0400, Ross W. Wetmore wrote:
>
>> > 0 1 . . . . . .
>> > . . 2 3 . . . .
>> > . . . . 4 5 . .
>> > . . . . . . 6 7
>
>Consider fog of war.
>
>0 1 x x x . . .
>x x 2 3 x x x .
>. x x x 4 5 x x
>. . . x x x 6 7
>
>A unit (vision radius 1) moving along the numbers leaves 8 tiles unseen
>(of course, there are presumably more tiles outside this grid, but I'll
>just use these 32 tiles for convenience).
>
>0 x x x x . . .
>x 1 2 3 x x x .
>x x x x 4 5 x x
>. . . x x x 6 7
>
>This one leaves 7 tiles unseen. And in fact, if 5-6 is east and 6-7 is
>southeast, then you could leave just 6 tiles unseen.
>
>Now consider this one:
>
>0 x x . x x x .
>x 1 x x x 5 x x
>x x 2 x 4 x 6 x
>. x x 3 x x x 7
>
>I submit that as the "best" solution for moving units in Freeciv with
>fog of war turned on.
>
>:-)
>
>(More importantly, if you're moving multiple units from A to B, then
>each one should follow a different path! But the key is to always move
>diagonally whenever possible. Roguelike players also know this.)
>
>--
>Greg Wooledge | "Truth belongs to everybody."
>greg@xxxxxxxxxxxx | - The Red Hot Chili Peppers
>http://wooledge.org/~greg/ |
>
>Attachment Converted: "c:\program files\eudora\attach\[Freeciv-Dev] Re
directional s"
>
- [Freeciv-Dev] Re: directional system: more magic code cleanups, (continued)
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Gregory Berkolaiko, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Greg Wooledge, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Tony Stuckey, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups,
Ross W. Wetmore <=
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Trigonometry of Freeciv, Gregory Berkolaiko, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raahul Kumar, 2001/09/29
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/27
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/28
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/29
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/30
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/30
|
|