Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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  
  Box2d & Box2d Lights Simpleness Example  (Read 4795 times)
0 Members and 2 Guests are viewing this topic.
Online Slyth2727
« Posted 2013-07-12 01:12:35 »

Ok, just to show how awesome and simple libgdx box2d and box2d lights are check this out. I just started learning box2d yesterday and have come up with this. I'm really enjoying learning this library and I hope others will realize how great it is!

Use WASD to move and scroll to enlarge or decrease light.

Pics:








If you want to play with it, check out the download here:

 http://www.mediafire.com/download/1gvjchyevfdwuu2/Box2dCoolExample.jar

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline DazKins
« Reply #1 - Posted 2013-07-13 13:03:05 »

The file you've provided is a .zip not a .jar so it won't run with java.

Please could you get this fixed, i really wanna try this  Cheesy

DazKins

Check out my Dev Blog: http://dazkins.tumblr.com
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 139
Projects: 4
Exp: 3 years



« Reply #2 - Posted 2013-07-13 13:46:29 »

The file you've provided is a .zip not a .jar so it won't run with java.

Please could you get this fixed, i really wanna try this  Cheesy
Unless I'm missing something here, you're supposed to unzip the .zip to get the .jar...anyways, .jar is not the only executable that works with Java anyways.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Troncoso

JGO Coder


Medals: 20



« Reply #3 - Posted 2013-07-13 16:30:34 »

It worked when I downloaded it. It is, in fact, a runnable jar file that you are downloading.
Online Slyth2727
« Reply #4 - Posted 2013-07-14 00:11:03 »

Yes, I did post a .jar. You may have to right click and say run with java Smiley

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline grevius
« Reply #5 - Posted 2013-09-10 09:07:33 »

i see this kind of light in libgdx, my question is, can I run this on my android application without a considerable drop down frame rate or it's quite light to calculate for the phone? i don't know if you can understand my question XD
Offline pitbuller
« Reply #6 - Posted 2013-09-10 21:40:34 »

i see this kind of light in libgdx, my question is, can I run this on my android application without a considerable drop down frame rate or it's quite light to calculate for the phone? i don't know if you can understand my question XD

It's used many mobile games without problems. I developed this library mobile in my mind and actually its just side project when I make game programming course at university where I coded for really old android phone.(2010?)
Online Slyth2727
« Reply #7 - Posted 2013-09-11 00:23:18 »

Ah you're the creator of this great library? Kudos to you sir! May I make a suggestion? Add the option to have penumbras instead of complete soft shadows. I'm sure you could throw these in there relatively easily.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline StumpyStrust
« Reply #8 - Posted 2013-09-11 05:41:42 »

Windows 7 can add the ".zip" extension to a downloaded jar because it sees it as just a zip file. Look at the name of the file and it will be something.jar.zip.

Offline pitbuller
« Reply #9 - Posted 2013-09-11 18:49:13 »

Ah you're the creator of this great library? Kudos to you sir! May I make a suggestion? Add the option to have penumbras instead of complete soft shadows. I'm sure you could throw these in there relatively easily.

With current implementation this would add quite much of additional trickery. I have another light system with pure gpu solution which look lot more scalable.(up to 8k shadow casting lights with laptop) With that solution penumbras are really easy. Not promising anything yet thought.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online Slyth2727
« Reply #10 - Posted 2013-09-11 21:29:16 »

Wow that's great performance! Can I get one insight on that? Do you use shaders to render the shadows or do you use geometry?  I am guessing geometry because that is generally more performant. I look forward to what you come up with in the future Smiley.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline pitbuller
« Reply #11 - Posted 2013-09-30 21:28:12 »

Wow that's great performance! Can I get one insight on that? Do you use shaders to render the shadows or do you use geometry?  I am guessing geometry because that is generally more performant. I look forward to what you come up with in the future Smiley.
New system use only shaders. Basic algorithm is simple.

1. Calculate bounding box of all lights that contribute to screen.(might be bigger thab screen)
2. Render all occluders that are inside of that bounding box to fbo that is fitted to that bounding box.
3. Calculate 1d shadow maps for all lights using just single pass.
4. Render all lights to fbo. Optimal solution is using vertex shader fetch to save fill rate when light is shadowed. Can use pixel also shader for penumbras. Possible to use normal maps there too.
5. Horizontal separated gaussian blurs pass.
6. Vertical separated gaussian blurs pass.
7. Blend over scene.

There are quite many performance knobs. Occluder texture can be smaller size and use low bandwith texture. Only 1bit is actually needed(but no such render targets exist). Light fbo can be also quite low resolution. Shadow map resolution is quiet important. This 1d texture direclty affect number of raycast for shadow map generation and number of vertices per point light if vertex fetch is used.


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.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (35 views)
2014-12-09 22:41:13

BurntPizza (70 views)
2014-12-08 04:46:31

JscottyBieshaar (32 views)
2014-12-05 12:39:02

SHC (44 views)
2014-12-03 16:27:13

CopyableCougar4 (40 views)
2014-11-29 21:32:03

toopeicgaming1999 (108 views)
2014-11-26 15:22:04

toopeicgaming1999 (94 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!