System of building roles – Devlog #13

Viking City Builder

Pillage, set on fire and set a new village on the ashes of Europeans! Viking City Builder is a classic city builder game with real-time strategy elements that allows players to live through historic expansions of the Viking age.

[img]{STEAM_CLAN_IMAGE}/38753827/8a0e7e83dd4e902c3df6c264f41c50cacc550f54.png[/img] Hello Brothers and Sisters! Today we’d like to present you material slightly different than those we've published so far. Recently, one of our programmers - Dominik - volunteered to prepare a programming devlog. We thought 'why not' and let him take the initiative ;) So... We encourage you to check the material prepared by Dominik. You’ll find it below. [img]{STEAM_CLAN_IMAGE}/38753827/d014ef79fec858556e6ea4dc304ab3658650b9dc.png[/img] Earlier devlogs contained a lot of information about buildings and their functionalities. In our game, Viking City Builder, there are already a lot of them, but there will be even more of them ;) Each of these buildings is unique, you can distinguish several groups of buildings that serve different roles. Thanks to the fact, it’s easier to control it all and - if it goes well - there will be fewer bugs in the game ;) I’ll show you how it works on the example of Tailor. [img]{STEAM_CLAN_IMAGE}/38753827/c42077fe0d60c59354bf511c7a2d4603d0679bab.png[/img] I’ll start by showing you parameters such as Name, Icon and the 3D model that will represent this building. For the aforementioned Tailor, we can provide a 3D model of Longhouse - why not? ;) [img]{STEAM_CLAN_IMAGE}/38753827/7a70fbfa806c8296a8bb7dac71dc6fda89210e01.png[/img] Now let's move on to more important issues - the functionality of this building. Roles are responsible for this, which can be freely assigned and changed. At this point you can set such details as the maximum number of workers and what profession is responsible for the work in this building. [img]{STEAM_CLAN_IMAGE}/38753827/cda1fb3dec15d9e2d47fab7e1fc84487f0e5ab77.png[/img] In the Tailor building, resources are exchanged for others. In Viking City Builder, the Converter role is responsible for this. [img]{STEAM_CLAN_IMAGE}/38753827/3a4f29d74480cc341200e4c778f127014026809e.png[/img] Production processes define what specific resources are converted into what, in what quantities and how much labor this requires. For example: 3 x Yarn + 40 labor units = 1 clothing. [img]{STEAM_CLAN_IMAGE}/38753827/0d51508de2415ed654e42c5135128125833ca376.png[/img] The Converter role will also automatically create a backroom role - in this case, we don’t need to set it up specifically. This will provide the building with a warehouse in which to store resources. Now the code will automatically convert the building definition (not only the list of building instructions but also the building operation logic) at the time of construction to the actual building logic, so there’s no need to manually update it later. [img]{STEAM_CLAN_IMAGE}/38753827/d014ef79fec858556e6ea4dc304ab3658650b9dc.png[/img] Do you remember which building is mentioned in Dominik's text? If not, this is what Tailor will look like in our game. [img]{STEAM_CLAN_IMAGE}/38753827/6877e458b769c884076f8905f79a12b352370e59.gif[/img] Thanks for your attention! We hope you also liked this kind of material ;) Let us know what you think and if you'd like more programming devlogs! Also, don't forget to join our Discord and we'll hear from you soon! [url=https://discord.gg/yenDAYP5Ux][img]{STEAM_CLAN_IMAGE}/38753827/2724474b3f8a17c90fc924bcb14e6935f4553e22.gif[/img][/url]