This is a list with all classes and functions.

tml module

class tml.Teemap

Creates the default map.

The default map consists out of two groups containing a quadlayer with the background and the game layer.


Returns a list of all layers, collected from the groups.


Load a new teeworlds map from map_path.


Save the current map to map_path.

class tml.Header(teemap, f=None)

Contains fileheader information.

Takes a file as argument, please make sure it is at the beginning. Note that the file won’t be rewinded!


Write the header itself in tw map format to a file.

It calculates the item sizes. Every item consists of a special number of ints plus two additional ints which are added later (this is the +8). There is allways one envpoint item and one version item. All other items counted.

item module

class items.Item(type_num)

Represents an item.

class items.Version(item)
class items.Image(item)

Represents an image.

class items.Envelope(item)

Represents an envelope.

class items.Group(item=None)

Represents a group.


Creates the group optimised for the background.

class items.Layer(item)

Represents the layer data every layer has.

class items.TileLayer(item=None, game=0, width=50, height=50)

Represents a tile layer.


Property for height.

This is necessarry to rearrange self.tiles corresponding to this value.


Property for width.

This is necessarry to rearrange self.tiles corresponding to this value.

class items.Tile(index=0, flags=0, skip=0, reserved=0)

Represents a tile of a tilelayer.

class items.QuadLayer(item=None)

Represents a quad layer.


Adds the default background quad to the layer.

class items.Quad(points=None, colors=None, texcoords=None, pos_env=-1, pos_env_offset=0, color_env=-1, color_env_offset=0)

Represents a quad of a quadlayer.

class items.Envpoint(info)

Represents an envpoint.

Table Of Contents

Previous topic


Next topic

The Teeworlds map format

This Page