ShiVa3D
animate 2d character
All about the StoneScriptanimate 2d character
by siml » 11 Jul 2012, 14:59
hi.
i want to animate a 2d character in Shiva.
should i use timer to animate it (change texture) or use onEnterFrame event?
i want to animate a 2d character in Shiva.
should i use timer to animate it (change texture) or use onEnterFrame event?
Re: animate 2d character
by Kwaung » 11 Jul 2012, 15:25
What you are using for your character animation, HUD system or a texture map to a plane?
If you use HUD timer, I have no idea about that.
But if you use the plane one. I suggest changing texture's UV will be more faster than change texture itself. And yes you need the animation system to update every frame. It up to your design that you will use Event's onLoop() or onEnterFrame().
I suggest that create one main AI to taking care of all animation update will faster than per object(character) basis.
If you use HUD timer, I have no idea about that.
But if you use the plane one. I suggest changing texture's UV will be more faster than change texture itself. And yes you need the animation system to update every frame. It up to your design that you will use Event's onLoop() or onEnterFrame().
I suggest that create one main AI to taking care of all animation update will faster than per object(character) basis.
- Kwaung
- Fresh Boarder

- Posts: 14
Re: animate 2d character
by siml » 11 Jul 2012, 15:48
my character animation is 2 second long,and 24 frame(24 texture).how can animate it in onloop while keeping normal movement?
Re: animate 2d character
by siml » 11 Jul 2012, 16:09
hi dear broozar.
i have so many character in my scene,doesn't it make game slow?
do i have define anim2DTimer for every character in scene?
i have so many character in my scene,doesn't it make game slow?
do i have define anim2DTimer for every character in scene?
Re: animate 2d character
by broozar » 11 Jul 2012, 19:53
"many" is a very relative term, not only depending on the actual amount, but on the target platform as well. you have to conduct tests on your own. of course, as always, using less objects is always better.
no, this hud action only tells the main ai when to animate. make sure you object.sendEvent() the animation from onAnimate in the main AI to every onAnimate event in every object you want to update though.
siml wrote:do i have define anim2DTimer for every character in scene?
no, this hud action only tells the main ai when to animate. make sure you object.sendEvent() the animation from onAnimate in the main AI to every onAnimate event in every object you want to update though.
6 posts
• Page 1 of 1

