Here's how I would do it (easy to expand on):
rem
rem AGK Application
rem
rem Landscape App
SetVirtualResolution(640,480)
setPhysicsScale(0.25)
x# = 320
y# = 240
h# = 32
align = 1
phy = 2
spr = createPhysicsText(x#,y#,h#,align,phy,"Hello")
setSpritePhysicsAngularVelocity(spr,random(1,10))
rem A baxslash Did It!
do
sync()
loop
function createPhysicsText(x#,y#,h#,align,phy,text$)
rem create a text object
txt = createText(text$)
setTextSize(txt,h#)
setTextAlignment(txt,1)
setTextPosition(txt,x#,y#)
` get text data
w# = getTextTotalWidth(txt)
h# = getTextTotalHeight(txt)
select align
case 0 : x1# = x# : endcase
case 1 : x1# = x# - w#*0.5 : endcase
case 2 : x1# = x# - w# : endcase
endselect
y1# = y#
rem grab an image
clearScreen()
render()
img = getImage(x1#,y1#,w#,h#)
clearScreen()
rem delete the text object
deleteText(txt)
rem create the sprite
spr = createSprite(img)
setSpritePosition(spr,x1#,y1#)
setSpritePhysicsOn(spr,phy)
setSpriteShape(spr,3)
endfunction spr
Parragil para o mundo!