Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Libgdx + Box2d = ~8 fps on android? on: 2013-09-06 08:24:01
thanks for the advices ^^  at the moment it is not necessary to check the code    it was just a test if i could work with box2d
but atm i am working on my first game maybe ill get it to WIP soon ^^
2  Game Development / Newbie & Debugging Questions / Re: Libgdx + Box2d = ~8 fps on android? on: 2013-09-03 23:58:23
hey  thanks =) then ill test it out on desktop version until i got a phone Tongue
3  Game Development / Newbie & Debugging Questions / Libgdx + Box2d = ~8 fps on android? on: 2013-09-03 15:11:39
Heyho folks ^^

I was wondering about my performance on an android.
Just to test i made a very simple "Game" where i just make a world (box2d) + renderer and cam.
I have added 1 Body with this code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
BodyDef circleDef = new BodyDef();
      circleDef.type = BodyType.DynamicBody;
      circleDef.position.set(80, 120);
     
      Body circleBody = world.createBody(circleDef);
     
      CircleShape cs = new CircleShape();
      cs.setRadius(1);
     
      FixtureDef fd = new FixtureDef();
      fd.shape = cs;
      fd.density = 1;
      fd.friction = 0.2f;
      fd.restitution = 0.8f;
     
      circleBody.createFixture(fd);
      return circleBody;


here is my rendering method :

1  
2  
3  
4  
5  
public void update(float delta)
   {
      renderer.render(world, cam.combined);
      world.step(1/60f, 6, 2);
   }




now on my comp i have got like 60 fps   thats okay  but after launching on android it drops to ~8 fps o.O and this is not suitable for me =(

its the first time im working with android and my second time working with libgdx.

My question is:
can i somehow get this running on android or should i just forget it?   (btw. i cant connect a real android atm so i use the AVD for Nexus One  made out of the given Device Definitions)
4  Games Center / WIP games, tools & toy projects / Re: Earth Defender on: 2013-08-29 14:27:38
looks nice  maybe i'll try it out at home  (need to transport my comp so probaly i wont test it)

keep it up Cheesy
5  Games Center / Showcase / Re: Ten Second Sketch [Ludum Dare Jam Entry] on: 2013-08-28 12:30:03
just tested it out but its running slow x.x
this comp here is not the best but its not playable with that issue :/

i am using windows 7 64 bit and opened your game with chrome 28.0.1500.95

the input reacted with like 1-2 seconds lag =(

well this comp here is a dualcore 3.0 ghz

didnt check out the jar file yet but atm i havent got time to play Tongue

edit:
the game looks nice and fun ^^
in my opinion its cool overall, but the performance issues i got prevent me from testing this out atm.
6  Game Development / Newbie & Debugging Questions / Re: Apache License -> What exactly do i have to include to share my code/application on: 2013-08-28 10:09:04
Hey  somehow i failed yesterday with copy + paste and got the wrong part x.x so here comes the right one:

1  
2  
3  
4  
5  
//   It requires you to:

//   include a copy of the license in any redistribution you may make that includes Apache software;

//   provide clear attribution to The Apache Software Foundation for any distributions that include Apache software.


so my question was sort of:
what parts of the licenses do i have to include?
I am using libgdx just as an example and well the catch is that i just dont understand what exactly i have to do to be legaly correct ^^
7  Game Development / Newbie & Debugging Questions / Apache License -> What exactly do i have to include to share my code/application on: 2013-08-27 20:57:47
Heyho folks Cheesy

I worked on my very first game and around 3 months ago i started with serious programming.
Now i wanted to share the code with somebody  I barely know, but I want to license it with the Apache License 2.0.
I was reading the faq -->http://www.apache.org/foundation/license-faq.html<--
and came across the "I'm not a lawyer. What does it all MEAN?" part.
There i were stuck at the part:
1  
2  
3  
  //  It does not require you to:

 //   include the source of the Apache software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;

now i searched around but i could not find an (for me) understanable explentation :/
so now i would like to know what exactly do i have to include? ^^
8  Game Development / Newbie & Debugging Questions / Re: box2dlight + libgdx -> cant get it to work (SOLVED) on: 2013-08-23 09:00:26
i dont even know how a blog post would look like o.O
im not really into such things Tongue but ill try to document my problems and stuff like that

for now ill just try to complete my tasks so i can keep working on my game Cheesy
9  Game Development / Newbie & Debugging Questions / box2dlight + libgdx -> cant get it to work (SOLVED) on: 2013-08-22 12:43:52
Hello peeps, I started to create a 2D topdown Tilebased Game and i wanted to add some lightning.

I found this tut:http://voodoobits.blogspot.de/2012/04/and-there-was-light.html
but i could not get it to work.

at this place:
1  
2  
3  
light_world = new com.badlogic.gdx.physics.box2d.World(new Vector2(), true);
RayHandler.useDiffuseLight(true);
rayHandler = new RayHandler(light_world); // <----- this one

i get an Exception and that was it then :/


here is what my eclipse says :

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.IllegalArgumentException: color attribute must have 4 components
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
Caused by: java.lang.IllegalArgumentException: color attribute must have 4 components
   at com.badlogic.gdx.graphics.VertexAttributes.checkValidity(VertexAttributes.java:104)
   at com.badlogic.gdx.graphics.VertexAttributes.<init>(VertexAttributes.java:52)
   at com.badlogic.gdx.graphics.glutils.VertexArray.<init>(VertexArray.java:53)
   at com.badlogic.gdx.graphics.Mesh.<init>(Mesh.java:99)
   at box2dLight.RayHandler.<init>(RayHandler.java:120)
   at box2dLight.RayHandler.<init>(RayHandler.java:87)
   at de.vdb.tiledmapgametest.LightRenderer.<init>(LightRenderer.java:30)
   at de.vdb.tiledmapgametest.WorldRenderer.drawLight(WorldRenderer.java:93)
   at de.vdb.tiledmapgametest.WorldRenderer.render(WorldRenderer.java:86)
   at de.vdb.tiledmapgametest.Gamescreen.render(Gamescreen.java:97)
   at com.badlogic.gdx.Game.render(Game.java:46)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:187)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)


i am using the stable libgdx 0.9.8

maybe somebody around here may have an idea Cheesy

btw. the light_world is filled somewhere else after that piece of code but as far as i can see that is nothing i have to care about at this place right?  Roll Eyes

edit: got the line of code where it all goes to valhalla x.x  its in libgdx  :
com.badlogic.gdx.graphics.VertexAttributes  Line 104
1  
2  
3  
4  
5  
6  
if (attribute.usage == Usage.Color || attribute.usage == Usage.ColorPacked) {
            if (attribute.numComponents != 4) throw new IllegalArgumentException("color attribute must have 4 components"); // <--- this one :D

            if (cols) throw new IllegalArgumentException("two color attributes were specified");
            cols = true;
         }


while debugging i found out that i have got 2 attributes    vertex positions and color     color got 4 args  thats ok but here the color attribute got the usage code 4  and the positions 1   libgdx is asking for code 1 as color code and then it runs into 2 components  not 4  after that ->  crash x.x


edit 2 :

Okay now i can see that box2dlights uses the Usage class of libgdx  and takes Usage.Position for the position attributes and Usage.ColorPacked for the Color   so far its okay    but now at Runtime i got the code 1 for the pos attribute and it is recognized as a color, but for the position the code 0 is used in my libgdx o.O    seems like in my libgdx there are other codes used then in box2dlight  ill try to change from stable to nightly if that fixes my bug   ill report back soon Tongue

edit 3:

after a break and updating my libs to the nightly build its working now Cheesy

sorry for spamming your forum xD but i did not know that i can fix it on my own Tongue just started my apprenticeship this month as a programmer ^^
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

pw (22 views)
2014-07-24 01:59:36

Riven (20 views)
2014-07-23 21:16:32

Riven (17 views)
2014-07-23 21:07:15

Riven (20 views)
2014-07-23 20:56:16

ctomni231 (48 views)
2014-07-18 06:55:21

Zero Volt (44 views)
2014-07-17 23:47:54

danieldean (35 views)
2014-07-17 23:41:23

MustardPeter (38 views)
2014-07-16 23:30:00

Cero (53 views)
2014-07-16 00:42:17

Riven (53 views)
2014-07-14 18:02:53
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!