public class SpriteSheet

string json = File.ReadAllText(jsonPath); var data = JsonSerializer.Deserialize<SpriteSheetData>(json); Texture2D texture = content.Load<Texture2D>(data.Texture); var sheet = new SpriteSheet(texture, data.FrameWidth, data.FrameHeight); foreach (var region in data.Regions)

Option A: Simple manual load

Cache your Rectangle regions. The code above does this via Dictionary<string, Rectangle> .

public void AddClip(string name, string[] regionNames, float framesPerSecond, bool loop = true)

_sheet = sheet; _clips = new Dictionary<string, AnimationClip>();

Add 1-2px transparent padding between sprites to prevent texture bleeding (adjacent pixels bleeding into your sprite due to texture filtering). 5. Complete Example: Player Character public class Player

"texture": "characters/hero_sheet", "frameWidth": 32, "frameHeight": 32, "regions": "idle": "x": 0, "y": 0, "width": 32, "height": 32 , "walk1": "x": 32, "y": 0, "width": 32, "height": 32 , "walk2": "x": 64, "y": 0, "width": 32, "height": 32 , "jump": "x": 96, "y": 0, "width": 32, "height": 32