Tuesday, May 1, 2007

Making One of those Weeks episode 14, part 3

More of Melee Combat has been posted. I have uncovered a few minor bugs, but nothing major yet so the chance of release this week is really good still. This means that the few people who follow this blog will be getting the next chapter of Making One of those Weeks at least a week early. Lets finish off the chapter.

Rendering a forest is the same as rendering other three-dimensional views, except the walls are trees. This actually makes the rendering easier. The trees I use are symmetrical. This means that unlike a wall, all the different views (left, right and center) of the tree are the same image. This makes a three dimensional forest very easy to draw.

To help with the variety of the forest, I tried to have three slightly different kinds of trees. The first tree is the normal tree. The other two are a taller version and a fatter version. While some people may have noticed the different trees, most people didn't notice any difference. In other words, a better approach at getting variety in the trees would have been to use three distinctly different looking trees.

One thing that I never even considered doing would be to grow the trees algorithmically. This is largely because the short amount of time that I have allocated to the creation of these episodes. Randomly generated trees could easily be seeded based on their location within the map, so every time the level is played, the trees would look the same. The quality of the trees could also be based on how fast the computer is, so faster computers could have more tree generation iterations, though I have never actually written an algorithm to generate a conifer (though I have written generators for deciduous trees and ferns) but I have seen such generators.

Because the renderer is the same one used in the earlier game, just with a different tile set for the "walls", there is no real need to go into the code of the game. The only real difference is that I added an additional depth level allowing the player to see deeper into the forest.

No comments: