Page 2 of 2

Re: 2D Dynamic Lighting Tutorial

Posted: Wed Feb 09, 2011 3:20 am
by Firzen
Just to be clear and make sure that you understand my point.

A tutorial is not ment to be dropped into your code, it just illustrates the idea.

Now, I don't know about how you code, but I actually prefer to write code myself than "dropping it in".
You can surely optimize the code and I won't say that that's not a valuable discussion, but for those that just want to learn it surely is a bit of a distraction and on top of that, your wording on that "critique" is not really constructive.
pubby8 wrote:It is very nice of you to write such an example, however I wanted to point out that there are numerous flaws in your method and that this code should not be used in game.

You should spend some time and optimize it.
All your posts sounds pretty much the same, it's always like: "Yeah, pretty nice what you did there. Oh, also, fuck you"
But that's not how a forum or real life works. Pointing out that the code can be optimized and all is not a bad thing. But the way in which you do it is.

Also, like I said before, optimizing tutorial code is just bad, because it easily obfuscates the basic idea. While you might want to point out ways to optimize the method you don't want to actually include them in the same tutorial about basic lighting techniques. So at least start a new topic if you want to discuss optimization issues.

Re: 2D Dynamic Lighting Tutorial

Posted: Wed Feb 09, 2011 4:22 am
by N64vSNES
We should all take bets on how long it'll be before pubby8 gets banned :lol:

The tutorial was great, very well explained. I'll probably have to play with this later. ;)

Re: 2D Dynamic Lighting Tutorial

Posted: Wed Feb 09, 2011 12:44 pm
by dandymcgee
N64vSNES wrote:We should all take bets on how long it'll be before pubby8 gets banned :lol:
Honestly, I think he's funny.

Re: 2D Dynamic Lighting Tutorial

Posted: Thu Feb 10, 2011 7:42 am
by GroundUpEngine
dandymcgee wrote:
N64vSNES wrote:We should all take bets on how long it'll be before pubby8 gets banned :lol:
Honestly, I think he's funny.
LOL

Re: 2D Dynamic Lighting Tutorial

Posted: Thu Feb 10, 2011 3:31 pm
by dandymcgee
GroundUpEngine wrote:
dandymcgee wrote:
N64vSNES wrote:We should all take bets on how long it'll be before pubby8 gets banned :lol:
Honestly, I think he's funny.
LOL
Told ya so. Even GroupUpEngine is laughing.

Re: 2D Dynamic Lighting Tutorial

Posted: Wed Mar 02, 2011 7:30 pm
by dnxviral
dandymcgee wrote:
GroundUpEngine wrote:
dandymcgee wrote:
N64vSNES wrote:We should all take bets on how long it'll be before pubby8 gets banned :lol:
Honestly, I think he's funny.
LOL
Told ya so. Even GroupUpEngine is laughing.
Haha the whole thing was funny

Besides that irrelevancy. The tutorial is freakin awesome. Impressed, I applaud you. :) I'll be sure to keep this in mind!

Re: 2D Dynamic Lighting Tutorial

Posted: Thu Mar 10, 2011 10:57 pm
by MadPumpkin
Wow... This is completely amazing, I'm very impressed with the whole thing :worship: I've honestly never seen anything that made me awe for longer than just even the screen shot of the dynamic light in action. And hey, why can't I be a Jealous Self-Righteous Prick? I demand that I be changed to a Jealous Prick!!

EDIT: Not exactly what I had in mind, but still fitting.

Re: 2D Dynamic Lighting Tutorial

Posted: Sat Apr 02, 2011 9:52 pm
by TheAustech
Whoa, lots of posts since I've been gone.

Thanks for kind of standing up for me, but to be fair pubby8 was only addressing that it was unoptimized. And looking back at my tutorial, there are some things that should of been taken care of for optimization.

Like storing the trig value, it would help a lot.

Maybe pubby didn't say it in the..."nicest" way possible, but still he did bring up that it was unoptimized a bit. :P

Thanks again for all the support though, it means a lot ;)

Re: 2D Dynamic Lighting Tutorial

Posted: Fri May 13, 2011 9:47 am
by Falco Girgis
TheAustech wrote:Whoa, lots of posts since I've been gone.

Thanks for kind of standing up for me, but to be fair pubby8 was only addressing that it was unoptimized. And looking back at my tutorial, there are some things that should of been taken care of for optimization.

Like storing the trig value, it would help a lot.

Maybe pubby didn't say it in the..."nicest" way possible, but still he did bring up that it was unoptimized a bit. :P

Thanks again for all the support though, it means a lot ;)
It wasn't just this post. He spent all of his time trolling around looking for any little place to bitch to prove his superiority.
MadPumpkin wrote:And hey, why can't I be a Jealous Self-Righteous Prick? I demand that I be changed to a Jealous Prick!!
Thank you so much, whoever changed his rank to "Dumbass." Very fitting.

Re: 2D Dynamic Lighting Tutorial

Posted: Wed Nov 30, 2011 1:43 am
by qwerber
Err, I know this thread was from May, but I wanted to contribute something.

Instead of using the trigonometric functions, you can simply extend the x and y distances between the light and the vertex you are computing. Maybe a little code will explain things:

Code: Select all

castedPoint->x = (light->x - vertex->x) * 5 + light->x;
castedPoint->y = (light->y - vertex->y) * 5 + light->y;
For each vertex you compute a casted point, and then used those points to render shadow geometry. There is a slight advantage because you avoid the trig functions, but unless this is performance critical code, any trig overhead can be neglected...

I also noticed that multiple light blending was not mentioned... don't know if I should bring that up... this seems to be a very strict forum;

Anyways, C++ isn't my "main" language so forgive my if I coded wrong, I think it's pretty much understandable.

Re: 2D Dynamic Lighting Tutorial

Posted: Sat Aug 02, 2014 7:53 pm
by HeadClot
Just thought I would reply to this as some images in the stickies are broken/borked. :\

Re: 2D Dynamic Lighting Tutorial

Posted: Sat Aug 02, 2014 9:14 pm
by dandymcgee
HeadClot wrote:Just thought I would reply to this as some images in the stickies are broken/borked. :\
Probably not going to be fixed unless Google happens to have them cached and someone is bored enough to go find them.

Re: 2D Dynamic Lighting Tutorial

Posted: Sun Aug 03, 2014 9:20 am
by Aido97
Oh man great tutorial. Been looking for something like this :shock2: