Search found 75 matches

by drunken_thor
Tue Feb 24, 2015 5:56 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

I am having trouble with rotation.. First of all if I have a "rectangle" type shadow, I get an error as "self.unit_data" is nil in body.lua 126. However when I swap the type to Image, the issue I described before shows up again. Heres a screen shot(Note: it's rotated by 180 degr...
by drunken_thor
Tue Feb 24, 2015 5:55 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

Heres the snippet where my draw is function love.draw() lightWorld:draw(function() camera:draw() camera:set() --normal drawing stuff here-- end) camera:unset() end any help would be appreciated> :cry: You need to change your camera because normal usage of this would be something like this function ...
by drunken_thor
Wed Feb 18, 2015 9:24 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

okay finished circles now as well!
by drunken_thor
Wed Feb 18, 2015 3:29 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

Okay I have finally finished scaling and rotating most things I am not sure I did scaling circles now that I think about it.....

Anyways it is all merged into master now so try it out and let me know what it means. If you have problems it is all tagged you can use the 2.0 tag.
by drunken_thor
Fri Jan 30, 2015 7:38 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

I just pushed a rotation_and_scaling branch on github, you can check it out there. I ended making rectangles into polygons to eliminate some extra code and I think I am going to have to approach rotating and scaling from a different way because to address the inaccuracy issues/
by drunken_thor
Thu Jan 29, 2015 9:55 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

Just an update, I pretty much implemented scaling and rotating of light bodies, there is just some inaccuracy in them so the object get slightly smaller if you rotate them and scaling does not match up with how love.graphics.draw scales so it will be a different size depending on the scale.
by drunken_thor
Mon Jan 26, 2015 3:09 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

Just out of curiosity but why do you draw normal maps/shadow objects like this: love.graphics.draw(self.normalMesh, self.x - self.nx, self.y - self.ny) And not this: love.graphics.draw(self.normalMesh, self.x, self.y,self.rotation,1,1,self.nx,self.ny) The only downside that I can see so far is that...
by drunken_thor
Sun Jan 04, 2015 3:20 am
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

I think I did it ! yes.png I pass to the shadow shader an image with only the non-floor normals. I apply the shadow attenuation over normals only if not on a non-floor normal. I can do a pull request if you want ;) Hey giann, I just pushed a change to do what you described in a more general way. No...
by drunken_thor
Sun Jan 04, 2015 3:17 am
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

Is it possible to apply the light/shine map to the drawn objects, so that tiles hidden behind other tiles (casting a shadow on them) are actually hidden (but objects the light shines on aren't)? I am using the engine together with STI if that is relevant. To clarify, I marked the areas that I don't...
by drunken_thor
Wed Dec 31, 2014 6:05 pm
Forum: Libraries and Tools
Topic: Löve "Light vs. Shadow" Engine v2
Replies: 140
Views: 120458

Re: Löve "Light vs. Shadow" Engine v2

I pass to the shadow shader an image with only the non-floor normals. I apply the shadow attenuation over normals only if not on a non-floor normal. I can do a pull request if you want ;) Yeah you submit a pull request but please test the issue that you were having with wall block shadows overlappi...