Animator make your Sprites animation easy

Advanced game related topics
User avatar
microdevweb
Enthusiast
Enthusiast
Posts: 179
Joined: Fri Jun 13, 2014 9:38 am
Location: Belgique

Animator make your Sprites animation easy

Post by microdevweb »

Editing the 2014/10/03 New version with save option
Hello everybody,

I work more and more with modules because what's done is second to none, I create a module for the animation of 2D sprite: arrow: http://www.purebasic.fr/french/viewtopi ... =6&t=14803

I now develop software to manage your movies easily (in conjunction with the module)

Image

Everything is here : :arrow: http://www.alldev.be/ALLDEV_WEB/TUTO/An ... or_1.2.zip

You can play with sequences and change the frame rate for each sequence, the software can also be used when you draw your sprites to see the result directly. (Draw your animation as in the example of the zip).

Look the Freench post for more using another modules
:arrow: http://www.purebasic.fr/french/viewtopi ... =6&t=14803

In your games
Do not forget to include the module

Code: Select all

XIncludeFile "Animator.pbi"
to start the animation

Code: Select all

Animator::Start(IdAnimation)
In the loop of your games

Code: Select all

Animator::Animation(IdAnimation)
Look in the DeclareModule Animator for other opportunities

Here is hoping that it will be useful
Last edited by microdevweb on Fri Oct 03, 2014 12:40 pm, edited 1 time in total.
Use Pb 5.73 lst and Windows 10

my mother-language isn't english, in advance excuse my mistakes.
User avatar
Danilo
Addict
Addict
Posts: 3010
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Animator make your Sprites animation easy

Post by Danilo »

Nice, thanks microdevweb!

Just a small suggestion:
I think the field name "Frame Rate" is misleading. When setting it to 100, the animation
runs very slow (like a frame rate of 10 FPS). When setting it to 10 (because I wanted
a frame rate of 10 FPS), it runs at round about 100 FPS.
Looks like your 'frame rate' is the delay time between frames. 10 FPS = 100ms delay,
and 100 FPS = 10ms delay.

Next thing to add is saving and loading the Animator state, isn't it? ;)
So you could continue to add new sequences later. Maybe save as XML or JSON.

The dialog box 'Copy the code of the clipboard' is too small. I cannot see the example text.
I see:
1) "Enter the Name of sprite (ex:"
2) "Enter the name of Animation (ex:"
I think the title should be "Copy code to clipboard"
User avatar
microdevweb
Enthusiast
Enthusiast
Posts: 179
Joined: Fri Jun 13, 2014 9:38 am
Location: Belgique

Re: Animator make your Sprites animation easy

Post by microdevweb »

Hello Danilo,

That's right, this is the time for delay. Therm my English is not always correct, because my language is French. I will correct this in a future release.
Use Pb 5.73 lst and Windows 10

my mother-language isn't english, in advance excuse my mistakes.
User avatar
Kuron
Addict
Addict
Posts: 1391
Joined: Sat Oct 17, 2009 10:51 pm
Location: Nashville

Re: Animator make your Sprites animation easy

Post by Kuron »

Looks VERY nice. I am still trying to wrap my head around modules. :|
User avatar
microdevweb
Enthusiast
Enthusiast
Posts: 179
Joined: Fri Jun 13, 2014 9:38 am
Location: Belgique

Re: Animator make your Sprites animation easy

Post by microdevweb »

Hello Kuron,

The module are not very complicated. It's just a big box or are encapsulated all variables. Just look at the declarations is the most important part for the user
Use Pb 5.73 lst and Windows 10

my mother-language isn't english, in advance excuse my mistakes.
Post Reply