Hi
I have a game using B4Xpages that I am showing some image, you click on it, and it moves to next screen using:
B4XPages.ShowPageAndRemovePreviousPages("page2")
One you click on the answer, it moved back to page1, using same command, you click on next question and it moved you back to page2
so all the game is moving from page1 to 2 and 2 to 1
The game has many images and it crashed due to mem issue so I used this to solve it:
#VirtualMachineArgs: -Xms1048m -Xmx1048m (I see it is consuming 300Mbps of RAM)
now I have issue (probably also before) that when moving between the pages there is a "delay" of ~0.5/1 sec till images appear on the screen (on that time it can show white or gray screen or back window screen) but this does not happens all the time, it usually happens when moving from page1 with many images to page2 with less (moving back is usually ok, but it is not all the time ok)
my questions:
1. Is it correct approach using the B4XPages.ShowPageAndRemovePreviousPages when moving between the pages
2. How can I optimize the game? maybe allocate more ram to it?
3. When game is over and player start it again from the game (play again) issue of delay is getting even worse
4. Do I need to clean/release something else when ending page
Any other suggestion?
If needed I have some movie I can post
I have a game using B4Xpages that I am showing some image, you click on it, and it moves to next screen using:
B4XPages.ShowPageAndRemovePreviousPages("page2")
One you click on the answer, it moved back to page1, using same command, you click on next question and it moved you back to page2
so all the game is moving from page1 to 2 and 2 to 1
The game has many images and it crashed due to mem issue so I used this to solve it:
#VirtualMachineArgs: -Xms1048m -Xmx1048m (I see it is consuming 300Mbps of RAM)
now I have issue (probably also before) that when moving between the pages there is a "delay" of ~0.5/1 sec till images appear on the screen (on that time it can show white or gray screen or back window screen) but this does not happens all the time, it usually happens when moving from page1 with many images to page2 with less (moving back is usually ok, but it is not all the time ok)
my questions:
1. Is it correct approach using the B4XPages.ShowPageAndRemovePreviousPages when moving between the pages
2. How can I optimize the game? maybe allocate more ram to it?
3. When game is over and player start it again from the game (play again) issue of delay is getting even worse
4. Do I need to clean/release something else when ending page
Any other suggestion?
If needed I have some movie I can post