Post feature RSS DevLog: Player Customized Village Building

A look at how we accomplished a customizeable village allowing the players to choose where each shop and house should go.

Posted by on

We've been using the Tiled map editor, which we used for our last game (Magnetta) as well. For anyone who hasn't tried this out its a really reasonablly priced software that makes map editing in a tile based game much easier. For our cancelled project Arizona we made our own tile map editor and it was much harder to use and added another set of development work in adding features and improving usability.

Our map sections in the overworld are each their own tiled map file including the Village map which is by far the most dense. Before being able to customize the village the map had objects where each building should be and if it was built it spawned the object and also placed the accompanying objects that surround it. With adding the ability to place shops and houses anywhere though we needed to come up with a different solution.

Original Village Tiled Map

Screenshot of Tiled Map Editor showing the village objects

We ended up making what we call the Lot system where there are Lot regions in the main Village map each with a unique index in the that can have something placed on them. We then made separate Tiled map files for each building type that contained the building, accompany objects, and collision laid out in a default Lot sized map. When a lot was marked as built on we grabbed the correct Tiled map data for the building type that was placed there and spawned the building object, added its collision to the main collision layer, and spawned the accompanying objects. In order to not have a bunch of empty area where the lots would be we placed trees, rocks, and other objects in the lots and marked them to be removed when that lot index had been built up.

Lot Based Village Tiled Map

Screenshot of Tiled Map Editor showing the new version with lot objects

Sample of a building lot that gets its objects and tiles loaded into one of the Lot slots.

Screenshot of Tiled Map Editor showing the Lot for the Heroes Shop

Gif showing a player purchasing and placing a new shop:

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.