Procedurally Generated Galaxy

One of the things I'm really passionate about in games is procedurally generated content (PGC). I feel strongly that we as an industry need to head in that direction. Games are getting bigger and more expensive and the only way we're going to keep up is by algorithmically generating some part of the content. Many games are already doing this. Most strategy games allow the player to generate a random map and some games, like Diablo, even generate their dungeon levels. Roguelikes have been doing this for years, ever since the original Rogue game.

One huge avenue for PGC is what I call procedurally assisted design. This is where you have a system that generates the world, but the deisgners go in and hand-tweak whatever they want. Another version of this is to have designers place down the important areas first and have the algorithm fill in the rest. This is extremely powerful and allows the game world to be as large as you want it to be. Games like Daggerfall used a similar method to build their world.

One of my favorite hobbies is running tabletop RPGs. One campaign that I built was set in space and followed the adventures of the Terran Star Navy. I needed to build a rather large chunk of space complete with stars and planets, but most of these places were never going to be visited. I ended up writing a program that procedurally generated a region of space and wrote out an HXM file, which is the file format used by Hexographer. Hexographer is a wonderful mapping tool made by Inkwell Ideas that I've been using for a couple of years now. It's incredibly easy to use and very powerful. I highly recommend checking it out if you're in the market for a mapping tool.

Once the map was generated, I opened it in Hexographer and tweaked it to my own desires. Most of the content didn't change. I changed the names of several of the major star systems and tweaked a planet here and there. I also rebuilt the entire subsector that contains Sol to include the closest dozen stars or so. I wanted them to be actual stars that exist in our neighborhood. I also added the borders and a couple of wormholes. Other than that, the map I ended up using is largely the same as the one I generated.

You can view the final map here. It's over 5 MB, so it might take a little while.


Screenshots:

Credits:

  • PGC Programming: David "Rez" Graham
  • Hexographer Tool:Inkwell Ideas

Stats:

  • Language: Perl
  • Line count: 1479 across 10 source files
  • Dev Time: About 2 weeks