All,
We are developing a puzzle game and it is going very well. We really enjoy AppGameKit v2 and think it is an amazing product for us to develop with.
However, after playing for 3 hours on my android phone, I got the following message: ERROR: Ran out of GPU memory on line xxx (See attached)
That line is actually a SYNC() [of course, since that updates the screen]
The reason I am looking for a debug / GPU Memory check command, is to be able to find what is going on.
Here is our GAME code structure
1. Preload Images [ All images: 4MB as jpg & png ]
2. Preload Fonts [ TTF : Only 2 - 61K ]
then after that we have sub-menu's and play cycles, for each of these we do the following:
a. Delete All Sprites
b. Delete All Texts
c. Create Base Sprites (1 for each type of graphic used in this section)
d. Clone any and all sprites needed in the playing field
e. Create All Texts as needed in this section
f. Make these visible as needed
g. When user leaves the MENU / CYCLE
g1. Delete All Sprites
g2. Delete All Texts
Since it takes me about 3 hours to get the error, as well as the fact that we delete all sprites & texts every time AND we don't load any new images/fonts.
It seems to suggest there is a memory leak somewhere or a garbage collection issue, that makes the memory slowly fill up until it hits the threshold.
To confirm that it is not a particular level that causes this by creating too many sprites, we never exceed 1,000 sprites ( 90% of which are 60 x 60 which would be 3600 x 4 = 14400 bytes per sprite ) never more than 8 overlap.
After it crashed, when I start up again, and continue from the same level everything works great again for 3 hours or so.
What would really help me is the ability to check the available GPU Memory in various places in the code, to see if there are area's where it goes up, but not down. Maybe we missed something in our logic or can identify where the problem occurs.
Without a resolution for this problem we cannot publish the game, because it would crash at some point and that is unwanted behavior.
I have not yet been able to test it on iOS as extensively, so do not know if the issue exists on both platforms. I have not seen it on windows yet, but my machine has 32GB internal memory.
Any and all help is much appreciated.