GLBasic forum

Main forum => GLBasic - en => Topic started by: AlienMenace on 2011-Nov-18

Title: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-18
Trying to develop a game in GLB to work on Android has been a horror story. I think I am finally at the end of my rope. The performance is terrible, you have to use polys to get anything near acceptable speed, not using createscreen crashes the app and more fun stuff. The only device (HTC Flyer) that I have that did have acceptable performance now runs half the speed it did before the 2.3.4 update making the game totally unplayable now. Yay.  Glad I spent the last 3 months on the Android port just to end up here.  Wonderful. :rant:
Title: Re: I am officially fed-up with Android and GLB
Post by: Albert on 2011-Nov-18
That's a sad story, can we help you? I would be glad if I could help you. I can test your APK on my Galaxy S if you want.
Title: Re: I am officially fed-up with Android and GLB
Post by: Minion on 2011-Nov-18
Don`t despair chap. Ive had my fair share of Android problems and if they can`t be sorted here on the forum, then Gernot is always more than willing to dig a little deeper to see if theres anything he can do/fix (hes a star you know  :) )

So far Ive only had 2 real issues with Android apps, 1) It not working on the Galaxy S II but does work on all the other Samsung phones (checking a few forums it does sound as tho the SII does suffer from not running games, so I dont think it is a GLB issue as such) and 2) No bugger grabbing my games from the market.
Title: Re: I am officially fed-up with Android and GLB
Post by: mentalthink on 2011-Nov-18
HI Alienmenace this it´s strange, perhaps you have something wrong in your code, when I made my first game, my speed was very low, after checking somthings like For into another fors the game runs at full 60 FPS. Now I ´m developing in android and I use 3D whit big textures light and 2D, all together , and all runs very well.

I don´t now what´s happened but I can tell you Glbasic runs very very well in all platforms it can develop, always in the first stages of new platfforms, some little errors are presents, but GLbasic Team make  a great effort and a very good work.

I´m sorry about the not succes, but I think can be more about your code, or the mobile device in this case.

Kinds Regards,
Iván J
Title: Re: I am officially fed-up with Android and GLB
Post by: Kitty Hello on 2011-Nov-18
You can send me the code (per email). I'll have a look and tell you where to add performance boosters, if you wish.
Title: Re: I am officially fed-up with Android and GLB
Post by: Wampus on 2011-Nov-18
AlienMenace what the heck happened with the 2.3.4 Android update? I don't like the sound of that.

Seems so much varies from device to device hardware and version to version software. So far I haven't had a single app or test routine I've written fail or run slow on my Galaxy S2 yet. I'm not expecting other devices and OS versions will be as friendly.
Title: Re: I am officially fed-up with Android and GLB
Post by: MrTAToad on 2011-Nov-18
There is so much variance between each device - plus, of course, you get all these generic Chinese ones as well...
Title: Re: I am officially fed-up with Android and GLB
Post by: Hatonastick on 2011-Nov-19
Don't give up, give Kitty a chance.  Take him up on his offer.
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-21
Thanks for the words of encouragement guys but really, GLB's Android stuff still needs some serious work. For example... GLB Apps crash if they do not use CREATECREEN/USESCREEN. Kindle Fire GETSCREEN returns the wrong screen size & also mouse-coordinates are incorrect, and 2D stuff is slow, slow, slow. I don't know about 3D performance, my game is a 2D shooter and does have lots of stuff going on which my iPads handle without breaking a sweat.

Glad to hear at least the sound issues have been worked out for the next update.

I feel I have optimized the heck out of my game, I have used texture atlas whenever possible to reduce the number of texture swaps and consolidated loops whenever possible, etc. to even get it close to running at a decent speed, I DID NOT not have to worry about doing ANY of this for iPad and was able to just use the built-in DRAWSPRITE commands and still get exceptional speed on my iPad2.

GLB code on both of my dual-core Android tablets just runs lethargically slow. Period. As I mentioned, I did have my game running very well on the HTC Flyer (single core 1.5GHz Snapdragon)... until Gingerbread update 2.3.4 killed my frame rate by 50%, apparently the HTC update broke something GLB is doing as the rest of the games I have downloaded from the market still run fine. One day it worked great and literally the next day it is unplayable. Not sure what more optimization in my code I can do to address an issue like this. It is a definite show-stopper. The level of frustration something like this causes is not something I can easily put into words right now.

At this point, I think there are some improvements that Gernot can make to GLB to run better on Android hardware because even though these new dual-core tablets are not as fast as the iPad 2, they should certainly run my 2D GLB game better than this. I was also hopefull that the last Android fix would have done more but hey, at least collisions are working now.

There are reports in another thread that the Kindle Fire is not running GLB apps correctly...
http://www.glbasic.com/forum/index.php?topic=7307.0

Christmas is right around the corner now... would theoretically be a good time to get apps up for sale, especially for the Fire.
I had put a lot of faith into GLB so this kind of stuff is really, really distressing.
Title: Re: I am officially fed-up with Android and GLB
Post by: spacefractal on 2011-Nov-21
I don't mean I use create screen for my game, but draw to back buffer directly (I also not use set screen as well). You might need set use screen to back buffer first.

This due fps was dropped extractly over 50% here (somewhere same code idea asmos used in code snippets), so wierd if you cant draw to backbuffer directly without crash, so its mightbeen other issue?

Returning wrong resolution might been a manifest issue, but cords sound like a glbasic bug (inverted I think).

I guess you target 30fps as well 60fps? If yes, a double update() before paint() could kill too.
Title: Re: I am officially fed-up with Android and GLB
Post by: erico on 2011-Nov-21
I understand the frustration on something that suddenly does not work.
What to take the opportunity to re code / accept more team help some parts and also workout an upgrade?

I know it sucks to be forced to under such conditions but if taken as an opportunity if you can?

Don´t know, I mean just positive words....
It would have to happen to me so I know the true feeling.

keep up. :rtfm:
Title: Re: I am officially fed-up with Android and GLB
Post by: MrTAToad on 2011-Nov-21
I suspect there is still a lot of debug code still in the Android libraries that could be removed...
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-21
That's what I have been wondering as well. My game is actually running pretty good on my Fire now (except for the sound issues) and I've made adjustments for the mouse co-ordinates so I guess I will just focus on getting an Amazon-store Kindle only version ready and forget about the other stuff for the time being. On a related note, anybody know how to build for the Amazon Store? Is it the same as it is for the market or are there other steps to follow?

Thanks guys and thanks Gernot, I certainly do appreciate all the hard work you put into this for us.
Title: Re: I am officially fed-up with Android and GLB
Post by: spacefractal on 2011-Nov-21
I wish it was possible to check device name using platform info, so it's would doing that runtime (I doing this for iOS with a system call).

Amazon store works for other devices than it's own, so no good doing that.

Better if gernot could fix it or a least doing that like above.
Title: Re: I am officially fed-up with Android and GLB
Post by: Kitty Hello on 2011-Nov-21
OK, there's an update now that makes my apps run quite fast on Android (HP Touchpad).
If mouse coords are off of getscreensize is wrong, you must change android:anyDensity.

If it's still slow, post your AndroidManifext.xml file here.
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-22
Does this include the sound buffer fix as well?
Title: Re: I am officially fed-up with Android and GLB
Post by: Kitty Hello on 2011-Nov-22
Yes. See the logfile.
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-22
Tried that first butit the English page still shows only up to 10.159 and the German one returns a page not found error.
Title: Re: I am officially fed-up with Android and GLB
Post by: Albert on 2011-Nov-22
Just update from inside the glBasic (Web->Update)
I downloaded it yesterday night.
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-23
// 10.179
   // Core:
   //    a[-1] did not fail for empty arrays.
   //    ASC has optional index parameter.
   //    SOCK_GETREMOTEIP() was broken.
   //    VIEWPORT reset some 2D setting (SMOOTHSADING...). Fixed now.
   //    NEWWEBGET crashed for URLs > 900 chars.
   //
   // Caanoo:
   //    CLEARSCREEN 0 - was ignored.

Is this everything that was updated? I don't see any of the Android fixes you mentioned.
Title: Re: I am officially fed-up with Android and GLB
Post by: Kitty Hello on 2011-Nov-23
Haha. Got me. I forgot to log it.
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-23
 :whistle:
Title: Re: I am officially fed-up with Android and GLB
Post by: fuzzy70 on 2011-Nov-23
Might be an idea to update the current available version at the top of the forum. It has been saying "*NEW* Current Version:  10.057" since I started using GLB & I began with 10.118 just over a month or so ago I think  :D

Lee
Title: Re: I am officially fed-up with Android and GLB
Post by: AlienMenace on 2011-Nov-25
Hmm... haven't really noticed any speed increase on my Thrive tablet with the latest build... on the other hand, it runs awesome my my new Touchpad.