Jump to content

  • Log In with Google      Sign In   
  • Create Account

2D Animation Scripting


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Valgor   Members   -  Reputation: 126

Like
0Likes
Like

Posted 08 October 2012 - 05:32 PM

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!

Sponsor:

#2 greenvertex   Members   -  Reputation: 510

Like
6Likes
Like

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.

#3 RevenantBob   Members   -  Reputation: 119

Like
0Likes
Like

Posted 10 October 2012 - 02:04 PM

I found using scripting for animations is better than an animation data format. It tends to give more control and there always ends up some state you want to pull off your format doesn't allow.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS