The technique used here was actually inspired from something that DarkCampainger made a while back, but never released. It's kind of hacky and there's a lot of vector math involved for rendering the shadows.

Here's a really fat gif of the new lighting system in action: http://puu.sh/4vGZS.gif

Thus far, it runs smoothly in multiplayer and singleplayer. Unfortunately, it's not very useful in multiplayer games for various reasons.
I came a little bit.
Ah, I get it. You're using transform() on the shadows, and calculating out where to draw them from the position of the torch, right?
In response to Topkasa
Topkasa wrote:
Ah, I get it. You're using transform() on the shadows, and calculating out where to draw them from the position of the torch, right?

Basically. I also compute the angles for each edge for the shadows. Technically, atom.transform isn't capable of doing a square -> trapezoid type of transformation, so getting around that is where some of the complexity in this system comes from as well.

The system is also presently capable of casting shadows from convex polygons of arbitrary orientation.
In response to D4RK3 54B3R
D4RK3 54B3R wrote:
Technically, atom.transform isn't capable of doing a square -> trapezoid type of transformation, so getting around that is where some of the complexity in this system comes from as well.

Wait, it can't? That's kind of an important transformation, in my opinion. I was planning on using that for simple card rotation animations. I am sad.
A trapezoidal transform is a lot more complex and cannot he represented in a single matrix.

You could tesselate the card into triangles and apply a transform to each of those to achieve an equivalent effect, however.
I'd like to make a game with this. I've been wanting to make a horror game but a lighting system is something that' always been just out of reach. Optimize it and we'll test it for bugs =P
In response to Hiro the Dragon King
Hiro the Dragon King wrote:
That looks fucktastically amazing. If you can make something that works well with isometric and client.dir, even side-map and client.dir, I'd blow you.

Heheheheh.
Slight problem with the trapezoidal thing: edge Anti-aliasing after rotation:

More!! xD
Not using animate() but...related to MouseMove()

Dude did you code that to make it in paint?
In response to Kidpaddle45
Kidpaddle45 wrote:
More!! xD
Not using animate() but...related to MouseMove()


Your next task: BYOND "Draw Something" Clone!
In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
Kidpaddle45 wrote:
More!! xD
Not using animate() but...related to MouseMove()


Your next task: BYOND "Draw Something" Clone!

Challenge Accepted!!!


*Sorry for the big gif!
In response to Kidpaddle45
Kidpaddle45 wrote:
SuperSaiyanGokuX wrote:
Kidpaddle45 wrote:
More!! xD
Not using animate() but...related to MouseMove()


Your next task: BYOND "Draw Something" Clone!

Challenge Accepted!!!


*Sorry for the big gif!

Excellent!
A new Line Walk game, anybody?
I had this in mind but...SSGX made me forget!! LOL

Anyways I got another thing in mind now so...Go for it!
Oh! That's a good idea, too. :)
Cool stuff.
In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
Kidpaddle45 wrote:
More!! xD
Not using animate() but...related to MouseMove()


Your next task: BYOND "Draw Something" Clone!

Omfg, gimmie src! lol Awesome.
Page: 1 2 3 4 5 6 7 8 ... 17 18 19