Code Monkey home page Code Monkey logo

spritefactory's Introduction

Sprite Factory

An open source sprite sheet animation editor.

Sprite Factory

What does it do?

I made Sprite Factory to solve a very specific problem. Sometimes you find awesome art on the internet and you want to animate it for your game.

Adventurer

credit: Eltan

You could always hand roll the animations in code but that can get tedious pretty quickly. Especially if you've got a lot of content to animate.

Or you could download Sprite Factory and spend a few minutes creating the animations and saving them as JSON files.

{
  "textureAtlas": {
    "texture": "adventurer.png",
    "regionWidth": 32,
    "regionHeight": 32
  },
  "cycles": {
    "idle": {
      "frames": [0,1,2,3,4,5,6,7,8,9,10,11,12],
      "isLooping": true
    },
    "walk": {
      "frames": [13,14,15,16,17,18,19,20],
      "isLooping": false
    }
  }
}

Then you can load them into your game** and get on with game development.

var spriteSheet = Content.Load<SpriteSheet>("Animations/adventurer.sf", new JsonContentLoader());
var sprite = new AnimatedSprite(spriteSheet);
sprite.Play("idle");

** The loading code above currently works in the develop branch of MonoGame.Extended

Wait, it's really open source and free?

There aren't many open source editor type tools around that use MonoGame under the hood. I thought it might be nice to have this as an example of what can be done. It's my hope that having the code open will inspire others to create more tools.

I have a few other ideas for tools in the works. If you like what I'm doing check out my patreon page for some other awesome things.

What's left to do?

The main problem with the tool right now is actually loading the files into MonoGame. I've written a basic loader in the develop branch of MonoGame.Extended but I've been struggling to get it working with the MonoGame Content Pipeline. I would love some help with this.

Right now the tool only works with this one specific type of sprite sheet layout. There's plenty of room for improvement to add more features to the tool for sprite sheets that are packed differently, or even add a texture packer to the tool itself.

spritefactory's People

Contributors

janfokke avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.