Skip to content

Releases: AristurtleDev/monogame-aseprite

[HotFix] Version 4.0.3

26 Feb 04:11
Compare
Choose a tag to compare

This is a hotfix release to resolve the following issues:

  • Fixed crash in TextureAtlas.FromRaw where loop for slices used incorrect iterator. (Closes #52)

[HotFix] Version 4.0.2

22 Feb 07:14
ad328d4
Compare
Choose a tag to compare

This is a hotfix release to resolve the following issues:

  • Fixed XML docs not included in NuGet leading to no intellesense. (Closes #44)
  • Fixed RawTexture.Height property being internal by making it public (Closes #45)

Version 4.0.0 Release 🥳🥳🥳

21 Feb 18:09
989be9f
Compare
Choose a tag to compare

Version 4.0.0 Is Here

This version was pretty much a complete rewrite of the entire library from the ground up.

PLEASE NOTE THIS IS A NON-BACKWARDS COMPATIBLE RELEASE
Please read the documentation at https://monogameaseprite.net to get started.

Versin 3.1.1 Release

21 Nov 16:17
2e39789
Compare
Choose a tag to compare

This release is a quick hotfix to resolve the following issues

  1. AnimatedSprite.Width and AnimatedSprite.Height both now take the Scale value into account before returning the value.
  2. AnimatedSprite.TryGetCurrentFrameSlice now takes the scale value into when creating the SliceKey value.

Get via nuget dotnet add package MonoGame.Aseprite --version 3.1.1

Version 3.1.0 Released

29 Aug 01:44
Compare
Choose a tag to compare

This add support for .NET 6.0 and MonoGame 3.8.1

Going forward, this will only support the current .NET version and current MonoGame version.

Get via nuget dotnet add package MonoGame.Aseprite --version 3.1.0

Version 2.0.5 Released

04 May 05:33
de4da89
Compare
Choose a tag to compare

This release is a quick hotfix to resolve issue #31: Alpha Premultiply Not Applied. When generating Color values, they are done so using alpha premultiplication. This is to align with the default expectation in MonoGame. When calling SpriteBatch.Begin() the default constructor and average user will not be specifying a BlendState so by default premultiplied is expected.

Please refer to the documentation website for how to use this library.

What's Changed

New Contributors

Full Changelog: 2.0.4.1...2.0.5

Version 2.0.4.1 Release

25 Jan 01:04
22c7a1d
Compare
Choose a tag to compare

This marks the release of version 2.0.4.1.

Change Log

  • Fixed issue where OnAnimationEnd was invoked during the AnimatedSprite.Stop() method, but was not properly checked for null before invoking. (reference issue #21)

Please refer to the documentation website for installation, migration, and usage documentation.

Version 2.0.3 Release

12 Dec 20:58
017e3ae
Compare
Choose a tag to compare

This marks the release of version 2.0.3. Please refer to the documentation website for installation, migration, and usage documentation.

2.0.2-beta Release

10 Dec 17:52
Compare
Choose a tag to compare
2.0.2-beta Release Pre-release
Pre-release

With the 2.0.2-beta release, support for MonoGame 3.7.1 (.NET Framework >= 4.5) has been added.

Please refer to the documentation site for how to install and use update at
https://manbeardgames.com/monogame-aseprite

2.0 Alpha Build

08 Dec 04:13
Compare
Choose a tag to compare
2.0 Alpha Build Pre-release
Pre-release

Currently documentation hasn't been written for the 2.0 release. The following serves as a quickstart guide

Quick Start Guide

Download

Download the MonoGame.Aseprite.2.0-alpha.zip file below. It contains the Monogame.Aseprite.dll and MonoGame.Aseprite.ContentPipeline.dll files. Extract these somewhere on you computer where you can remember

Alternatively you can clone the repo and build it yourself. To do this, you'll need to ensure you're in the tags/2.0-alpha of the repo. The following commands should do it all for you

  1. Clone the repository with: git clone https://github.com/manbeardgames/monogame-aseprite.git
  2. cd to the repo directory with: cd monogame-aseprite
  3. Switch to the 2.0-alpha tree with: git checkout tags/2.0-alpha You'll get a message about the HEAD being detached. This is normal
  4. Initialize the submodules with: git submodule update --init

Add Pipeline Reference

  1. Open the Content.mgcb file for your project with the Content Pipeline Tool.
  2. In the Content Pipeline Tool, click "Content" in the project panel.
  3. Scroll down to "References" in the Properties panel and click it to open the Reference Editor dialog
  4. Click the "Add" button and locate the MonoGame.Aseprite.ContentPipeline.dll file to add it.
  5. Click Ok.

Add Project Reference

With your project open in Visual Studio:

  1. Right-click your project in the Solution Explorer panel and select Add > Project Reference. This may just be Add > Reference... if using VS 2017. This will open the Reference Manager dialog window.
  2. Click the Browse button at the bottom
  3. Navigate to and select the MonoGame.Aseprite.dll file to add it.
  4. Once added, click OK to close the Reference Manager dialog window.

Using MonoGame.Aseprite

To use this tool, first add a new .ase/.aseprite file to your project using the Content Pipeline tool. When you select the file in the content pipeline tool, you should see in the Properties panel that it is using the Aseprite Animation Importer and Aseprite Animation Procesor for the importer and processor respectively. Click the save button and you can close the pipeline tool now.

In your project, to load the content in, you do so like any other content, with the following command

// Lets say we added the file player_animations.aseprite
AsepriteDocument doc = Content.Load<AsepriteDocument>("player_animations");

Doing this will create the AsperiteDocument object that has all the information from importing the aseprite file, including a Texture2D that you can use for rendering. The texture that is generated is a spritesheet of all the frames from the aseprite file. To get the boundries of the frames within the spritesheet, you can use the AsepriteDocument.Frames property. If you aseprite file had animation tags defined, they are in the AsepriteDocument.Tags property, which is a Dictionary where the key is the name of the animation.

MonoGame.Aseprite also come with an out-of-the-box AnimatedSprite class that you can use to create animated sprites from the AsepriteDocment. To use this, just pass the document into a new instance of the class like so

AsepriteDocument doc = Content.Load<AsepriteDocument>("player_animations");
AnimatedSprite _sprite = new AniamtedSprite(doc);

Note that for theAnimatedSprite class to function properly, you have to create animation tags in the Aseprite file as it relies on this to parse correctly. For more information, see the Aseprite documentation at https://www.aseprite.org/docs/tags/

Then when you want a certain animation to play, just use the .Play(string) method, and give it the name of an animation tag from your file.

sprite.Play("animation_tag_name");

Take a look at the AnimatedSprite class to see what properties and methods are available.
You can also take a look at the monoagem-aseprite-demo project to see a working example of some of the things you can do.