Page 1 of 1

Sight & Light

Posted: Sun Mar 23, 2014 4:15 pm
by Tanner
I really liked this article about rendering with simple and fast ray intersection logic. So I decided to port the ray logic into a really lightweight object. There are number of raycasting implementations for Lua out there but most of them have a lot of dependencies. This implementation only depends on vrld's vector class (and that's really just for convenience).

Here's line.lua: https://gist.github.com/TannerRogalsky/9724785

You can see some of the applications in that original blog post or you can download my Love2D proof of concept below or you can check out my code.

Re: Sight & Light

Posted: Sat Mar 29, 2014 4:18 am
by Satinxs
Dude this is awesome! I'll definitely try it and see if I can implement the same shadow and image superposition the original author does! Thanks for sharing! :nyu:

Re: Sight & Light

Posted: Sat Mar 29, 2014 3:13 pm
by kikito
I am afraid I see some random errors on your implementation. Here are a couple screnshots (the cursor doesn't show, but it is always in the "vertex" of the "error black triangle":
Screen Shot 2014-03-29 at 16.10.33 .png
Screen Shot 2014-03-29 at 16.10.33 .png (18.34 KiB) Viewed 1614 times
Screen Shot 2014-03-29 at 16.11.46 .png
Screen Shot 2014-03-29 at 16.11.46 .png (17.45 KiB) Viewed 1614 times