{"id":395,"date":"2024-02-19T20:38:57","date_gmt":"2024-02-19T20:38:57","guid":{"rendered":"https:\/\/retrorendezvous.org\/?p=395"},"modified":"2026-01-22T11:55:55","modified_gmt":"2026-01-22T11:55:55","slug":"the-hobbit-exploring-the-wilderland","status":"publish","type":"post","link":"https:\/\/retrorendezvous.org\/index.php\/2024\/02\/19\/the-hobbit-exploring-the-wilderland\/","title":{"rendered":"The Hobbit : Exploring the Wilderland"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"762\" src=\"https:\/\/retrorendezvous.org\/wp-content\/uploads\/2024\/02\/TheHobbitExample.jpg\" alt=\"\" class=\"wp-image-391\" srcset=\"https:\/\/retrorendezvous.org\/wp-content\/uploads\/2024\/02\/TheHobbitExample.jpg 1022w, https:\/\/retrorendezvous.org\/wp-content\/uploads\/2024\/02\/TheHobbitExample-655x488.jpg 655w, https:\/\/retrorendezvous.org\/wp-content\/uploads\/2024\/02\/TheHobbitExample-300x224.jpg 300w, https:\/\/retrorendezvous.org\/wp-content\/uploads\/2024\/02\/TheHobbitExample-768x573.jpg 768w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/figure>\n\n\n\n<p>My next BASIC coding project is to squeeze a very simplified version of the classic text adventure game &#8220;The Hobbit&#8221; by Veronika Megler, Philip Mitchell and David Johnston into a BBC Basic program. This would be for a 32K BBC Model B. I&#8217;ll be using the Owlet editor in the main and cross checking the code on my own BBC Micro.<\/p>\n\n\n\n<p>See this <a href=\"https:\/\/stardot.org.uk\/forums\/viewtopic.php?p=417250#p417250\">Stardot forum post <\/a>for progress on this project<\/p>\n\n\n\n<p>Like many of you, I enjoyed this landmark game and it stuck in memory. I coded some of my own text adventures at the time and was fascinated with the process&#8230;.certainly nudging me towards a database programming career later on in life.&nbsp;<strong>Let me know some of your own memories, experiences with this game &#8211; I&#8217;d like to hear them.<\/strong><\/p>\n\n\n\n<p>This project is mostly for nostalgia, but also taking on the challenge of squeezing a very simplified form of this landmark game into a BBC Basic version. Like many retro coding projects you think &#8230;. &#8220;Why not?&#8221;<\/p>\n\n\n\n<p>My objectives are:-<\/p>\n\n\n\n<p>1. To represent every location in the game in BBC basic, using tokens for the common words to save space.<br>2. To navigate between all the locations using the original mappings (though I may exclude the random-like maddening mazes such as the Dark Stuffy Passage)<br>3. To emulate the split screen user interface that the Hobbit had, with input text in the bottom quarter of the screen and output text in the top.<br>4. To keep everything in one program, not reading other files.<\/p>\n\n\n\n<p>If there&#8217;s any memory left (I&#8217;ll use MODE 7) then we&#8217;ll see what else could be added. It would be fantastic to include NPCs wandering around the game map randomly, such as Thorin and\/or Gandalf, so you could meet them as you wander.<\/p>\n\n\n\n<p>My objectives are not:-<\/p>\n\n\n\n<p>1. To have a clever parser. It&#8217;s just to input directions, to allow an easy exploration of the Wilderland.<\/p>\n\n\n\n<p><strong>Resources<\/strong><\/p>\n\n\n\n<p>The book &#8220;The Guide to Playing the Hobbit&#8221; by David Elkan (which I used to own) which gives a great breakdown of the game (from the internet archive)<br><a href=\"https:\/\/archive.org\/download\/guide-to-playing-the-hobbit\/GuideToPlayingTheHobbit.pdf\">https:\/\/archive.org\/download\/guide-to-p &#8230; Hobbit.pdf<\/a><\/p>\n\n\n\n<p>Veronikia Megler&#8217;s website (one of the original authors of the game) includes some really useful information:-<br><a href=\"http:\/\/veronikamegler.com\/WL\/wl.htm\">http:\/\/veronikamegler.com\/WL\/wl.htm<\/a><\/p>\n\n\n\n<p>&#8211; A map<br>&#8211; Room Database dump of the locations<br>&#8211; Even a rudimentary Spectrum emulator, displaying the state of the elements in the game<\/p>\n\n\n\n<p><strong>Using ChatGPT (ver 4)<\/strong><\/p>\n\n\n\n<p>For this project I&#8217;ve been using ChatGPT to start to compile the word tokens and the locations converted into text with token indexes inserted. It&#8217;s done quite well with this. I asked ChatGPT to look at this list of locations and pull out all common words that are greater than two characters:-<\/p>\n\n\n\n<p>Beorn&#8217;s house<br>The Bewitched gloomy place<br>A big cavern with torches along the walls<br>A bleak barren land that was once green<br>The cellar where the king keeps his barrels of wine.<br>A comfortable tunnel-like hall.<br>A dark dungeon in the elven king&#8217;s halls.<br>The dark stuffy passage<br>The dark winding passage<br>The east bank of a black river<br>The elven king&#8217;s great halls<br>An elvish clearing with levelled ground and logs<br>The empty place<br>The forest<br>A forest of tangled smothering trees<br>The forest road<br>The forest road<br>Forest river<br>The front gate of the Lonely Mountain<br>The gate to Mirkwood<br>A gloomy empty land with dreary hills ahead<br>The goblins&#8217; dungeon<br>The great river<br>The green forest<br>The halls where the dragon sleeps<br>A hard dangerous path in the Misty Mountains<br>A hidden path with trolls&#8217; footprints<br>Inside the goblins&#8217; gate<br>A large dry cave which is quite comfortable<br>A little steep bay, still and quiet, with an overhanging cliff.<br>The Lonely Mountain<br>Long Lake<br>The mountains<br>A narrow path<br>A narrow dangerous path<br>A narrow place with a dreadful drop into a dim valley<br>Outside goblins&#8217; gate<br>A place of black spiders<br>Rivendell<br>The ruins of the town of Dale<br>The running river<br>A smooth straight passage<br>A strong river<br>The treeless opening<br>The troll&#8217;s cave<br>The troll&#8217;s clearing<br>The waterfall<br>The west bank of a black river<br>The west side of Ravenhill<br>A wooden town in the middle of Long Lake<\/p>\n\n\n\n<p>Common words (tokens) that ChatGPT found (here shown stored in DATA statements):-<\/p>\n\n\n\n<p>800 DATA &#8220;the&#8221;,&#8221;with&#8221;,&#8221;river&#8221;,&#8221;forest&#8221;,&#8221;place&#8221;,&#8221;gate&#8221;,&#8221;path&#8221;,&#8221;dark&#8221;,&#8221;passage&#8221;<br>810 DATA &#8220;black&#8221;,&#8221;goblins'&#8221;,&#8221;narrow&#8221;,&#8221;gloomy&#8221;,&#8221;land&#8221;,&#8221;green&#8221;,&#8221;where&#8221;,&#8221;comfortable&#8221;,&#8221;dungeon&#8221;<br>820 DATA &#8220;elven&#8221;,&#8221;king&#8217;s&#8221;,&#8221;bank&#8221;,&#8221;great&#8221;,&#8221;halls&#8221;,&#8221;clearing&#8221;,&#8221;and&#8221;,&#8221;empty&#8221;,&#8221;lonely&#8221;<br>830 DATA &#8220;mountain&#8221;,&#8221;dangerous&#8221;,&#8221;mountains&#8221;,&#8221;cave&#8221;,&#8221;long&#8221;,&#8221;lake&#8221;,&#8221;town&#8221;,&#8221;troll&#8217;s&#8221;,&#8221;west&#8221;<\/p>\n\n\n\n<p>&#8230;and the resulting location descriptions with indexes inserted representing the word token (this was also generated by ChatGPT):-<\/p>\n\n\n\n<p>900 DATA Beorn&#8217;s house,01 Bewitched 13 04,A big cavern 02 torches along 01 walls,A bleak barren 14 that was once 15,01 cellar 16 01 king keeps his barrels of wine.<br>910 DATA A 17 tunnel-like hall.,A 18 dungeon in 01 elven king&#8217;s halls.,01 18 stuffy 09,01 18 winding 09,01 east 20 of a 10 03<br>920 DATA 01 elven king&#8217;s 22 halls,An elvish 24 02 levelled ground 24 logs,01 25 04,01 05,A 05 of tangled smothering trees<br>930 DATA 01 05 road,01 05 road,05 03,01 front 20 of 01 Lonely Mountain,01 20 to Mirkwood<br>940 DATA A 13 25 14 02 dreary hills ahead,01 goblins&#8217; dungeon,01 22 03,01 15 05,01 halls 16 01 dragon sleeps<br>950 DATA A hard 18 20 in 01 Misty Mountains,A hidden 20 02 trolls&#8217; footprints,Inside 01 goblins&#8217; 20,A large dry 31 02 is quite 17,A little steep bay, still and quiet, 02 an overhanging cliff.<br>960 DATA 01 Lonely Mountain,Long Lake,01 mountains,A 12 20,A 12 18 20<br>970 DATA A 12 04 02 a dreadful drop into a dim valley,Outside goblins&#8217; 20,A 04 of 10 spiders,Rivendell,01 ruins of 01 34 of Dale<br>980 DATA 01 running 03,A smooth straight 09,A strong 03,01 treeless opening,01 troll&#8217;s 31<br>990 DATA 01 troll&#8217;s 24,01 waterfall,01 west 20 of a 10 03,01 west side of Ravenhill,A wooden 34 in 01 middle of Long Lake<\/p>\n\n\n\n<p><strong>Location Exit Data<\/strong><\/p>\n\n\n\n<p>Each location has data in this format:-<\/p>\n\n\n\n<p>&#8220;01202807506605103&#8221;<\/p>\n\n\n\n<p>The first two digits are the location, followed by at least one group of 3 digits.<\/p>\n\n\n\n<p>Each 3-digit block represents an exit, with the first digit for the direction (1 for North, 2 for Northeast, etc., 0 for Down, and 9 for Up) and the next two digits for the destination location number<\/p>\n\n\n\n<p>I had ChatGPT read &#8220;The Guide to Playing the Hobbit&#8221; and had a go at creating the exit data,&nbsp;<strong>but it&#8217;s pretty bad<\/strong>&nbsp;&#8211; and this needs redoing by hand!<\/p>\n\n\n\n<p><strong>I need to:-<br><br>a) Resolve a bug with unpacking the room descriptions properly. It doesn&#8217;t convert the token value that lies at the end of a location description string into the corresponding word.<br>b) Go through all the exit data to check and replace as required (done)<br>c) Allow the input of directions to include shorthand as well as longhand for the directions (North and N for example).<br>d) Cross check the common word token replacements. I think ChatGPT has made some mistakes.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My next BASIC coding project is to squeeze a very simplified version of the classic text adventure game &#8220;The Hobbit&#8221; by Veronika Megler, Philip Mitchell and David Johnston into a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[27,19],"tags":[],"class_list":["post-395","post","type-post","status-publish","format-standard","category-basic-programming","category-bbc-micro-b","entry"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Paul Bussey","author_link":"https:\/\/retrorendezvous.org\/index.php\/author\/paul-admin\/"},"_links":{"self":[{"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":1,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/retrorendezvous.org\/index.php\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}