Game Development Community

How hard would it be to move up and down, not just left and right?

by Matt H. · in Torque X Platformer Kit · 10/19/2009 (4:45 pm) · 0 replies

There was a behavior in TGB by Michael Baily, http://www.garagegames.com/community/resources/view/16693, that added the functionality of changing the animation depending on the direction the sprite was facing.

This aloud for 8 different running animations depending on which way the sprite was facing. N,S,E,W,NE,NW,SE,SW.

I love the PlayerActorComponent that the Platformer Kit comes with. It does a very similar job in letting the user change animation depending on which way the sprite is facing, jumping, idle, etc. Among MANY other things.

My question is this:

How hard would it be to add/change the functionality of the PlayerActorComponent to allow for 360 degrees of movement? Say for a semi top down shooter, or something akin to Double Dragon(slightly modified side scroller).

I would love to have the functionality of changing the animations of the PlayerActorComponent but have the movement based off of the normal MovementComponent that is in the basic 2DStarter Template.

Is this a relatively easy endeavor or would it require a complete rewrite of the two components? Forgive me, I'm very new to the programming side of things. I'm still struggling with trying to wrap my head around how different methods and class's talk to each other.

Also, as a side note. If anyone has any insights that they could share for beginner programmers that might shed some light on this, that would rock! I can go though most of the code line by line and tell you what that line of code is doing, but when I have to write it myself or try to inherit from some other class or method I'm at a total loss. I understand the basics pretty well, but don't quite grasp how to get different methods and class's talking to each other.


Any help would be greatly appreciated!