In the Part 1, I discussed the development of Histories and Heroes, the precursor to LoreGen.

Losing Steam

After I finished the language and biome modules of Histories and Heroes, I posted the project on a few online forums. A couple people downloaded the project and gave me some feedback, which helped me tweak the interface and add some cool functionality.

But I started to lose steam on the development. There were a bunch of factors: One was that I was immersed in NaNoWriMo, an intensive creative writing project that took a lot of my free time. My wife and I were also getting ready to buy a house, and so I had to devote some spare time to stuff like house-shopping and packing and paperwork.

More broadly, I started finding that the effort to develop Histories and Heroes was providing less of a reward than it did at the start of the project. It had helped me sharpen my C# skills for my job, but the project was different enough from what I was doing at work that it offered diminishing returns. And the sheer amount of time that went into developing any module Histories and Heroes had become daunting (more on that in a second).

It also struck me that, from a user’s perspective, it’s sort of a neat gimmick to explore a randomly generated world, but it’s not something that’s fun or engaging over time. (And I personally had burned out on clicking around the worlds the program generated, which I figured was a bad sign.)

hnh-scrn3

The basic version of the “Hero Sandbox”

Because of this mild burnout, I decided to switch gears. I’d made some design notes about how a sandbox, open-ended RPG might work within Histories and Heroes. I started building a new “game mode” that gave you control of a person inside the world the program generated. After about a week of work, I had created a simple program where you would be placed somewhere in the world and could move around one square at a time.

But I kept running into some problems, the same ones that made it so tedious to add new world generation functionality and the same ones that were sapping my enthusiasm for the project: Major portions of the code I’d written for the project was unscalable — both because I was a total C# newbie when I started the project and because the nature of the project had expanded and changed so much.

Fundamental Problems

Without getting into the technical minutia of what I mean by “unscalable,” here are a couple examples of the problems (I mention these because they all proved instructive for my eventual goals for LoreGen):

  • Huge chunks of world generation logic were packed into a few functions, each with hundreds of lines of codes. For example, let’s consider generating continents: everything from determining how many continents the world featured, to setting their size and shape, to naming them, and more — all occurred in one huge block of code. This type of poor organization constantly appeared in Histories and Heroes’ source code, which made every change or expansion time-consuming.
  • All of the raw data involved with generating each world — from the range of number of continents, to the “phonetic vocabularies” used when creating languages, to the information about biomes and terrains — was hard-coded into the program, not pulled from anywhere external.
  • I’d designed several fundamental building blocks of the world generator — such as regions and continents — in weird and, in retrospect, stupid ways. For example, the spatial representation of these entities were completely separated from its other information. This made almost every added piece of functionality seem like a “hack” as I worked around old bits of code.
  • A lot of the generation logic I’d developed — the shape of regions, the layout of continents, the leader biographies, the historical timeline of nations — was fairly simplistic compared to some of the later modules — languages and names, biomes and terrains. This led to an incongruency that bothered me and was not easy to fix.

I could go on and on, really. Dozens of design choices, both intentional and inadvertent, made the continuing development of Histories and Heroes a chore.

In March 2014 — about five months after starting the project, though it felt much longer — after much contemplation and struggling, I finally made the tough decision: The entire project needed to be rebuilt from the ground up, this time using stricter documentation and development standards, with modular, easily expanded design.

So I wrapped up a “final” version of Histories and Heroes. You can download that final release here for free:

If my motivation for working on new content for Histories and Heroes was low, my motivation for rebuilding it from scratch was even lower. I made some lists of requirements and goals for the new version and did a few experiments, but eventually tabled my idea for a rebooted world generator.

But it wouldn’t be too long before I found a spark to take another look at the project. That new project would become LoreGen.

In part 3, I describe the origin of LoreGen.