Ugh. There is nothing worse than brittle code. A block of complex logic that completely falls apart when you modify it. As I've written about previously, I had to revisit the primary parser of my text-based game engine to accommodate non-player movement.
That is a brittle piece of code. One wrong move and the client piece completely breaks down. To address it at this time I've added comments walking through its logic. In time however I will need to toughen it up (Probably in iteration two - right before I begin the networked multi-player version of the engine. For now it works, and the NPCs are moving correctly, but I hate how touchy it is.
No comments:
Post a Comment