Quote: " Is there any way to print text over an actual sprite. not a pasted sprite?"
Indeed
Red = 0xFF0000
CLS Red
Get Image 1, 0,0,128,128
Draw Sprites First
Set Text Size 50
Do
Center Text Screen Width() * 0.5, Screen Height() * 0.5, "The quick brown fox jumped over the lazy dog"
Sprite 1, MouseX(), MouseY(), 1
Loop
Quote: "My issue is i use sprites for collision and i use pasted sprites for other things. So I need both"
Sprites can still collide when hidden
Quote: "Is it possible to play an animated sprite in reverse? "
Unlike in AppGameKit, you cannot force a sprite to play back with a negative delta. You have to set the frame manually; which means you would also need to creater a timer to make use of the frame speed convinience.
If you search the forums you will find that most solutions found require a timer function.
My way is easier:
Red = 0xFFFF0000
Blue = 0xFF0000FF
Box 0, 0, 128, 128, Red, Red, Blue, Blue
Center Text 32, 32, "1"
Center Text 96, 32, "2"
Center Text 32, 96, "3"
Center Text 96, 96, "4"
Get Image 1, 0,0,128,128
Save Image "Temp.png", 1
Create Animated Sprite 1, "Temp.png", 2, 2, 2
Clone Sprite 1, 2
Hide Sprite 1
Delete File "Temp.png"
Draw Sprites First
Set Text Size 30
Do
Paste Image 1, 0, 0
` Play sprite backwards
Play Sprite 1, 1,4, 1000
Set Sprite Frame 2, 5 - Sprite Frame(1)
Center Text Screen Width() * 0.5, Screen Height() * 0.5, "The quick brown fox jumped over the lazy dog"
Sprite 2, MouseX(), MouseY(), 2
Loop
You just play a cloned hidden sprite and use its playback speed for reference. You will not lower the performance significantly because the reference sprite is hidden and the texture memory used is still the same due to the sharing of the same image.
However, if working on something long term or something with an excess quantity of animated sprites for some reason; say 5,000 or more animated sprites, you'd be better of creating the timer function so that sprite loops are made more efficient.
It is still handy to have an arbitrary timer function available for various needs; I use a timer function to detect Miles Per Second measurement of car speed variables; and loops per millisecond iterations in my game.
Sync On
Global FrameTime
Do
CLS
i = RND(2) + 1
Sync Rate i
FrameTime = Timer() - LastFrameTime
LastFrameTime = Timer()
Print "Sync rate: "; i
Print "Frame time: "; FrameTime
Print "Playback 10 frames: "; StepsPerSec( 10 )
Sync
Loop
//============================================================
Function UnitsPerSec#( fUnits# )
If fUnits# = 0 Then ExitFunction 0.0
Local fSpeed# : fSpeed# = fUnits# * 0.001
fSpeed# = fSpeed# * FrameTime
Endfunction fSpeed#
//============================================================
Function StepsPerSec( fSteps# )
If fSteps# = 0 Then ExitFunction 0.0
Local fSpeed# : fSpeed# = fSteps# * 0.001
fSpeed# = fSpeed# * FrameTime
fSteps# = fSteps# / fSpeed#
Endfunction fSteps#
There are many applications for those two particular functions