Oriented animation for sprites

Hello everybody.

I was working on a small game, and when i realized how hard it is to find low poly char (for rts) i decided to create a small library to handle sprites.

My work on this library is not over (far from over actually), but it’s enough to share it with you to have feedbacks on it.

Some screenshots (for a reason that i don’t know, my fps are capped to 150)

here is 5000 units.

here is an exemple where the camera is rotating around the axis Y. The cube is here to check the orientation of the camera (to check if the sprite is rotating correctly).

Here you have the source code + 2 assets i used

Now, let’s be a bit more technical.
The point of this library is to provide a way to display sprite as easily as 3D object. When you rotate the sprite, the correct image is used. + you can load animations.

Right now, you have only 1 way to load animations, and it only works with rpg maker xp style character image.
I will maybe add other type of image, it’s not really hard.

For the angle : right now, you cannot change the angle of the sprite, but when the camera move the sprite take the right image.
You can either load each animation file individually (so 1 texture will be created for each animation) or load all of them at the same time and a big texture file will be created.

This is not the final version, of course.

I think that it could be interesting to have a way to tranform a 3d object + its animation into such a collection of sprites to replace far objects with their sprites. A kind of LOD where far objects become quads.

Right now, only the angle around the Y axis is used by the orientedanimation. Acutally, i don’t know how to split the surface of a sphere in a usable way.

If you don’t understand something, if something is not working, if you have advice or anything to say, please do.

About nothing : the plugin “imagepainter” is broken : when i try to use it i get an exception saying “methodnotfound” for the getWidth on imageraster. I can provide a full log, but it seems that imagepainter is using a method that imageraster don’t have now.


Imgur is better for sharing images. I cba to click through on all the mega links, with imgur you can embed them directly.