{"id":201,"date":"2016-05-17T13:37:58","date_gmt":"2016-05-17T21:37:58","guid":{"rendered":"http:\/\/www.nathanbak.com\/?p=201"},"modified":"2026-01-02T20:02:38","modified_gmt":"2026-01-03T04:02:38","slug":"dangerous-field","status":"publish","type":"post","link":"https:\/\/nathanbak.com\/?p=201","title":{"rendered":"Dangerous Field"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-208 size-medium alignright\" title=\"By ML5 at English Wikipedia - Transferred from en.wikipedia to Commons by Common Good using CommonsHelper., Public Domain, https:\/\/commons.wikimedia.org\/w\/index.php?curid=7042127\" src=\"http:\/\/www.nathanbak.com\/wp-content\/uploads\/2016\/05\/675px-Casio_fx-7000G_FullLength-225x300.jpg\" width=\"225\" height=\"300\" srcset=\"https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/05\/675px-Casio_fx-7000G_FullLength-225x300.jpg 225w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/05\/675px-Casio_fx-7000G_FullLength.jpg 675w\" sizes=\"auto, (max-width: 225px) 85vw, 225px\" \/>Back in the magical decade known as the 90&#8217;s I got my first graphing calculator.\u00a0 It was one of the Casio FX-7000 variants&#8211;I don&#8217;t recall which one exactly, but I do clearly remember that it had 422 bytes of memory to be used by programs.\u00a0 While I wrote some programs to do mathy stuff, most programs were games.\u00a0 I think the first game I wrote for the calculator was a number guessing game where the game would generate a random number and the player would enter guesses and be told it the actual number was higher or lower.\u00a0 There were various other games along the same vein.\u00a0 Then I started coding with a friend and things got &#8220;Dangerous&#8221;.<\/p>\n<p>My friend Jed had a Casio graphing calculator too.\u00a0 His was newer and fancier and had more memory, but it used the same programming language.\u00a0 One day (I think during French class), he showed me his new game &#8220;Dangerous Field&#8221;.\u00a0 It was a text adventure game in which the game play went something like this:<\/p>\n<pre>DANGEROUS FIELD\r\nU R IN A FIELD\r\nWUT?\r\n&gt; N\r\nU R IN A FIELD\r\nWUT?\r\n&gt; E\r\nU R IN A FIELD\r\nWUT?\r\n&gt; N\r\nU FALL IN HOLE\r\nU DIE\r\n3<\/pre>\n<p>Zork it was not.\u00a0 In Dangerous Field you were in a field and could go North, South, East, or West.\u00a0 After a random number of moves, you fell in a hole and died.\u00a0 The &#8220;score&#8221; was the number of moves made.\u00a0 There was no terrain or scenery apart from the field, there was no possible strategy, and there was no way to win.\u00a0 But it was a start.<\/p>\n<p>We made new versions of Dangerous Field adding various features such as a map stored as an array defining a path the player could potentially follow to escape the field.\u00a0 Other games were added to the Dangerous series including &#8220;Dangerous House&#8221; and &#8220;Dangerous Cave&#8221;.\u00a0 Combat was added as well as rudimentary graphics&#8211;all within 422 bytes.<\/p>\n<p>In the years since then, I&#8217;ve written a lot of code in various programming languages, but never have I been so concise.\u00a0 My next calculator was an HP48G (which I still regularly use and is currently sitting on my disheveled desk) with 32KB of RAM so I had enough room to write whatever I needed.\u00a0 A full computer obviously has tons more space, and even the toy apps I&#8217;ve written for a space-constrained smart phone have been measured in megabytes.\u00a0 So now, whenever I think about the constraints surrounding coding, I remember Dangerous Field and all that was crammed into 422 bytes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in the magical decade known as the 90&#8217;s I got my first graphing calculator.\u00a0 It was one of the Casio FX-7000 variants&#8211;I don&#8217;t recall which one exactly, but I do clearly remember that it had 422 bytes of memory to be used by programs.\u00a0 While I wrote some programs to do mathy stuff, most &hellip; <a href=\"https:\/\/nathanbak.com\/?p=201\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Dangerous Field&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-making"],"_links":{"self":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=201"}],"version-history":[{"count":9,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":216,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions\/216"}],"wp:attachment":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}