Hey,
I'm a little bit confused, I'm using B4A now since a year, before I was doing a lot with VB on Windows. But there are so much things I don't understand or I'm doing wrong.
At the moment I'm experimenting with gameview and I've discovered something, maybe for the most of you it's easy to explain, but I don't get it.
I try to show it with the example of Erels GameView Smiley app.
I didn't change much, only that I dim the timer in Globals:
Then I enable the timer at activity_create:
And the timer isn't disabled at activity_pause:
If I start it, everything works fine, If i leave the app with the back button (not home) and then start the app again, it's much faster as before but everything, besides of the speed, is working well.
So my problem is, why does this happen (are there with this code more than one timer working at a time?!) and is it possible to use it without restarting the app?
At the first start the fps on my Iconia Tab A700 were at 60, at the second start there were at 80, third start 90, then the changes doesn't make huge steps but it seems it's getting faster and faster...
I don't really understand it, but maybe some of you could explain me this, thanks in advance
I'm a little bit confused, I'm using B4A now since a year, before I was doing a lot with VB on Windows. But there are so much things I don't understand or I'm doing wrong.
At the moment I'm experimenting with gameview and I've discovered something, maybe for the most of you it's easy to explain, but I don't get it.
I try to show it with the example of Erels GameView Smiley app.
I didn't change much, only that I dim the timer in Globals:
B4X:
Sub Globals
Dim gv As GameView
Dim lblFPS As Label
Dim timer1 As Timer '<-- new at this position
timer1.Initialize("Timer1", 15) '<-- new at this position
End Sub
Then I enable the timer at activity_create:
B4X:
Sub Activity_Create(FirstTime As Boolean)
'...
'...
'...
Activity.AddView(lblFPS, 0, 100%y - 30dip, 50dip, 30dip)
timer1.Enabled = True '<-- new at this position
End Sub
And the timer isn't disabled at activity_pause:
B4X:
Sub Activity_Pause (UserClosed As Boolean)
'timer1.Enabled = False
End Sub
If I start it, everything works fine, If i leave the app with the back button (not home) and then start the app again, it's much faster as before but everything, besides of the speed, is working well.
So my problem is, why does this happen (are there with this code more than one timer working at a time?!) and is it possible to use it without restarting the app?
At the first start the fps on my Iconia Tab A700 were at 60, at the second start there were at 80, third start 90, then the changes doesn't make huge steps but it seems it's getting faster and faster...
I don't really understand it, but maybe some of you could explain me this, thanks in advance