Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: civserver segfault with new research system (PR#1221)
Home

[Freeciv-Dev] Re: civserver segfault with new research system (PR#1221)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: civserver segfault with new research system (PR#1221)
From: Justin Moore <justin@xxxxxxxxxxx>
Date: Thu, 17 Jan 2002 02:56:35 -0500 (EST)

> > > Well where do you put the special cases for barbarians?
> > > A flexible solution is to make barbarians always set science to 0%.
> >
> > IANAFH (I am not a freeciv hacker), but ...
> >
> >    That's one way, but I think it would be easier to put the chokepoint
> > (so-to-speak) in the code where you increase the amount of research done
> > (where the lightbulb total increases).  It's relatively well-defined, and
> > would take care of cases where science is set to non-zero for whatever
> > reason, or if something gives the barbarians some light bulbs.
>
> That's bad. We want to separate AI from civserver as much as possible, not to
> mix it even more.

   I agree about the separation, but right now the AI/server code is so
tightly integrated, big changes aren't going to happen in an evolutionary
manner:

matthews:~/compile/freeciv/common$ grep barbarian *.c | wc
     19      90    1044
matthews:~/compile/freeciv/common$ cd ../server/
matthews:~/compile/freeciv/server$ grep barbarian *.c | wc
    179    1000   11145
matthews:~/compile/freeciv/server$

I'm simply proposing to move the special case handling to a slightly more
effective place (I think), given the current setup.  For a real nightmare,
check out server/stdinhand.c.  I think a total AI/server separation is
futile given the codebase and other influencing factors.

   Seriously, though, where could one quickly and easily check and make
sure a barbarian city (or anywhere else) wasn't producing any bulbs?

-jdm

Department of Computer Science, Duke University, Durham, NC 27708-0129
Email:  justin@xxxxxxxxxxx



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