I posted this in the graphics section and recieved no replies, so maybe I'll have better luck here!
I've been working on a 2D RPG in XNA. While browsing tutorials and videos, I've heard them mention doing animation in a seperate script file. Since tutorials are always brief and never indepth, the following questions persist:
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?
4) Any other reason to use scripts in a game?
Thanks!
2 replies to this topic
Sponsor:
#2 Members - Reputation: 510
Posted 08 October 2012 - 06:05 PM
1) Are scripting languages faster than C# for animations? Is that why we would want to use them?
Mainly because they don't require two things: a deep knowledge of underlying game code in order to design and implement cut scenes (i.e. more designer friendly), and scripts do not require a recompile of all the game code in order to test a change.
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).
You can technically go as crazy as you want. That doesn't mean you should (reading a script to decide how to handle a particular player input, for example). Things that you can see changing or being added to frequently during development are good targets: level layout, cut scenes, puzzle interactions, etc. Good rule of thumb: if you see the work as more design-oriented, make it script-able.
3) Good, possible, and best scripting lanuage to use for animation?
Anything that has an interpreter for the language your game code is in. Beyond that, I don't know... Lua? Python? JavaScript? Your own (with an implementation of an interpreter of course)?
4) Any other reason to use scripts in a game?
Pretty much as above, anything that basically dictates behavior, can be read once and only once (not executed every update), and is subject to change is a good target.






