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: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>, Sebastian Bauer <sebauer@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: Modified can_build_improvment()
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Aug 2001 10:03:07 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Aug 20, 2001 at 03:17:18PM -0700, Kevin Brown wrote:
> Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > 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.
> 
> Hmm...I suppose so.  I guess it depends on how you do this.
> 
> You don't have to do the check one at a time if there are multiple
> things to check.  You can bundle them all together into one request
> and send that off, and have the server respond in kind.

I don't think this will do any better.

> >     Also, as has already been pointed out, client-server
> > communication is (essentially) asynchronous, so this kind of
> > question-reply communication is tricky.
> 
> Yeah, this is a problem.  It's also surprising since this *is* a
> turn-based game after all.  :-)
> 
> 
> It's obviously desirable to minimize the amount of knowledge the
> client has, since cheating gets easier as the knowledge the client has
> (relative to what it needs) increases.  It's also, I think, quite a
> bit cleaner.

You have to separate between knowledge of algorithms and data. Extra
data would be cheating but extra algorithms may help reducing
communication.

> Do we have hard numbers on just how much added communication overhead
> queries such as this would create?

On localhost the time from sending a request for setting a worker in a
city and the getting the updated city_info (which includes a complete
city calculation) is 20+-1ms. These are the only data I have.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
  I only have a yellow belt in makefile kungfu.  These fancy gnu make things
  are relatively new to some of us..."
    -- Mark Frazer to Vassilii Khachaturov in linux-kernel


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