All entries for Friday 14 July 2006
July 14, 2006
Well, there's no beating about the bush with this one, I've made a bit of a mistake. The problem isn't exactly easy to describe, but the crux of the matter is that 2 triangles per square isn't gonna cut it on the grid, I need to change for 4.
My plan for raising/lowering land (landscaping) was to be able to simply raise a corner, and have the four corresponding tiles (each corner is shared by 4 tiles) have their terrain change appropriately. As link demonstrates, the triangles to the left and right of the raised point are fine, the ones in front and behind are wrong.
So, the change to 4 triangles per grid square has a few of problems associated with it:
a) I need an extra vertex per square (in the middle) to be able to draw my 4 triangles, thus increasing memory requirements.
b) I have to draw twice as many triangles as I'd hoped, hurting performance there.
c) It's going to mean rewriting a substantial portion of the code I've already written, except this time, the rewrite is going to be even more difficult than it was before.
It certainly won't be impossible, and I should be able to have most of it back in order by the end of the weekend, but it's certainly a bit of a setback. On the bright side, once I'm done, I can demonstrate landscaping in a video, something I was about to do before I realised my mistake…