Brian Gordon

Ultima I-like procedurally generated worlds

This Python program samples noise generated by fractional brownian motion to create randomly-generated world maps. The model incorporates separate layers for forests, mountains, and lakes in a fairly realistic configuration.

Here is a random forest mask which was generated by the program. This surface can be sampled to place forests in the world.

Castles are placed on the world in pairs and connected by roads. Intersecting roads create a three-way intersection.

You can play a simple game inside the randomly generated world:

  • Move around the world; mountains and water are impassable.
  • Earn experience by killing monsters. Monsters drop gold coins onto the world when killed. Levelling up increases your HP and attack damage.
  • If injured in combat, head to an Inn, where you can restore your HP for a modest price.
  • Monsters spawn at randomly-placed camps and amble around protecting their camps.
  • When sighted by a monster, it will chase you down and attack you. If you run far enough away from its camp, the monster will lose interest and return to its camp.
  • Monsters move in a realistic fashion incorporating randomness so that their movement rules cannot be exploited. For example, it's difficult to snag them on impassible tiles.
  • If you can get to a monster camp alive then you will disband it and earn a gold bonus. Another camp will appear elsewhere.
  • Object-oriented design allows monsters of different species to chase and attack each other. Monsters can pick up gold to increase their gold value. Monsters can gain experience and level up.

Download the zip archive or view the individual source files below:

Overworld requires NumPy and noiselib. I don't recommend trying to build them on Windows, but you can do it with MinGW.

   

"Overworld" is inspired by the System Shock 2 minigame named "Overworld Zero."

The Orc, Swine, and Inn sprites were made by my friend Jeremy Duenos. The monster camp sprite is taken from a certain dear turn-based strategy game and the tombstone is from Chrono Trigger.