flame

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 and spritesheet.png exported from Sprite Fusion into the assets/tiles/ and assets/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

:warning: Under the current sprite batch implementation, you might experience extra lines while rendering due to a bug in Flutter, see this issue.