Game Development Community

Player Movement (isometric)

by Andrey-Gr · in Torque Game Builder · 02/06/2012 (10:13 am) · 8 replies

Hello!
Please help me to figure out better way to implement isometric character movement, identical to Arena Shooter Tutorial at sites.google.com/site/soyouwanttomakeanarenashooter/tutorial-1
in that tutorial for Torque X, they using C#, AnimatedCharacterComponent.cs for character movement and sprite animation

How to implement similar in Torque 2D? Should I use C++ or script behaviors?
Please point me from where to start and to look for? also why they using C# instead of Torque Script behaviors?


#1
02/06/2012 (5:50 pm)
I would suggest implementing in T2D using behaviors.

As far as why they used C# instead of TorqueScript, I don't know the motivation. I know in T2D C++ code runs faster than TorqueScript. Maybe that is true as well for TorqueX2D? It could be as simple of a reason as that version of TorqueX2D not having behavior support.

As an aside, I'm kind of interested in this type of project so I'll look into converting the tutorial examples into behaviors in my spare time. No promises though, I don't have much time to mess around these days.
#2
02/10/2012 (7:35 am)
Hello guys!
When adding BehaviorField by %template.addBehaviorField,
how can I add dropdown list with Animated Sprites object names, like when you do keybind and list of keyboard keys?
#3
02/10/2012 (12:20 pm)
@Andrey - Use the object type:

%template.addBehaviorField(Target, "Target object", object, "", t2dAnimatedSprite);
#4
02/10/2012 (8:33 pm)
@Michael, thank you for the assistance.
I tried this already, but I'm getting only "None" and nothing else in dropdown list :(
#5
02/11/2012 (6:29 am)
@Andrey-Gr - Sorry, I should have mentioned that the animated sprite needs to already be in your scene. Otherwise, it will not show up in the dropdown list.
#6
02/11/2012 (7:00 am)
@Michael, not working :( still "None" even after I recreated and added animation sprites to the scene
#7
02/11/2012 (7:08 am)
Did you give the sprite a name? Go down to the Scripting rollout section and name it.
#8
02/11/2012 (7:12 am)
@Michael, certainly not :), Thanks a Lot!