1.x
The 1.x series of Interhack is the original version. I like to think of 1.x as a prototype that far outlived its deserved lifespan.
As soon as I got the basic filter (stdin to NAO, NAO to monitor) working, I knew I could implement a helluva lot. I just hacked on it without thinking hard about the implications.
Luckily 1.x is very featureful. Its downsides, however, led me to start (from scratch) 2.x.
- Written with very bad practices (plugins are loaded with 'do', no use strict/warnings).
- No ability to save state because state is strewn all about the place, a lot of the time in inaccessible lexical variables.
- The core was starting to suffer from its hugeness. All plugin utility functions, like show_menu, lived in the core.
- Due to the simple nature of plugins, a lot of useful ideas just weren't implementable as plugins. They were deferred, or worse, hacked right into the core.
- Some important checks, like whether we were watching another person play, were just plain broken. This meant the eval plugin was a time bomb waiting to explode (good thing only Eidolos used it).
- Simply impossible to test, or run outside of the interhack/ directory, or CPAN-able
Despite all these negatives, I still very much like 1.x.
1.x is currently the trunk because 2.x is not yet ready.
2.x
2.x is a complete rewrite using Moose, a modern object system.
One of the design decisions was that the core should remain completely free from new features. You should be able to use Interhack with no plugins and it should be exactly like telnetting in and playing normally.
The central concept for plugins is the idea of hooks. Interhack provides many small methods (such as toserver, which sends a keystroke to the server; or check_input, which validates input -- always returns 'valid' in the core). Plugins 'wrap' these small methods to do whatever they like. For example, they Keystrokes plugin wraps the toserver method and increments an internal counter for each character in the text.
2.x lacks many of the plugins of 1.x, but it does have some new awesomeness that was impossible in 1.x.
- Macros (as a plugin!)
- ConfirmDirection (makes sure you only type in a valid direction at 'In what direction?' so you don't finger of death yourself (hi Stevie)
- Foodless (helps you maintain the foodless conduct by making you confirm every 'e' command -- easy to disable for the rest of the game, in case you don't care about foodless)
- PasteDetection (if it thinks you're pasting text, it'll force you to press tab to go through with the paste -- a feature borrowed from irssi)
0.x
0.x is a minimal implementation that developers can toy with. It was written (in only a few minutes) after 2.x was started.
It's a useful starting off point if you just want to toy with it. Being so small, it should easily fit into your head. It's only 70 lines.
The 'control-E => write Elbereth' macro is implemented, as well as coloring all Elbereths purple (to make it easy to tell at a glance how well you're covered). These features are one line each.
We recommend 1.x (or 2.x) for all of our users, but some people may have fun toying with 0.x. :)