Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (472)
Games in Android Showcase (105)
games submitted by our members
Games in WIP (524)
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 2579 times)
0 Members and 1 Guest are viewing this topic.
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Posted 2013-08-21 09: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

So
http://i.imgur.com/yX5FunO.png

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!!




edit:

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: 231
Projects: 11
Exp: 2 years


If it wasn't Awesome, it wasn't me.


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

Did you break the fps counter? Wink

Offline davedes
« Reply #2 - Posted 2013-08-21 15: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:
https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson5

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:
https://github.com/mattdesl/lwjgl-basics/wiki/OpenGL-ES-Blurs

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (7 views)
2014-07-10 20:20:18

CopyableCougar4 (16 views)
2014-07-10 02:26:14

CopyableCougar4 (25 views)
2014-07-09 02:55:38

Code Mage (25 views)
2014-07-08 23:57:00

Code Mage (10 views)
2014-07-08 23:49:08

AppleSauce (20 views)
2014-07-08 19:25:32

CopyableCougar4 (21 views)
2014-07-06 01:51:26

ipe369 (26 views)
2014-07-05 14:18:25

vastrolorde (37 views)
2014-07-04 18:45:44

theagentd (53 views)
2014-07-02 22:19:37
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!