In previous article, we decide to change many system for enhancing game experience. Unfortunately, AI behavior and skill are typical complex system that need access information from environment and change some status. It is hard to prevent bug when changing a system which heavily depend on the interactions with other systems. Turns out, we need testing.
Because there are so many system and functionality, it is important to separate irrelevant codes and what we want to modify. To regularize exist systems, 3 kinds of testing are introduced:
- Unit Test – make sure fundamental components won’t be broken accidentally. We use haxe-utest to test Logger, Collision and other stable systems.
- Behavior Test – to ensure third-party library and system interactions work as expected. buddy is chosen to test Database, Tiled Loading, Path Finding and Behavior Tree modules and AI behavior.
- UI Test – use automation test to replace manual test for basic operation. We integrate Unity UI Test Automation into our game to simulate boring operation like toggle widget and drag/drop item.
To be honest, it is technically not formal TDD and BDD. However, testings are really help our development process. As game features change, testings got our back. Do you think test driven is suitable for game development? Would you consider using TDD in your game? Please leave your comment and share your ideas. (<ゝω・) ☆