Posted: 4th Oct 2011 3:12
Does anyone know if it is possible to turn a text string into a sprite using AppGameKit?
Posted: 4th Oct 2011 13:40
I am not sure why you need to text objects are treated in much the same way.
Posted: 4th Oct 2011 15:04
I am not sure why you need to text objects are treated in much the same way.

Can you apply physics and rotations to text objects? (aside from using them to put simple text on screen, I haven't played with them much).
Posted: 4th Oct 2011 15:31
Can you apply physics and rotations to text objects? (aside from using them to put simple text on screen, I haven't played with them much).

No I don't think you can add physics but I think you can rotate them... yes (just checked), you can even rotate individual characters in a string

But for physics you would have to create an image in an editor and turn physics on.
Posted: 5th Oct 2011 23:09
baxslash, how do you suggest rotating the whole text? I only found code to rotate individual characters in the textobject.
Posted: 6th Oct 2011 4:30
What I'm trying is to display a dynamically generated text right in front of a sprite to make it seem as the text is actually printed on the object.

Literally, I want to have a mathematical operation printed on a bomb. The player would have to solve the operation before the bomb reaches the ground... But I'm still in trouble regarding the text right in front of the bomb... Any ideas?
Posted: 6th Oct 2011 10:42
@jomajuga, just use the "setSpriteDepth" and "setTextDepth" commands giving the text a smaller value. This will put the text in front of the sprites. At default text is set at a depth of 9 which should be in front of other sprites unless you have edited the sprite depth.

@Impetus73, You're right, only individual characters can be rotated. There's an enhancement request for the board. If I get time later I'll add it. In the mean time you'd have to place characters individually too which is a real pain! Not impossible though. Might make a handy code snippet.

Rotating individual characters does make it possible for text to follow a curve / angle or just look more 'jumbled' though which is cool...
Posted: 6th Oct 2011 15:36
Sinus scrolls!

I guess with clever rotation and displacements of each individual characters, and plotting them around a circle like planets in a solar system, one can get a rotated text, but it would eat alot of processor cycles.
Posted: 7th Oct 2011 3:47
Thank you, I will prove with the properties of the object text.
Posted: 7th Oct 2011 8:30
If you need for text to use physics, have the text follow a sprite.