game process statistics metrics memory usage

Monkey Targets Forums/Android/game process statistics metrics memory usage

matty(Posted 2011) [#1]
Hello all. I have been working on a side scrolling beat em up for my phone and it works well so far but...

How can I see the amount of memory it takes up at run time?
Also what is considered large for a phone when it comes to disk space used for a game?
Also is there some way I can display a loading screen as I load all resources at start-up?
I must say I think it is amazing how easy monkey makes it to develop on phone.


dave.h(Posted 2011) [#2]
hi matty

1) go into setting and manage apps on your phone and itll tell you how big it is

2) mines 11meg and theres plenty of ram left on my phone. 256 altogether and theres plenty of graphics in the game.if you look at towers in enferno in the apps thats about 8 meg and thats in debug mode in release mode its only about 5 meg.

3) not figured out how to load a splash screen yet i would love to know as well cos it takes about 5 seconds for my graphics to load.

4) monkeys great and gets better with every release


Samah(Posted 2011) [#3]
3) not figured out how to load a splash screen yet i would love to know as well cos it takes about 5 seconds for my graphics to load.

Loading the image into the phone's memory isn't the problem; the delay is with uploading the image to video memory. You should still be able to call LoadImage in your OnCreate, but you can force them to cache by calling DrawImage (anywhere). Try something like this:
Field loading:Int = 0

Method OnCreate()
  ' load all your images here
End

Method OnRender()
  Cls
  If loading < 2 Then
    ' draw splash screen here
    DrawImage splashscreen, x, y
    If loading = 0 Then
      loading = 1
    ElseIf loading = 1 Then
      ' draw all your images offscreen
      DrawImage image1, -1000, -1000
      DrawImage image2, -1000, -1000 ' etc.
      loading = 2
    End
  Else
    ' do your rendering for the rest of the game
  End
End

Be aware that while drawing all these images your program will most likely be seen as "not responding" to the OS, so you may want to load them in groups on each loop.


dave.h(Posted 2011) [#4]
ive just noticed your reply to this samah and implemented something very similiar and it works fantastic as a splash screen.Thanks as that was causing me some headaches.


FlameDuck(Posted 2011) [#5]
1) Alternatively you can use the adb to profile your code, by adding "profile" to the commandline arguments.

2) Angry Birds is 3MB but Cut the Rope is 16MB. What is considered "large" would depend on which phone you have and the size of its internal storage, as well as how many games you want to have installed. A brand new HTC Desire for instance has about 50MB of free space for apps. So you can have a lot more Angry Birds type games than you can Cut The Rope. On the other hand the Samsung Galaxy S, has such absurd amounts of memory (and doesn't come with as much shovelware that you can't uninstall) that it doesn't matter much.

If you have to have a figure, I'd say anything bigger than 4MB would probably be considered large, for most non-enthusiast phones. Of course if you only care about people with enthusiast phones, 16MB is no problem at all.


matt(Posted 2011) [#6]
On my Android phone - the budget ZTE Blade - Angry Birds runs like a pig (pardon the pun) and Cut the Rope runs beautifully.

So there's more to it than memory usage.


FlameDuck(Posted 2011) [#7]
So there's more to it than memory usage.
Not when the question is: "Also what is considered large for a phone when it comes to disk space used for a game?"


matty(Posted 2011) [#8]
Thanks all. From Matt.
Something I am finding difficult is establishing which phones my games won't run or won't run well. I seem to get a number of bad comments from users about games not running well on their phones, although they work well on all our test devices at work-having some way of knowing which phones not to support would be good.