All 2 entries tagged Grid
July 17, 2006
I posted just a few days ago slightly peeved at myself that I'd made such a rookie mistake with regards to my grid. Well, thankfully the fixes actually took a lot less time than I imagined, and by Saturday morning everything was in working order again with the new "4 squares" rather than two.
So soldiering on with Landscaping, and the GUI window associated with landscaping I did, and it's already looking fairly polished. Users can raise and lower land, and then use the level tool to flatten an area of land to a given height. I won't bore you too much with where the remaining areas are to polish up as they certainly won't be there too much longer.
Something that has worked surprisingly well was the small indicator (in fact, just a white cube) showing which vertex you are currently hovering over… something best demonstrated in a video!
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…