Homebrew Worlds

Scripting Personal Project

Details

Duration: April 2019 - Ongoing
My Roles: Programmer, Game Designer
Team Size: 4

Engine: Unity
Platform: PC

Duration: April 2019 - Ongoing
My Roles: Programmer
Team Size: 4
Engine: Unity
Platform: PC

Description

Homebrew Worlds is a project I've been working on irregularly for quite some time. It still has a long way to go, but it's been a great way to get into Unity and C#.

Homebrew Worlds is a 3D map generator for Dungeons and Dragons, where the player can paint different terrain, colors, foliage and cities into an irregular grid in order to create their personal and immersive settings for D&D campaigns.

My Contributions

...

Terrain Generation

Scripting

  • In order to make the terrain easy to edit but still look fairly natural, we divided the terrain into voronoi cells, that each can be edited individually
  • Each terrain style that you can use is created through perlin noise, with a terrain curve to give the noise a specific expression
  • Borders between different terrains are smoothed by having both terrains slowly converge towards the same height
  • Using Unity Jobs and an event system, we regenerate each cell individually, using multiple threads, in order to allow the game to run even when things are generating
...

City and Path Generation

Scripting

  • Firstly I made a simple pathfinding algorithm in a hexagonal grid, that takes terrain elevation into account, which made pretty natural looking and sensible paths
  • This algorithm has then been tweaked to create areas instead of paths, where the area would prefer spilling into space with less elevation in the way in order to create the cities
  • Each hexagon would then be assigned into a tier based on how far it is from the center, and in each tier I generated a web of streets, covering the whole area
  • The borders between tiers were then covered by walls and the area between streets was covered with buildings

More Coming Soon

XS SM MD LG XL