Here's a quick function I wrote to display useful stats in game, you can press the escapekey (or back button on phones) to display or hide the stats. You might have to adjust the size of the transparent hud to fit your app.
It shows you the sync rate, touch position, sprite hit and device information. You can also display a website if you want to leave this in the app.
global wait
global showinfo
function developerinfo()
rem show / hide with escapekey
if GetRawKeyPressed(27) and showinfo=0 and wait=0
wait=10
showinfo=1
endif
if GetRawKeyPressed(27) and showinfo=1 and wait=0
wait=10
showinfo=0
endif
rem show developer info
if showinfo=1
rem create transparent background
if getspriteexists(1001)=0
createsprite(1001,0)
setspritecolor(1001,0,0,0,150)
setspriteposition(1001,0,0)
setspritesize(1001,768,350)
setspritedepth(1001,10)
endif
rem syncrate
Print( "Sync: "+str(round(ScreenFPS() )))
Print( "Polygons: "+str(getpolygonsdrawn()))
print(" ")
rem touch co ordinates and sprite hit
if getpointerstate() = 1
print("Touch: X: "+str(round(getpointerx()))+" / Y: "+str(round(getpointery())))
print("Sprite: "+str(getspritehit(getpointerx(),getpointery())))
else
print("Touch: No")
print("Sprite: No")
endif
print(" ")
rem device
Print( "Device: "+getdevicename()+" "+getdevicetype())
Print( "Language: "+getdevicelanguage())
Print("Processors: "+str(getnumprocessors()))
print("Screen: "+str(getmaxdevicewidth())+" x "+str(getmaxdeviceheight()))
print(" ")
rem website!
print("www.bradburygames.com")
else
rem delete background
if getspriteexists(1001)=1
deletesprite(1001)
endif
endif
endfunction
www.liambradburymusic.com - professional music for your games.