Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He ought to be using what Wikipedia calls a "perspective projection", or, sufficiently in this case, a restriction thereof. Notice how the edges of walls do not appear straight on the screen, even though he mentioned correcting "a fisheye effect" (tellingly alluding to a popular tutorial on this topic at lodev.org).

A correct formula is on line 485 of my implementation linked above, found the old fashioned way using basic geometry.



Indeed, you're right: http://i.imgur.com/oQ7S3Jo.jpg

On my old laptop, the demo looked fine. But after switching over to a widescreen (and higher FPS) you can tell that it's slightly wrong up close, and noticeably wrong (jittery) in the distance.

I wonder what's causing the jitter...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: