Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Tile Set

TileSet

TileSet represents a collection of tiles and associated metadata. Access via the 'tilemap' submodule.

Properties


NameDescriptionType
first_gidFirst global tile id (GID) in this tileset.int
last_gidLast global tile id (GID) in this tileset.int
nameTileset name.str
tile_sizeSize of tiles in pixels.Vec2
spacingPixel spacing between tiles in the source image.int
marginPixel margin around the source image.int
tile_countTotal number of tiles in the tileset.int
columnsNumber of tile columns in the source image.int
tile_offsetPer-tile offset applied when rendering.Vec2
terrainsTerrainList of terrain definitions.TileSet.TerrainList
tilesTileSetTileList of tile metadata entries.TileSet.TileSetTileList
textureSource texture for the tileset.Texture

Methods


Has Tile

has_tile(id: int) → boolhas_tile(id: int) → bool

Check whether a global tile id belongs to this tileset.

Args

  • id : Global tile id (GID).

Returns

bool : True if the tileset contains the tile id, False otherwise.

Get Tile

get_tile(id: int) → TileSet.Tileget_tile(id: int) → TileSet.Tile

Retrieve tile metadata for a given id.

Args

  • id : Global tile id (GID).

Returns

Tile : The tile metadata, or None if not found.

PreviousTileResult (TileLayer)
NextTimer

On this page

PropertiesMethodsHas TileGet Tile