Code QA / Error Checking

I was beginning wonder if you would address bounds checking and glad to see you previewed an approach at the end of this lecture.

Related - do you address other kinds of errors (systematically) like a Unit’s gridPosition member variable being out of sync with the GridSystem? Use of asserts or unit testing?

I missed one line of code earlier and had a very weird bug that I think could have been caught with maybe some testing hooks built into the code. I think having some of this could also help users debug their own code faster.

A note about me: I’m not an engineer, but I am familiar with basic code hygiene and system design concepts. I know some engineers like to build tests in parallel with the code development. But really, my practical experience with solving such problems is limited so this would be useful for someone like me. Especially interested in learning the game developer perspective where performance is critical.

Privacy & Terms