Game Development Community

Animation Script

by rennie moffat · in Torque Game Builder · 08/18/2009 (6:19 pm) · 1 replies

I am currently studying the PlatformerAnimation tut
tdn.garagegames.com/wiki/T2DScript/PlatformerPlayer
and have some questions, none being, does this tut actually work?


but here are my questions
a. I am asked to define my player states. Each animation state must be declared, ex. player run, player stand run, run jump etc.
It says to declare them in the player.cs. I put mine in the onLoad function.
example code
$playerStandState = new ScriptObject() { animation = playerStandAnimation; };
$playerStandRunState = new ScriptObject() { animation = playerStandRunAnimation; };
$playerRunState = new ScriptObject() { animation = playerRunAnimation; };
is this a good way, or is this old and irrelevant style of programming animations?





b. it also asks me to declare a playerState, playerReset and createPlayer functions. Are these good practices? The reason I ask is because I have never seen them in more popular tuts.



thanks.

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.