Skip to content

Latest commit

 

History

651 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avanor: The Land of Mystery

Avanor: The Land of Mystery is a classic roguelike role-playing game originally developed in the early 2000s. After being abandoned for over two decades, the project has been revived and is currently being modernized for a new release.


Table of Contents


About Avanor

Avanor is a single-player roguelike RPG set in a rich fantasy world. The game features:

  • Permadeath - Classic roguelike tradition where death is permanent
  • Turn-based gameplay - Strategic combat and exploration
  • Procedurally generated dungeons - Each playthrough is unique
  • Rich character customization - Multiple races, professions, and skills
  • Deep item and equipment system - Weapons, armor, potions, scrolls, and more
  • Complex magic system - Spells, resistances, and elemental effects
  • Diverse creature ecosystem - Rats, insects, orcs, undead, giants and demons

Features

Character System

  • 7 Playable Races: Human, Half Elf, High Elf, Halfling, Half Orc, Dwarf, Gnome
  • 8 Professions: Warrior, Wizard, Archer, Ranger, Cleric, Paladin, Alchemist, Bard
  • 8 Core Stats: Strength, Dexterity, Toughness, Learning, Willpower, Mana, Perception, Charisma
  • 5 Schools of Magic: Elemental, Body, Protection, Death and Surviving, with 26 spells between them
  • 23 Skills: From archery and alchemy to mining, herbalism and climbing out of pits
  • Experience & Leveling: Exponential progression curve

Game World

  • Multiple Locations: Main valley, dungeons, caves, towns
  • Dungeon Levels: Progressive difficulty through depth
  • NPC System: Unique characters with quests and dialogue, all scripted in Lua
  • A Calendar: The world keeps months, weeks and years, and herbs grow in their season

Combat System

  • Melee Combat: Attack, defend, special maneuvers
  • Ranged Combat: Bows, crossbows, slings, thrown weapons
  • Magic System: Spells from multiple schools
  • Brand Effects: Special weapon effects (poison, fire, paralysis, slaying, etc.)
  • Tactics: A stance from all-out attack to full defence, traded off against your own opening

Item System

  • 12 Kinds of Slot, 14 in all: Head, neck, body, cloak, two hands, two rings, gloves, boots, light source, tool, missile weapon, missile
  • Item Types: Weapons, armour, potions, scrolls, books, food, tools, gems, money
  • Crafting*: Alchemy, cooking, mining

Monster System

  • 15 Creature Classes: Rats, felines, canines, reptiles, insects, humans, orcs, giants, kobolds, undead, goblins, demons, humanoids, blobs and others
  • 10 Difficulty Tiers
  • AI System: 18 base flags + 6 composite presets for diverse behaviors
  • Special Abilities: Spells, skills, brands, corpse effects

Gameplay

Quick Start

  1. Create a Character: Choose race, profession, and gender
  2. Enter the Valley: Begin your adventure in the town of Avanor
  3. Explore: Visit shops, talk to NPCs, accept quests
  4. Descend: Venture into dungeons and caves
  5. Survive: Manage food, health, and equipment
  6. Grow: Gain experience, find better gear, learn new abilities

Controls

Press ? in game for the full keyboard layout, which is the authoritative list. The ones you need first:

Key Action
1-9 Move (numeric keypad layout)
w + direction Walk until something interesting turns up
< > Up and down stairs
, Pick up what is on the floor
d Drop
i Inventory
e Equipment - wear, wield, take off
E Eat
D Drink a potion
r Read a scroll or book
Z Cast a spell (^Z repeats the last one)
t Shoot at a target
a Use a skill (A lists them)
C Chat
o c Open and close a door
l Look at something
@ Your character sheet
M The messages you have missed
S Save
Q Quit

Two more exist only under --god: ^F lights the whole level, and ^W steps you anywhere on it. Neither costs a turn.

Tips for New Players

  • Save often: There is no autosave - S is the only thing that writes a save
  • Manage nutrition: Starvation is a real threat
  • Identify items: Unknown items can be dangerous or beneficial
  • Learn from failures: Each death teaches valuable lessons
  • Explore thoroughly: Hidden secrets abound

Project History

The Original Era (2000-2006)

Avanor was created in 2000 by Vadim Gaidukevich. Its source code was published as Open Source under the GPL2 license in 2003. The latest release was 0.5.8 in 2006. Work had begun on creating a new quest and integrating Lua, but that was never finished.

The Revival (2025-2026)

In September 2025, the project was revived with a major modernization effort.


Current Status

The project is currently in active modernization with the following status:

Completed Modernization Work

Core Infrastructure

  • Sol2 integration for Lua scripting
  • Cereal integration for serialization
  • Removal of legacy XFile system

Code Quality

  • Conversion of legacy enums to C++11 enum classes
  • Type safety improvements
  • Removal of deprecated code
  • Modern C++ features (smart pointers, const correctness, etc.)

Game Content

  • Every creature defined through the MonsterBuilder interface - 97 of them across the Lua files in world/, with their dialogue, quests and AI beside them
  • Levels, tiles, colours and map-generator settings all driven from world/

Ongoing Work

Documentation

  • Comprehensive documentation of all game systems
  • API documentation for developers
  • Design documentation for maintainers

Code Modernization

  • Continued conversion to modern C++ idioms
  • Performance optimizations
  • Memory management improvements

Upcoming

Planned for Next Release

  • The remaining content still hard-coded in C++
  • Official release of revived Avanor

Building and Running

Avanor builds with GNU Make.

Required C++ modules

Everything below is expected to be installed on the system. Nothing is vendored into the tree and there are no git submodules, so a plain git clone is enough once the packages are in place.

Module Kind Used for Found via
LuaJIT 2.1 shared library The scripting runtime. Every creature, item, location and quest in world/ is Lua. pkg-config luajit
sol2 3.x header only The C++/Lua binding layer - usertypes, enum tables, protected calls. #include <sol/sol.hpp> /usr/include/sol
notcurses 3.x shared library The terminal display, including 24-bit colour and the resize handling. The C++ binding notcurses++ is what is linked; the game includes <ncpp/NotCurses.hh>. pkg-config notcurses++
{fmt} 9+ shared library String formatting throughout the engine and the world scripts' messages. pkg-config fmt
cereal 1.3 header only Save and restore. The whole world graph goes through it. #include <cereal/...> /usr/include/cereal
Zstandard shared library Compresses the save file (avanor.svg.zst). -lzstd
argparse header only The command line in Main.cpp. /usr/include/argparse

A C++17 compiler is required - the code uses structured bindings, std::optional, if-initialisers, std::string_view and inline variables. GCC 9 or Clang 8 upwards will do. It is built and tested with GCC.

The versions this is currently developed against:

LuaJIT 2.1    notcurses 3.0.17    fmt 11.2.0
sol2 3.5.0    cereal 1.3.2        zstd 1.5.7

On Fedora:

sudo dnf install gcc-c++ make pkgconf-pkg-config \
                 luajit-devel notcurses-devel fmt-devel \
                 libzstd-devel sol2-devel cereal-devel argparse-devel

On Debian and Ubuntu the header-only three (sol2, cereal, argparse) may not be packaged under those names; dropping their headers under /usr/local/include works just as well, since the build finds them on the default include path.

Building

make -j$(nproc)          # release build -> ./avanor
make debug=1 -j$(nproc)  # debug build with symbols -> ./avanor-d

The two builds keep their objects apart (obj/ and obj-d/), so they do not tread on each other. make clean only clears the configuration you name, so a full clean is both:

make clean && make debug=1 clean

Running

./avanor                 # play
./avanor --god           # play with a thousand extra hit points and optional death
./avanor --seed 7        # build the world from a fixed seed
./avanor --demo          # watch the world run itself, no hero
./avanor --help

The game keeps its files in ~/.avanor: the save (avanor.svg.zst), the high score table, and the optional memorial file for dead characters.


Modernization Details

Technologies Adopted

Legacy Modern Benefit
Custom Lua binding Sol2 Type-safe, modern C++ API
Bundled Lua 5.0 LuaJIT JIT compilation, performance, Lua 5.1 compatibility
Custom save/load Cereal Header-only, powerful serialization
Enum raw values enum class Type safety, scoped enumerators
Raw pointers Smart pointers Automatic memory management
C and Custom strings std::string Standard library string functionality
Custom containers std::vector, std::map Standard library containers

Key Changes from Original

  1. Lua Runtime: Migration from bundled Lua 5.0 to LuaJIT
  2. Lua Binding: Complete rewrite using Sol2
  3. Serialization: Migration from XFile to Cereal
  4. Monster Definitions: New MonsterBuilder fluent interface
  5. Type Safety: Widespread use of enum classes
  6. Code Organization: Improved namespace usage and encapsulation

License

Avanor is released under the GNU General Public License version 2 or later (GPLv2+).


Original Credits

Original Author:

  • Vadim Gaidukevich - Project founder and primary developer

Revival Credits

Project Revival (2025-2026):

  • Joachim de Groot - Modernization, Sol2/Cereal integration, LuaJIT adoption

Contact

For questions, feedback, or contributions:

  • Project Repository: GitHub (when published)

About

Fork of the historic roguelike game Avanor

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages