Table of Contents
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’s a little bit different than Rogue and Hack, its predecessors.
I wasted many of my teenage hours playing Larn.
Ularn, or “Ultra” Larn, was an enhancement developed in 1992, adding new monsters, weapons, and features, and extending the dungeon to 15 levels, among other enhancements.
The Ularn sources appear to have been maintained through about 2002, ending in version 1.5 patch 4.
I had played a version of Ularn, back in 2006, called “Ularn Win TTY”, that seems to have disappeared off the internet.
I recently downloaded the Ularn sources, and got them to compile under a ‘modern’ Cygwin, since the last Cygwin-aware build appears to have been done in 2002. I also made a few modifications to allow it to run “natively” as a Windows app, without requiring a full Cygwin install.
You can find Ularn Win32 here:
This version is an almost-pure Ularn experience with very few modifications.
I went on to make a few more modifications, but “CygUlarn” departs slightly from the circa-2002 “pure” version of Ularn. The biggest feature is that I added color.
So…. if you like Larn and Ularn, please try this out, play with it, enjoy it, and (polite) comments / suggestions are welcome.
I will eventually get this out on GitHub or SourceForge, but haven’t had time yet.
Here is a zip file containing Win32 binaries, as well as the modified sources.
- Download the zip file. Always scan for viruses, whenever you download anything you don’t trust.
- Open the zip file
- Copy the files to your desktop (or some other folder)
- Go in to the CygUlarn_1_7_1 folder
- Go in to the Binaries folder
- Open the file, “CygUlarn”
- Smile A LOT. And die a lot. But mostly, smile.
How do I Play?
Use these keys to move:
y k u \ | / h -- -- l / | \ b j n You operate the keys with your right hand on the keyboard, and they are laid out like this: ul ur y u lf dn up rt h j k l dl dr b n
Press ? for a detailed help screen.
I preserved the original Wizard, Debug, and Creator modes from the Ularn sources.
‘_’ (underscore) switches to debug mode. Debug mode places one of every object on the screen, and sets your level to ‘Creator’
‘=’ switches to Wizard mode. As a Wizard, you can press “z” to teleport, and you have access to several other features.
‘#’ sets your level to “Creator” (Wizard only)
‘@’ create any object (Wizard only)
I left the Wizard’s password unchanged from the original sources:
(The smallest ‘c’ program)
What’s New: Version 1.7.1
Eh. Bug fix. Restoring a game might result in a crash. During drawscreen, the original code builds a “screen table”, which allows objects such as monsters to overlap other objects, such as doors or items. The color logic follows the “screen table” with a “color table”, rendering correct color in to the table as the algorithm figures out what is on top of what. If nothing is there, the algorithm writes a space ‘ ‘, but I wasn’t writing a default color, resulting in my “color table” having null pointers. Can’t print a null pointer.
What’s New: Version 1.7.0
- Runs in Win32. Runs in just about every version of 32-bit or 64-bit Windows (Win32) including Windows XP, Windows 7, Windows 8. Although this was compiled in Cygwin, it doesn’t require Cygwin to be installed.
- Color. Blessed color. I originally played Larn on a green screen, and I think my less-than-perfect eyesight may be a result. Color is implemented using ANSI (escape) codes.
- The dots are back. Hack uses dots to represent a “grid” for each room. Larn used dots to represent areas that the player had explored. Ularn, for whatever reason, got rid of the dots! This made it extremely confusing… a blank space might truly be empty, or maybe we haven’t explored it yet. Coupled with a blue background (I experimented with many background colors), you can easily see what’s been explored.
- I changed a few of the symbols because things didn’t make sense. For example, ‘^’ was originally a trap or an express elevator, and both up and down elevators used the same symbol. Now, ‘v’ is down.
- Elevators and stairs are color-coded. Green is up, red is down.
- Branch DND store, like the “Branch Bank of Larn”
- Get the arrow keys working
- The original To Do suggested a blacksmith, that could repair damaged weapons. I think that’s a great idea!
Q: How do I change the colors?
A: For now:
- Download Cygwin ( http://cygwin.org/ ), and install the “gcc” development environment (gcc and make)
- Download CygUlarn
- Put the contents of the Sources folder somewhere in your Cygwin tree…. maybe /home/username/CygUlarn (YOU create whatever folder you want)
- Launch a Cygwin shell, and go to the /home/username/CygUlarn directory
- Edit /home/username/CygUlarn/src/data.c — text, Monster, and Object colors are specified. A list of colors can be found in ansicodes.c
- If successful (no errors), copy home/username/CygUlarn/src/CygUlarn.exe to your CygUlarn_1_7_0/Binaries folder
For example, to change the text color (Light Cyan) to Light Green, change the following line in data.c and recompile:
#define NORMALCOLOR HICYAN to #define NORMALCOLOR HIGREEN
Search for “objectcolors”, which is an array of color values for each object. Changing the “empty” object (first entry) changes the already-explored background (dot) color.
Search for “monstcolors”, which is an array of color values for each monster.
A complete list of color codes can be found in ansicodes.h
Q: What is the difference between the various Larn versions?
A: Here is a recap:
- Larn, circa 1986 had a dungeon with 10 levels. It was written for a monochrome terminal, using only normal, reverse video, and bold text.
- Ularn, or “Ultra” 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’s much harder in Ularn), more weapons, monsters, bug fixes, etc…
- Ularn 1.5 pt4 was the latest version of the Ularn sources from SourceForge, dated 2001. This was probably the last time someone compiled Ularn under Cygwin, and the 1.5 pt4 sources would not compile under a “modern” (circa 2015) Cygwin.
- Ularn Win32 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. It’s still black and white, and has a couple of drawbacks.
- CygUlarn is my fork of Ularn Win32, adding colors and fixing some issues, to suit my own preference. I may or may not continue developing it.
- Nlarn is a “Larn-like” game developed as a clean build. It has some really cool features (including color, and more efficient menus), but it doesn’t feel like Larn, and isn’t a nostalgic experience for me.
- Ularn Win TTY existed at one point, but seems to have disappeared. This was a really cool version, extended from the Ularn sources, that added color, used the “line draw” symbols to build smooth dungeon walls, and had a few more tweaks. 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’s GONE. Can’t find it.
Q: How can I make the screen larger?
A: Check out this link from Ularn Win32