Well, in this case, I've just saved you from reading 150,000 words, since my GIF below has 150 frames.ĭescription: the first image represents my app's memory usage when the "stage 1" is first loaded. As Confucius said, "An image is worth a thousand words". ![]() Instead of describing it with words and risk getting you confused, I will use images. The stages are created by retrieving metadata from xml files.īesides all the possible memory leaks on my code (all of which I've been working hard to find and solve), there is a strange phenomenon related to the garbage collector happening. The game logic and the game loop is handled by a side thread (gameThread). All the objects (that are, essentially, views) are drawn in a custom view created by me (extends FrameLayout). Currently, when the player reaches the final stage (I've only created 4 so far) he/she automatically goes back to the first stage (level 1).Īn abstract class called GameObject (extends Android.View) defines the base structure and behaviour for the player and all the other objects (obstacles, etc) present in the game. Each stage has a starting point for the player and an exit, which leads the player to the next stage. It's a game that consists of several stages (levels). ![]() I will break this text into sections, in order to make it clearer and readable. I'm a beginner Java and Android developer and I've been having trouble lately dealing with my app's memory management.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |