User Tools

Site Tools


boards:diatoms:diatoms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
boards:diatoms:diatoms [2016/01/14 00:10]
Ozyman old revision restored (2016/01/10 23:26)
boards:diatoms:diatoms [2016/04/21 12:37] (current)
Ozyman
Line 5: Line 5:
 {{ :boards:diatoms:diatoms-game.png?direct&800 | {{ :boards:diatoms:diatoms-game.png?direct&800 |
 boards:diatoms:diatoms-game.png}} boards:diatoms:diatoms-game.png}}
-http://www.wargear.net/boards/view/Diatoms 
 ====== Diatoms ====== ====== Diatoms ======
 +http://www.wargear.net/boards/view/Diatoms
 +
 Diatoms was created for the "Under the Sea" map making competition.  Diatoms are simple algae.  I choose them for this theme mainly because they often have very regular shapes, and I thought I could use them to make an interesting geometric tiling board.  But as I read more about them, I thought they were pretty interesting in their own right. Diatoms was created for the "Under the Sea" map making competition.  Diatoms are simple algae.  I choose them for this theme mainly because they often have very regular shapes, and I thought I could use them to make an interesting geometric tiling board.  But as I read more about them, I thought they were pretty interesting in their own right.
 ====== Game Play ====== ====== Game Play ======
Line 17: Line 18:
  
  
 +To win - eliminate all your opponents, or get the required number of territories.  Number of territories required, depends on scenario, and matches the scenario name.  (e.g. scenario '50' only needs 50 territories to win, etc.)
  
 ===== Bonuses ===== ===== Bonuses =====
Line 29: Line 31:
  
 Locked to medium fog.  All territories have view borders to up to 3 territories away.  Vision is blocked by non-triangle diatoms. Locked to medium fog.  All territories have view borders to up to 3 territories away.  Vision is blocked by non-triangle diatoms.
 +
 +===== Cards =====
 +Start with a wild card - hold up to six.  If you hang on to your wild card, you'll always be able to turn in twice with six cards.
  
  
Line 69: Line 74:
 ====== Development ====== ====== Development ======
  
-blah blah.. wiki lost my text...  factories abandon bonuses.  Iwo Jima... Diatoms...  Trivial Pursuit.+I've often had difficulty making boards with abandon that I was happy with It usually seemed to encourage very aggressive behavior, and lots of empty territories.  I've recently used a new (for me) paradigm of having bonuses for (almost) every territory on the board on 3 maps: Iwo JimaDiatoms, Trivial Pursuit And I've been happy with the result.  This setup creates a conflict between wanting to group your units for offense/defense and wanting to spread out your units to get bonuses.
  
 +
 +The 'continents' and view borders were added programatically in python.  Here are the interesting bits:
 <code python> <code python>
 def setupDiatoms(): def setupDiatoms():
   wgmap = WGMap()   wgmap = WGMap()
   wgmap.loadMapFromFile('//DISKSTATION/data/wargear development/diatoms/Diatoms(7).xml')   wgmap.loadMapFromFile('//DISKSTATION/data/wargear development/diatoms/Diatoms(7).xml')
 +
 +  # get territory sets
   triangleTerritories = wgmap.getTerritoryIDsFromNameRegex("^T")   triangleTerritories = wgmap.getTerritoryIDsFromNameRegex("^T")
   rhombusTerritories = wgmap.getTerritoryIDsFromNameRegex("^R")   rhombusTerritories = wgmap.getTerritoryIDsFromNameRegex("^R")
   hexagonTerritories = wgmap.getTerritoryIDsFromNameRegex("^H")   hexagonTerritories = wgmap.getTerritoryIDsFromNameRegex("^H")
 +  
 +  # add continents
   wgmap.continentsFromNeighbors(triangleTerritories,1)   wgmap.continentsFromNeighbors(triangleTerritories,1)
   wgmap.continentsFromNeighbors(rhombusTerritories,2)   wgmap.continentsFromNeighbors(rhombusTerritories,2)
Line 87: Line 98:
  
  
-    todo: is this the same as getTerritoryIDsByDistance? +  get all territories within n borders - special version to only continue through triangle territories
-  # I think this version has been tested but other has not+  
-  # return set includes original territoryID+
   def getATWNB(territoryID,nBorders, direction="either", borderTypesAllowed = ["Default","Attack Only"],targetRegex=".*"):   def getATWNB(territoryID,nBorders, direction="either", borderTypesAllowed = ["Default","Attack Only"],targetRegex=".*"):
          
-    #import pdb; 
     tid = int(territoryID)     tid = int(territoryID)
-    #print"gatwnb called with",tid, nBorders 
     borderDepth = 0     borderDepth = 0
     allTerritoriesInReach = set()     allTerritoriesInReach = set()
     allTerritoriesInReach.add(tid)     allTerritoriesInReach.add(tid)
     nBorders = int(nBorders)     nBorders = int(nBorders)
-    #print "borderDepth:",borderDepth 
-    #print "nBorders:",nBorders 
-    #print "borderTypesAllowed:",borderTypesAllowed 
                  
     while(borderDepth < nBorders):     while(borderDepth < nBorders):
       allTerritoriesAddition = set()       allTerritoriesAddition = set()
-      #print "len(allTerritoriesAddition)",len(allTerritoriesAddition) 
       for tirID in allTerritoriesInReach:       for tirID in allTerritoriesInReach:
         tirName = wgmap.getTerritoryNameFromID(tirID)         tirName = wgmap.getTerritoryNameFromID(tirID)
-        #print "looking at",tirName 
         if tirName[0] != "T" and borderDepth > 0:         if tirName[0] != "T" and borderDepth > 0:
-          #print "skipping" 
           continue;           continue;
         tb = wgmap.getNeighborIDsFromID(tirID,direction, targetRegex, borderTypesAllowed)         tb = wgmap.getNeighborIDsFromID(tirID,direction, targetRegex, borderTypesAllowed)
-        #tb = self.getBorderTerritoryIDsByTerritoryID(tirID,direction) 
-        #print "for",tirID,"found borders:",tb,"size:",len(tb)   
-        #if len(tb) > 8: 
-        #    pdb.set_trace()       
         allTerritoriesAddition |= set(tb)         allTerritoriesAddition |= set(tb)
       allTerritoriesInReach |= allTerritoriesAddition       allTerritoriesInReach |= allTerritoriesAddition
       borderDepth = borderDepth + 1        borderDepth = borderDepth + 1 
        
-    #print "atir",allTerritoriesInReach 
-     
-    #allTerritoriesInReach.discard(tid) 
-    print "returning", allTerritoriesInReach 
-    print "########################    returning set of size:", len(allTerritoriesInReach) 
-     
-    #if len(allTerritoriesInReach) > 72: 
-    #  pdb.set_trace() 
     return allTerritoriesInReach     return allTerritoriesInReach
    
  
-  #wgmap.addViewBordersToNeighbors(nDistance=3,baseRegex="^T",directionality="One-way")+ 
 +  add view borders to every territory
   nDistance=3   nDistance=3
-  #baseRegex = ".*" 
   targetRegex=".*"   targetRegex=".*"
   directionality="One-way"   directionality="One-way"
-  ''' +
-    An nDistance of 1 does nothing... +
-  '''+
   setrecursionlimit(15000)   setrecursionlimit(15000)
   originalDOM = deepcopy(wgmap.DOM)       originalDOM = deepcopy(wgmap.DOM)    
Line 145: Line 133:
      
   for t in wgmap.DOM.getElementsByTagName("territory"):   for t in wgmap.DOM.getElementsByTagName("territory"):
-    #if (None == re.search(baseRegex,t.getAttribute("name"))): 
-    #  continue 
     tid = t.getAttribute("tid"     tid = t.getAttribute("tid"
-    #print "working on tid:",tid 
          
     wgmap.DOM = originalDOM     wgmap.DOM = originalDOM
 +    # find all territories that should be viewable from t
     twoDist = getATWNB(tid,nDistance,targetRegex=targetRegex) - getATWNB(tid,1,targetRegex=targetRegex)     twoDist = getATWNB(tid,nDistance,targetRegex=targetRegex) - getATWNB(tid,1,targetRegex=targetRegex)
          
boards/diatoms/diatoms.1452748233.txt.gz · Last modified: 2016/01/14 00:10 by Ozyman