Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: multiplayer mode is all that counts
Home

[Freeciv-Dev] Re: multiplayer mode is all that counts

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Cc: Reinier Post <rp@xxxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: multiplayer mode is all that counts
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Sep 2001 09:28:39 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Sep 20, 2001 at 11:17:07AM -0400, Daniel L Speyer wrote:
> On Thu, 20 Sep 2001, Reinier Post wrote:
> 
> > On Wed, Sep 19, 2001 at 10:25:54PM -0400, Daniel L Speyer wrote:
> > 
> > > I think the general environment might be a set of hooks and scripting
> > > actions.
> > 
> > I'm curious to know what your 'actions' look like.  Before you know it
> > they span multiplle client-server interactions, which have been
> > stateless until now, and therefore, hard to track.  This is the problem
> > Raimar's patches for attributes and 'brackets' try to address.  Do you
> > intend to rely on them?
> 
> The action I'm presently testing with just gives the player a message
> saying that enemy units are sighted.  I plan to write one that takes an
> assigned unit, calculates battle percentages, compares them to its orders,
> and possibly attacks.  Since the design is pretty extensible, it could
> call a lisp or python interperator.
> 

> I haven't made any use of states and I don't see what good they'd do.  One
> thing a script might do is write other scripts (this would be hidden from
> the player, probably), but each script itself responds to one event.

You want to save which commands you received (at which percent of
winning a battle you attack for example). You don't want to hard code
this. See the ai/ directoy for the reason.

> There are potentially real co-ordination problems.  For example, I set my
> legion to automatically attack where it can win.  My enemies knights come
> by on a road under auto-goto.  My legion steps forth to do battle, and
> finds them long gone.  I'm not sure what to do about this, especially
> given the possibility of real network lags

If the knight just turned up from the unknown you can't do
anything. What you can do is to either chase it (if given the command)
or ignore it. However other units now know that an enemy is
approaching and calculate an "abfangkurs" (a path to meet the intruder
while considering the motion of the enemy).

> , but I don't think states would help.

No it wouldn't.

> One possibility would be to put all this into the server, but there are a
> couple of problems.  First, IMO, it is very inelegant -- these scripts are
> to augment the players, they should be treated like players.  Second,
> server-side would open the problems of security.  Auto-goto (a much
> simpler routine) allows players to gain improper information.  It would be
> very dificult to avoid that with full scripting.  And finally, servers nd
> clients would have to hold very tight version coupling to maitain
> compatibility.  This would be especially a problem with multi-player
> games, which we'll need to do real-world testing.

Repeat: AI at server is bad.

> I'll send out what code I've written as soon as I get it cleaned up enough
> that I'm not embarresed to have other people see it :).  Of course, with
> this restructuring, we'll probably throw it all out, but as Brooks
> said, plan to throw one away, you will anyhow.

You may want to look at what I wrote up about agents.

        Raimar
-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Just because you put a flag on the moon doesn't make it yours, it just
  puts a hole in the moon."


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