Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is no guarantee that the garbage collector will actually be run when we attempt for <a href="http://developer.android.com/reference/java/lang/System.html#gc%28%29" rel="nofollow noreferrer">System.gc()</a> as gc() expects certain preconditions like resource hunger. So it is quite obvious that calling gc() is just wasting critical CPU Cycles. As a developer we can make unnecessary objects for gc collectable by nullifying the references. </p> <p>There are couple of optimization techniques that can be helpful while creating a gaming system(game).</p> <ol> <li><p>Use Texture. Here is an <a href="http://tkcodesharing.blogspot.in/2008/05/working-with-textures-in-androids.html" rel="nofollow noreferrer">example</a>.</p></li> <li><p>Use Sprite and SpriteSheets( It gives less overhead to the system than loading individual bitmaps). many open source game engines are there who uses this.If you don't want to use them get an idea how to create from scratch from these sources.</p></li> <li><p>Use these standard android doc for how to <a href="http://developer.android.com/training/displaying-bitmaps/load-bitmap.html" rel="nofollow noreferrer">Loading Large Bitmaps Efficiently</a> and <a href="http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html" rel="nofollow noreferrer">Caching Bitmaps</a> for better usage of bitmap. The idea is when users device is not efficient enough to handle the amount of processing and/or the memory is less for your game you can always scale down the bitmap(compromise with quality for better response).</p></li> <li><p>Always test your app against memory leak problems. Here is a <a href="https://stackoverflow.com/questions/4646157/tool-to-check-memory-leaks-in-android">nice post</a> that will help. </p></li> <li><p>Keep InMemory(don't release once used) items that are used several times inside the game in the same scene. The reason is it takes lot of time to load images into the memory.</p></li> </ol> <p>Hope this will help you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload