Game Map

class GameMap(map_name: str, seed: Any)[source]

Bases: object

Holds tiles for a map. Handles generation of the map and placement of the entities. Fills map with floors on init.

__init__(map_name: str, seed: Any)[source]

Initialize self. See help(type(self)) for accurate signature.

property air_tile_positions

Return a copy of an array containing ints, 0 for blocked and 1 for open

property block_movement_map

Return a copy of an array containing ints, 0 for blocked and 1 for open

property block_sight_map

Return a copy of an array containing ints, 0 for blocked and 1 for open

classmethod deserialise(serialised: Dict[str, Any])[source]

Loads the details from the serialised data back into the GameMap.

dump(path: str)[source]

Dumps the dungeon tree into a file

generate_new_map(player_data: Optional[scripts.engine.internal.definition.ActorData] = None)[source]

Generate the map for the current game map. Creates tiles. Saves the values directly to the GameMap.

get_open_space()[source]

Returns a random open space from the tile map.

serialise()Dict[str, Any][source]

Serialise the game map to dict.