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 kalle_h » Tue Jan 17, 2012 10:14 pm

If you don't give box2d world then all lights are xrays which means they are super fast. But then you dont get dynamic lights. Still lot better than no lights at all.

Lights are just meshes which drawed with additive blending over the top of your game. No overhead.
kalle_h
 
Posts: 666
Joined: Thu Dec 29, 2011 9:50 pm

Re: box2dLights

Postby pasman » Tue Jan 17, 2012 11:13 pm

cool, just finished a first integration and it works just as expected.
Thanks man!
pasman
 
Posts: 10
Joined: Wed Dec 15, 2010 2:11 pm
Location: Cluj-Napoca, Romania

Re: box2dLights

Postby xpe » Wed Jan 18, 2012 9:42 pm

This is really nice but I have a simple question, why when I run light test demo with opengles 2.0 turned off it works fine on pc and not on android?
I can only see the background where light is (PC) but on android is different, I see everything. Is Blend kinda limited for android devices with ES 1.X? Sorry I'm still new in opengles stuff
using defy

thx
xpe
 
Posts: 43
Joined: Wed Jan 18, 2012 9:16 pm

Re: box2dLights

Postby kalle_h » Thu Jan 19, 2012 12:15 am

xpe wrote:This is really nice but I have a simple question, why when I run light test demo with opengles 2.0 turned off it works fine on pc and not on android?
I can only see the background where light is (PC) but on android is different, I see everything. Is Blend kinda limited for android devices with ES 1.X? Sorry I'm still new in opengles stuff
using defy

thx


Shadows need framebuffer with alpha channel with gles1.0 this is usual case with desktop but on android default is 16bit framebuffer with rgb565 channels but no alpha.
On gles2.0 lights are lot better looking so I would just encourage you to use that.
kalle_h
 
Posts: 666
Joined: Thu Dec 29, 2011 9:50 pm

Re: box2dLights

Postby Gooni » Sun Feb 19, 2012 10:34 am

THANKS!

And don't forget to end the spritebatch before rendering the lights. :oops:
Gooni
 
Posts: 66
Joined: Sat Oct 08, 2011 10:54 am

Re: box2dLights

Postby Veedoo » Thu Sep 27, 2012 6:35 am

Hi, I'm planning to take advantage of the box2dLights library. Just one question - is it still being developed? LibGDX is moving forward pretty fast and I haven't seen any updates on box2dLights since FEB... anyone knows?
Veedoo
 
Posts: 165
Joined: Mon May 09, 2011 1:53 pm

Re: box2dLights

Postby kalle_h » Sun Sep 30, 2012 10:16 pm

Veedoo wrote:Hi, I'm planning to take advantage of the box2dLights library. Just one question - is it still being developed? LibGDX is moving forward pretty fast and I haven't seen any updates on box2dLights since FEB... anyone knows?


Box2dLights does not rely libgdx stuff that much but I haven't checked compatibility for months. Currently all my time goes to my job where I make iOs games with c++ so I haven't done any libgdx coding lately. If there is some problems with working I can update it but there are hardly any new features left in development.
kalle_h
 
Posts: 666
Joined: Thu Dec 29, 2011 9:50 pm

Re: box2dLights

Postby Veedoo » Tue Oct 16, 2012 6:55 pm

That is OK. Just verified and looks it works perfectly!! Thanks!
Veedoo
 
Posts: 165
Joined: Mon May 09, 2011 1:53 pm

Re: box2dLights

Postby kalle_h » Sat Oct 27, 2012 1:39 pm

Veedoo wrote:That is OK. Just verified and looks it works perfectly!! Thanks!

Thanks for checking it. Good to hear it works.
kalle_h
 
Posts: 666
Joined: Thu Dec 29, 2011 9:50 pm

Re: box2dLights

Postby Gooni » Mon Nov 12, 2012 8:24 am

Hi,
thx for the lib. I'm using it and it works flawless so far.
However I have problems doing something specific: I want to render a screen of my level - including the light/darkness - to a texture. My level is rendered to the framebuffer correctly, but light&darkness don't show up on my texture.

Code: Select all
FrameBuffer m_FrameBuffer = new FrameBuffer(Format.RGB565, (int)(width * m_fboScaler), (int)(height * m_fboScaler), false);
TextureRegion m_OutTexture = new TextureRegion(m_FrameBuffer .getColorBufferTexture());

m_SpriteBatch.begin();
m_FrameBuffer.begin();
m_Level.DrawContent();
m_Level.DrawLights();
m_FrameBuffer.end();
m_SpriteBatch.end();


What am I doing wrong? Any suggestions to fix this are greatly appreciated.
Cheers, Gooni.
Gooni
 
Posts: 66
Joined: Sat Oct 08, 2011 10:54 am

PreviousNext

Return to Showcase

Who is online

Users browsing this forum: No registered users and 1 guest