Chapter 17. API reference overview

Table of Contents

Overview

Tilengine uses eight types of elements, arranged in two groups:

Functions by category

Setup & run

This section shows the basic functions to initialise, manage and query Tilengine. Read at least the functions TLN_Init, TLN_SetRenderTarget and TLN_UpdateFrame

Windowing & user input

Tilengine is designed to act as a back-end renderer for other gaming environments, but it has a built-in windowing system for easy setup and testing without having to rely on user provided components. Read at lest the functions TLN_CreateWindow, TLN_ProcessWindow, TLN_DrawFrame and TLN_GetInput (for user input)

Background layers

Layers represent the scrolling planes (or backgrounds) composed of square tiles. A layer must be assigned a tileset, a tilemap and optionally a palette. Read at least the functions TLN_SetLayer and TLN_SetLayerPosition

Sprites

Sprites represent the movable objects that are not part of the backgrounds and where the gameplay occurs. A sprite must be assigned a spriteset and optionally a palette. Read at least the functions TLN_ConfigSprite, TLN_SetSpritePicture and TLN_SetSpritePosition.

Animations

Animations represent the built-in sequencers that play sequences. An animation must be assigned a sequence and one of the following: a layer (for tileset animation), a sprite (for sprite animation) or a palette (for color animation). Read at least the functions TLN_SetSpriteAnimation, TLN_SetTilemapAnimation and TLN_SetPaletteAnimation.

Tilesets

Tilesets are the building blocks of the backgrounds, the individual tiles themselves packed together. They are loaded at runtime from Tiled tsx files with the TLN_LoadTileset function.

Tilemaps

Tilemaps are a gird layout of tiles (from a tileset) that form a background. They are loaded at runtime from Tiled tmx files with the TLN_LoadTilemap function.

Spritesets

Spritesets are collections of related individual images for sprites grouped together inside a big picture, for example all the animation frames of the main character. They are loaded at runtime from png/txt pairs with the TLN_LoadSpriteset function.

Palettes

Palettes are the color tables used by the graphics in layers and sprites. They can be loaded at runtime from standard adobe *.act* files with the function TLN_LoadPalette, retrieved from tilesets with TLN_GetTilesetPalette or from spritesets with TLN_GetSpritesetPalette.

Sequences

A sequence is a serie of frames played in succession at a given speed by an animation. They can be loaded at runtime from *.sqx* files (xml) with the TLN_LoadSequencePack function.