Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: patch: Modified can_build_improvment()
Home

[Freeciv-Dev] Re: patch: Modified can_build_improvment()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Cc: Sebastian Bauer <sebauer@xxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: patch: Modified can_build_improvment()
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 13:43:57 +0100 (BST)

On Mon, 20 Aug 2001, Kevin Brown wrote:

> If the client wants to build something, shouldn't it first query the
> server to see if it's permitted?  Or tell the server that it's going
> to do so and let the server tell it whether or not it worked?  The
> server knows all the rules and has all the information about the game,
> after all.

        Ideally, yes, but this would require a query to the server for
every building type every time you want to change production in a city
(and you'd have to do it for every city if the client had no intelligence,
as different cities may be subject to different restrictions). This is bad
from a bandwidth point of view.

        Also, as has already been pointed out, client-server
communication is (essentially) asynchronous, so this kind of
question-reply communication is tricky.

        The present clients use hard-coded checks, based sometimes on data
from the rulesets, to make these decisions, and I'm not prepared to
completely rewrite them.

        Finally, I think this could be viewed as a "feature". equiv_repl
or equiv_dupl allow you, in theory, to create building types that cannot
be build if a certain building exists in another player's empire on the
other side of the planet. (Presently the checks only prevent you from
building a barracks in a city with Barracks II, for example, but impr-gen
is more, er, general.) Such a ruleset setting would be, IMHO, a bit silly
anyway.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"Heavier-than-air flying machines are impossible."
         - Lord Kelvin, president, Royal Society, 1895.



[Prev in Thread] Current Thread [Next in Thread]