Producing and Gathering Resources
One of the most underrated features of an RTS game is resource gathering and production because, while battle and map exploration are important, only resource management can help the player get stronger than the opponent faster. Some resources are automatically generated, while others require that the player command their units to collect them, making this a crucial part of the game strategy.
In this chapter, we are going to learn how to create a system that will generate resources each second, with an option to generate them automatically or manually, depending on the configuration we are going to have in ScriptableObjects. We will also learn how to implement the automatic generation of Gold resources in our game scenes and the manual generation of Food and Wood resources, which will only happen when the player sends units to a specific GameObject with the
By the end of this chapter, you will have learned how to develop and...