## How to test for Android?

A project to port LÖVE to Android handhelds
Titousensei
Prole
Posts: 13
Joined: Mon Aug 20, 2012 11:35 pm

### How to test for Android?

Hi, I just finished a small game, and I wanted to test it on Android with love-native-android. I didn't try much so far, but I'm getting a blank (white) screen at start-up. I'm suspecting the filesystem access to cause problems, and I will try to comment it out next.

I have a few questions about how to proceed.

1. Is it currently possible to test in code for things that are not supported before making the call? For instance, can I add:

Code: Select all

if love.filesystem then
-- do filesystem things
end

2. I like to use print to log in the console my game's activity. Is there such a thing on Android? Can I access the console log and do a post-mortem analysis to debug?

3. How do you guys trace what the problems are when trying a game on Android. Do you use the emulator or an actual device?

4. Is there a restriction on the Android versions supported? I have a 2.3 and a 1.6.

Thanks for love-native-android!

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: How to test for Android?

Calling love.filesystem does not crash love-native-android, it just doesn't do anything.

If you are experiencing crashes/black screens, are you perhaps using Framebuffers? Because they crash everything.

Also, does the no-game screen work?

Titousensei
Prole
Posts: 13
Joined: Mon Aug 20, 2012 11:35 pm

### Re: How to test for Android?

I am not using framebuffers. The no-game screen works fine and shows the animated love planet with the little ghosts.

Also, I'm not getting a black screen but a white screen (of the dimensions specified in the conf.lua), I'm not sure if that helps.

Any idea how to debug that?

Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

### Re: How to test for Android?

Titousensei wrote:1. Is it currently possible to test in code for things that are not supported before making the call? For instance, can I add:

Code: Select all

if love.filesystem then
-- do filesystem things
end

No, there is no test. I wonder if a test that locates yet unsupported function would be more effort than just implementing the actual functionality...
2. I like to use print to log in the console my game's activity. Is there such a thing on Android? Can I access the console log and do a post-mortem analysis to debug?
I think that we implemented the one of love, so any print should go to logcat.
3. How do you guys trace what the problems are when trying a game on Android. Do you use the emulator or an actual device?
We started our development on real devices. The emulator may work but we do not support it.
4. Is there a restriction on the Android versions supported? I have a 2.3 and a 1.6.
The core code in Java is only about 100-200 lines. We do not use anything special. I think any Android version that can use libraries from NDK should be fine. The lowest version we tested is 2.1. There are to many Android configurations to be tested by a just-for-fun project.
At the moment, we have one restriction: ARM only. This is not technical but laziness: Currently, we did not see a point in creating x86 or MIPS libs, we have not seen any devices using it.

Titousensei
Prole
Posts: 13
Joined: Mon Aug 20, 2012 11:35 pm

### Re: How to test for Android?

I found that my device has one of those graphic cards that need power of 2 padding. After I fixed that, the game worked, although it seems to use a lot of memory for this tablet. Thanks for the help!

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: How to test for Android?

The po2 issue is standard on Android. I think it's mentioned in Google's documentation if Android if I remember correctly.

Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

### Re: How to test for Android?

Which hardware do you have? I want to know all limitations and if we should consider to solve this non power of two (NPOT) texture problem.
There are many chips that need some special texture settings for NPOT textures...

Titousensei
Prole
Posts: 13
Joined: Mon Aug 20, 2012 11:35 pm

### Re: How to test for Android?

I have an Archos 101 (first model, not the G9). I don't know if it's popular or not.

I'm testing my with my own game, you can download it at http://rti-zone.org/eyes-in-the-night.php

Most of the love package's size is due to the music, and it's using so much memory the game is a little laggy, so I will build a smaller version with only one ogg file to see if this helps.

(Oh, and love.graphics.setLineWidth() doesn't seem to work)

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: How to test for Android?

Or, you can solve the npot problem for all hardware by just upgrading to LÖVE 0.8

austinart2862
Prole
Posts: 1
Joined: Sat Sep 22, 2012 10:57 am

### Re: How to test for Android?

Have tried in my emulator in PC, but it says graphics not compatible..

### Who is online

Users browsing this forum: No registered users and 4 guests