Heh, reminds me of kkrieger - a first person shooter in 100KB for a scene demo. https://www.scene.org/file.php?file=%2Fparties%2F2004%2Fbrea...
If you missed it a couple of weeks ago, this article about its creation was really interesting: http://fgiesen.wordpress.com/2012/04/08/metaprogramming-for-... ( Thread: https://news.ycombinator.com/item?id=7739599 )
A first-person engine in 265 lines of JS
71–80 of 99 posts
Re: A first-person engine in 265 lines of JS
#72Re: A first-person engine in 265 lines of JS
#73It runs really slow for me, like 1 FPS. Firefox 29 on Linux.
Re: A first-person engine in 265 lines of JS
#74What's the difference between ray casting and ray tracing?
Re: A first-person engine in 265 lines of JS
#75https://plus.google.com/108984290462000253857/posts/MxWQwo14...
Re: A first-person engine in 265 lines of JS
#76As someone with no experience in computer graphics it's always insane to see demos like this. Especially using just around 250 lines of javascript. Really impressive. Also on the topic, the demo scene stuff is mind blowing, too. [0] [0]: http://awards.scene.org/awards.php
The nice thing about this implementation is that the code is very clear and easy to follow. You could easily make it much shorter if that were the goal.
Re: A first-person engine in 265 lines of JS
#77This demo unfortunately uses an incorrect perspective transformation. There is no reason to go to trig if you represent the camera plane as a vector, and step along it one pixel at a time, and allowing the wall height to vary linearly in the distance to the camera vector (taking lines to lines). In addition to being correct[1], it has the added benefit of being faster if implemented well. My (admittedly n00bish and e…
Re: A first-person engine in 265 lines of JS
#78As someone with no experience in computer graphics it's always insane to see demos like this. Especially using just around 250 lines of javascript. Really impressive. Also on the topic, the demo scene stuff is mind blowing, too. [0] [0]: http://awards.scene.org/awards.php
Re: A first-person engine in 265 lines of JS
#79Heh, reminds me of kkrieger - a first person shooter in 100KB for a scene demo. https://www.scene.org/file.php?file=%2Fparties%2F2004%2Fbrea...
If you missed it a couple of weeks ago, this article about its creation was really interesting: http://fgiesen.wordpress.com/2012/04/08/metaprogramming-for-... ( Thread: https://news.ycombinator.com/item?id=7739599 )
Re: A first-person engine in 265 lines of JS
#80Earlier quoted context omitted.
If you missed it a couple of weeks ago, this article about its creation was really interesting: http://fgiesen.wordpress.com/2012/04/08/metaprogramming-for-... ( Thread: https://news.ycombinator.com/item?id=7739599 )
It's really interesting but would someone mind explaining why they have to keep this code under some size limit?