Rotate image
by Joao Caxaria · in Technical Issues · 11/18/2008 (3:54 am) · 3 replies
Hi Guys,
I'm doing a sample card game and I've done a small sprite with all the cards and imported that sprite into TGB, setting the image mode as CELL, etc. Everything is working fine for the basic stuff.
Right now, when the user clicks on a card, I immediately 'flip it' (change the image from the back sprite to the card image). I wanted to know if anyone did some script to flip it, where it would seem that the card was really turning on it's back.
One solution would be to build the animation - it's a simple effect, even using the free paint.net - playing it when clicked, etc, but that would make my sprite much bigger.
Thanks!
I'm doing a sample card game and I've done a small sprite with all the cards and imported that sprite into TGB, setting the image mode as CELL, etc. Everything is working fine for the basic stuff.
Right now, when the user clicks on a card, I immediately 'flip it' (change the image from the back sprite to the card image). I wanted to know if anyone did some script to flip it, where it would seem that the card was really turning on it's back.
One solution would be to build the animation - it's a simple effect, even using the free paint.net - playing it when clicked, etc, but that would make my sprite much bigger.
Thanks!
About the author
#2
11/18/2008 (7:55 am)
Not to reply to my own post, but TGB does have limited support for 3D objects as well. you could probably make a billboard and just apply the sprites as textures. Then flipping those images would give you proper isometric scaling as they rotate rather than the squeeze-and-stetch approach I mentioned above.
#3
Yeah, the scaling of the sprites would be a nice one but the squeeze effect kind of ruins it :D
Your 3D suggestion, however, it's quite interesting. Performance wise, do you have any idea if its better to do the 3d object with the 2 textures or create a animation for each card that simulates the 3D?
I'm developing for the iPhone - currently not actually deploying in the device, just simulating - and I would like to avoid any known performance killers that the community may be aware of...
11/18/2008 (8:07 am)
Hi Brian,Yeah, the scaling of the sprites would be a nice one but the squeeze effect kind of ruins it :D
Your 3D suggestion, however, it's quite interesting. Performance wise, do you have any idea if its better to do the 3d object with the 2 textures or create a animation for each card that simulates the 3D?
I'm developing for the iPhone - currently not actually deploying in the device, just simulating - and I would like to avoid any known performance killers that the community may be aware of...
Torque Owner Brian Wilson
Once the TDN is back online full, I'll look for the specific command for scaling a sprite.