The World Map

Chronicles uses 2D tiles like other RPG's but organizes the world into an arbitrary tree of map layers. In the end, every position in the entire game is in the same world coordinate system with all exteriors and interiors existing on the same continuous map.


To make this work performantly, the tiles are chunked and then stored in a QuadTree. Temporary static rendering takes place at higher zoom levels to allow you to fully explore and edit tiles even at a 10k x 10k scale while maintaining 60fps.

Buildings and towns and caves and dungeons and lakes and islands can all be separated into individual layers whose children will then be located relative to them. In the video I move a town to a different island layer and then move it around, which in turn moves around the town's child layer which is the buildings. I then add an event for a player origin so that when the game actually starts, it spawns a player-controlled actor at that point in the world. Moving the town would move this origin as well automatically!

The effect of all of this is new content can be created arbitrarily using the asset system. It's simple to mod in a new town or a new island on top of the existing geography and everything stacks up together.

A critical feature to this is that layers can be conditional based on the world state, allowing the world to change between runs. Towns can be destroyed, rivers flooded, bridges built, and all just by conditionally loading the correct layers when a run starts.

Querying the content of an individual tile in this massive world map is lightning-fast in this structure and allows a ton of freedom for creating content. Really proud of how all of this has come together!

#gamedev #chron4

| 🌐 | 🙋‍ | @britown@blog.brianna.town