[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Aug 26, 2001 at 01:02:05AM +0200, Bert Buchholz wrote:
> On Sat, Aug 25, 2001 at 05:59:53PM +0200, Raimar Falke wrote:
> > On Sat, Aug 25, 2001 at 04:26:11PM +0200, Bert Buchholz wrote:
> > > IMPORTANT: Currently, if there are units with visionrange > 2, their
> > > visionrange is reduced. This is not logical, so maybe the visionrange
> > > shouldn't be set to 2 but enhanced by 1 (vision_range+1), but this would
> > > mean that spies inside a fortress would get a visionrange of 3, which
> > > seems to be very much. In fact, every visionrange > 2 seems to be too
> > > much, but maybe you think diffrently. Also, the value 2 is hardcoded,
> > > maybe that is not desired, even though I don't see too many reasons to
> > > play around with this one, but you never know :-)
> > For maximum flexibility it may be nice to have two variables:
> > watchtower_vision and watchtower_extra_vision. Your current code
> > implements watchtower_vision=2. Could you replace the hardcoded 2 with
> > a call to get_watchtower_vision() which is something like:
> >
> > {
> > int base_vision=get_unit_type(punit->type)->vision_range;
> >
> > return max(base_vision,
> > max(watchtower_vision, base_vision+watchtower_extra_vision));
> > }
>
> Hmm, of course, this function wouldn't be a problem, I'm just not sure
> if I understand the need of watchtower_extra_vision. When a unit's
> visionrange is smaller than watchtower_vision, it gets this new value
> and if it's the same or larger, it keeps it's own visionrange. I suppose
> I'm overlooking something here, otherwise, my way would be simpler.
IMHO there should be two ways to increase the vision through a
watchtower: to an absolute value like you have implemented and an
increase of the current vision of the unit.
> > Could you also make these two variables changeable by server command
> > or ruleset?
>
> Well, personally, I find it nicer to put this into a ruleset, but this
> is open to discussion. Assuming, it is put into a ruleset, I'm not sure
> where to put it. I think, the game.ruleset would be most fitting, what
> do the others think?
I have no opinion on this.
> > Another issue to have a more fine grained control over vision
> > range. The vision range is currently a square with the dimensions
> > (vision*2+1)X(vision*2+1). Maybe this could be changed to somelike
> > like:
> >
> > vision=1:
> >
> > x
> > xux
> > x
> >
> > vision=2:
> >
> > xxx
> > xux
> > xxx
> >
> > vision=3:
> > x
> > xxx
> > xxuxx
> > xxx
> > x
> > vision=4:
> > xxx
> > xxxxx
> > xxuxx
> > xxxxx
> > xxx
> > and so on.
>
> Yes, I see, this could possibly be used for other stuff as well, but is
> this implemented in some way already or would this have to be done
> completely new? Probably I could do this, but for that I'd have to take
> a closer look at the tile-coordinates-handling...
I looks like only some square_iterate have to be replaced in some
server/maphand:*fog* methods. IMHO you have to write such a
circle_iterate however by ourselve.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"USENET is *not* the non-clickable part of WWW!"
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Ross W. Wetmore, 2001/08/25
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Gregory Berkolaiko, 2001/08/26
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Jason Dorje Short, 2001/08/26
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Paul Zastoupil, 2001/08/26
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Mike Kaufman, 2001/08/26
|
|