{"id":9085,"date":"2014-07-06T14:09:50","date_gmt":"2014-07-06T18:09:50","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9085"},"modified":"2014-07-06T14:10:29","modified_gmt":"2014-07-06T18:10:29","slug":"a-first-person-engine-in-265-lines","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/07\/06\/a-first-person-engine-in-265-lines\/","title":{"rendered":"A First-Person Engine in 265 Lines"},"content":{"rendered":"<p><a href=\"http:\/\/www.playfuljs.com\/a-first-person-engine-in-265-lines\/\">Hunter Loftis<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=7842037\">Hacker News<\/a>):<\/p><blockquote cite=\"http:\/\/www.playfuljs.com\/a-first-person-engine-in-265-lines\/\"><p>In this article, we&rsquo;ll compose a first-person exploration from scratch, quickly and without difficult math, using a technique called raycasting. You may have seen it before in games like Daggerfall and Duke Nukem 3D, or more recently in Notch Persson&rsquo;s ludum dare entries.<\/p><p>Raycasting feels like cheating, and as a lazy programmer, I love it. You get the immersion of a 3D environment without many of the complexities of &ldquo;real 3D&rdquo; to slow you down. For example, raycasts run in constant time, so you can load up a massive world and it will just work, without optimization, as quickly as a tiny world. Levels are defined as simple grids rather than as trees of polygon meshes, so you can dive right in without a 3D modeling background or mathematics PhD.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Hunter Loftis (via Hacker News):In this article, we&rsquo;ll compose a first-person exploration from scratch, quickly and without difficult math, using a technique called raycasting. You may have seen it before in games like Daggerfall and Duke Nukem 3D, or more recently in Notch Persson&rsquo;s ludum dare entries.Raycasting feels like cheating, and as a lazy programmer, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[619,346,74,71],"class_list":["post-9085","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-graphics","tag-javascript","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=9085"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9085\/revisions"}],"predecessor-version":[{"id":9086,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9085\/revisions\/9086"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}