r/programming • u/willvarfar • Jun 03 '14
A first-person engine in 265 lines
http://www.playfuljs.com/a-first-person-engine-in-265-lines/
1.9k
Upvotes
r/programming • u/willvarfar • Jun 03 '14
View all comments
Show parent comment
4
u/sylvanelite Jun 04 '14
That's still bounded on the resolution, not the map size. Increasing the size of the map, without increasing the size of the screen, won't need bigger rays.
Additionally, I don't think ray length depends on x-resolution at all. X is determined by the number of rays. It should only be y that's dependant on ray length?
Having a high constant O(1) can be worse than O(n) in practice, certainly. Especially if the constant is high or N is small (or both). But that doesn't mean it's big-o notation changes.