#1 Members - Reputation: 126
Posted 07 October 2012 - 08:40 AM
1) Are scripting languages faster than C# for animations? Is that why we would want to use them?
2) Is this only for time/movie like animations and not animations that require input (such as pressing up to animate my sprite to move up compared to a cut scene that plays regardless of input).
3) Good, possible, and best scripting lanuage to use for animation?
Thanks!
#3 Members - Reputation: 368
Posted 14 October 2012 - 12:38 AM
Scripting language won't be ever faster than language you're running the script on.
Scripting language is being interpreted on the fly, so why would it be faster?
Just implement these animations in C#.
#4 Members - Reputation: 693
Posted 14 October 2012 - 10:10 AM
LuaJIT can match and in some cases beat C code, not that it matters if your limiting factor isn't the execution speed of the script, but the time you have to put things together, and the ease in creating, debugging, maintaining and expanding it. Also, some scripting languages provide partial or full AOT compilation.Scripting language won't be ever faster than language you're running the script on.
Scripting language is being interpreted on the fly, so why would it be faster?
Just implement these animations in C#.
1) depends on how you define "faster", if you mean execution speed, then there aren't many languages equal to (or faster) than full or partial AOT compiled code (you can actually use C# for scripting via Mono, speed is really dependant on the JIT/VM engine behind the code), C# is actually JIT'ed in many cases.1) Are scripting languages faster than C# for animations? Is that why we would want to use them?
2) Is this only for time/movie like animations and not animations that require input (such as pressing up to animate my sprite to move up compared to a cut scene that plays regardless of input).
3) Good, possible, and best scripting lanuage to use for animation?
You won't use them cause they run faster unless your problem is execution speed, you'd use them because they make development easier and simpler, as an example, Naughty Dog has an old presentation around on a customed Perl VM (not even JIT'ted) that they used to handle events and trigger animations, sequences and other things.
2) this pretty much depends on the answer to 1, there are entire 2D engines that run on top of a script VM, and run pretty well, it depends on your needs.
3) thats like asking whats the best car to drive, its very subjective, and depends on your needs and requirements, in your case, it needs to be able to integrate with C#, this cuts out a few things, but also opens up other things, like IronPython and IronLua.
Edited by Necrolis, 14 October 2012 - 10:23 AM.






