Lighting Dynamics Demo
Re: Lighting Dynamics Demo
Alright, thanks guys!
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: Lighting Dynamics Demo
Here, I made a pixel effect version completely from scratch:
simply do
I couldn't bear your insisting to index tables with strings, why not just use Lua? Instead of
Code: Select all
table["index"]
Code: Select all
table.index
Re: Lighting Dynamics Demo
Ah!
Lumens doesn't seen to work as expected - just changes diameter of spotlight, not it's intensity (alpha), see demo.
Lumens doesn't seen to work as expected - just changes diameter of spotlight, not it's intensity (alpha), see demo.
- Attachments
-
- spynazPE_test.love
- Demo to show problem with light intensity
- (16.74 KiB) Downloaded 205 times
Last edited by Ref on Sat Mar 09, 2013 10:25 pm, edited 1 time in total.
Re: Lighting Dynamics Demo
I like the new version over the previous one.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: Lighting Dynamics Demo
It changes the intensity fine on my computer... you have to remember that it's a reciprocal function.
If you were talking about Ref's vs mine.
I think that I might have messed up with the way I draw the effect, but I'm sure it can be fixed easily enough.
Me too, the trees look coolDavidobot wrote:I like the new version over the previous one.
If you were talking about Ref's vs mine.
I think that I might have messed up with the way I draw the effect, but I'm sure it can be fixed easily enough.
Re: Lighting Dynamics Demo
Sorry, couldn't resist!
Don't bother looking at demo if you don't have 72 seconds to waste.
Don't bother looking at demo if you don't have 72 seconds to waste.
- Attachments
-
- Busy_Bee.love
- Simple dynamic lighting - no canvas but pixel effect used
- (927.35 KiB) Downloaded 213 times
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Lighting Dynamics Demo
Serious question, but is there a drawback to doing that? Is one slower or something or is it just a readability thing?xXxMoNkEyMaNxXx wrote:I couldn't bear your insisting to index tables with strings, why not just use Lua? Instead ofsimply doCode: Select all
table["index"]
Code: Select all
table.index
I use that first method when needed. Like if I need to refer to a table entry through the use of a string variable. For instance:
Code: Select all
table = {
entry1 = "Hello!",
entry2 = "Nope!"
}
num = 1
var = "entry"..num
print(table[var])
> Hello!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Lighting Dynamics Demo
They are equal, but it is way more readable. Consider writing _G["myImage"] = _G["love"]["graphics"]["newImage"]("some/image.png").
And yes, for indexing with variables that is the only way, the 'dot-syntax' only works for names that are also valid identifiers (roughly equatable to potential variable names), but keep in mind that that's a different operation altogether, anyway.
And yes, for indexing with variables that is the only way, the 'dot-syntax' only works for names that are also valid identifiers (roughly equatable to potential variable names), but keep in mind that that's a different operation altogether, anyway.
Re: Lighting Dynamics Demo
Its 72 seconds of processor time (because of os.clock()), so if on my laptop it runs at 60fps with 0.20 load, then it takes 360 seconds (6 min) to complete. For wall-clock time, you need os.time().Ref wrote:Sorry, couldn't resist!
Don't bother looking at demo if you don't have 72 seconds to waste.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Re: Lighting Dynamics Demo
Thanks!
Didn't appreciate the difference!
Docs say:
"os.clock() Return CPU time since Lua started in seconds."
Thought seconds were seconds - that CPU seconds were then same as Universal seconds.
Good catch!
Really appreciate input.
Edit:
Turns out on my computer that the os.clock() and os.time() happen to give the same elapsed time for this demo.
Demo actually is terminated by bee.buzz:isStopped( ) - when music is over.
Didn't appreciate the difference!
Docs say:
"os.clock() Return CPU time since Lua started in seconds."
Thought seconds were seconds - that CPU seconds were then same as Universal seconds.
Good catch!
Really appreciate input.
Edit:
Turns out on my computer that the os.clock() and os.time() happen to give the same elapsed time for this demo.
Demo actually is terminated by bee.buzz:isStopped( ) - when music is over.
Who is online
Users browsing this forum: No registered users and 3 guests