Home | Trees | Indices | Help |
|
---|
|
object --+ | Map
Fast field-of-view and path-finding on stored data.
Set map conditions with the walkable and transparency attributes, this object can be iterated and checked for containment similar to consoles.
For example, you can set all tiles and transparent and walkable with the following code:
map = tdl.map.Map(80, 60) for x,y in map: map.transparent[x,y] = true map.walkable[x,y] = true
Since: 1.5.0
Instance Methods | |||
|
|||
|
|||
iter((x, y), ...) |
|
||
[(x, y), ...] |
|
||
|
|||
|
|||
Inherited from |
Instance Variables | |
fov Map tiles touched by a field-of-view computation, access this attribute with map.fov[x,y] |
|
transparent Map transparency, access this attribute with map.transparent[x,y] |
|
walkable Map accessibility, access this attribute with map.walkable[x,y] |
Properties | |
Inherited from |
Method Details |
Create a new Map with width and height.
|
Compute the field-of-view of this Map and return an iterator of the points touched.
|
Get the shortest path between two points. The start position is not included in the list.
|
Instance Variable Details |
fovMap tiles touched by a field-of-view computation, access this attribute with map.fov[x,y]Is True if a the tile is if view, otherwise False. You can set to this attribute if you want, but you'll typically be using it to read the field-of-view of a compute_fov call. |
transparentMap transparency, access this attribute with map.transparent[x,y]Set to True to allow field-of-view rays, False will block field-of-view. Transparent tiles only affect field-of-view. |
walkableMap accessibility, access this attribute with map.walkable[x,y]Set to True to allow path-finding through that tile, False will block passage to that tile. Walkable tiles only affect path-finding. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat May 28 16:09:37 2016 | http://epydoc.sourceforge.net |