I made a thing for a game of which right now I am not sure what it will become. But it has dynamic lighting. And that is the important thing.
The "game" might take some time to start and will probably not run very smooth if you have lot's of things in the screen.
Move the light with your arrow keys.
You can draw new shadow-casting objects with the mouse: left click sets a new point, and a right click sets a point and finishes the polygon.
Clear the scene with 'c'.
See some ugly stuff with pressing 'w', 'n' and 'd'.
Enough text, screenshots:
Dynamic Lighting
Dynamic Lighting
- Attachments
-
- dynamic-light.love
- (5.75 KiB) Downloaded 845 times
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Dynamic Lighting
Can you handle multiple light sources? If so, you, hands down, have beaten my two methods for dynamic lighting.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: Dynamic Lighting
Doesn't work on this bad bad computer.
Just darkness.
Just darkness.
Re: Dynamic Lighting
I really love your demo ! I was going to implement it by myself for my upcomming game... but this is just great!
My game uses a tile/grid based graphics engine, so I'm gonna rewrite your demo for tile based systems in the next days...
My game uses a tile/grid based graphics engine, so I'm gonna rewrite your demo for tile based systems in the next days...
Re: Dynamic Lighting
Dude. This would be perfect for real-time roguelike games.
Though it only seems to affect the ground. Walls in shadow are still visible.
Though it only seems to affect the ground. Walls in shadow are still visible.
Re: Dynamic Lighting
Theoretically yes, but you would have to do a few adjustments.Taehl wrote:Can you handle multiple light sources?
Damn you, PO2 syndrome!. Should be fixed now...thelinx wrote:Doesn't work on this bad bad computer.
This is wanted. Hiding walls in shadows would be possible though (but would require some additional code).VideroBoy wrote:Though it only seems to affect the ground. Walls in shadow are still visible.
Apart from the PO2 fix, I added a hopefully more efficient collision (still buggy on slow computers) detection, a camera and did some other stuff.
- Attachments
-
- dynamic-light.love
- (7.25 KiB) Downloaded 498 times
Re: Dynamic Lighting
Shadows are pretty unrealistic.
Re: Dynamic Lighting
Elaborate, please.Tesselode wrote:Shadows are pretty unrealistic.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Dynamic Lighting
Toss some guns and some zombies in there, and you've got a game!
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Dynamic Lighting
I think the shadows look fine. The collision is a little broken with some shapes. I was able to fall into the wall of a couple hand-made shapes. If I force myself I can get sucked in.
Who is online
Users browsing this forum: No registered users and 41 guests