5 ms·
Once I wrote my third game in Unity, with unit tests coverage of about 80%. It was least buggy game in my entire career. It was also the hardest time as I had t
by guzik 5y ago
Once I wrote my third game in Unity, with unit tests coverage of about 80%. It was least buggy game in my entire career. It was also the hardest time as I had to start thinking more about creating testable components rather than messy spaghetti code I used to write before.
- bobertlo 5y agoI’ve found that while I did spend a lot of time at first figuring out how to write testable code, I now am so much better at writing in this way that I am much more productive since everything has great test coverage. Saves me going back to modules I wrote 2 years ago to add features.
- jeddy3 5y agoThis is one of the best "side-effects" of testing, with the reasoning is that testable code is good code (as in modular, cohesive, etc...)
- eXpl0it3r 5y agoSince testing in game development is very much underrated, it would be interesting to hear more about this. Was this just as a hobby or is the game available somewhere? And have you ever done a demo/talk about how you've approached unit testing with Unity?
- gfxgirl 5y agonot unit testing but a good talk on one team's testing https://m.youtube.com/watch?v=m5zrfTFKf_E https://m.youtube.com/watch?v=m5zrfTFKf_E
- HelloNurse 5y agoGames are likely to benefit significantly from unit tests: architecture is complex and likely to be improved by adding clean boundaries and layers for the sake of testability; supporting automation is likely to enable useful features (e.g. deterministic simulations); tests are likely to be meaningful and important.
- HWR_14 5y agoHave you developed games at all, or are you just speaking from an armchair?
- kelseyfrog 5y agoAs a gamedev who writes unit tests, I agree with GP. Games benefit from unit tests. That, however, doesn't change the systemic incentives that prevent tests from being written. The ways that gamedev is budgeted/funded is a more important factor than more tests = a more stable/less buggy game.
- HWR_14 5y agoWhat engine do you use that supports a unit test framework?