I haven't blogged in a while, even though I've been tapping away at the code I'm afraid little progress has been made. The main function I've been concentrating on creates a triangle list for a patch with respect to cracking and also holes or partial patches created by some but not all children being drawn. I wouldn't say that I'm a neat coder but I do know when things get out of hand - I really don't know how I can make this function any simpler. Because of this, I don't have much confidence in the code being bug free. However last night it all seemed to come together:
Until I saw this bastard hole at the bottom.
The thing is there are 56 (8 choose 2) different possible index layouts taking into consideration compensating for combinations of holes and cracking. I should either (1) write an automated test for each of these combinations or (2) start over. I've decided to be lazy and go for option 3, try to fix this one and hope it's the last. But I will make a public promise here in my blog that if there's another anomaly after this one I'll write tests for each case.
Let's be honest, if that happens I'll go for option 4 and edit the blog not to have any promise of doing testing at all.
No comments:
Post a Comment