C / C ++: 2D animation library

I need to write an application that (among other things) displays 2D animated images, let's say it's a video game.

It turned out that video game images can have a rather complex structure, which very little depends on the program logic, mainly on the image itself:

  • It can have several animations (one for each state on which the object can be drawn)

  • To transition from state to another, there may be acyclic animation.

  • Each animation can be made of several frames, each of which has a duration.

Also, the method of storing images on disk can be complicated:

  • The above properties of the image, its states and its frames should be stored in the data file associated with the image, and not in the hard code in the program source.

  • Different frames can be combined into the same image file or at different levels of the image file or into different image files.

  • Background pixels can be displayed through a split bitmask or using a specific color.

And I think that for real video games you will need much more parameters that I don’t have (I don’t know, another bitmask to identify the pixels that need to be replaced with the color of the command or something else).


This makes me think that there should already be a library that does all this. But half an hour on google did not help me.

Is there any open source 2D animation library for C ++ or C?

, , 2D- ( )? API , .

+3

Source: https://habr.com/ru/post/1775244/


All Articles