flame_sprite_fusion 0.1.3+1 flame_sprite_fusion: ^0.1.3+1 copied to clipboard
Sprite Fusion support for the Flame game engine. This package parses and renders tilemaps exported from Sprite Fusion tool.
Adds support for parsing and rendering tilemap exported from Sprite Fusion directly in Flame engine.
Features #
Provides a component called SpriteFusionTilemapComponent
to easily load json exports from Sprite Fusion.
This component works exactly like any other Flame component and plays nicely with rest of the Flame
Component System (a.k.a FCS).
Getting started #
-
To get started, first add
flame_sprite_fusion
as a dependency in your flutter project.flutter pub add flame_sprite_fusion
-
Then place the
map.json
andspritesheet.png
exported from Sprite Fusion into theassets/tiles/
andassets/images/
directory of your project respectively. -
Finally load the map and spritesheet using
SpriteFusionTilemapComponent
in your game.
Usage #
// Load the map.
final map = await SpriteFusionTilemapComponent.load(
mapJsonFile: 'map.json',
spriteSheetFile: 'spritesheet.png'
);
//Add it to the game world.
world.add(map);
Additional information #
⚠️ Under the current sprite batch implementation, you might experience extra lines while rendering due to a bug in Flutter, see this issue.