Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] (PR#2053) Cient can see all units in a stack
Home

[Freeciv-Dev] (PR#2053) Cient can see all units in a stack

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2053) Cient can see all units in a stack
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 28 Apr 2003 05:09:35 -0700
Reply-to: rt@xxxxxxxxxxxxxx


On Fri, 25 Apr 2003, Per I. Mathisen wrote:

> On Fri, 25 Apr 2003, Rafal Bursig wrote:
> > about cheating... client has access to tile units stack.
> > I don't know if this is correct functionality (IMHO not) but you can
> > see all enemy units in this tile (client block this info).
> > Server should check if units in tile belong to player or allied player
> > and if true then send all "stack" info but if not then send only first
> > units info.
> 
> Yes, this should be fixed, but the problem is, we don't have a rule about
> what is the "first" unit in a stack. The server just sends the whole
> stack, and then the client decides how to show it.
> 
> There are two ways to solve this: Either to give all clients the ability
> to see what is in a stack, or to define rules for what is a "top unit" of
> a stack, and only send that. Either way is a challenge.

Sending only "top" leads to all sorts of problems.  The root of all evil 
is that the units move into a tile (to form a stack) one by one and each 
of these movements is sent to the client.  So an intelligent client will 
just keep an account of what moved in and what moved out and ignore the 
"top unit" info.  The only case when this wouldn't work is when your unit 
uncovers a tile which _already_ contains a stack.  This special casing 
will make situation very difficult and lead to many bugs (when we dealt 
with enemy cities we created about 3 other bugs and stacks is more 
complicated).

Thus Thomas' proposal is the best:

On Fri, 25 Apr 2003, Thomas Strub wrote:
> 
> I think a player should see all selfmovingunits in a stack. For
> Transports only that they are full or not. But think its clear that you
> see the musketeers + the artillery and not only a part of the army which
> is at that spot.

I also think that transported units should _not_ be shown.  You cannot see 
what's inside a transporter or a B-52 or a wooden horse.  But you can 
see/feel it's loaded, so a "loaded" field should be sent with a unit info.

Note that this can be overcome by a cheating client too: if a client sees 
units being loaded onto a transport (1), it can "remember" such info (2).  
But (1) is highly unlikely and (2) is very hard to code.

On Fri, 25 Apr 2003, Christian Knoke wrote:
>
> - server sends all units in stack (no option)
> 
> - client lists all units in the unit popup
> 
> - client shows best attacking unit and a "+" sign. That's because you see at
>   once how dangerous it is. [1] If you want to attack, you can take the time 
> to
>   look at the popup.
> 
> Fini.
> 
> Christian
> 
> [1] This probably means that Marines are shown on a transport at the coast ...

I disagree with [1].

G.




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#2053) Cient can see all units in a stack, Gregory Berkolaiko <=