Skip to content

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

License

Notifications You must be signed in to change notification settings

cherrybit-studios/combustile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

If you have questions, join our Discord and reach us there :)


About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published