box2dLights

Present your own projects here, be they WIPs, betas or finished products. Get feedback from others and help each other out with some lovely testing.

Re: box2dLights

Postby Magnesus » Tue Apr 16, 2013 3:48 pm

Solved! I realised what is happening - the old Spine JAR and box2DLight JAR are expecting a method set(float r, float g, float b, float a) in libGDX Color class that returns void while in new libGDX it returns Color. Function set(Color c) works because it was already returning Color. We just need to use the newest source projects in both cases because both projects don't build new JAR files apparently.
Magnesus
 
Posts: 1632
Joined: Sun Sep 25, 2011 3:50 pm

Re: box2dLights

Postby Biki » Tue Jun 11, 2013 1:33 pm

Newest libgdx nightly along with the newest box2dlights nightly crashes with the following error:

Code: Select all
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: com.badlogic.gdx.graphics.Mesh.setVertices([F)V
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:116)
Caused by: java.lang.NoSuchMethodError: com.badlogic.gdx.graphics.Mesh.setVertices([F)V
   at box2dLight.LightMap.createLightMapMesh(LightMap.java:172)
   at box2dLight.LightMap.<init>(LightMap.java:120)
   at box2dLight.RayHandler.<init>(RayHandler.java:112)
   at box2dLight.RayHandler.<init>(RayHandler.java:87)
   at com.asset17.Asset17.create(Asset17.java:57)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:130)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)
Biki
 
Posts: 23
Joined: Sat Apr 20, 2013 11:18 pm

Re: box2dLights

Postby Zarlok » Thu Jun 13, 2013 12:41 pm

Hi!

I have the same issue.

As it s my first experience with box2dlights i was thinking that i made something wrong.

But it seems to be some modifications in the latest nightly.

Something is weird, source code seems to be correct.

Can someone please confirm if it's a nightly build issue, or did i made something wrong in my project ?

thx in advance
Zarlok
 
Posts: 42
Joined: Tue Feb 21, 2012 6:45 am

Re: box2dLights

Postby kylej628 » Fri Jun 14, 2013 3:25 am

I also have this issue, was chugging along following a tutorial, then this hits :( I was so frustrated that I couldn't figure out how to fix it! Hopefully a fix will show up soon!
kylej628
 
Posts: 1
Joined: Fri Jun 14, 2013 3:24 am

Re: box2dLights

Postby Zarlok » Tue Jun 25, 2013 7:53 am

hi,

to avoid this issue, you need to build box2dlights from source.

cf this post : http://badlogicgames.com/forum/viewtopic.php?f=11&t=9707&p=43863&hilit=box2dlights#p43863

1: get box2dlights source from svn repository https://code.google.com/p/box2dlights/source/checkout

2: in box2dlights libs folder overwrite gdx.jar,... with files from libgdx nighty build

3: build box2dlights . there is a build.xml file, so you just need to launch ant

4: you get in a target folder a new box2dlights.jar and box2dlights-sources.jar files. Overwrite old ones in your project libs folder with the new ones.

5: your project should now be able to use box2dlights

it works for me
Zarlok
 
Posts: 42
Joined: Tue Feb 21, 2012 6:45 am

Re: box2dLights

Postby dimecoin » Thu Nov 14, 2013 4:24 am

Zarlok wrote:4: you get in a target folder a new box2dlights.jar and box2dlights-sources.jar files. Overwrite old ones in your project libs folder with the new ones.


would you mind posting the .jar here?
dimecoin
 
Posts: 334
Joined: Wed Oct 31, 2012 5:33 am

Re: box2dLights

Postby evilentity » Sat Aug 02, 2014 1:36 am

Is there a proper way of resetting the lights? I have a bunch of pooled objects, changing the lights to new position makes them blink sometimes in old position when used with light.setEnabled(). Ive tried various orders of calling setPosition and enabling/disabling the light but i couldnt get it to work. Not disabling the lights works as expected, but marginally increased the cpu cost as they have to be culled.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4461
Joined: Wed Aug 24, 2011 11:37 am

Previous

Return to Showcase

Who is online

Users browsing this forum: No registered users and 1 guest