This is a feature proposal on how to realize a persistent outdoor world. Most likely, this will not make it into S.C.O.U.R.G.E. 1!

The basic idea Edit

As this feature will build on top of an isometric engine with limited level dimensions, the outdoor world will be segmented into tiles of that size. For this purpose, we need an internal representation of the "world grid" and the properties of each tile. Such an amount of data can't be stored realistically in a .cfg file, so the idea is to use a bitmap image with tile properties stored as bitfields in the pixel RGB values.

The encoding would be as follows:

Red byte

Bit 0: If set, load a fixed map for this tile, else generate the tile.

Bit 1: This tile belongs to the storyline; entrances to lower levels are locked before reaching the respective storyline index.

Bits 2-5: Number of levels below the surface. If zero, there will be no dungeon or cave at all.

Bits 6-7: Type of underground feature. 0 = dungeon, 1 = monastery, 2 = cave.

Alternative suggestion: The locations and types of underground features are randomized on world creation, which allows to store other data in bits 2-7:

Bits 2-3: Monster density. 0 = no monsters, 3 = plenty of monsters.

Bits 4-5: Minimum level of monsters. 0 = 25% of player's level, 1 = 50%, 2 = 75%, 3 = 100%.

Bits 6-7: Maximum level of monsters. 0 = equal to minimum level, 1 = (minimum level * 1.5), 2 = * 2, 3 = * 3.

Green byte

Bits 0-1: Development type. 0 = wilderness, 1 = agriculture, 2 = village, 3 = town (will "fuse" with adjacent town tiles, so multi-tile cities are possible).

Bit 2: The tile has country road(s). They are generated in a way that they attach to roads on neighboring tiles.

Bit 3: The same, but with river(s).

Bit 4: The tile has a harbor where the player can rent a ship. Ignored if the tile doesn't border the sea.

Bit 5: The tile has stables where the player can rent a horse.

Bit 6: The tile has an airport where the player can rent an airship.

Blue byte

Bits 0-2: Elevation. 0 = ocean, 1 = plains, 2 = slightly hilly terrain, 3 = downs, 4 = mountains (tiles with mountains and no roads will be impassable)

Bits 3-4: Vegetation density. 0 = wasteland (no trees), 1 = grassland (some groups of trees), 2 = light forest (big tree groups), 3 = dense forest (impassable without a road)

Bits 5-7: Climate. Determines the type of ground, vegetation and weather patterns. 0 = alpine, 1 = boreal, 2 = temperate, 3 = subtropical, 4 = tropical


In addition to roads and rivers attaching to their counterparts on adjacent tiles, tile borders will also gradually assume landscape features of the respective neighbor tiles. This is important for example if the neighbor tile is an impassable mountain tile, so you can't get there by crossing that tile border. This zone along the edges will be refered to as the "transition zone" in this article.

Also, tiles will only attach along their four edges, not diagonally, so a tile touching the ocean with a corner will not have a coast.

The map grid cannot be free of human error, so a paper-stone-scissors system is needed to prevent generation of somewhat strange tiles. While the tile generator should be able to cope with something like a city with a harbor at a coast corner with a river attached to another river, there are other combinations that do not make much sense. The generator should take care of that. Examples:

  • High mountains + forest = no forest. Very high terrain is always treeless.
  • Village/town + missing road: Settlements are always assumed to have a road, so they will attach to adjacent tiles with a road automatically.
  • Dense forest + agriculture = no agriculture. While the generator should be able to generate crops/ranches of different sizes to fit well within the vegetation, a farm in the mid of a jungle doesn't make much sense, especially if the player cannot reach it.
  • Stables + no other stables = no stables. Stables allow you to travel to any other stable on the same landmass. If no other stables exist, what is the point of generating?

Details of tile generation Edit

  1. As a first step, the terrain heightfield would be generated using the existing code.

  2. Elevation adjustment: All height points are multiplied by a fixed factor according to whether the terrain is flatlands, hills etc.

  3. Coast line generation: Within a certain zone (the transition zone?) along edges that border the sea, the terrain is flattened and sloped downwards.

  4. River generation: Rivers would be created similar to shorelines by sinking the terrain below water level. It would be important to add some random variation to the process so it doesn't look like a canal.

  5. Road generation: Relatively straightforward, just flatten the terrain around the road. If a road crosses a river, the banks are leveled at that location to be on the same altitude and a bridge is generated.

  6. Infrastructure placement: Depends somewhat on the type of development assigned to the tile. Two common important aspects are that the terrain has to be leveled wherever a building is placed, and that all buildings can be reached by the player on a densely forested or mountainous tile. That would be best to manage by placing all buildings close to each other and next to the road or river, if existent.

    The game already has village generation code which is constantly improving. Towns would be different from villages though, as they would have a few internal roads and be much larger, extending until the transition zones (even until the tile border if the town continues on an adjacent tile).

    The transportation facilities (stables, harbor, airport) would also be coped with during infrastructure placement, preferably by placing them on the first opportunity. The harbor would be connected to the village/town with a road (in case the settlement doesn't extend to the shoreline), so it would have to be generated before all other buildings. If the tile has a dungeon entrance, it must be ensured that the player can reach it.

  7. Planting: Vegetation that suits the climate and elevation is placed.

How it changes gameplay Edit

There would still be a mission board where the player can select his current mission, but he won't be transported automagically to the destination anymore. Instead he would leave the headquarters through the entrance and end up on the world tile where Horghh is (or if Horghh is multi-tile, in the town district where HQ is located). Approaching the map edge at a non-blocked location, he would be able to enter the adjacent world tile. No time would elapse, as the tiles are directly next to each other. However, to make things easier to program, he would not neccessarily appear at the same position on the edge on the other tile. This is because tiles would not be seamless on the terrain level like in a flight simulator, as the player wouldn't see more than one at any time (the one he is on).

Means of travel

If the player whishes to reach a far away destination quickly, he will be able to utilize various transportation services. When travelling using one of these ways, time will elapse based on the distance to the destination and transportation speed.

  • Ship (slow): On tiles with a sea harbor, the player can rent a ship. He can reach all destinations with a sea harbor this way.
  • Horse (medium): On tiles with stables, the player can rent a horse. He can reach all destinations with stables which are on the same landmass this way.
  • Airship (fast): On tiles with an airport, the player can rent an airship. He can reach all destinations with an airport this way.
  • Magic (instant): there are several types of teleportation possible. Characters with a high affinity to a deity can travel to remote temples, mages with teleportation spells, students of arcane lore or investigators of forgotten machinery can all eventually achieve instantaneous methods of covering large distances.
  • Animal companion (varied): Players with animal or creature companions can take to the sky/road/water when upon their mounts.

How it can benefit the game Edit

Providing not only randomly generated dungeons, but also a randomly generated persistent outdoor world, replayability would be infinite. No other Free or commercial game has taken it to this level (I think), so it would make S.C.O.U.R.G.E. truly stand out from the crowd of roguelikes.