After beating my head against the wall, I called in a friend to help look at and debug the code. If I were in a collaborative environment to begin with, I would have asked for another set of eyes sooner. But after lunch at a nearby sub shop, I had him poke at my code.
Although the exact error was not found at that time, he did show me some more tricks working with Visual Studio and at least gave me a fresh perspective on where to focus my search. After narrowing down the location, I was able to go back to the example code and figure out what I was missing.
In short, it was the typical "off by one" error. In this case I was using a <= when it should have been <. So after that was done, a few more errors in math were found in the rendering portion and finally I had completed the exercise. Now I have half of a nice random terrain generator.
This is designed for an RTS so it has peaks and valleys. I am not sure if I will have non-flat terrain in YAR itself, but it other aspects, such as path finding and object placement will be useful. Orginally I was thinking of doing a simple 2D iso tile system, but it seems fairly straight forward to do this as a terrain/texture mesh over a 3D surface, even if the surface is going to be flat. Since most of the heavy lifting has been done in DirectX (and OpenGL) like matrix transformations and what not, I might as well stay here as well. I will be easier to make it simpler later.
The Josh Strife Hayes Ultimate MMO Tier List
10 hours ago