[Freeciv-Dev] RFC: new implementation of island numbering
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Here is an idea I have for solving several problems related to general
improvement effects as well as PR#2238.
here I use islands and continents interchangeably.
Currently, the server and the client have different ideas as to what is a
continent. Since the server sees the whole map, the server can determine
precisely which tile belongs to what continent and assigns that tile a
number. (see mapgen.c:assign_continent_numbers())
The client doesn't have the luxury of being omniscient, it can only see
what is known. so if a nation sends out a ship exploring and runs into a
new landmass which isn't visibly connected to the original land, it does
not really know whether it's a different continent altogether or the same
continent connected somewhere in the unknown part of the map. So it
defaults to a new continent and if later it finds out they're the same,
merges the the continent under the same number.
(see climisc.c:climap_renumber_continent())
This disparity has some immediate consequences, namely for trade routes and
some effects: for trade routes, cities on different continents get a better
deal than ones on the same continent. So if the client calculates the
trade, it might wind up with a different answer than the server which is
the origin of 2238. Or for island-wide effects, this behavior leads to more
information than a client needs to have: the presence of an effect could
tell a client about unknown terrain.
My solution to these problems is to have the server calculate all
continents numbers, but to do so from each client's point-of-view. So
instead of saving these numbers in tile->continent, they will be in
player_tile->continent. That way, for you, the server and you have the same
idea of geography.
Davide has raised a concern that the new behavior is exploitable in the
following way:
oooooo
oo####oooo
oooLL###LLooo
oooCLL##LLCooo
ooooLL##LLoooo
oooooo###ooooo
ooooooooooooo
o = ocean
# = unknown
L = land
C = a city
if you found two cities as so and create a trade route between them, you
will get the benefit of a trade route between separate continents, even if
you're reasonably sure that the two cities are sitting on the same
continent. That's true, but I contend that this is an unusual strategy, one
that takes more work than gives benefit, since if you uncover any of the
unknown your benefit goes away, and it's potentially dangerous to have that
situation for trade benefit, and you _don't_really_know_ if these cities are
actually on the same continent. In short, I don't think that this is a good
enough reason not to do this.
The only potential problem I see in implementing this is the coordination of
continent numbers between players. This leads to a couple of odd effects: a
trade route between two nations may yield different amounts of trade for
each nation:
scenario: player A know that his city and B's city are on the same
continent. B doesn't know this. When the trade route is created, A
gets less trade than B does. A solution which I think is fine is that a
trade route will reveal the continent which the city is on. In that case,
when the trade route is created, ther server will inform B that A's city is
on the same continent. What should happen if neither know? Should they find
out or does the server act as is they are on separate continents. I prefer
the latter.
scenario: A has discovered all of continent 1. B has two colonies on
continent 1, but he doesn't know that they are the same continent, so he
labels them 2 and 3. A sees both of B's colonies. B sees that one of his
colonies (on 2) is on the same continent as A's city Rome. Now: A builds an
improvement in Rome that delivers an island-wide effect. Question: should
B see this effect on continents 2 only or should he see it on 3 as well?
After all, A sees 3 in on the same island, he expects that the effect is
affecting B's cities/units/etc on that island. I don't know about this one.
Interesting: should mere knowledge of geography or lack thereof be a
deciding factor in whether an effect works?
Comments are welcome. Other difficult scenarios too.
-mike
- [Freeciv-Dev] RFC: new implementation of island numbering,
Mike Kaufman <=
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Raimar Falke, 2002/11/10
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Mike Kaufman, 2002/11/10
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Per I. Mathisen, 2002/11/10
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Mike Kaufman, 2002/11/10
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Davide Pagnin, 2002/11/11
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Ben Webb, 2002/11/11
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Per I. Mathisen, 2002/11/11
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Ben Webb, 2002/11/11
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Raimar Falke, 2002/11/11
- [Freeciv-Dev] Re: RFC: new implementation of island numbering, Davide Pagnin, 2002/11/11
|
|