Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13211) RFC: redesign of aifill system
Home

[Freeciv-Dev] (PR#13211) RFC: redesign of aifill system

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13211) RFC: redesign of aifill system
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Fri, 3 Jun 2005 22:01:33 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13211 >

Currently aifill is a server setting with no side effects.  Its only
effect is that when starting a game new players are created as needed to
bring the total up to the aifill amount.

This is a problem with an improved pregame dialog, because there is no
way to edit these new nations in pregame.  Based on the starcraft model
all players should be editable in pregame.  It's possible to use the
create command to get around this - even to automate mass-creation at
the client side - but this is a hack and it would just come to replace
the aifill mechanism.  So we should go right to the source and replace
it directly.  However I'm not entirely sure how this should be done -
basically we want creation or removal of players to happen immediately
rather than waiting for game start, so that the setting/command will
have side effects.  Another problematic issue is how the aifill value
should interact with the maxplayers value - or indeed if these two
should simply be merged.  Another question is if the aifill can replace
/create and /remove entirely - is there any purpose in having non-AI
non-connected players in pregame?

Plan 1.  My first thought was that aifill should be changed into a
command.  Thus is you /aifill 5 then players will immediately be created
or removed to bring the total up to 5.  This will be reflected
immediately in the players list, allowing the new players to be edited.
 The problem is if new human players connect afterwards, these will show
up as new extra players and you'll have to rerun /aifill to get back to
your original total number of players.

Plan 2.  So then I thought, aifill should continue to be a setting but
should become instantaneous (with side effects).  There would then
basically be two effects.  First, the side effect is that when you "/set
aifill" new players are immediately added or removed to reach the total
(this isn't so good since side effects for settings are inherently
problematic - see the old fulltradesize/notradesize issue - but it may
be an acceptable tradeoff).  Secondly, any time new players connect or
depart AI players will be removed or created to take their place to keep
the total at the given amount (thus distinguishing it from plan 1).
This second plan seems somewhat more convenient than Plan 1, but also
quite a bit uglier to implement.  It also doesn't answer the question of
maxplayers.

Plan 3.  Integrating aifill with maxplayers leads to some blue-sky
speculation.  One idea is to go with a full emulation of the Starcraft
pregame system.  Here you set maxplayers, then individually toggle the
players between open (available for joining), closed (?), or AI.  This
integrates aifill with maxplayers but it doesn't scale well: to create
30 AI players you have to toggle each player to AI individually
(Starcraft had a maximum of 8 players).  It would also take a bit of
work since it's based on a fixed numbering of players, whereas the
current system renumbers players at will during pregame.

Right now I'm leaning toward plan 1 as an initial implementation.  One
interesting thing is that I think any of these plans will take less code
than the current system.  Because the current system treats aifilled and
regular AI and human players differently both for player creation and
also for nation selection, there's a lot of duplicated code right now.

Also note that all of these models make Freeciv variously more
compatible with the GGZ model (which is basically a superset of the
starcraft model).

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13211) RFC: redesign of aifill system, Jason Dorje Short <=