Progress so far…

So far i have been mainly focusing on building a level class that will deal with pretty much all of the content in the levels. Such as loading in sprites/images (soon sounds) as well as dealing with collisions and updating the sprites in the level. I have decided to use only one activity for the game but to use multiple “scenes” for the different screens throughout the game. The “scenes” are part of the AndEngines functionality. As i am using the “scenes” I have to deal with unloading the images from the VRAM when the player moves onto a new level, to prevent the game from slowing down or indeed crashing, which is very bad indeed. I am currently doing this by using arrays, however i plan to change them to Vector arrays before adding any more functionality to the game.

public void unload(){

this.mLevelScene.detachChildren();

for(int j = 0; j<texCount;j++){

textureArray[j].getTexture().unload();

}

}

 

The above code is used for unloading the textures that are used in that level from VRAM. The Sprites themselves are also removed from the scene in a similar mannor. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s