WAZUMBi Well-Known Member Licensed User Longtime User Nov 16, 2013 #1 I made a simple slider puzzle app. You can see it here: https://play.google.com/store/apps/details?id=slider.puzzle This is the first time I used AcceleratedSurface in an app. I have been using GameView. I am now making a second app using the same code geared towards children. I am almost done... My question is: I used a timer to invalidate and redraw the canvas on the screen. It looks like this is the wrong approach. I have been testing for a few days now until I just noticed I never enabled the timer sub I was using to refresh the AcceleratedSurface but the game still works and redraws as expected. Looking through the tutorial and examples provided by Infomatix here http://www.b4x.com/android/forum/threads/lib-accelerated-surface.27462/ For the life of me I cannot see where and when the surface is actually refreshed. It looks as though this is implied and done automatically. Can I pause and restart it?
I made a simple slider puzzle app. You can see it here: https://play.google.com/store/apps/details?id=slider.puzzle This is the first time I used AcceleratedSurface in an app. I have been using GameView. I am now making a second app using the same code geared towards children. I am almost done... My question is: I used a timer to invalidate and redraw the canvas on the screen. It looks like this is the wrong approach. I have been testing for a few days now until I just noticed I never enabled the timer sub I was using to refresh the AcceleratedSurface but the game still works and redraws as expected. Looking through the tutorial and examples provided by Infomatix here http://www.b4x.com/android/forum/threads/lib-accelerated-surface.27462/ For the life of me I cannot see where and when the surface is actually refreshed. It looks as though this is implied and done automatically. Can I pause and restart it?
Informatix Expert Licensed User Longtime User Nov 16, 2013 #2 This is explained here, in the Draw only what’s needed section. You can stop the calls to Update and Draw with StopRegularDraw. Upvote 0
This is explained here, in the Draw only what’s needed section. You can stop the calls to Update and Draw with StopRegularDraw.
WAZUMBi Well-Known Member Licensed User Longtime User Nov 17, 2013 #3 Great. Thank you very much. Upvote 0