Game Development Community

Runtime Sprite Manipulation

by Brandon Haston · in Torque X 2D · 12/22/2008 (10:39 pm) · 3 replies

I have a series of animation sequences for a character and I'm trying to keep the game's size down to a minimum. One of the ideas I have to achieve this is to store only half of the total sprites as physical data.

All sprites face a single direction (left). The idea here is to flip the sprites and save it as as a new animation in memory that the game can then use when the person moves to the right.

I'm not quite sure how I'd achieve this in Torque X though (I'm so used to C++ and heavily reliant on STL :( )

Any thoughts?

#1
12/23/2008 (2:18 am)
I think the platformer kit does SceneObject.FlipX = true; Which will draw the sprites facing left.
#2
12/23/2008 (9:54 am)
Exactly. Like Vishal says, you don't do anything with the animation itself. But you can vertically and horizontally flip the animated sprite scene object (which results in a flipped animation playback).

John K.
#3
12/23/2008 (12:01 pm)
Interesting. Thanks guys :)