Restrictions with mobiles ? like WP7 or IP or And

Community Forums/Monkey Talk/Restrictions with mobiles ? like WP7 or IP or And

Paul "Taiphoz"(Posted 2011) [#1]
I have started work on a game for young children to help them spell and count, the way I am designing it it will use a lot of small images, which will for the questions and answers, was wondering is there was any space issues or limits I might run into .

I am aiming for a pre release count of about 50 or more questions, each question could have anywhere between 3 and 9 images about 200*200 so possibly around 250 images will be taken up just by the questions and answers.

I was thinking, just loading them into memory as I need them and then freeing them when I load the next question, or would a phone handle having them all in at once ?


D4NM4N(Posted 2011) [#2]
Most newer smartphones would likely handle loading the lot, although it is better practice to load them on the fly as you suggested..

You can also make the app smaller by using "save for web and devices" in photoshop* and rendering them to png-8 256 color**, the overall rendering will still be 24bit but each image will me mapped to just 8 bit which is usually adequate.

*gimp also has a similar option.
**unless they are photograpic then use JPG if the result is smaller


Xaron(Posted 2011) [#3]
Forget 8 bit. The iPhone can't candle 8 and 16 bit png files correctly.

Androids are very picky as well. Usually you have only 16-32MB of heap memory! You run into out of memory exceptions rather quickly. I've added a solution for that to MonkeyGame.java (regarding the out of memory problem) and reported it in the bug forum over there at MonkeyCoder. But all in all it's a good idea to load only currently needed resources and use image.Discard() a lot for images you don't need currently.

Window phones eat almost everything. :)


Paul "Taiphoz"(Posted 2011) [#4]
What do you mean about the win phone ? That's what I will be targeting first as I have one.


D4NM4N(Posted 2011) [#5]
8, 16, 24 and 32 bit PNG images on android work just fine. It is worth converting them anyway (even if ios has issues)
As for the JRE heap, you can apparently increase it if you need (no idea how, although you may need to ask yourself why you need to? I have never needed to, and the more you increase it the less phones you support i would have thought. :/ )

And yes windows phone are nasty. Get a new phone (android, iphone whatever) :D

Last edited 2011


Xaron(Posted 2011) [#6]
No, Windows phones are the best, never thought I would have to admit that, at least from a developers point of view.

On Android you run rather quickly into out of memory issues, plus the garbage collector is a pain as well in Java ...

On newer Android versions you can increase the heap size but no chance for <=2.3.
5 images with 480x800 use 5 textures of 512x1024. That's already 10MB if you use 32bit images because of transparency, so only 6MB left on devices with 16MB heap. So you have to load and discard all the time which leads to additional loading times. Oh and then you have to render them offscreen before using them if you like to draw them without delay, another great feature. I have so many workarounds only for Android, I'm glad I can use that preprocessor stuff like
#IF TARGET = android ...
to have this code only in Android running...


Paul "Taiphoz"(Posted 2011) [#7]
wow that sounds like a pain in the ass, kinda glad you said that now since Windows Phone will be my first target, and only target for a while until I get other devices.

is iPhone as bad ??? god I hope not.


Xaron(Posted 2011) [#8]
No iPhone is fun as well beside the horrible submitting process including funny bugs in XCode. I'll write guides for all platforms the next days...


D4NM4N(Posted 2011) [#9]
On newer Android versions you can increase the heap size but no chance for <=2.3.
How is targeting 2.3+ any different from targeting non backwards stuff in i4 or 5 ??
It can be a problem, but on the other hand forces you to write nice smaller and more efficient apps. Remember the limit is per process not per app so is not nessecarily a total showstopper. They do this to ensure no app eats up so much that it steals too much resulting in a better "phone" user experience.
(And if you dont like java, then you do not -have- to use it)

Yeah development is nice on windows phones. C# is a really nice language to code in. Problem is the user experience is so awful, so i am not sure how well windows is going take off.
I have a friend who works for a mobile phone shop and he claims they have sold hardly any (and not just talking about his store).

Last edited 2011


Xaron(Posted 2011) [#10]
I think Windows will take off especially in the business area in the next few years. It will eat up RIM with they blackberrys. ;) Don't underestimate them. Starting with Mango (7.5) it's very very nice and I'm really looking forward to Windows 8. The research department of Microsoft is really great, they produce a lot of nice stuff but unfortunately it comes only in rare cases to a product...

I agree the userbase is very small at the moment but this will change. Not that much like for Android but that's a different story. I still don't get why there are so many free apps there,..

Well I LOVE Java, it's a great language but it has its drawbacks on mobile devices, especially for games.

Last edited 2011


D4NM4N(Posted 2011) [#11]
If it takes off i reckon it will be thanks to Nokia's name rather than the fact it runs windows. Thing is it has been horrifically slow out of the gate :/

Edit:
Just a thought, what about using engines that manage the media for you as these are C++ so are not subjected to Java limitations?. As i said before I have not had any problems when using an engine for graphics.

Last edited 2011


Xaron(Posted 2011) [#12]
Yep, but I wonder why. Since 7.5 it's really nice! I was surprised by myself! And I agree Nokia will really push this.