Changeset 39

04/20/09 05:07:53 (11 years ago)

Added some building tiles to simulate a building.
Added a 'blocking' tile to enable non-visual blocking.
Extanded map size a little.
Adjusted /utilities/ and added instructions.
Rejigged map file to add a buildings layer (experimental).
Minor adjustment to /scripts/ to add new layer.

17 added
1 deleted
3 edited


  • trunk/demo/maps/map.xml

    r38 r39  
    66        <import file="../objects/ground/gravel/gravel.xml"></import> 
    77        <import file="../objects/ground/brick/brick.xml"></import> 
     8        <import file="../objects/ground/block/block.xml"></import> 
     10        <import file="../objects/buildings/build-fl.xml"></import> 
     11        <import file="../objects/buildings/build-fm.xml"></import> 
     12        <import file="../objects/buildings/build-fr.xml"></import> 
     13        <import file="../objects/buildings/build-bl.xml"></import> 
     14        <import file="../objects/buildings/build-bm.xml"></import> 
     15        <import file="../objects/buildings/build-br.xml"></import> 
    817        <import file="../objects/ground/grass/transition/grass-tc01.xml"></import> 
    918        <import file="../objects/ground/grass/transition/grass-tc02.xml"></import> 
    3645        <import file="../objects/ground/grass/transition/grass-ts14.xml"></import> 
    3746        <import file="../objects/ground/grass/transition/grass-ts15.xml"></import> 
    3848        <layer grid_type="square" id="GroundLayer" x_scale="1.0" pathing="cell_edges_only" y_scale="1.0" rotation="0.0" x_offset="0.0" y_offset="0.0"> 
    3949                <instances> 
    40                         <i r="0" z="0.0" x="2.0" o="grass-a" y="-2.0" ns="PARPG"></i> 
     50                        <i r="0" z="0.0" x="2.0" o="brick" y="-2.0" ns="PARPG"></i> 
    4151                        <i x="1.0" o="brick" z="0.0" y="-1.0" r="0"></i> 
    4252                        <i x="0.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
    4353                        <i x="-1.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
    4454                        <i x="0.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
    45                         <i x="1.0" o="brick" z="0.0" y="0.0" r="0"></i> 
    46                         <i x="2.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
    47                         <i x="1.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
    48                         <i x="0.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
    49                         <i x="0.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
     55                        <i x="1.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
     56                        <i x="2.0" o="brick" z="0.0" y="-1.0" r="0"></i> 
     57                        <i x="1.0" o="brick" z="0.0" y="-2.0" r="0"></i> 
     58                        <i x="0.0" o="brick" z="0.0" y="-1.0" r="0"></i> 
    5059                        <i x="-1.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
    5160                        <i x="-1.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
    52                         <i x="0.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
    53                         <i x="2.0" o="brick" z="0.0" y="0.0" r="0"></i> 
    54                         <i x="1.0" o="brick" z="0.0" y="1.0" r="0"></i> 
     61                        <i x="0.0" o="brick" z="0.0" y="-2.0" r="0"></i> 
     62                        <i x="2.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
     63                        <i x="1.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
    5564                        <i x="2.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
    56                         <i x="-1.0" o="brick" z="0.0" y="-2.0" r="0"></i> 
     65                        <i x="-1.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
    5766                        <i x="-2.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
    5867                        <i x="-2.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
    6271                        <i x="-2.0" o="grass-a" z="0.0" y="-3.0" r="0"></i> 
    6372                        <i x="-1.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
    64                         <i x="0.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    65                         <i x="1.0" o="brick" z="0.0" y="2.0" r="0"></i> 
     73                        <i x="0.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
     74                        <i x="1.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
    6675                        <i x="2.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
    67                         <i x="-1.0" o="brick" z="0.0" y="-3.0" r="0"></i> 
     76                        <i x="-1.0" o="grass-a" z="0.0" y="-3.0" r="0"></i> 
    6877                        <i x="0.0" o="brick" z="0.0" y="-3.0" r="0"></i> 
    6978                        <i x="1.0" o="brick" z="0.0" y="-3.0" r="0"></i> 
    7079                        <i x="2.0" o="brick" z="0.0" y="-3.0" r="0"></i> 
    71                         <i x="3.0" o="brick" z="0.0" y="-3.0" r="0"></i> 
     80                        <i x="3.0" o="grass-a" z="0.0" y="-3.0" r="0"></i> 
    7281                        <i x="3.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
    7382                        <i x="3.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
    7584                        <i x="3.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
    7685                        <i x="3.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
     86            <i x="-3.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     87            <i x="3.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     88                        <i x="-1.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     89                        <i x="0.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     90                        <i x="1.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     91                        <i x="2.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     92                        <i x="-2.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     93                        <i x="4.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     94            <i x="3.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     95                        <i x="-1.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     96                        <i x="0.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     97                        <i x="1.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     98                        <i x="2.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     99                        <i x="-2.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     100                        <i x="4.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     101                        <i x="-3.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     102            <i x="-3.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     103                        <i x="-3.0" o="grass-a" z="0.0" y="-3.0" r="0"></i> 
     104                        <i x="-3.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
     105                        <i x="-3.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
     106                        <i x="-3.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
     107                        <i x="-3.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
     108                        <i x="-3.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
     109                        <i x="-3.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
     110            <i x="4.0" o="grass-a" z="0.0" y="-4.0" r="0"></i> 
     111                        <i x="4.0" o="grass-a" z="0.0" y="-3.0" r="0"></i> 
     112                        <i x="4.0" o="grass-a" z="0.0" y="-2.0" r="0"></i> 
     113                        <i x="4.0" o="grass-a" z="0.0" y="-1.0" r="0"></i> 
     114                        <i x="4.0" o="grass-a" z="0.0" y="0.0" r="0"></i> 
     115                        <i x="4.0" o="grass-a" z="0.0" y="1.0" r="0"></i> 
     116                        <i x="4.0" o="grass-a" z="0.0" y="2.0" r="0"></i> 
     117                        <i x="4.0" o="grass-a" z="0.0" y="3.0" r="0"></i> 
    77118                </instances> 
    78119        </layer> 
    80121    <layer x_offset="0.0" pathing="cell_edges_and_diagonals" y_offset="0.0" grid_type="square" id="TransitionLayer0" x_scale="1" y_scale="1" rotation="0.0"> 
    81122        <instances> 
    82             <i x="1.0" o="grass-ts13" y="-1.0" r="0" z="0.0"></i> 
    83             <i x="1.0" o="grass-tc03" y="0.0" r="0" z="0.0"></i> 
    84             <i x="2.0" o="grass-ts11" y="0.0" r="0" z="0.0"></i> 
    85             <i x="1.0" o="grass-ts05" y="1.0" r="0" z="0.0"></i> 
    86             <i x="-1.0" o="grass-ts07" y="-2.0" r="0" z="0.0"></i> 
    87             <i x="0.0" o="grass-ts12" y="2.0" r="0" z="0.0"></i> 
    88             <i x="1.0" o="grass-tc08" y="2.0" r="0" z="0.0"></i> 
    89             <i x="-1.0" o="grass-tc02" y="-3.0" r="0" z="0.0"></i> 
    90             <i x="0.0" o="grass-ts02" y="-3.0" r="0" z="0.0"></i> 
    91             <i x="1.0" o="grass-ts02" y="-3.0" r="0" z="0.0"></i> 
    92             <i x="2.0" o="grass-ts02" y="-3.0" r="0" z="0.0"></i> 
    93             <i x="3.0" o="grass-ts02" y="-3.0" r="0" z="0.0"></i> 
     123            <i x="2.0" o="grass-ts01" y="-2.0" r="0" z="0.0"></i> 
     124            <i x="1.0" o="grass-ts02" y="-1.0" r="0" z="0.0"></i> 
     125            <i x="2.0" o="grass-ts03" y="-1.0" r="0" z="0.0"></i> 
     126            <i x="0.0" o="grass-ts06" y="-1.0" r="0" z="0.0"></i> 
     127            <i x="0.0" o="grass-ts04" y="-2.0" r="0" z="0.0"></i> 
     128            <i x="0.0" o="grass-ts12" y="-3.0" r="0" z="0.0"></i> 
     129            <i x="1.0" o="grass-ts08" y="-3.0" r="0" z="0.0"></i> 
     130            <i x="2.0" o="grass-ts09" y="-3.0" r="0" z="0.0"></i> 
    94131        </instances> 
    95132    </layer> 
    96     <layer x_offset="0.0" pathing="cell_edges_and_diagonals" y_offset="0.0" grid_type="square" id="TransitionLayer1" x_scale="1" y_scale="1" rotation="0.0"> 
    97         <instances> 
    98             <i x="1.0" o="grass-ts04" y="0.0" r="0" z="0.0"></i> 
    99             <i x="1.0" o="grass-ts01" y="2.0" r="0" z="0.0"></i> 
    100             <i x="-1.0" o="grass-ts04" y="-3.0" r="0" z="0.0"></i> 
     134        <layer grid_type="square" id="BuildingLayer" x_scale="1.0" pathing="cell_edges_only" y_scale="1.0" rotation="0.0" x_offset="0.0" y_offset="0.0"> 
     135                <instances> 
     136                    <i x="1.0" y="-1.0" z="0.0" o="build-fm" r="0"></i> 
    101137        </instances> 
    102138    </layer> 
    104140        <layer x_offset="0.0" pathing="cell_edges_and_diagonals" y_offset="0.0" grid_type="square" id="ObjectLayer" x_scale="1" y_scale="1" rotation="0.0"> 
    105141                <instances> 
    106                         <i x="0.0" o="boy" y="0.0" r="0" id="PC" z="0.0"></i>            
     142                        <i x="0.0" o="boy" y="0.0" r="0" id="PC" z="0.0"></i> 
     143                        <i r="0" z="0.0" x="2.0" o="block" y="-2.0"></i> 
     144                <i x="2.0" o="block" z="0.0" y="-1.0" r="0"></i> 
     145                        <i x="1.0" o="block" z="0.0" y="-2.0" r="0"></i> 
     146                        <i x="0.0" o="block" z="0.0" y="-1.0" r="0"></i> 
     147                        <i x="0.0" o="block" z="0.0" y="-3.0" r="0"></i> 
     148                        <i x="1.0" o="block" z="0.0" y="-3.0" r="0"></i> 
     149                        <i x="2.0" o="block" z="0.0" y="-3.0" r="0"></i> 
     150                        <i x="0.0" o="block" z="0.0" y="-2.0" r="0"></i> 
     151                        <i x="1.0" o="block" z="0.0" y="-1.0" r="0"></i> 
    107152                </instances> 
    108153        </layer> 
    109155        <camera ref_cell_width="72" zoom="1.0" tilt="-60.0" id="main" ref_layer_id="ObjectLayer" ref_cell_height="38" rotation="45.0"> 
    110156        </camera> 
  • trunk/demo/scripts/

    r38 r39  
    5353        self.filename = '' 
    5454        self.instance_to_agent = {} 
    55         self.transitions=[] 
     55        self.transitions = [] 
     56        self.building_layer = [] 
    5758    def reset(self): 
    7778            if(layer.getId()[:size]=='TransitionLayer'): 
    7879                self.transitions.append( 
     80        # add layer for buildings (assume always present, even if empty) 
     81        self.building_layer ='BuildingLayer') 
    7982        self.PC = Hero(self.model,'PC',self.agentlayer) 
    8083        self.instance_to_agent[self.PC.agent.getFifeId()] = self.PC 
  • trunk/demo/utilities/

    r38 r39  
    2727# the information for the transition tiles that are rendered over the ground 
    29 # this is experimental code for the moment 
    30 # awaiting rest of tile graphics for full testing 
     29# usage: mapfile 
     30# outputs file new.xml, a simple text file that contains ONLY the new layers 
     31# needed in the mapfile. At the moment you have to splice these in by hand; 
     32# they must come AFTER the ground layer but BEFORE the building and objects 
     33# layers. PM maximinus at the PARPG forums if any questions. 
    3235# some simple defines for each part of the tile 
    268271    def GetSize(self): 
    269         """GetSize stores both the size of the grid""" 
     272        """GetSize stores the size of the grid""" 
    270273        for t in self.layers[0].tiles: 
    271274            if t.x > self.max_x: 
Note: See TracChangeset for help on using the changeset viewer.