[Freeciv-Dev] Barbarians
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
A few days ago I tried to generalise the barbarian leader code so that the
AI could use it for gameloss units. The result was not very good. Turns
out the barbarian needs and the AI's needs are, after all, quite
different. I took a look at the rest of the barbarian's use of the AI, and
the same pattern emerged.
My conclusion is: We should make a full separation between AI and
barbarian code. Barbarians only need a tiny subset of the AI code, the
rest only leads to CPU waste and bugs in both AI and barbarian code.
A barbarian "AI" (for Artificial Stupidity) would be very easy to code.
Ferrying means summoning a ferry out of nowhere and sending it to the
closest shore. Once the ferry is empty it is moved out of sight and
disbanded. Attack code means finding nearest target and moving at it. City
production code means building the latest available land attacker.
Barbarian leader code tries to stack it with another barb, or run it off
(eg to a fogged tile to disband).
Moreover, this gave me pause to think about the barbarian rules.
What functional role does barbarians play in the game? From what I see,
there does not seem to be a coherent design idea behind it. I suggest that
barbarians are there to keep players on their toes and make them defend
borders cities. Barbarians should be a nuisance, but not annoying nor
challenging. The current barbarians have a too high tech level and attack
players too randomly, the latter making them unsuitable for pubserver,
which is a loss.
There should be a concept of 'barbarian tiles', which are tiles that are
unowned (borders) and fogged for all players. These are tiles in which
barbarians can spawn and despawn. Each player has a barbarian timer which
is set to 'barbarian serveroption'=b, rand(b)+b, and counted down. When a
barbarian attack occurs, the attack happens relative to a random city. The
barbarians are spawned on the nearest barbarian tile to this city, which
can be either sea or land.
The tech level of the barbarians summoned should be relative to and lower
than the player attacked, and not relative to the global tech level as the
rules are presently. The current rules punish slower players too much.
We only need one barbarian player. It is not a normal player, and should
not die when it loses all its units and cities. Its player name should be
merely "Barbarian", be created on server start instead of constantly
recreated as it is now, and it should not be visible in the F3 or /list
player lists to avoid confusion. It should gain techs the same way as
everyone else, but these techs should have no bearing on the units
spawned, only on units built in occupied cities. There is then no need for
a "barbarian nation", so this kludge can be removed.
What do other people think?
- Per
- [Freeciv-Dev] Barbarians,
Per I. Mathisen <=
- [Freeciv-Dev] Re: Barbarians, Christian Knoke, 2003/10/15
- [Freeciv-Dev] Re: Barbarians, Gregory Berkolaiko, 2003/10/15
- [Freeciv-Dev] Re: Barbarians, Mike Kaufman, 2003/10/15
- [Freeciv-Dev] Re: Barbarians, Per I. Mathisen, 2003/10/17
- [Freeciv-Dev] Re: Barbarians, Ross Wetmore, 2003/10/17
- [Freeciv-Dev] Re: Barbarians, Ross Wetmore, 2003/10/17
- [Freeciv-Dev] Re: Barbarians, Christian Knoke, 2003/10/18
- [Freeciv-Dev] Re: Barbarians, Per I. Mathisen, 2003/10/18
- [Freeciv-Dev] Re: Barbarians, Christian Knoke, 2003/10/18
- [Freeciv-Dev] Re: Barbarians, Ross Wetmore, 2003/10/18
|
|