Jump to content
  • Advertisement
Sign in to follow this  
NDD

Is a script driven 2d animation possible? :-)

This topic is 4135 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'am working for a 2D game with lots of visual effects : many star-like sprites flying here and there via some manually adjusted tracks. The animation progammming is quite a hard work for me, especially when you need to recompile and restart the whole game to see the effects. To make things worse, the artists often need some thing more or different than my original thoughts. So I just Imagine there can be some script driven anmation editor: the artist use the script to control the sprites supplied by C++ Rendering Engine. The script can be simply modified or even rewrite during runtime. Thus the artist can make the effect himself/herself, and I only need to integrate the script driven animation from the script editor to the real game client.Also,we have a similar example like cg shaders editor. Use script to modify UI and AI is common today.But is that also possible to implement such a script based rendering progamme? First of all, will the framerate drop too low or memory cost too much? What kind of script will fit that task? Need your suggesions and hints:-) BTW,all 2d animation in the game implement a 'abstract animation interface' of c++, so a uniform interface is not a problem.

Share this post


Link to post
Share on other sites
Advertisement
I would make it data driven rather than script driven. That way it will run fast in a native data-structure but still have the advantage of not needing a re-compile. The data format required may be hard to work out however. If needed scripts could be executed at certain points (collisions, after a time etc.) but I believe that scripts shouldn't be called every frame.

Share this post


Link to post
Share on other sites



Yes, scripts can be very useful depending on how your game works.

If you have figures with many seperate sets of action sequence frames (ie- walk, turn, swing sword, sword miss, sword strike, die, jump...) especially of there are
variations with slightly different results. Also, if you have sound or other effects that have to be coordinated with the actions.

Then it is very useful to use scripts to control the sequencing. The animation frames are indexed and you have commands like PlayFrames(100,150) and PlaySound("thud"). Some figure anminations even have seperate animation for different biody parts to eliminate the combinatoric explosion (swingin the sword while running, walking, standing still, jumping....).

Most scripts like this dont do alot of number crunching, so the fact that many run 20x slower than native code isnt too significant.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!