Announcement

Collapse
No announcement yet.

The Programming of this Project

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    *Tables for the Military Data*

    A couple of changes from the Mil Model:

    a) I went w/ Mark's single Combat Value, but added a diff. CV vs each of the domain types. [A unit can be strong vs Air, weak vs ground, etc.]

    b) Changed the name from "ZOD" to Recon Zone... sounds more military and RECON is better than ZOD.

    [This message has been edited by Druid2 (edited June 08, 1999).]

    Comment


    • #17
      Druid, REVISED 6/9/99

      byte = +/- 127, (8 bit, can shift it in code to get 0-255)
      short = +/- 32k, 16 bit
      int = +/- 2x10^9, 32bit
      float +/- 3E38 32bit


      Lots of the world is ocean. I think we should have a two Classes BaseMapSquare can be an ocean square with no further enhancement. MapSquare would be a place people could live that gets the full treatment.

      These are not necessarily well thought out. I just took stuff from Clash V0.05 and mutilated it a bit

      I'm sure I need more, but this is a start.


      //////////////////
      // BaseMapSquare //
      /////////////////

      byte terrain // one of the terrain types, e.g. MapSquare.WATER
      byte siteType = 0;
      // index pointing to position in Array that holds site information
      // Right now there is only one site Type for each terrain type, but I'm setting
      // it up more generally for future use
      *That is are all Forests the same or are some more resource rich, or convert into better farmland . . .*

      short xLoc, yLoc; // absolute x and y coords of the square

      TF[] TFsHere; // the TFs know what civ they're from by TF.itsCiv
      byte numTFsHere = 0;

      boolean selected; // for use in selecting squares on the map for various functions

      byte worldIndex = 0;// Which world is the square in?
      // Defaults to 0, the main game world * this is for AI use *

      //might need something for fish availablility here


      /////////////////////
      // MapSquare //
      /////////////////////

      class MapSquare extends BaseMapSquare implements Cloneable {
      // an individual land square of the map and its characteristics

      short [5] workersOn // workers on this type of site
      int [5] developedSites // level of development of sites for
      // farm, resources, production, services, Special
      Number of sites available are given by terrain, except for Specials
      which are done on a per-square basis

      byte specialSites // number of special sites in this square (usually 0)
      byte specialType // if there is an econ special in the square (coal etc) it goes here

      byte siteAdjustment[];// modification of sites due to normal variation or loss to depletion. Easier to put it in since we might want to let sites deplete at some point.

      All roads and rivers go to center of Sq

      byte[] roadCondition; // [0] is N and it goes cw ([1] = NE etc...)
      // No Road = -1, 0 is for planned or destroyed roads, + numbers for better roads

      byte[] riverPos; different size rivers work similarly to roads.
      //Could also use for canals

      Province prov; // the Province the square is associated with, if any
      boolean city = false;// is this square urban?

      float pop; // Population, 1 = 1000 people

      float milPower = 0;// the defensive military capability of the inhabitants of the square includes people + mil units if present
      Culture cultures[];//Culture covers tech and society aspects of populated squares
      // there can be up to three cultures per Square
      byte culturePct[];// that don't belong to a civ, culturePct keeps track of percent
      // of population in each of three cultures if sum over culturePct less than 100
      // the rest of the pop is a mixture of other cultures too small to keep track of


      boolean frontLine = false; // *AI used if sq is part of a prov to determine
      // if this square is directly exposed to potential hostilities
      byte numForeignSqs = -1; // number of foreign squares adjacent
      // Specifically, number of adj. land squares not controlled directly by us


      [This message has been edited by Mark_Everson (edited June 09, 1999).]
      Project Lead for The Clash of Civilizations
      A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
      Check it out at the Clash Web Site and Forum right here at Apolyton!

      Comment


      • #18
        Province Info

        byte = +/- 127, (8 bit, can shift it in code to get 0-255)
        short = +/- 32k, 16 bit
        int = +/- 2x10^9, 32bit
        float +/- 3E38 32bit

        These are not necessarily well thought out. I just took stuff from Clash V0.05 and mutilated it a bit

        String provName;
        Civ itsCiv;
        byte numInCiv; // its number in the provs[] array
        Character administrator;// if there is a character administrator for the province it goes here

        MapSquare[] squares;// squares that constitute the province
        short turnFounded;// turn settled or conquered by the civ
        boolean selected; // short-term flag to keep track of various operations
        //boolean frontLine = true;// Very Important for military AI
        // used if part of the prov is directly exposed to potential hostilities

        float pop; // Population of the Province 1 pop = 1000 people

        // information for culture model to break out people in province by economic class, culture and religion. Don't know exactly what's needed yet.

        Sector[] // Sectors of economy: Farm, Resources, Prod, Services, Special;// //Sector class handles in detail the econ stats. Prices for the items and amounts produced etc. (Yes I know I need to provide this too!)

        Infra infra = null;// class to handle detailed infrastr management,

        Merchant[] // merchants that call this province home

        byte taxRate;// in %
        float tax$; // income resulting from taxation this turn
        float $avail=0;// $ placed to lure immigrants to prov.

        Float moneyToAttractPeople // stash of cash to lure people here
        float amtPerHead // amount each immigrant would get
        (maybe need this in MapSquare also?)


        Unit[] unitsSupported; // the units know what civ they're from by Unit.itsCiv
        short numUnitsSupported = 0;

        Reserves[] // mil units on reserve status (maybe this should be in MapSquare)
        Project Lead for The Clash of Civilizations
        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
        Check it out at the Clash Web Site and Forum right here at Apolyton!

        Comment


        • #19
          Social Model.

          The model deals with the following objects :

          - cultures, defined at civ. level.
          - classes, defines at civ level.
          - religions, defined at world level for mono and civ level for poly.
          - agents (=culture+class+religion), defined at civ level.
          - provinces, defined at civ level.


          Here are the datas used by the social model for each object :

          - cultures :
          - traditionalism (byte)
          - soc. rigidity (byte)
          - authority acceptance (byte)
          - education (byte)
          - nationalism (byte)
          - provincialism (byte)
          - familal shpae (byte, one of 3 values)
          - physical traits (byte)
          - language (byte)
          (maybe : - humanism, byte)
          - A vector holding the Attitude of this culture vs. every other cultures it knows (bytes).

          - classes :
          - the datas from H's model
          - life level (earning, in % to the civ total earnings; byte)
          - a vector for Attitude of this class vs. every other class of the civ (bytes)

          - religions :
          1. polytheistic religions :
          - human sacrific oriented (byte)
          - sky oriented (byte)
          - nature oriented (byte)
          - divinities evilness (byte)
          - a vector holding Attitude of this rel vs evry other rels it knows (poly AND mono, bytes)
          2. monotheistic religions :
          - tolerance (byte)
          - individualism (byte)
          - a vector holding Attitude of this rel vs evry other rels it knows (poly AND mono, bytes)
          (- other attributes? Wait for ur ideas)

          - Provinces :
          - All datas from Mark'model
          - local life level (earnings, a modifier to the overall civ mean life level; byte or float)
          - local health (byte)
          - three demographic tables holding proportion of peoples : culture/class, class/religion, religion/culture (integers)

          - Agents : the agents are the groups formed at the ciov level with people sharing the same class, religion and culture.
          - culture (object ref or TBD)
          - class (object ref or TBD)
          - religion (object ref or TBD)
          - A set of actions it can take (TBD, may depend on the class; at the agent level, actions are stored as triggers, ie bytes or integers)


          OK, now a word on the inputs and outputs of the model.

          Inputs :
          - Every event, as defined in the social model, is an input for the model.
          - political forces from the H's model
          - Economic datas from Mark's model.

          Outputs :
          - Actions taken by the agents
          - modifiers for the other models :
          * mil model (army strength, morale...)
          * econ model (investment, corruption...)
          * tech research (acceptance, particpation to particular fields of research...)
          * gov model (pol powers, class relationships)
          * demographic model (rate of birth, birth control, age of reproduction ...)
          * social model (crime...)

          Also, in a way, the social model will have ripple effects on every aspect of the game (ex : diplomacy could be indirectly influenced by the behaviour of the people...)

          That's it for now; all this needs refinement (I must code the model to see how it works before being able to finalize anything).
          Also, this is a model : it should be able to produce many kinds of output, so I'm listening to your whishes.


          One last note, about events propagation through the provinces with respect to transport and communication tech levels.

          I guess we could use a simple propagation model, which would give the intensity of an event at a given geographic point with respect to its origin.
          Let be K a value reflecting the transport/comm tech (K is a value formed of both, how is TBD); let be D the distance between the origin point and the province we are intersted in.
          The the intensity may be smthg like :
          I = K/D.
          This would give an "sense intensity" for an event in a given province, and thus modifying the intensity of the reaction to the evnent.
          When K is low (early transport/comm techs), events wont propagate far beyond the borders of the origin province;
          I would be maximized at 1, which means that when transport/comm techs are eveolved enough, I sould be >1 in every place of the world, meaning that it has the same intensity (1) every where.
          We should there add a system to represent the fact that some governments prevent their people from having access to external infos (ex : China today).

          OK, Cya. Manu.

          Comment


          • #20
            Here are some rough ideas on the info needed for research system programming. Please note that I´m not a programmer, so I don´t know how to present this in the right terms.

            First of all, we need to store the data for each Tag type (10 types at the most). This data is the modification number (a percentage number most likely) for the projects with that Tag type. The modification number is derived from in-game situation (TBD). Basically, this modifier represents the peoples desire and ability to go in a specific research direction. This of course needs to be done for each state, both player and computer. In addition we need to store how many projects of each Tag type the player/computer has researched.

            Then, info on each project needs to be stored. That is, the basic cost, the Tag type modifier and individual modifers for a project. My idea is that those projects the public most wants (needs) to aquire giving their status have their cost reduced, instead of assigning some ‘extra’ RPs to a lot of projects. As for the Tag-type modifier above, these modifiers are derived from the in-game situation
            Also needed is what Tag type(s) the project has (if it has more than one the modification number is the average of the Tag type numbers); the prereqs the project needs (these are Hard prereqs, should never be more than 1 or 2 per project) and the ‘Tag number’, which is compared to the number of the specific Tag projects researched and modifiying the cost accordingly.
            Then, the current research status of those projects being researched must be stored. Note that this needs only to be done for those projects the player (computer) itself is researching (i.e. putting RPs into).
            Projects that the public wants will simply have it´s cost reduced. For this I envision we´ll make a list of things (50 at most) that projects can be linked with. The listings cover various in-game situations which can apply to the project, either affect its cost or prohibit it being researched. Each project has two ‘slots’, which each can have one link to the list.
            Finally, the effects of each project must be stored. I think it´s best to limit the effects to two per project. Again we might make a list of possible effects and make links to that list.

            The RPs players generate/accumulate must also be stored. As the exact method for generating RPs is undecided I can´t say much about this, as for the ‘storing’ of RPs, all RPs are of course assigned to certain projects and thus stored there.

            That’s pretty much it. Hope you can make anything out of this. Feel free to report any errors omissions, ther are bound to be some :-).

            Comment


            • #21
              Re: Version Control, Bug Database

              Have a look at www.mozilla.org/tools.html and see if the tools they use could be useful for coordinating the programming of Clash.

              Druid:

              I recommend CVS for version control at least. It is much more flexible than having a webmaster manually upload new stuff each time a change is made. I think that if you keep in mind that an automated system is no replacement for management, it could really help a team as diversified as this.

              Martin

              Comment

              Working...
              X