Java-Gaming.org Hi !
 Featured games (90) games approved by the League of Dukes Games in Showcase (684) Games in Android Showcase (196) games submitted by our members Games in WIP (752) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 Show Posts Pages: [1]
 1 Game Development / Newbie & Debugging Questions / Re: Libgdx + Box2d = ~8 fps on android? on: 2013-09-06 06: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 box2dbut 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 21:58:23 hey  thanks =) then ill test it out on desktop version until i got a phone
3  Game Development / Newbie & Debugging Questions / Libgdx + Box2d = ~8 fps on android? on: 2013-09-03 13: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 12: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
 5 Games Center / Showcase / Re: Ten Second Sketch [Ludum Dare Jam Entry] on: 2013-08-28 10:30:03 just tested it out but its running slow x.xthis 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.95the input reacted with like 1-2 seconds lag =(well this comp here is a dualcore 3.0 ghzdidnt check out the jar file yet but atm i havent got time to play 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 08: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 18:57:47
Heyho folks

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.
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 07:00:26 i dont even know how a blog post would look like o.Oim not really into such things but ill try to document my problems and stuff like thatfor now ill just try to complete my tasks so i can keep working on my game
9  Game Development / Newbie & Debugging Questions / box2dlight + libgdx -> cant get it to work (SOLVED) on: 2013-08-22 10: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
Caused by: java.lang.IllegalArgumentException: color attribute must have 4 components
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)

i am using the stable libgdx 0.9.8

maybe somebody around here may have an idea

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?

edit: got the line of code where it all goes to valhalla x.x  its in libgdx  :
 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

edit 3:

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

sorry for spamming your forum xD but i did not know that i can fix it on my own just started my apprenticeship this month as a programmer ^^
 Pages: [1]
 orrenravid (228 views) 2016-07-16 03:57:23 theagentd (298 views) 2016-07-11 14:28:54 Hydroque (384 views) 2016-07-06 05:56:57 Hydroque (537 views) 2016-07-03 08:52:54 GrandCastle (404 views) 2016-07-01 09:13:47 GrandCastle (399 views) 2016-07-01 09:09:45 CopyableCougar4 (451 views) 2016-06-25 16:56:52 Hydroque (422 views) 2016-06-22 02:17:53 SwampChicken (387 views) 2016-06-20 13:22:57 SwampChicken (306 views) 2016-06-20 13:22:49
 Archive 30x Slyth2727 24x Brynn 23x EgonOlsen 22x orangepascal 22x TritonDreyja 21x orange451 20x DavidBVal 19x Spasi 18x Opiop 11x princec 11x LiquidNitrogen 11x Phased 11x Longor1996 10x ziozio 10x h.pernpeintner 9x
 Making a Dynamic Plugin Systemby Hydroque2016-06-25 00:13:25Java Data structures2016-06-13 21:22:09Java Data structures2016-06-13 21:20:42FPS Camera Tutorialby Hydroque2016-05-22 05:40:58Website offering 3D Models specifically for games for freeby vusman2016-05-18 17:23:09Website offering 3D Models specifically for games for freeby vusman2016-05-09 08:50:56Website offering 3D Models specifically for games for freeby vusman2016-05-06 11:10:21Website offering 3D Models specifically for games for freeby vusman2016-04-29 12:56:17
 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