Combustile

style: very good analysis Powered by Mason License: MIT

A simple tile system, that provides a declarative API, with Flame Component System in mind

Installation 💻

❗ In order to start using Combustile you must have the Flutter SDK installed on your machine.

Add combustile to your pubspec.yaml:

dependencies:
  combustile:

Install it:

flutter packages get

How to use it

To create a tiled map with combustile, you first need to a TiledMap containing a tileset, example:

final tilesetImage = await images.load('tileset.png');
final tileset = Tileset(
  image: tilesetImage,
  tileSize: 16,
);

final map = TiledMap(
  size: Vector2(15, 10),
  tileset: tileset,
  objects: [],
);

Then you can fill your map with different objects. Objects are classes that uses tiles from the tileset to create components for you game.

Which object has a different type of technique, RepeatObject for example will repeat a given tile inside its area, while SingleObject will use a single tile to renders its full size.

Check our example for a more complete example.


GitHub

View Github