4-way sprite animation tutorial?
by amaranthia · in Torque Game Builder · 09/01/2006 (2:14 pm) · 6 replies
Hi, I was wondering if there is a four-way sprite animation tutorial out there? I have a chicken that I want to wander around on screen in a random direction (left, right, up, down). I need something I can apply to 40 different sprites that can have the same movement... It seems a datablock is the best way to do this, but as a newbie, I'm not sure how to set one up for four-way movement.
#2
09/01/2006 (6:44 pm)
Awww, thanks! I've already got my chicken, but I'm trying to figure out how to save some time. My problem is that I have 40 different creatures and if I have to set the animation for each of them by hand... well, I'm just not going to do that. Wayyyy to much work! I did see another topic with info on setting up 4-way movement, but now I'm wondering... how can I use a script to grab a png with a creature animation in it and dynamically generate an animation based on an animation template... If anyone has an idea about how to do this, let me know! :)
#3
1 each static graphic of the character facing north, east, south, and west
1 each animation of the character walking north, east, south, and west.
I would imagine that when velocity is set to 0 (zero), your character's direction would need to be established, and the static sprite for that direction is displayed. When the velocity does not equal 0, determine the direction your character is standing and display the animated sprite for that direction.
I am new to TGB, and was planning to start attacking my main character movements with this method at first, if it is possible, or even practical.
Any help would be appreciated!!
Johnny
09/05/2006 (9:35 pm)
Are you looking to make your character move like Link in the original Zelda? I am looking for a method to do this also. Without knowing how to do it yet here is what I was planning to try first:1 each static graphic of the character facing north, east, south, and west
1 each animation of the character walking north, east, south, and west.
I would imagine that when velocity is set to 0 (zero), your character's direction would need to be established, and the static sprite for that direction is displayed. When the velocity does not equal 0, determine the direction your character is standing and display the animated sprite for that direction.
I am new to TGB, and was planning to start attacking my main character movements with this method at first, if it is possible, or even practical.
Any help would be appreciated!!
Johnny
#4
Secondly,
You could then use something like getDirectoryList() to retrieve a list of the PNG's in your ./data/images/monsters/ directory and then assign each of them to there own t2dImageMapDataBlock() and then create 4 new instances of the mob????? objects and assign each to the imagemap just created.
I've not really tested this theory, but I see no reason why it would not work (I suppose I could write some code to see if it does work :))
09/06/2006 (6:05 pm)
@Amaranthia, first, let me start by saying I loved Aveyond.Secondly,
new t2dAnimationDatablock(mobNorth) {
animationFrames = "0 1 2 3";
animationTime = "1";
animationCycle = "1";
randomStart = "0";
startFrame = "0";
};
new t2dAnimationDatablock(mobSouth) {
animationFrames = "4 5 6 7";
animationTime = "1";
animationCycle = "1";
randomStart = "0";
startFrame = "0";
};
// repeat for East/West/NE/SE/NW/SW, etcYou could then use something like getDirectoryList() to retrieve a list of the PNG's in your ./data/images/monsters/ directory and then assign each of them to there own t2dImageMapDataBlock() and then create 4 new instances of the mob????? objects and assign each to the imagemap just created.
I've not really tested this theory, but I see no reason why it would not work (I suppose I could write some code to see if it does work :))
#5
Wow! I can't believe that the maker of Aveyond is on the GG forums. . .sweet! Aveyond was quite a lovely game with great graphics, kudos! (I've only played the demo, though :)
Are you aware of the Animation builder in the level builder? That would definately be the most user-friendly method, but I noticed that the Mole Game used "@" to "add" strings together using the color of the mole + the desired animation.
btw---What did you use to make Arihman's(spelling?) Prophecy and Aveyond?
09/11/2006 (6:35 pm)
Amaranthia,Wow! I can't believe that the maker of Aveyond is on the GG forums. . .sweet! Aveyond was quite a lovely game with great graphics, kudos! (I've only played the demo, though :)
Are you aware of the Animation builder in the level builder? That would definately be the most user-friendly method, but I noticed that the Mole Game used "@" to "add" strings together using the color of the mole + the desired animation.
btw---What did you use to make Arihman's(spelling?) Prophecy and Aveyond?
#6
Nice to see another ex-"maker" on Torque, Amanda =)
09/13/2006 (6:30 am)
She was using RPG Maker (2000 and XP), pretty simple but cool program.Nice to see another ex-"maker" on Torque, Amanda =)
Torque Owner STEVENPANKRATZ
http://reinerstileset.4players.de/animalsE.htm#sp03