Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] Serious Suggestions
Home

Re: [Freeciv-Dev] Serious Suggestions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Serious Suggestions
From: Matt Busigin <jediknight@xxxxxxxxx>
Date: Tue, 23 Feb 1999 11:25:46 -0500 (EST)

On 23 Feb 1999, Falk Hueffner wrote:

#I have also considered this recently. I think using a "real" language
#for this is a bit overkill. 

Agreed - more bloat isn't good!  FreeCiv scales relatively well on different
platforms, but a whole language might make it slower, and more resource
hungry.

#I considered a simple language with some predefined predicates like:

#defenders < 2 : Riflemen
#food_surplus > 2 : Settlers
#!have(Great Wall) && size >= 4 : City Walls
#size >= 7 : Aqueduct
#production > 8 : JS-Bach

I wouldn't use C logical &&, but rather 'and'.

#which would be just parsed from the top till the first is true. This
#could be easily made with lex & yacc. Also, a GUI could be simply made 
#that produces this output.

Each city could have a little dialog button "Orders". or something.  You
click on "orders", and it brings a listbox or textbox of the current orders. 
Yuu enter the orders one by one.

#Checks if it is already there or can't be build are unnecessary IMHO,
#if it can't be build, the next is taken.

Agreed.

#I have a little experience with lex and yacc, so I could try this.

Need some help?  This sounds interesting, and at one time, I was developing
a language of my own using lex & yacc.  For this, though, I think using yacc
is a bit overkill.  The parser really isn't that difficult for something as
small as this.

                                matt

   Matt Busigin [Perl/Tcl/Sh/C/C++/Lex/Yacc/HTML UNIX Programmer] 
          "Overdrawn?  But I still have checks left!" 
     xwing.org Debian Linux: 600 BogoMips AMD K6 300 128mb RAM
belgarath.xwing.org Debian Linux: 230 BogoMips AMD K5 166 128mb RAM
       email : spod(at)ewtoo.org, jediknight(at)xwing.org
     ** Email for 2048 bit PGP public encryption key! **


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