0 purchases
combustile
Combustile #
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:
copied to clipboard
Install it:
flutter packages get
copied to clipboard
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: [],
);
copied to clipboard
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.