2012-08-23
2012-08-23
Zero Percent Game Dev - Code re-use
I felt like I collapsed hundreds of lines into a couple dozen, but it wasn't that severe. This will save me from writing the same lines of code in a hundred different places, though. Everywhere there is a reward, some code kicks in that lessens that reward based on how high your experience weight is. That is now a function in one place and if I come up with other things that can affect that, I only need to change it in one place.