Table of Contents

Examples Overview

The AsepriteFile instance that is created when you load your Aseprite file contains the raw data of hte Aseprite file. The information contained within this isntance is structured similar to how it is in Aseprite. The information is granular and needs to be transformed into a more meaningful type that can be used in your MonoGame game.

Thsi is where the power of the MonoGame.Aseprite library comes into play. It provides several out-of-the-box types to handle these scenarios for you. While they may not cover eery scenario, they have been designed to cover most.

Caution

If you plan to work only with the AsepriteFile and not use the utility types from the MonoGame.Aseprite library provided, it might be more beneficial for you to use the AsepriteDotNet base library instead.

MonoGame.Aseprite Types

The following table provides a summary of each type provided in MonoGame.Aseprite and a link to the documentation showing an example of using that type in your game project.

Type Summary
Sprite A Sprite represents the texture created from a single frame in an Aseprite file.
TextureAtlas A TextureAtlas contains all frames from the Aseprite file packed into a single Texture2D with defined TextureRegions that provide the source rectangle for each frame.
SpriteSheet A SpriteSheet contains a TextureAtlas along with all of the animations based on the tags from the Aseprite file. From here you can create AnimatedSprite instances for your animations.
Tileset A Tileset contains a single tileset from the Aseprite file.
Tilemap A Tilemap represents a tilemap created from the tilemap layers of a single specified frame in the Aseprite file.
AnimatedTilemap An AnimatedTilemap represents a tilemap that animates over multiple frames from the Aseprite file.