{"id":2285,"date":"2015-05-20T18:35:13","date_gmt":"2015-05-20T23:35:13","guid":{"rendered":"https:\/\/justinparrtech.com\/JustinParr-Tech\/?page_id=2285"},"modified":"2015-05-21T09:20:31","modified_gmt":"2015-05-21T14:20:31","slug":"cygularn-win32","status":"publish","type":"page","link":"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/","title":{"rendered":"CygUlarn Win32"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#what-is-cygularn\" >What is CygUlarn?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#download\" >Download<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#installation-instructions\" >Installation Instructions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#how-do-i-play\" >How do I Play?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#cheat-modes\" >Cheat Modes<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#whats-new-version-171\" >What&#8217;s New:\u00a0 Version 1.7.1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#whats-new-version-170\" >What&#8217;s New:\u00a0 Version 1.7.0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#to-do\" >To Do<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#faq\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#q-how-do-i-change-the-colors\" >Q: How do I change the colors?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#q-what-is-the-difference-between-the-various-larn-versions\" >Q:\u00a0 What is the difference between the various Larn versions?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/cygularn-win32\/#q-how-can-i-make-the-screen-larger\" >Q: How can I make the screen larger?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"what-is-cygularn\"><\/span>What is CygUlarn?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2294 size-medium\" src=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_02-300x163.png\" alt=\"CygUlarn_02\" width=\"300\" height=\"163\" srcset=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_02-300x163.png 300w, https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_02.png 997w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2295 size-medium\" src=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_01-300x163.png\" alt=\"CygUlarn_01\" width=\"300\" height=\"163\" srcset=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_01-300x163.png 300w, https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_01.png 997w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Larn, a Rogue-like, ASCII (character)-based game was written in 1986, and was one of the first Rogue-like games to have a top-level town, multiple dungeons, and many other features that were ahead of its time.<\/p>\n<p>Larn has a style that&#8217;s a little bit different than Rogue and Hack, its predecessors.<\/p>\n<p>I wasted many of my teenage hours playing Larn.<\/p>\n<p>Ularn, or &#8220;Ultra&#8221; Larn, was an enhancement developed in 1992, adding new monsters, weapons, and features, and extending the dungeon to 15 levels, among other enhancements.<\/p>\n<p>The Ularn sources appear to have been maintained through about 2002, ending in version 1.5 patch 4.<\/p>\n<p>I had played a version of Ularn, back in 2006, called &#8220;Ularn Win TTY&#8221;, that seems to have disappeared off the internet.<\/p>\n<p>I recently downloaded the Ularn sources, and got them to compile under a &#8216;modern&#8217; Cygwin, since the last Cygwin-aware build appears to have been done in 2002.\u00a0 I also made a few modifications to allow it to run &#8220;natively&#8221; as a Windows app, without requiring a full Cygwin install.<\/p>\n<p>You can find Ularn Win32 here:<\/p>\n<p><a href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/ularn-win32\/\" target=\"_blank\">https:\/\/justinparrtech.com\/JustinParr-Tech\/ularn-win32\/<\/a><\/p>\n<p>This version is an almost-pure Ularn experience with very few modifications.<\/p>\n<p>I went on to make a few more modifications, but &#8220;CygUlarn&#8221; departs slightly from the circa-2002 &#8220;pure&#8221; version of Ularn.\u00a0 <strong>The biggest feature is that I added <\/strong><span style=\"color: #00ff00;\"><strong>c<\/strong><span style=\"color: #ff6600;\"><strong>o<\/strong><span style=\"color: #0000ff;\"><strong>l<\/strong><span style=\"color: #ff00ff;\"><strong>o<\/strong><span style=\"color: #00ff00;\"><strong>r<\/strong><span style=\"color: #000000;\"><strong>.<\/strong>\u00a0 <\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>So&#8230;. if you like Larn and Ularn, please try this out, play with it, enjoy it, and (polite) comments \/ suggestions are welcome.<\/p>\n<p>I will eventually get this out on GitHub or SourceForge, but haven&#8217;t had time yet.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"download\"><\/span>Download<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Here is a zip file containing Win32 binaries, as well as the modified sources.<\/p>\n<p><a href=\"\/JustinParr-Tech\/wp-content\/uploads\/CygUlarn_1_7_1.zip\" target=\"_blank\">CygUlarn_1_7_1<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"installation-instructions\"><\/span>Installation Instructions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Download the zip file.\u00a0 Always scan for viruses, whenever you download anything you don&#8217;t trust.<\/li>\n<li>Open the zip file<\/li>\n<li>Copy the files to your desktop (or some other folder)<\/li>\n<li>Go in to the CygUlarn_1_7_1 folder<\/li>\n<li>Go in to the Binaries folder<\/li>\n<li>Open the file, &#8220;CygUlarn&#8221;<\/li>\n<li>Smile A LOT.\u00a0 And die a lot.\u00a0 But mostly, smile.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"how-do-i-play\"><\/span>How do I Play?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Use these keys to move:<\/p>\n<pre> y  k  u\r\n  \\ | \/\r\nh -- -- l\r\n  \/ | \\\r\n b  j  n\r\n\r\nYou operate the keys with your right hand on the keyboard, and they are laid out like this:\r\n\r\n ul  ur\r\n  <strong>y   u<\/strong>\r\n    lf  dn  up  rt\r\n     <strong>h   j   k   l<\/strong>\r\n dl  dr\r\n<strong> b   n<\/strong><\/pre>\n<p>Press ? for a detailed help screen.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"cheat-modes\"><\/span>Cheat Modes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I preserved the original Wizard, Debug, and Creator modes from the Ularn sources.<\/p>\n<p>&#8216;_&#8217; (underscore) switches to debug mode.\u00a0\u00a0 Debug mode places one of every object on the screen, and sets your level to &#8216;Creator&#8217;<\/p>\n<p>&#8216;=&#8217; switches to Wizard mode.\u00a0 As a Wizard, you can press &#8220;z&#8221; to teleport, and you have access to several other features.<\/p>\n<p>&#8216;#&#8217; sets your level to &#8220;Creator&#8221; (Wizard only)<\/p>\n<p>&#8216;@&#8217; create any object (Wizard only)<\/p>\n<p>I left the Wizard&#8217;s password unchanged from the original sources:<\/p>\n<blockquote><p>main(){}<\/p><\/blockquote>\n<p>(The smallest &#8216;c&#8217; program)<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"whats-new-version-171\"><\/span>What&#8217;s New:\u00a0 Version 1.7.1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Eh.\u00a0 Bug fix.\u00a0 Restoring a game might result in a crash.\u00a0 During drawscreen, the original code builds a &#8220;screen table&#8221;, which allows objects such as monsters to overlap other objects, such as doors or items.\u00a0 The color logic follows the &#8220;screen table&#8221; with a &#8220;color table&#8221;, rendering correct color in to the table as the algorithm figures out what is on top of what.\u00a0 If nothing is there, the algorithm writes a space &#8216; &#8216;, but I wasn&#8217;t writing a default color, resulting in my &#8220;color table&#8221; having null pointers.\u00a0 Can&#8217;t print a null pointer.<\/p>\n<p>Fixed!<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"whats-new-version-170\"><\/span>What&#8217;s New:\u00a0 Version 1.7.0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Runs in Win32.<\/strong> Runs in just about every version of 32-bit or 64-bit Windows (Win32) including Windows XP, Windows 7, Windows 8.\u00a0 Although this was <em>compiled<\/em> in Cygwin, it doesn&#8217;t <em>require<\/em> Cygwin to be installed.<\/li>\n<li><strong>Color.<\/strong>\u00a0 Blessed color.\u00a0 I originally played Larn on a green screen, and I think my less-than-perfect eyesight may be a result.\u00a0 Color is implemented using ANSI (escape) codes.<\/li>\n<li><strong>The dots are back.<\/strong>\u00a0 Hack uses dots to represent a &#8220;grid&#8221; for each room.\u00a0 Larn used dots to represent areas that the player had explored.\u00a0 Ularn, for whatever reason, got rid of the dots!\u00a0 This made it extremely confusing&#8230; a blank space might truly be empty, or maybe we haven&#8217;t explored it yet.\u00a0 Coupled with a blue background (I experimented with many background colors), you can easily see what&#8217;s been explored.<\/li>\n<li><strong>I changed a few of the symbols because things didn&#8217;t make sense.<\/strong>\u00a0 For example, &#8216;^&#8217; was originally a trap or an express elevator, and both up and down elevators used the same symbol.\u00a0 Now, &#8216;v&#8217; is down.<\/li>\n<li><strong>Elevators and stairs are color-coded<\/strong>.\u00a0 Green is up, red is down.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"to-do\"><\/span>To Do<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Branch DND store, like the &#8220;Branch Bank of Larn&#8221;<\/li>\n<li>Get the arrow keys working<\/li>\n<li>The original To Do suggested a blacksmith, that could repair damaged weapons.\u00a0 I think that&#8217;s a great idea!<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"faq\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"q-how-do-i-change-the-colors\"><\/span>Q: How do I change the colors?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>A: For now:<\/strong><\/p>\n<ul>\n<li>Download Cygwin ( <a href=\"http:\/\/cygwin.org\/\">http:\/\/cygwin.org\/<\/a> ), and install the &#8220;gcc&#8221; development environment (gcc and make)<\/li>\n<li>Download <a href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/ularn-win32\/\" target=\"_blank\">CygUlarn<\/a><\/li>\n<li>Put the contents of the Sources folder somewhere in your Cygwin tree&#8230;. maybe \/home\/username\/CygUlarn (YOU create whatever folder you want)<\/li>\n<li>Launch a Cygwin shell, and go to the \/home\/username\/CygUlarn directory<\/li>\n<li>Edit \/home\/username\/CygUlarn\/src\/data.c &#8212; text, Monster, and Object colors are specified.\u00a0 A list of colors can be found in ansicodes.c<\/li>\n<li>Type:<\/li>\n<\/ul>\n<pre style=\"padding-left: 60px;\">make all<\/pre>\n<ul>\n<li>If successful (no errors), copy home\/username\/CygUlarn\/src\/CygUlarn.exe to your CygUlarn_1_7_0\/Binaries folder<\/li>\n<\/ul>\n<p>For example, to change the text color (Light Cyan) to Light Green, change the following line in data.c and recompile:<\/p>\n<pre>#define   NORMALCOLOR     HICYAN\r\n\r\nto\r\n\r\n#define   NORMALCOLOR     HIGREEN<\/pre>\n<p>Search for &#8220;objectcolors&#8221;, which is an array of color values for each object.\u00a0 Changing the &#8220;empty&#8221; object (first entry) changes the already-explored background (dot) color.<\/p>\n<p>Search for &#8220;monstcolors&#8221;, which is an array of color values for each monster.<\/p>\n<p>A complete list of color codes can be found in ansicodes.h<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"q-what-is-the-difference-between-the-various-larn-versions\"><\/span>Q:\u00a0 What is the difference between the various Larn versions?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>A:\u00a0 Here is a recap:<\/strong><\/p>\n<ul>\n<li><strong>Larn<\/strong>, circa 1986 had a dungeon with 10 levels.\u00a0 It was written for a monochrome terminal, using only normal, reverse video, and bold text.<\/li>\n<li><strong>Ularn<\/strong>, or &#8220;Ultra&#8221; Larn, circa 1992 was an extended version of Larn, featuring a larger dungeon, the Volcano (not sure if the Volcano exists in the original Larn or not, but if it did, it&#8217;s much harder in Ularn), more weapons, monsters, bug fixes, etc&#8230;<\/li>\n<li><strong>Ularn 1.5 pt4<\/strong> was the latest version of the Ularn sources from SourceForge, dated 2001.\u00a0 This was probably the last time someone compiled Ularn under Cygwin, and the 1.5 pt4 sources would not compile under a &#8220;modern&#8221; (circa 2015) Cygwin.<\/li>\n<li><strong>Ularn Win32<\/strong> is my hacked and slashed version of Ularn 1.5 pt4, designed to run in a Windows environment, rather than requiring the Cygwin shell and environment.\u00a0 It&#8217;s still black and white, and has a couple of drawbacks.<\/li>\n<li><strong>CygUlarn<\/strong> is my fork of Ularn Win32, adding colors and fixing some issues, to suit my own preference.\u00a0 I may or may not continue developing it.<\/li>\n<li><strong>Nlarn<\/strong> is a &#8220;Larn-like&#8221; game developed as a clean build.\u00a0 It has some really cool features (including color, and more efficient menus), but it doesn&#8217;t feel like Larn, and isn&#8217;t a nostalgic experience for me.<\/li>\n<li><strong>Ularn Win TTY<\/strong> existed at one point, but seems to have disappeared.\u00a0 This was a really cool version, extended from the Ularn sources, that added color, used the &#8220;line draw&#8221; symbols to build smooth dungeon walls, and had a few more tweaks.\u00a0 I wanted to find the sources for this version, and tweak it slightly (e.g. mark explored space, and fix a couple of bugs), but it&#8217;s GONE.\u00a0 Can&#8217;t find it.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"q-how-can-i-make-the-screen-larger\"><\/span>Q: How can I make the screen larger?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A:\u00a0 Check out this link from Ularn Win32<\/p>\n<p><a href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/ularn-win32\/#Isn%E2%80%99t_that_kind_of_small?\" target=\"_blank\">https:\/\/justinparrtech.com\/JustinParr-Tech\/ularn-win32\/#Isn%E2%80%99t_that_kind_of_small?<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; What is CygUlarn? Larn, a Rogue-like, ASCII (character)-based game was written in 1986, and was one of the first Rogue-like games to have a top-level town, multiple dungeons, and many other features that were ahead of its time. Larn has a style that&#8217;s a little bit different than Rogue and Hack, its predecessors. [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2285","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/pages\/2285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/comments?post=2285"}],"version-history":[{"count":10,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/pages\/2285\/revisions"}],"predecessor-version":[{"id":2305,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/pages\/2285\/revisions\/2305"}],"wp:attachment":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/media?parent=2285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}