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]
To: stephenh@xxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Serious Suggestions
From: Schaefer Frank R <fschaef@xxxxxxxxxxxxxxx>
Date: Sat, 20 Feb 1999 20:46:36 -0500 (EST)

Hi, 

referring to your mail:

  This  is  a  good idea  (I  believe  something  similar will  be  in
  Civ3:CTP). I think we need to have some discusion on how to do this,
  for example  should we just have  a simple list or  a true scripting
  language type  system such  as suggested above?  Personally I  am in
  favour  of  a  scripting  language,  especially since  it  could  be
  extended to  provide unit automation too  (eg if enemy  unit wakes a
  sentried unit and at war with that nation then attack). In that case
  which language?  I think  we should consider  Scheme since  it's the
  standard GNU scripting language now.

That's what  Schwammerl thought to be,  before, I was  so much charged
with my PhD work. Schwammerl  is like C, has object oriented features,
no  classes, that's  against the  Philosophy, but  I'm  thinking about
Protypes so that one could write for example:

family = "Spielberg";
Player[0].name   = "Steven" + family; # structure elements are created
#                                     # dynamically

Player[1] like Player[0]; # what means Player has the same class-structure
#                         # as Player[0]
Player[1].name = Player[0].name s/ "Spielberg" / "Hodge" / 
                                s/ "even" / "eve"/;  
# Player One is adapted (gues what his name is about)
# 
# The special strength of Schwammerl is tree-namespace-support:

[CIV]
max_nr_cities = 4711;
...
   [>> CITIE_SETTING]
   xpm_dir = "/usr/X11/lib/freeciv/data";
   cache_size_city_popup =   sin(CIV::max_nr_cities * 34.)
                           * exp(1/CIV::TauGeneral); 
   ..
   [<< ]

# Of course Schwammerl has if-then stuff like C

if( elvis.age < 21 ) { no_beer = "YES"; happyness_str = ":-)"; }
if( elvis.name = "Bill Hilly" ) { something_sucks(); }

# Schwammerl  was  thought to  be  a  nice  bavarian response  to  these
# american  stuff  Scheme,  Tcl,  and  so  on (at  the  time  a  was  in
# Bavaria).  The most  important thing  with Schwammerl  is, that  it is
# funny. Comments can be "#" as in shell scripts, "/*..*/" as in C, "//"
# as in "C++" or:
(:schmarrn
   as in bavaria (schmarrn = Something that you must not think too
   much about it ,it's only schmarrn.)
:)

# the smileys are thought to  be delimiters different other stuff, but I
# don't have any idea for what else, perhaps for event triggers, oh yeah
# ..

So if you're interested, I can send you some code. It is really fancy.
Unfortunately  I  didn't  have  the  time to  perfection  the  obeject
oriented part. But you can use it as interpreter for a procedural prog
lang.   I would  indeed suggest  that a  event triggered  finite state
machine  is the  best way  to control  automatically a  country.  Also
there I programmed somthing during my PhD ...

C U 

-- Frank
>| Frank R. Schaefer  
>| Office:  864-656-7183   Home: 864-858-4611
>| R. 116, Fluor Daniel Building,
>| Mech. Eng., Clemson University
>| Clemson, SC 29634, USA




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