Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LibGDX + Android = soo much 10fps(SOLVED)  (Read 7160 times)
0 Members and 1 Guest are viewing this topic.
Offline namrog84

JGO Ninja

Medals: 46
Projects: 4

Keep programming!

« Posted 2013-08-21 07:14:23 »

So I am trying to isolate an issue.  My game always seems to run at 10fps.

I first thought it was having too many 'box2d' objects, I averaged about 1000.  So I rewrote my code so now there is usually less than 150

Then I thought maybe it was the fact that in level creation, I was filling the whole level, then 'removing' the empty parts.
-So I redid it, in a way I should have done from beginning, and had it only create from nothing the very specific parts.

So then I realized, all my optimizations were pointless and stupid because nothing had changed.
So I started to look into profiling so I know for REALZ Pointing  what is actually causing the slowdown.

I am a newb when reading it but I am using eclipse's DDMS
At some point I start method profiling.
and I start to see where the most cpu and time is spent. then try to reduce from there.

So in beginning I tried optimizing those sections,  but after seeing 0 effect, I just started commenting out entire blocks of code, render, update sections
To the point, where I wasn't rendering/updating any particles, worldly tiles or anything.
Its essentially all removed away. and its still running at 10fps!   Cranky Cry Angry


I am not sure what I should be looking for.  What exactly is causing my slowdowns?
I've removed quite a bit of code but should I try and lower excl cpu % or excl real time? or cpu time/call ?
I am not sure which of the statistics should be my focus. As you can see, they arent necessarily all in the same places.
I have no idea what is causing the performance to be sooo slow.

Any thoughts or helps on how to isolate the performance issue would be greatly appreciated!!


after hours of struggling, but within minutes of posting. I find the problem

So I switched cfg.useGL20 back to false.  And although I doubt that is the issue directly.
It made me turn off a ShaderProgram and FrameBuffer that I was using for a realtime Gaussian blur for the distant background.
and Although I had removed the rendering of what it was blurring. I never removed the 'blurring' itself.
Once I removed that, fps jumped back up to 60 (well most of the time  Clueless )

Anyways, I suppose there is a more efficient way to do Gaussian blurring than the way I had done it, but I am not too worried about it right now. Just gonna remove it.

"Experience is what you get when you did not get what you wanted"
Offline HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #1 - Posted 2013-08-21 07:21:34 »

Did you break the fps counter? Wink

Offline davedes
« Reply #2 - Posted 2013-08-21 13:52:11 »

FBOs and gaussian blurs are expensive on Android. Firstly you should use tricks to optimize, like low-res FBO, bilinear sampling to reduce texture fetches, and non-dependent texture reads (passing texcoords from vertex shader).

Some of it is explained here:

But most of the time you won't be able to achieve real-time full screen multi-pass blurs with (current) hardware on Android. Here is a look at some alternatives:

Pages: [1]
  ignore  |  Print  

hadezbladez (295 views)
2018-11-16 13:46:03

hadezbladez (164 views)
2018-11-16 13:41:33

hadezbladez (295 views)
2018-11-16 13:35:35

hadezbladez (75 views)
2018-11-16 13:32:03

EgonOlsen (2156 views)
2018-06-10 19:43:48

EgonOlsen (2183 views)
2018-06-10 19:43:44

EgonOlsen (1370 views)
2018-06-10 19:43:20

DesertCoockie (1988 views)
2018-05-13 18:23:11

nelsongames (1631 views)
2018-04-24 18:15:36

nelsongames (2279 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!