Re:“What Went Right and What Went Wrong”: Analysis of 155 Po...
by JabavuAdams on Saturday March 26, 2016 @06:29PM
(#11367752)
Unit testing makes a lot of sense for game engine code, but less so for game-logic code, which tends to be highly volatile and specified only qualitatively.
Re:“What Went Right and What Went Wrong”: Analysis of 155 Po...
by true_religion on Saturday March 26, 2016 @08:56PM
(#11368304)
A lot of bugs in games involve asking if state is X,Y,Z ... does A actually execute.
No!!
Testing is not merely about future proofing (although it's a really nice benefit), it's about proving that your code actually works now. By writing tests and verifying that they pass you can be sure that the code actually does what you think it does. Furthermore you can ensure that when other parts of the code changes your code still does what you think it does, which might be an issue tomorrow, next week, or in ten years.
\* note: Testing does not prove that your code is correct, only that it satisfies the conditions of the test. As with all engineering testing is only effective as the person implementing it.