GLBasic forum

Main forum => GLBasic - en => Topic started by: trucidare on 2011-Mar-28

Title: Android - does it work for you?
Post by: trucidare on 2011-Mar-28
Hi,

if you have an Android device, please try the attached APK and tell us if it worked.

Tell you system and your Andoid OS version, please.


This is an early port - we need some time to solve some main problems and optimize the engine for use with all devices.

The apk is below.



[attachment deleted by admin]
Title: Re: Android - does it work for you?
Post by: XanthorXIII on 2011-Mar-29
HTC Hero Android 2.1 - Unfortunately no. I need a new Android device though, this thing sucks.
Title: Re: Android - does it work for you?
Post by: Albert on 2011-Mar-29
Samsung Galaxy S with Froyo 2.2
working smooth.
Title: Re: Android - does it work for you?
Post by: BigAnd on 2011-Mar-29
Works fine here on my HTC Desire 2.2.
Title: Re: Android - does it work for you?
Post by: Rizla on 2011-Mar-29
Not working here on 2.1 - 'The application SDL App (process org.libsdl.app) has stopped unexpectedly'

It is a cheap tablet though:Disgo 6000 tablet (http://www.mydisgo.info/archives/1398)
Title: Re: Android - does it work for you?
Post by: XanthorXIII on 2011-Mar-29
I'm guessing that it probably won't work on anything below 2.2 which is what it's looking like.
Title: Re: Android - does it work for you?
Post by: Darmakwolf on 2011-Mar-31
HTC Droid Incredible with Gingerbread: App runs fine, except that the coordinates are way off at first. After a while of touching the screen, the cross hairs are accurate. They start out too far to the right and below my finger. However - the app runs!
Title: Re: Android - does it work for you?
Post by: ampos on 2011-Mar-31
HTC Desiree 2.2, works. But the cross is missaligned, a lot at the beginning, and later just... around +32 pixes in X axis.
Title: Re: Android - does it work for you?
Post by: Darmakwolf on 2011-Mar-31
So it seems it will work on legitimate Android devices with 2.2 and higher...except with some kind of touch-coordinate problem. Not a bad start!!!
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Mar-31
Out of interest when it doesn't work on 2.1 how exactly doesn't it work? For instance it's been pointed out that Angry birds doesn't work on 2.1, only 2.2 and above, but on my wife's 2.1 phone it does work just with a lot of white for the background, and a cheap 2.1 media player/picture frame I have plays Angry Birds extremely well just with the white stuff in the background. Is GLB like this so some things don't work or does it just totally refuse to work? I may not want to make Quake 5 on my picture frame, but it would be nice to maybe create a cool slideshow for my pictures for example (hardly going to kill a 750mhz machine).

Cheers
Title: Re: Android - does it work for you?
Post by: trucidare on 2011-Mar-31
sorry guys the package couldnt be run because its corrupted.
Title: Re: Android - does it work for you?
Post by: Kitty Hello on 2011-Mar-31
So, it "might" run on 2.1?

I'm probably in chat tonight. Wife's out :P
Title: Re: Android - does it work for you?
Post by: trucidare on 2011-Mar-31
uhm no sorry i didnt saw that you changed the apk file in first post.

req. 2.2
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Apr-07
I just tried this on the wife's HTC Wildfire running 2.2.1 and it seems exactly the same as other people have said here except the square in top left is white. Isn't it supposed to be red? Note this is the same device that had white bits in the background of Angry birds. Most things work though. Any ideas?

Also my 2.1 tablet unsurprisingly doesn't work with it (more powerful than the Wildfire but I guess it's all in the software versions).

Cheers
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-07
Sounds like there is a lot of differences between the versions.  Which does make you wonder whether a 2.2 game would work on 3.0...

Speaking of which, I hope to be getting my tablet tomorrow, at which point I will see if it works :)
Title: Re: Android - does it work for you?
Post by: Millerszone on 2011-Apr-08
I purchased a Samsung Galaxy Tab GT-P1000 on eBay today, should have next week.
http://www.samsung.com/us/mobile/galaxy-tab (http://www.samsung.com/us/mobile/galaxy-tab)

I was going to buy the Archos 101, but for $75.00 more the Samsung Galaxy Tab
seemed to be a lot better.

What is the most popular screen size to develop games on the Android, 800x480?
The TAB has a screen resolution of 1024x600, hopefully it'll run games 800x480.

This will be my first Android device, will be asking a lot of questions. :)
Title: Re: Android - does it work for you?
Post by: Dabz on 2011-Apr-08
Quote
What is the most popular screen size to develop games on the Android, 800x480?

Android is quite PC'ey in that respect, there's quite a few, the general consensus is that you should let your app run at it's native resolution and then scale it to suit.

I've been playing with monkey and this works across HTML5, iOS and Android:-

Code (glbasic) Select

Strict

Import mojo

' Store the device width and height
Global SCREEN_WIDTH%
Global SCREEN_HEIGHT%

' Game Width and Height
Const WIDTH#=320
Const HEIGHT#=240

Global game:MyGame

Function Main:Int()
game = New MyGame()
Return 0
End Function

Class MyGame Extends App
Field FPS% = 60
Field mx%
Field my%

Method OnCreate:Int()
SetUpdateRate FPS

' Store the device width and height
SCREEN_WIDTH = DeviceWidth()
SCREEN_HEIGHT = DeviceHeight()

Return 0
End Method

Method OnUpdate:Int()
If TouchHit()
mx = TouchX() / (SCREEN_WIDTH/WIDTH)
my = TouchY() / (SCREEN_HEIGHT/HEIGHT)
Endif

Return 0
End Method

Method OnRender:Int()
Cls
PushMatrix
Scale SCREEN_WIDTH/WIDTH, SCREEN_HEIGHT/HEIGHT
SetColor 255,255,255
DrawRect 100,100,32,32
SetColor 255,0,255
DrawRect mx,my,1,1
DrawText mx+":"+my,0,0
PopMatrix
Return 0
End Method
End Class


Dabz
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Apr-08
That's why I asked about loadsprite (and possibly loadfont and savesprite) having a ratio percentage for x and y. That way you can work out the x and y ratio at the start based on the resolution you based the graphics on and the resolution you actually have. Then the graphics will take up less memory if the resolution is lower and therefore should be faster especially compared with scaling on the fly (eg stretchsprite). I posted some code to do this before but I don't know how to get it to work for different levels of opacity (varying levels of transparency most obviously seen with alphamode -1)

Hopefully Gernot will provide this functionality and then worrying about the resolution is greatly reduced. Handling the rest of it is simple really.

Cheers
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-08
Got mine today.  Unfortunately its not working well at all :(

Incorrect and multiple keypresses, a lot of pressure is needed for it to detect anything and calibration fails ...

Hopefully will be able to get a replacement quickly.
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Apr-08
My tablet was like that. Turned out to be a corroded cable connected to the screen. I sent mine back and the new one was fine (you didn't purchase from a Scottish company by any chance?). Although the callibration was much better with a stylus (I used an old iPaq one) as the screens are normally the older types on the cheaper tablets rather than the newer type used by iPhone/iPad/expensive Android etc (capacitive vs resistive I believe). I can use my fingers on it, but it is much better with a stylus.

Cheers
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-08
No, got mine from the place previously mentioned (that is in London).

Hopefully, I'll be able to do an RMA soon...

I couldn't even get to this site due to incorrect key presses, which was annoying...
Title: Re: Android - does it work for you?
Post by: Kitty Hello on 2011-Apr-08
Yes, that's what mine does too. When you hold on a list that can scroll you see how badly it jitters.
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Apr-08
My replacement seems a lot better now. Especially when used with a stylus and after using the stylus to get through the calibration routine. It may not be iPad or iPhone smooth but it's a lot closer now to my wife's Android phone which uses the better touch technology. Just a shame that it is 2.1 :( Apparently I can upgrade to 2.2 but it all looks very dubious and very chinese. I think I'll leave it for now and just use my wife's phone for GLB when required (although that white square rather than red is a little worrying). I do have 3 iDevices though so best not be greedy...

Cheers
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-09
According to Facebook posts, it does look like I went with the wrong company - hopefully tomorrow I'll get a support email reply and then send it back.

If not, it'll time to get the money back through my bank and contact Trading Standards...
Title: Re: Android - does it work for you?
Post by: Ian Price on 2011-Apr-09
Ouch! looks like buying a good, working Android device is very hit and miss. :(
Title: Re: Android - does it work for you?
Post by: Millerszone on 2011-Apr-09
Quote from: Ian Price on 2011-Apr-09
Ouch! looks like buying a good, working Android device is very hit and miss. :(
I hope the Galaxy Tab works out o.k., I paid a lot of money for a device that I probably won't be using to much.

One good thing, someone already has Android 3.0(honeycomb) partially running on the tab.
Title: Re: Android - does it work for you?
Post by: Dabz on 2011-Apr-09
Quote
Ouch! looks like buying a good, working Android device is very hit and miss.

Yep, it's a bit of a mine field really, I know of two people now that have Android device's and have needed to rip into it to enable hardware acceleration, the devices are quite adequate to run OpenGL ES, but, it seems when a manufacturer makes a phone £50 cheaper, they automatically dumb the guts of it down... Which is plain stupid really!

Reminds me when I had a little bit of a ding dong in PC World, I was just browsing and stopped to look at a laptop, one of the hawks must of seen my interest and was over in a shot... He give all the usual guff, and proceeded to tell me it was "Vista Ready", so I said "Oh really, so that's what that 'Vista Ready' sticker means then.", with a little smirk...

Anyway, I asked him what are the new features of Windows Vista [Which I knew anyway], he give me it all, and as expected "DirectX 10 gaming", so I asked if the laptop could play DirectX 10 games (It had an Intel GMA, so I knew it couldnt), he said "No", so then I said "But you said its Vista Ready, and there's a sticker on it saying its Vista Ready, but if I cannot play new games on it, then its obviously not ready is it?"

He then proceeded to tell me "Yes, but the machine is capable of running all other features of Vista", I replied "I know, but your advertising it as Vista Ready, which in my mind, it should run all features of Vista, not a subset, why is there no sticker or information saying that?"

I finished off saying it was a bit of a con, said I'd lost interest and walked out of the store! :)

I'm a bugger for that I really am!

Dabz
Title: Re: Android - does it work for you?
Post by: erico on 2011-Apr-09
car mechanincs are similar to computer sellers when you walk in their place...
I understand jack s..t about car/engines but whenever I walk into a comp store and ask stuff I hear the ultimate bulls...

...and me too, enjoy putting this people on a short skirt. ;/
Title: Re: Android - does it work for you?
Post by: matchy on 2011-Apr-11
The app runs on Android 2.2 (FroYo) On HTC (Touch HD/BlackStone) [03 Sep 2010] (V1.6 xda). The result is a white square in the upper left and full screen cross-hairs that track the input.
Title: Re: Android - does it work for you?
Post by: Millerszone on 2011-Apr-11
Quote from: matchy on 2011-Apr-11
The app runs on Android 2.2 (FroYo) On HTC (Touch HD/BlackStone) [03 Sep 2010] (V1.6 xda). The result is a white square in the upper left and full screen cross-hairs that track the input.

That's good to hear. The TAB comes with Android 2.2 (FroYo) installed. I should have by Wednesday to test.
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-11
Has anyone tried it on a Android 3.0 machine yet ?
Title: Re: Android - does it work for you?
Post by: matchy on 2011-Apr-12
Quote from: MillersZone on 2011-Apr-11
That's good to hear. The TAB comes with Android 2.2 (FroYo) installed. I should have by Wednesday to test.

LOL, it was a reply to the first post so where post here are about testing.
Title: Re: Android - does it work for you?
Post by: Millerszone on 2011-Apr-15
Tested the program on a Samsung Galaxy Tab with Froyo 2.2.1, like others, the cross-hair was a little to the bottom right of the touch.
I ended the program and tried again but the program locked up the second time.
Screen resolution is 1024 x 600
Title: Re: Android - does it work for you?
Post by: Kitty Hello on 2011-Apr-15
the program does not quit properly with the home button. Check it in running tasks and kill manyually if it's still running. I've fixed that already. I fear I have trouble with the Pause state. Would it be much of a problem if it would sent GLB_ON_QUIT instead and quit as it does on iOS 3.1?
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-19
Finally got a replacement for my previously dodgy tablet, and whilst the new one is no-where near perfect, the test program does run - took me a while to work out how to install it though  :-[

Coordinates are off (but they are anyway - screen calibration always fails :( ) - and the horizontal line doesn't go across the complete screen.
Title: Re: Android - does it work for you?
Post by: Crivens on 2011-Apr-20
Quotescreen calibration always fails
Have you tried with a stylus? If still no go then might be faulty. My first tablet did this and I put it down to the screen tech not being as good as iDevice/Android phones (resistive and capacitive screens). After a few weeks it completely failed to accept any touch. Sent it back and they found a corroded cable to be at fault. Replaced the device and callibration worked first time with a stylus and it's a lot better.

Cheers
Title: Re: Android - does it work for you?
Post by: MrTAToad on 2011-Apr-20
It'll be worth trying with a stylus pen.  This is the replacement for the first, and is most likely due to being a "cheap" Chinese one :)

I do have another one coming, which will hopefully be better...
Title: Re: Android - does it work for you?
Post by: ketil on 2011-Apr-22
Working on HTC Legend with the Android 2.2 update  :good:
Title: Re: Android - does it work for you?
Post by: Wampus on 2011-Apr-23
A close friend is planning to get getting a Xoom which runs Android 3.0. Will probably have a chance to play with it next week, which I'm also taking off as holiday so I can finally get some time to work on some of my projects.  =D