ToolBX.Spritebound 2.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package ToolBX.Spritebound --version 2.0.5                
NuGet\Install-Package ToolBX.Spritebound -Version 2.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ToolBX.Spritebound" Version="2.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ToolBX.Spritebound --version 2.0.5                
#r "nuget: ToolBX.Spritebound, 2.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ToolBX.Spritebound as a Cake Addin
#addin nuget:?package=ToolBX.Spritebound&version=2.0.5

// Install ToolBX.Spritebound as a Cake Tool
#tool nuget:?package=ToolBX.Spritebound&version=2.0.5                

Spritebound

Spritebound

Spritesheet and animation management for sprite-based projects.

The base package for Sprites is kept as generic as possible to be allowed to be used with any .NET engine or framework. Specific implementations will likely come eventually.

For now, this base package only includes container classes meant to be used as part of a larger animation system.

Static vs Animated spritesheet

StaticSpritesheets are used for inanimate sprite elements that are bundled under a single file. This could be tilesets, posters, items or UI elements.

AnimatedSpritesheets are used for animated sprite elements such as a character or a special effect.

Spritesheets have an ID property! What do I do with that??

It's up to you and your engine/framework. Jackal uses the ID internally because they are part of a collection and it's faster to look for a numeric ID than compare strings.

It's not ideal (and not very ToolBX-like, I admit) but you could just ignore it.

However, if you do want to use the ID property, the Spritesheet base class implements IAutoIncremented<int> which is part of the ToolBX.Unicity library. That library has an extension method to automatically "get the next available ID" in an IEnumerable<T> where T implements IAutoIncremented<int>.

SpritesheetMap

A map to a static spritesheet made up of sprites of equal size. Maps are automatically indexed by row from left to right.

Rough Trigger uses this for country flags and weapon icons among other things.

Events

Sometimes, you might need events to be triggered when a specific frame plays. This is what the FrameEvent class is there to achieve.

FrameEvent.Name is used to identify the event in-game. In other words; that name must be the exact same on both ends for it to be recognized.

FrameEvent.Origin is optionally used when your event also needs a position. This is usually reserved for things like when a gun is fired so that the game knows exactly where it's fired from.

Serialization

Both Newtonsoft.Json and System.Text are tested and supported but XML isn't.

Sprites.Jackal

Coming soon-ish : Complete animation system used in the Jackal 2D game engine.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ToolBX.Spritebound:

Package Downloads
ToolBX.Spritebound.Web

Spritesheet management for websites.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 100 9/27/2024
3.0.0-beta1 87 9/23/2024
2.2.0 188 1/13/2024
2.2.0-beta1 122 1/7/2024
2.0.5 222 6/19/2023
2.0.4 219 5/5/2023
2.0.3 167 5/1/2023
2.0.2 199 4/27/2023
2.0.1 253 3/10/2023
2.0.1-beta1 159 3/3/2023
2.0.0 379 11/12/2022
2.0.0-beta1 157 10/4/2022
1.0.4 411 10/4/2022
1.0.3 524 8/10/2022
1.0.2 530 8/7/2022
1.0.1 634 7/22/2022
1.0.0 415 7/3/2022