Summary
Through the explicit example of a watchtower in our example game, we learned a host of different techniques and considerations to improve efficiency in our systems. We applied the general technique of always trying to do less, by swapping a gated polling system for a killable update and event-driven systems. We used Unreal Engine-specific tools, such as the Timeline and Timers, to achieve these patterns, and we thought about how their application may affect the design of the gameplay beyond our numbers-based efficiency targets. The iterative process of improvement that this chapter focused on has also shown how to improve code in small measurable ways, using T(n) calculations to quantify each step. Moving forward, we will look at more general programming tools and their implementations within Unreal to expand this toolkit. The big takeaway is to break the problem down into its base parts and measure your improvements as you go. This will allow you to better communicate your...