[Freeciv-Dev] Re: (PR#7408) Client knows about hidden units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#7408) Client knows about hidden units |
From: |
"mateusz stefek" <matusik_s@xxxxx> |
Date: |
Tue, 9 Mar 2004 01:09:44 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7408 >
Dnia 2004.02.24 08:49, Jason Short napisał(a):
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7408 >
[cut]
> We're back to the original two solutions for this one. Either we track
> whether the player "knows" about the unit, and send a delete when this
> changes, or we introduce a check every time a condition for the
> knowledge changes.
>
> The latter would be done like this: when alliance is removed, iterate
> over all units on all tiles occupied by the player. For each unit, if
> the other player *could* see the unit before but *can't* now, it goes
> out of sight. This is very ugly! can_player_see_unit has a lot of
> checks but it's very localized. Duplicating this logic all over the
> place is something to be avoided.
>
So here is what I think about the first solution you propose:
Pros:
- Flexibility. Adding a new rule for visibility should be easy
- Delta gets less packets(this probably means lower bandwidth)
Cons:
- If we track some kind of bitvector for every unit, we must call something
like recalculate_visibility(punit) every time a condition for the knowledge
changes. So the logic is still duplicated
- Performance
- Much time is needed for writing this :( (It isn't as is easy as it seems)
Anyway, Is my patch going to be commited or we're waiting for someone to write
The New Flexible And Bugfree Sight System For Freeciv(tm)?
mateusz
- [Freeciv-Dev] Re: (PR#7408) Client knows about hidden units,
mateusz stefek <=
|
|