Theming Our Dungeon

Learn how to implement a dungeon theme.

Now that we know how to use traits to make replaceable components, let’s give the game a bit more visual flair by substituting different map themes at runtime. Our dungeon could become a forest or anything else we can draw. Alongside varied map design, this also helps keep players interested.

Add a new trait defining a map theme in map_builder/mod.rs:

Get hands-on with 1200+ tech skills courses.