Tablescape

Back

Itch Page

Tablescape is a procedural map generator designed for tabletop role-playing games.

The project aims to assist game masters in visualizing their worlds and running their games, with flexible environments that embrace the unpredictability and on the fly nature of tabletop games.

Photo

Environment Mesh Generation

The current implementation of Tablescape is capable of generating 3D indoor environments. The environment mesh is generated at runtime, allowing for dynamic updates.

The mesh is constructed using an adaptation of the Marching squares algorithm, extended to generate a dynamic 3D mesh at each square position.

Environment Mesh Texturing

Texturing a procedural mesh can be a challenge, as UV coordinates are typically required to map a mesh's vertex positions onto a material. Generating UV coordinates alongside the mesh isn't always straightforward.

Texturing the floor of the environment was a relatively simple task, as all its vertices lie on the same X/Z plane. The X/Z position of each vertex could be directly used as its UV coordinates in its tiling texture.

A more complex solution was required for texturing the walls due to their irregular geometry. This was achieved with tri-planar mapping, which entirely removed the requirement for UV coordinates. Tri-planar mapping projects a texture onto 3D surfaces from the X, Y, and Z planes. The texture at each vertex is a weighted interpolation of the three projections, based on the orientation of the surface normal at that vertex. The current implementation for this is not perfect, as wall segments that don't align with either the X or Z projection end up with a blended, blurry texture.

Viewing Perspective

While the generated environment is 3D, Tablescape's role within tabletop games requires that environments can be viewed from a top down perspective and from any orientation. This made expressing depth in the environment a challenge, as a typical three-quarter perspective appears awkward when viewed from alternative angles.

Photo

Tablescape solves this issue with a technique inspired by the Betrayal at House on the Hill board game. Walls are inclined slightly outward so they are partially visible from a top-down perspective, similar to the game board tiles.

This incline helps to distinguish the ground plane as being at a lower elevation than the top of the walls, but it also results in walls that are thicker at their base. While this quirk is not a problem in the current implementation, it presents an interesting challenge for future features, such as how a door with a wider base would swing open.

The current implementation includes settings to adjust the wall incline, providing further flexibility for different use cases.

Future Of The Project

While I am passionate about this project, its ambitious scope has led me to put it on hold for the time being.

© Daniel John Miller