I'm also experiencing this black screen when loading images.
I'm working in Tier 2 and I'm also using v108 beta 19;, and what I'm doing is loading graphics for the menu and then when it's time start the game, I'm deleting the menu graphics and loading the in-game graphics and menus.
Next, when I leave the game, I delete the in-game graphics and reload the main menu graphics. It's at this point I get a black screen with my debug information. So what I try to do is advance through the menus in hopes that the graphics will load but to no avail.
I then, exit the app and restart and everything works fine. This black screen doesn't pop up all the time so it's makes it very hard to track down what the problem may be.
In compiling the apk, I go to Cygwin, then in eclipse, I do a refresh and the Run the application on the device. Eclipse installs the apk on the Galaxy S3 and runs the game.
I wasn't really worried about the black screen in this stage of development, I figured I will get around to it later, but when I saw this post mentioning the black screen, I decided to say something.
Here is the function I call each time I'm loading graphics.
void LoadMenuScreen()
{
//title menu
titleSprite = agk::CreateSprite ( agk::LoadImage ( "phones/titlescreen.jpg" ) );
agk::SetSpriteSize(titleSprite,100.00,100.00);
agk::SetSpriteDepth(titleSprite,11);
//SelectionScreenSprite = agk::CreateSprite ( agk::LoadImage ( "phones/selectionpuzzle.jpg" ) );
//agk::SetSpriteSize(SelectionScreenSprite,100.00,100.00);
//agk::SetSpriteDepth(SelectionScreenSprite,11);
//agk::SetSpritePosition(SelectionScreenSprite,-100.00f,0.00f);
startScreenSprite = agk::CreateSprite ( agk::LoadImage ( "phones/startscreen2.jpg" ) );
agk::SetSpriteSize(startScreenSprite,100.00,100.00);
agk::SetSpriteDepth(startScreenSprite,11);
agk::SetSpritePosition(startScreenSprite,-100.00f,0.00f);
OtherScreenSprite = agk::CreateSprite ( agk::LoadImage ( "phones/otherstuff.jpg" ) );
agk::SetSpriteSize(OtherScreenSprite,100.00,100.00);
agk::SetSpriteDepth(OtherScreenSprite,11);
agk::SetSpritePosition(OtherScreenSprite,-100.00f,0.00f);
storeScreenSprite = agk::CreateSprite ( agk::LoadImage ( "phones/store.jpg" ) );
agk::SetSpriteSize(storeScreenSprite,100.00,100.00);
agk::SetSpriteDepth(storeScreenSprite,11);
agk::SetSpritePosition(storeScreenSprite,-100.00f,0.00f);
optionsScreenSprite = agk::CreateSprite ( agk::LoadImage ( "phones/otherstuff.jpg" ) );
agk::SetSpriteSize(optionsScreenSprite,100.00,100.00);
agk::SetSpriteDepth(optionsScreenSprite,11);
agk::SetSpritePosition(optionsScreenSprite,-100.00f,0.00f);
return;
}
When I call this function, sometimes the graphics don't load but the game is still functional.
Joeisms
KG2Entertainment.com