In these three posts, I’m going to recap the development history of LoreGen through the start of 2016.

Humble Beginnings

Back in fall of 2013, I was given some new software development responsibilities at work. I began work coding database-driven web apps in C# and the Microsoft stack.

The problem was that I’d done barely any programming since graduating college in 2010 and had barely ever used C# (though it’s so close to Java, I didn’t have much trouble).

So I figured it was good idea for me to build my coding muscles by working on a side project. Coming up with an idea for the project was fairly easy: Almost every idea for game I come up with involves procedural generation and open-ended sandboxes. So I decided to run with that on a grand scope: a tool to randomly generate fantasy universes to explore and observe and, eventually, interact with. I didn’t have any concrete gameplay ideas, but it was enough for me to get started.

A screenshot of a very early version

A screenshot of an early version

The project started simple: Whenever the program ran, it generated and named a world, some continents, and some regions within those continents. A simple WinForms interface displayed the world’s information.

I showed it to my wife, and she pointed out something that should have been obvious from the start: It’s a lot more interesting to explore this type of world if you have something visual to look at.

Thus, the project took a new layer of complexity: Representing the world visually and, therefore, spatially. I experimented with creating irregular polygons as the shape of each continent, but this proved complicated, unwieldy, and — when I finally made a working version — ugly and uninteresting.

I moved towards creating something more grid-based. I quickly realized this was a much better and more intuitive way to depict what was effectively a map of a fictional world. Not only was it logical and simpler to deal with, but it opened the door to using fractals to create interesting visuals: Each block of a grid could be broken down into its own smaller grid, meaning the program could theoretically “zoom in” on any portion of the map.

Early grid-based map

Early grid-based map

It still wasn’t stunning visually, but it was a start.

Expanding the Project

I wanted to share the project with my friends, so I needed a name and a web site. After a few days’ thinking, I settled on “Histories and Heroes” (HNH for short), and I slapped together a download page on my personal web site.

With a bare-bones interface and map working, I started expanding on the content that the program generated for each world: Regions contained nations; nations had rulers; and the entire world had a history timeline. Nations were given narratives, rising and falling through history, power changing hands from ruler to ruler.

One feature that was a lot of fun to put together was the generation of biographies for rulers of nations. Each ruler had some life events randomly selected for him (I wish I could say “him or her” but I never got around to adding female pronouns), and from those life events the program would spit out a one-paragraph bio.

At this point, I’d been working on the project with every spare hour for about a month. In my testing, I’d generated and played with hundreds of worlds. Two things consistently bothered me. First was the interface, which had grown bloated as I tried to pack as much information onto one screen as possible.

Redesigned interface

Redesigned interface

I remedied this with an interface overhaul. If you’ve ever tried to design an interface that provides a lot of functionality and conveys a lot of information, you know it’s difficult. It took a long time, and it was far from perfect, but I built an interface that made it possible to explore the world and its history in a variety of ways, in various “layers” (e.g. — a “continent” layer, a “region” layer, a “nation” layer, a “history” layer).

Language Generation

The second thing that bothered me was that my system for generating names was woefully limited. Everything’s (continents’, regions’, nations’, people’s) name followed a stock formula I’d hard-coded. In real life, as well as well-written fiction, people and places’ names vary in length and structure and style. They’re crucial to giving people and places character.

After thinking about it for awhile, I realized that the way societies name things is closely tied to the society’s language, so I really needed to learn more about language before I could improve the names in these randomly generated worlds. Fortunately, one of my best friends, the wise and generous Colton, majored in linguistics! I emailed him and explained what I was trying to do, and he agreed to meet with me to discuss the topic in detail.

Over a several-hour meeting, we came up with some sketches of how my program might randomly generate languages and names. Obviously, these wouldn’t be true languages, as they’d have no grammar or vocabulary. But by modeling phonetic vocabularies and various linguistic properties of procedurally generated languages, the program was finally able to create interesting and unpredictable (if infrequently meaningful) names for things like continents and regions and nations and people.

At least for me personally, this made my little project much more fun to use. Just now, I decided to boot it up again to look at name generation. I arbitrarily selected two nations from two different continents. One was called “Leunzeu Bolsheussstchoa’ulhpmoughst,” the other “Wamu.” That’s just an example of the weird, unpredictable names the engine comes up with. The variety is fun, but just as useful is the ability to create an infinite number of names that are linguistically consistent: For any given nation, the rulers all have names resembling each other (and the country’s name) because they’re all built from the same “language.”

Example of a region's terrain map

Example of a region’s terrain map

Biomes and Terrains

The last major module I added to Histories and Heroes was biomes. I decided I wanted richer visual representation of the world, and portraying a wide variety of terrains and climates would be one way to do this. I spent a whole weekend doing nothing but reading about the various biomes of earth and how they are categorized.

I eventually designed a mechanism for generating varied, compelling terrains: I came up with 42 possible biomes, each using a distribution of 33 climates and 10 terrain types. For each “terrain” — a combo of a climate and terrain type — I drew a small tile for a sprite sheet. And since the algorithm for generating terrains works in fractals, you can zoom into regions and see detailed biome maps.

I’ve made a page for Histories and Heroes that includes a feature list and a link to a free download, so if you find any of this interesting, please give it a shot and let me know what you think!

In the Part 2, I cover the end of Histories and Heroes, and how it laid the groundwork for LoreGen.